summaryrefslogtreecommitdiff
path: root/python/mateweather.defs
blob: bfbf24a620211184edb64ec3633ad4602bbf1bc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
;; -*- scheme -*-
; boxed definitions ...

(define-boxed Location
  (in-module "MateWeather")
  (c-name "MateWeatherLocation")
  (gtype-id "MATEWEATHER_TYPE_LOCATION")
)

(define-boxed Timezone
  (in-module "MateWeather")
  (c-name "MateWeatherTimezone")
  (gtype-id "MATEWEATHER_TYPE_TIMEZONE")
)

; interface definitions ...

; object definitions ...

(define-object LocationEntry
  (in-module "MateWeather")
  (parent "GtkEntry")
  (c-name "MateWeatherLocationEntry")
  (gtype-id "MATEWEATHER_TYPE_LOCATION_ENTRY")
)

(define-object TimezoneMenu
  (in-module "MateWeather")
  (parent "GtkComboBox")
  (c-name "MateWeatherTimezoneMenu")
  (gtype-id "MATEWEATHER_TYPE_TIMEZONE_MENU")
)

; pointer definitions ...

;; Enumerations and Flags ...

(define-enum LocationLevel
  (in-module "MateWeather")
  (c-name "MateWeatherLocationLevel")
  (gtype-id "MATEWEATHER_TYPE_LOCATION_LEVEL")
  (values
    '("world" "MATEWEATHER_LOCATION_WORLD")
    '("region" "MATEWEATHER_LOCATION_REGION")
    '("country" "MATEWEATHER_LOCATION_COUNTRY")
    '("adm1" "MATEWEATHER_LOCATION_ADM1")
    '("adm2" "MATEWEATHER_LOCATION_ADM2")
    '("city" "MATEWEATHER_LOCATION_CITY")
    '("weather-station" "MATEWEATHER_LOCATION_WEATHER_STATION")
  )
)


;; From mateweather-enum-types.h

(define-function g_weather_location_level_get_type
  (c-name "g_weather_location_level_get_type")
  (return-type "GType")
)



;; From mateweather-location.h

(define-function location_get_type
  (c-name "mateweather_location_get_type")
  (return-type "GType")
)

(define-function location_new_world
  (c-name "mateweather_location_new_world")
  (return-type "MateWeatherLocation*")
  (parameters
    '("gboolean" "use_regions")
  )
)

(define-method ref
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_ref")
  (return-type "MateWeatherLocation*")
)

(define-method unref
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_unref")
  (return-type "none")
)

(define-method get_name
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_name")
  (return-type "const-char*")
)

(define-method get_sort_name
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_sort_name")
  (return-type "const-char*")
)

(define-method get_level
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_level")
  (return-type "MateWeatherLocationLevel")
)

(define-method get_parent
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_parent")
  (return-type "MateWeatherLocation*")
)

(define-method get_children
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_children")
  (return-type "MateWeatherLocation**")
)

(define-method free_children
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_free_children")
  (return-type "none")
  (parameters
    '("MateWeatherLocation**" "children")
  )
)

(define-method has_coords
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_has_coords")
  (return-type "gboolean")
)

(define-method get_coords
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_coords")
  (return-type "none")
  (parameters
    '("double*" "latitude")
    '("double*" "longitude")
  )
)

(define-method get_distance
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_distance")
  (return-type "double")
  (parameters
    '("MateWeatherLocation*" "loc2")
  )
)

(define-method get_country
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_country")
  (return-type "const-char*")
)

(define-method get_timezone
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_timezone")
  (return-type "MateWeatherTimezone*")
)

(define-method get_timezones
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_timezones")
  (return-type "MateWeatherTimezone**")
)

(define-method free_timezones
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_free_timezones")
  (return-type "none")
  (parameters
    '("MateWeatherTimezone**" "zones")
  )
)

(define-method get_code
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_code")
  (return-type "const-char*")
)

(define-method get_city_name
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_city_name")
  (return-type "char*")
)

(define-method get_weather
  (of-object "MateWeatherLocation")
  (c-name "mateweather_location_get_weather")
  (return-type "WeatherInfo*")
)



;; From mateweather-timezone.h

(define-function timezone_get_type
  (c-name "mateweather_timezone_get_type")
  (return-type "GType")
)

(define-method get_name
  (of-object "MateWeatherTimezone")
  (c-name "mateweather_timezone_get_name")
  (return-type "const-char*")
)

(define-method get_tzid
  (of-object "MateWeatherTimezone")
  (c-name "mateweather_timezone_get_tzid")
  (return-type "const-char*")
)

(define-method get_offset
  (of-object "MateWeatherTimezone")
  (c-name "mateweather_timezone_get_offset")
  (return-type "int")
)

(define-method has_dst
  (of-object "MateWeatherTimezone")
  (c-name "mateweather_timezone_has_dst")
  (return-type "gboolean")
)

(define-method get_dst_offset
  (of-object "MateWeatherTimezone")
  (c-name "mateweather_timezone_get_dst_offset")
  (return-type "int")
)

(define-method ref
  (of-object "MateWeatherTimezone")
  (c-name "mateweather_timezone_ref")
  (return-type "MateWeatherTimezone*")
)

(define-method unref
  (of-object "MateWeatherTimezone")
  (c-name "mateweather_timezone_unref")
  (return-type "none")
)



;; From location-entry.h

(define-function location_entry_get_type
  (c-name "mateweather_location_entry_get_type")
  (return-type "GType")
)

(define-function location_entry_new
  (c-name "mateweather_location_entry_new")
  (is-constructor-of "MateWeatherLocationEntry")
  (return-type "GtkWidget*")
  (properties
    '("top")
  )
)

(define-method set_location
  (of-object "MateWeatherLocationEntry")
  (c-name "mateweather_location_entry_set_location")
  (return-type "none")
  (parameters
    '("MateWeatherLocation*" "loc")
  )
)

(define-method get_location
  (of-object "MateWeatherLocationEntry")
  (c-name "mateweather_location_entry_get_location")
  (return-type "MateWeatherLocation*")
)

(define-method set_city
  (of-object "MateWeatherLocationEntry")
  (c-name "mateweather_location_entry_set_city")
  (return-type "none")
  (parameters
    '("const-char*" "city_name")
    '("const-char*" "code")
  )
)



;; From timezone-menu.h

(define-function timezone_menu_get_type
  (c-name "mateweather_timezone_menu_get_type")
  (return-type "GType")
)

(define-function timezone_menu_new
  (c-name "mateweather_timezone_menu_new")
  (is-constructor-of "MateWeatherTimezoneMenu")
  (return-type "GtkWidget*")
  (properties
    '("top")
  )
)

(define-method set_tzid
  (of-object "MateWeatherTimezoneMenu")
  (c-name "mateweather_timezone_menu_set_tzid")
  (return-type "none")
  (parameters
    '("const-char*" "tzid")
  )
)

(define-method get_tzid
  (of-object "MateWeatherTimezoneMenu")
  (c-name "mateweather_timezone_menu_get_tzid")
  (return-type "const-char*")
)