Branch data Line data Source code
1 : : /* 2 : : * Copyright (C) 2023 James Westman <james@jwestman.net> 3 : : * 4 : : * This library is free software; you can redistribute it and/or 5 : : * modify it under the terms of the GNU Lesser General Public 6 : : * License as published by the Free Software Foundation; either 7 : : * version 2.1 of the License, or (at your option) any later version. 8 : : * 9 : : * This library is distributed in the hope that it will be useful, 10 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 : : * Lesser General Public License for more details. 13 : : * 14 : : * You should have received a copy of the GNU Lesser General Public 15 : : * License along with this library; if not, see <https://www.gnu.org/licenses/>. 16 : : */ 17 : : 18 : : #pragma once 19 : : 20 : : #if !defined (__SHUMATE_SHUMATE_H_INSIDE__) && !defined (SHUMATE_COMPILATION) 21 : : #error "Only <shumate/shumate.h> can be included directly." 22 : : #endif 23 : : 24 : : #include <glib-object.h> 25 : : 26 : : G_BEGIN_DECLS 27 : : 28 : : #define SHUMATE_TYPE_DATA_SOURCE_REQUEST (shumate_data_source_request_get_type()) 29 [ + - + - : 66 : G_DECLARE_DERIVABLE_TYPE (ShumateDataSourceRequest, shumate_data_source_request, SHUMATE, DATA_SOURCE_REQUEST, GObject) - + ] 30 : : 31 : : 32 : : struct _ShumateDataSourceRequestClass 33 : : { 34 : : GObjectClass parent_class; 35 : : 36 : : /*< private >*/ 37 : : gpointer padding[16]; 38 : : }; 39 : : 40 : : ShumateDataSourceRequest *shumate_data_source_request_new (int x, 41 : : int y, 42 : : int zoom_level); 43 : : 44 : : int shumate_data_source_request_get_x (ShumateDataSourceRequest *self); 45 : : int shumate_data_source_request_get_y (ShumateDataSourceRequest *self); 46 : : int shumate_data_source_request_get_zoom_level (ShumateDataSourceRequest *self); 47 : : 48 : : GBytes *shumate_data_source_request_get_data (ShumateDataSourceRequest *self); 49 : : void shumate_data_source_request_emit_data (ShumateDataSourceRequest *self, 50 : : GBytes *data, 51 : : gboolean complete); 52 : : 53 : : GError *shumate_data_source_request_get_error (ShumateDataSourceRequest *self); 54 : : void shumate_data_source_request_emit_error (ShumateDataSourceRequest *self, 55 : : const GError *error); 56 : : 57 : : gboolean shumate_data_source_request_is_completed (ShumateDataSourceRequest *self); 58 : : void shumate_data_source_request_complete (ShumateDataSourceRequest *self); 59 : : 60 : : G_END_DECLS