@girs/osmgpsmap-1.0 1.0.0-4.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1742 @@
1
+ /*
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ */
7
+
8
+ import './osmgpsmap-1.0-ambient.d.ts';
9
+
10
+ /**
11
+ * OsmGpsMap-1.0
12
+ */
13
+
14
+ import type Gtk from '@girs/gtk-3.0';
15
+ import type xlib from '@girs/xlib-2.0';
16
+ import type Gdk from '@girs/gdk-3.0';
17
+ import type cairo from '@girs/cairo-1.0';
18
+ import type GObject from '@girs/gobject-2.0';
19
+ import type GLib from '@girs/glib-2.0';
20
+ import type Pango from '@girs/pango-1.0';
21
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
22
+ import type freetype2 from '@girs/freetype2-2.0';
23
+ import type Gio from '@girs/gio-2.0';
24
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
25
+ import type GModule from '@girs/gmodule-2.0';
26
+ import type Atk from '@girs/atk-1.0';
27
+
28
+ export namespace OsmGpsMap {
29
+ enum MapKey_t {
30
+ FULLSCREEN,
31
+ ZOOMIN,
32
+ ZOOMOUT,
33
+ UP,
34
+ DOWN,
35
+ LEFT,
36
+ RIGHT,
37
+ MAX,
38
+ }
39
+ enum MapSource_t {
40
+ NULL,
41
+ OPENSTREETMAP,
42
+ OPENSTREETMAP_RENDERER,
43
+ OPENAERIALMAP,
44
+ MAPS_FOR_FREE,
45
+ OPENCYCLEMAP,
46
+ OSM_PUBLIC_TRANSPORT,
47
+ GOOGLE_STREET,
48
+ GOOGLE_SATELLITE,
49
+ GOOGLE_HYBRID,
50
+ VIRTUAL_EARTH_STREET,
51
+ VIRTUAL_EARTH_SATELLITE,
52
+ VIRTUAL_EARTH_HYBRID,
53
+ OSMC_TRAILS,
54
+ LAST,
55
+ }
56
+ const MAP_CACHE_AUTO: string;
57
+ const MAP_CACHE_DISABLED: string;
58
+ const MAP_CACHE_FRIENDLY: string;
59
+ const MAP_INVALID: number;
60
+ module Map {
61
+ // Signal callback interfaces
62
+
63
+ interface Changed {
64
+ (): void;
65
+ }
66
+
67
+ // Constructor properties interface
68
+
69
+ interface ConstructorProps
70
+ extends Gtk.DrawingArea.ConstructorProps,
71
+ Atk.ImplementorIface.ConstructorProps,
72
+ Gtk.Buildable.ConstructorProps {
73
+ auto_center: boolean;
74
+ autoCenter: boolean;
75
+ auto_center_threshold: number;
76
+ autoCenterThreshold: number;
77
+ auto_download: boolean;
78
+ autoDownload: boolean;
79
+ drag_limit: number;
80
+ dragLimit: number;
81
+ gps_track_highlight_radius: number;
82
+ gpsTrackHighlightRadius: number;
83
+ gps_track_point_radius: number;
84
+ gpsTrackPointRadius: number;
85
+ gps_track_width: number;
86
+ gpsTrackWidth: number;
87
+ image_format: string;
88
+ imageFormat: string;
89
+ latitude: number;
90
+ longitude: number;
91
+ map_source: number;
92
+ mapSource: number;
93
+ map_x: number;
94
+ mapX: number;
95
+ map_y: number;
96
+ mapY: number;
97
+ max_zoom: number;
98
+ maxZoom: number;
99
+ min_zoom: number;
100
+ minZoom: number;
101
+ proxy_uri: string;
102
+ proxyUri: string;
103
+ record_trip_history: boolean;
104
+ recordTripHistory: boolean;
105
+ repo_uri: string;
106
+ repoUri: string;
107
+ show_gps_point: boolean;
108
+ showGpsPoint: boolean;
109
+ show_trip_history: boolean;
110
+ showTripHistory: boolean;
111
+ tile_cache: string;
112
+ tileCache: string;
113
+ tile_cache_base: string;
114
+ tileCacheBase: string;
115
+ tile_zoom_offset: number;
116
+ tileZoomOffset: number;
117
+ tiles_queued: number;
118
+ tilesQueued: number;
119
+ zoom: number;
120
+ }
121
+ }
122
+
123
+ class Map extends Gtk.DrawingArea implements Atk.ImplementorIface, Gtk.Buildable {
124
+ static $gtype: GObject.GType<Map>;
125
+
126
+ // Own properties of OsmGpsMap.Map
127
+
128
+ get auto_center(): boolean;
129
+ set auto_center(val: boolean);
130
+ get autoCenter(): boolean;
131
+ set autoCenter(val: boolean);
132
+ get auto_center_threshold(): number;
133
+ set auto_center_threshold(val: number);
134
+ get autoCenterThreshold(): number;
135
+ set autoCenterThreshold(val: number);
136
+ get auto_download(): boolean;
137
+ set auto_download(val: boolean);
138
+ get autoDownload(): boolean;
139
+ set autoDownload(val: boolean);
140
+ get drag_limit(): number;
141
+ get dragLimit(): number;
142
+ get gps_track_highlight_radius(): number;
143
+ set gps_track_highlight_radius(val: number);
144
+ get gpsTrackHighlightRadius(): number;
145
+ set gpsTrackHighlightRadius(val: number);
146
+ get gps_track_point_radius(): number;
147
+ set gps_track_point_radius(val: number);
148
+ get gpsTrackPointRadius(): number;
149
+ set gpsTrackPointRadius(val: number);
150
+ get gps_track_width(): number;
151
+ set gps_track_width(val: number);
152
+ get gpsTrackWidth(): number;
153
+ set gpsTrackWidth(val: number);
154
+ get image_format(): string;
155
+ get imageFormat(): string;
156
+ get latitude(): number;
157
+ get longitude(): number;
158
+ /**
159
+ * A #OsmGpsMapSource_t representing the tile repository to use
160
+ *
161
+ * <note>
162
+ * <para>
163
+ * If you do not wish to use the default map tiles (provided by OpenStreeMap)
164
+ * it is recommened that you set this property at construction, instead
165
+ * of setting #OsmGpsMap:repo-uri.
166
+ * </para>
167
+ * </note>
168
+ */
169
+ get map_source(): number;
170
+ set map_source(val: number);
171
+ /**
172
+ * A #OsmGpsMapSource_t representing the tile repository to use
173
+ *
174
+ * <note>
175
+ * <para>
176
+ * If you do not wish to use the default map tiles (provided by OpenStreeMap)
177
+ * it is recommened that you set this property at construction, instead
178
+ * of setting #OsmGpsMap:repo-uri.
179
+ * </para>
180
+ * </note>
181
+ */
182
+ get mapSource(): number;
183
+ set mapSource(val: number);
184
+ get map_x(): number;
185
+ get mapX(): number;
186
+ get map_y(): number;
187
+ get mapY(): number;
188
+ get max_zoom(): number;
189
+ get maxZoom(): number;
190
+ get min_zoom(): number;
191
+ get minZoom(): number;
192
+ get proxy_uri(): string;
193
+ get proxyUri(): string;
194
+ get record_trip_history(): boolean;
195
+ set record_trip_history(val: boolean);
196
+ get recordTripHistory(): boolean;
197
+ set recordTripHistory(val: boolean);
198
+ /**
199
+ * A URI string which defines the location and format to fetch tiles
200
+ * for the map. The string is of the format
201
+ * "http://tile.openstreetmap.org/&num;Z/&num;X/&num;Y.png". Characters
202
+ * that begin with &num; are treated as tokens and replaced according to
203
+ * the following rules;
204
+ *
205
+ * <itemizedlist>
206
+ * <listitem>
207
+ * <para>
208
+ * \#X - X-tile, slippy map format
209
+ * </para>
210
+ * </listitem>
211
+ * <listitem>
212
+ * <para>
213
+ * \#Y - Y-tile, slippy map format, mercator projection
214
+ * </para>
215
+ * </listitem>
216
+ * <listitem>
217
+ * <para>
218
+ * \#Z - Zoom level, where min_zoom &gt;= zoom &lt;= max_zoom
219
+ * </para>
220
+ * </listitem>
221
+ * <listitem>
222
+ * <para>
223
+ * \#S - Zoom level, where -max_zoom &gt;= (zoom-max_zoom) &lt;= min_zoom
224
+ * </para>
225
+ * </listitem>
226
+ * <listitem>
227
+ * <para>
228
+ * \#Q - Quad tree format, set of "qrts"
229
+ * </para>
230
+ * </listitem>
231
+ * <listitem>
232
+ * <para>
233
+ * \#Q0 - Quad tree format, set of "0123"
234
+ * </para>
235
+ * </listitem>
236
+ * <listitem>
237
+ * <para>
238
+ * \#YS - Not Implemented
239
+ * </para>
240
+ * </listitem>
241
+ * <listitem>
242
+ * <para>
243
+ * \#R - Random integer in range [0,4]
244
+ * </para>
245
+ * </listitem>
246
+ * </itemizedlist>
247
+ *
248
+ * <note>
249
+ * <para>
250
+ * If you do not wish to use the default map tiles (provided by OpenStreeMap)
251
+ * it is recommened that you use one of the predefined map sources, and thus
252
+ * you should construct the map by setting #OsmGpsMap:map-source and not
253
+ * #OsmGpsMap:repo-uri. The #OsmGpsMap:repo-uri property is primarily
254
+ * designed for applications that wish complete control of tile repository
255
+ * management, or wish to use #OsmGpsMap with a tile repository it does not
256
+ * explicitly support.
257
+ * </para>
258
+ * </note>
259
+ */
260
+ get repo_uri(): string;
261
+ /**
262
+ * A URI string which defines the location and format to fetch tiles
263
+ * for the map. The string is of the format
264
+ * "http://tile.openstreetmap.org/&num;Z/&num;X/&num;Y.png". Characters
265
+ * that begin with &num; are treated as tokens and replaced according to
266
+ * the following rules;
267
+ *
268
+ * <itemizedlist>
269
+ * <listitem>
270
+ * <para>
271
+ * \#X - X-tile, slippy map format
272
+ * </para>
273
+ * </listitem>
274
+ * <listitem>
275
+ * <para>
276
+ * \#Y - Y-tile, slippy map format, mercator projection
277
+ * </para>
278
+ * </listitem>
279
+ * <listitem>
280
+ * <para>
281
+ * \#Z - Zoom level, where min_zoom &gt;= zoom &lt;= max_zoom
282
+ * </para>
283
+ * </listitem>
284
+ * <listitem>
285
+ * <para>
286
+ * \#S - Zoom level, where -max_zoom &gt;= (zoom-max_zoom) &lt;= min_zoom
287
+ * </para>
288
+ * </listitem>
289
+ * <listitem>
290
+ * <para>
291
+ * \#Q - Quad tree format, set of "qrts"
292
+ * </para>
293
+ * </listitem>
294
+ * <listitem>
295
+ * <para>
296
+ * \#Q0 - Quad tree format, set of "0123"
297
+ * </para>
298
+ * </listitem>
299
+ * <listitem>
300
+ * <para>
301
+ * \#YS - Not Implemented
302
+ * </para>
303
+ * </listitem>
304
+ * <listitem>
305
+ * <para>
306
+ * \#R - Random integer in range [0,4]
307
+ * </para>
308
+ * </listitem>
309
+ * </itemizedlist>
310
+ *
311
+ * <note>
312
+ * <para>
313
+ * If you do not wish to use the default map tiles (provided by OpenStreeMap)
314
+ * it is recommened that you use one of the predefined map sources, and thus
315
+ * you should construct the map by setting #OsmGpsMap:map-source and not
316
+ * #OsmGpsMap:repo-uri. The #OsmGpsMap:repo-uri property is primarily
317
+ * designed for applications that wish complete control of tile repository
318
+ * management, or wish to use #OsmGpsMap with a tile repository it does not
319
+ * explicitly support.
320
+ * </para>
321
+ * </note>
322
+ */
323
+ get repoUri(): string;
324
+ /**
325
+ * Controls whether the current gps point is shown on the map. Note that
326
+ * for derived classes that implement the draw_gps_point vfunc, if this
327
+ * property is %FALSE
328
+ */
329
+ get show_gps_point(): boolean;
330
+ set show_gps_point(val: boolean);
331
+ /**
332
+ * Controls whether the current gps point is shown on the map. Note that
333
+ * for derived classes that implement the draw_gps_point vfunc, if this
334
+ * property is %FALSE
335
+ */
336
+ get showGpsPoint(): boolean;
337
+ set showGpsPoint(val: boolean);
338
+ get show_trip_history(): boolean;
339
+ set show_trip_history(val: boolean);
340
+ get showTripHistory(): boolean;
341
+ set showTripHistory(val: boolean);
342
+ /**
343
+ * Either a full path or one of the special format URIs
344
+ * #OSM_GPS_MAP_CACHE_DISABLED, #OSM_GPS_MAP_CACHE_AUTO,
345
+ * #OSM_GPS_MAP_CACHE_FRIENDLY. Also see #OsmGpsMap:tile-cache-base for a
346
+ * full understanding.
347
+ *
348
+ * #OSM_GPS_MAP_CACHE_DISABLED disables the on disk tile cache (so all tiles
349
+ * are fetched from the network. #OSM_GPS_MAP_CACHE_AUTO causes the tile
350
+ * cache to be /tile-cache-base/md5(repo-uri), where md5 is the md5sum
351
+ * of #OsmGpsMap:repo-uri. #OSM_GPS_MAP_CACHE_FRIENDLY
352
+ * causes the tile cache to be /tile-cache-base/friendlyname(repo-uri).
353
+ *
354
+ * Any other string is interpreted as a local path, i.e. /path/to/cache
355
+ */
356
+ get tile_cache(): string;
357
+ set tile_cache(val: string);
358
+ /**
359
+ * Either a full path or one of the special format URIs
360
+ * #OSM_GPS_MAP_CACHE_DISABLED, #OSM_GPS_MAP_CACHE_AUTO,
361
+ * #OSM_GPS_MAP_CACHE_FRIENDLY. Also see #OsmGpsMap:tile-cache-base for a
362
+ * full understanding.
363
+ *
364
+ * #OSM_GPS_MAP_CACHE_DISABLED disables the on disk tile cache (so all tiles
365
+ * are fetched from the network. #OSM_GPS_MAP_CACHE_AUTO causes the tile
366
+ * cache to be /tile-cache-base/md5(repo-uri), where md5 is the md5sum
367
+ * of #OsmGpsMap:repo-uri. #OSM_GPS_MAP_CACHE_FRIENDLY
368
+ * causes the tile cache to be /tile-cache-base/friendlyname(repo-uri).
369
+ *
370
+ * Any other string is interpreted as a local path, i.e. /path/to/cache
371
+ */
372
+ get tileCache(): string;
373
+ set tileCache(val: string);
374
+ /**
375
+ * The base directory of the tile cache when you have constructed
376
+ * the map with #OsmGpsMap:tile-cache set to #OSM_GPS_MAP_CACHE_AUTO or
377
+ * #OSM_GPS_MAP_CACHE_FRIENDLY
378
+ *
379
+ * The string is interpreted as a local path, i.e. /path/to/cache. If NULL
380
+ * is supplied, map tiles are cached starting in the users cache directory,
381
+ * (as outlined in the
382
+ * <ulink url="http://www.freedesktop.org/wiki/Specifications/basedir-spec">
383
+ * <citetitle>XDG Base Directory Specification</citetitle></ulink>). To get the
384
+ * base directory where map tiles will be cached call
385
+ * osm_gps_map_get_default_cache_directory()
386
+ */
387
+ get tile_cache_base(): string;
388
+ /**
389
+ * The base directory of the tile cache when you have constructed
390
+ * the map with #OsmGpsMap:tile-cache set to #OSM_GPS_MAP_CACHE_AUTO or
391
+ * #OSM_GPS_MAP_CACHE_FRIENDLY
392
+ *
393
+ * The string is interpreted as a local path, i.e. /path/to/cache. If NULL
394
+ * is supplied, map tiles are cached starting in the users cache directory,
395
+ * (as outlined in the
396
+ * <ulink url="http://www.freedesktop.org/wiki/Specifications/basedir-spec">
397
+ * <citetitle>XDG Base Directory Specification</citetitle></ulink>). To get the
398
+ * base directory where map tiles will be cached call
399
+ * osm_gps_map_get_default_cache_directory()
400
+ */
401
+ get tileCacheBase(): string;
402
+ get tile_zoom_offset(): number;
403
+ get tileZoomOffset(): number;
404
+ /**
405
+ * The number of tiles currently waiting to download. Connect to
406
+ * ::notify::tiles-queued if you want to be informed when this changes
407
+ */
408
+ get tiles_queued(): number;
409
+ /**
410
+ * The number of tiles currently waiting to download. Connect to
411
+ * ::notify::tiles-queued if you want to be informed when this changes
412
+ */
413
+ get tilesQueued(): number;
414
+ /**
415
+ * The map zoom level. Connect to ::notify::zoom if you want to be informed
416
+ * when this changes.
417
+ */
418
+ get zoom(): number;
419
+
420
+ // Constructors of OsmGpsMap.Map
421
+
422
+ constructor(properties?: Partial<Map.ConstructorProps>, ...args: any[]);
423
+
424
+ _init(...args: any[]): void;
425
+
426
+ static ['new'](): Map;
427
+
428
+ // Own signals of OsmGpsMap.Map
429
+
430
+ connect(id: string, callback: (...args: any[]) => any): number;
431
+ connect_after(id: string, callback: (...args: any[]) => any): number;
432
+ emit(id: string, ...args: any[]): void;
433
+ connect(signal: 'changed', callback: (_source: this) => void): number;
434
+ connect_after(signal: 'changed', callback: (_source: this) => void): number;
435
+ emit(signal: 'changed'): void;
436
+
437
+ // Own static methods of OsmGpsMap.Map
438
+
439
+ static get_default_cache_directory(): string;
440
+ static source_get_friendly_name(source: MapSource_t): string;
441
+ static source_get_image_format(source: MapSource_t): string;
442
+ static source_get_max_zoom(source: MapSource_t): number;
443
+ static source_get_min_zoom(source: MapSource_t): number;
444
+ static source_get_repo_uri(source: MapSource_t): string;
445
+ static source_is_valid(source: MapSource_t): boolean;
446
+
447
+ // Own virtual methods of OsmGpsMap.Map
448
+
449
+ vfunc_draw_gps_point(cr: cairo.Context): void;
450
+
451
+ // Own methods of OsmGpsMap.Map
452
+
453
+ /**
454
+ * Convert the given location on the globe to the corresponding
455
+ * pixel locations on the map.
456
+ * @param pt location
457
+ */
458
+ convert_geographic_to_screen(pt: MapPoint): [number, number];
459
+ /**
460
+ * Convert the given pixel location on the map into corresponding
461
+ * location on the globe
462
+ * @param pixel_x pixel location on map, x axis
463
+ * @param pixel_y pixel location on map, y axis
464
+ */
465
+ convert_screen_to_geographic(pixel_x: number, pixel_y: number): MapPoint;
466
+ /**
467
+ * Cancels all tiles currently being downloaded. Typically used if you wish to
468
+ * cacel a large number of tiles queued using osm_gps_map_download_maps()
469
+ */
470
+ download_cancel_all(): void;
471
+ /**
472
+ * Downloads all tiles over the supplied zoom range in the rectangular
473
+ * region specified by pt1 (north west corner) to pt2 (south east corner)
474
+ * @param pt1
475
+ * @param pt2
476
+ * @param zoom_start
477
+ * @param zoom_end
478
+ */
479
+ download_maps(pt1: MapPoint, pt2: MapPoint, zoom_start: number, zoom_end: number): void;
480
+ /**
481
+ * Returns the geographic locations of the bounding box describing the contents
482
+ * of the current window, i.e the top left and bottom right corners.
483
+ */
484
+ get_bbox(): [MapPoint, MapPoint];
485
+ /**
486
+ * A convenience function for getting the geographic location of events,
487
+ * such as mouse clicks, on the map
488
+ * @param event A #GtkEventButton that occured on the map
489
+ * @returns The point on the globe corresponding to the click
490
+ */
491
+ get_event_location(event: Gdk.EventButton): MapPoint;
492
+ get_scale(): number;
493
+ gps_add(latitude: number, longitude: number, heading: number): void;
494
+ gps_clear(): void;
495
+ gps_get_track(): MapTrack;
496
+ image_add(latitude: number, longitude: number, image: GdkPixbuf.Pixbuf): MapImage;
497
+ image_add_with_alignment(
498
+ latitude: number,
499
+ longitude: number,
500
+ image: GdkPixbuf.Pixbuf,
501
+ xalign: number,
502
+ yalign: number,
503
+ ): MapImage;
504
+ image_add_with_alignment_z(
505
+ latitude: number,
506
+ longitude: number,
507
+ image: GdkPixbuf.Pixbuf,
508
+ xalign: number,
509
+ yalign: number,
510
+ zorder: number,
511
+ ): MapImage;
512
+ image_add_z(latitude: number, longitude: number, image: GdkPixbuf.Pixbuf, zorder: number): MapImage;
513
+ image_remove(image: MapImage): boolean;
514
+ image_remove_all(): void;
515
+ layer_add(layer: MapLayer): void;
516
+ layer_remove(layer: MapLayer): boolean;
517
+ layer_remove_all(): void;
518
+ map_redraw(): boolean;
519
+ map_redraw_idle(): void;
520
+ polygon_add(poly: MapPolygon): void;
521
+ polygon_remove(poly: MapPolygon): boolean;
522
+ polygon_remove_all(): void;
523
+ /**
524
+ * Scrolls the map by `dx,` `dy` pixels (positive north, east)
525
+ * @param dx
526
+ * @param dy
527
+ */
528
+ scroll(dx: number, dy: number): void;
529
+ set_center(latitude: number, longitude: number): void;
530
+ set_center_and_zoom(latitude: number, longitude: number, zoom: number): void;
531
+ /**
532
+ * Associates a keyboard shortcut with the supplied `keyval`
533
+ * (as returned by #gdk_keyval_from_name or simiar). The action given in `key`
534
+ * will be triggered when the corresponding `keyval` is pressed. By default
535
+ * no keyboard shortcuts are associated.
536
+ * @param key a #OsmGpsMapKey_t
537
+ * @param keyval
538
+ */
539
+ set_keyboard_shortcut(key: MapKey_t, keyval: number): void;
540
+ set_zoom(zoom: number): number;
541
+ set_zoom_offset(zoom_offset: number): void;
542
+ track_add(track: MapTrack): void;
543
+ track_remove(track: MapTrack): boolean;
544
+ track_remove_all(): void;
545
+ /**
546
+ * Zoom and center the map so that both points fit inside the window.
547
+ * @param latitude1
548
+ * @param latitude2
549
+ * @param longitude1
550
+ * @param longitude2
551
+ */
552
+ zoom_fit_bbox(latitude1: number, latitude2: number, longitude1: number, longitude2: number): void;
553
+ zoom_in(): number;
554
+ zoom_out(): number;
555
+
556
+ // Inherited methods
557
+ /**
558
+ * Creates a binding between `source_property` on `source` and `target_property`
559
+ * on `target`.
560
+ *
561
+ * Whenever the `source_property` is changed the `target_property` is
562
+ * updated using the same value. For instance:
563
+ *
564
+ *
565
+ * ```c
566
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
567
+ * ```
568
+ *
569
+ *
570
+ * Will result in the "sensitive" property of the widget #GObject instance to be
571
+ * updated with the same value of the "active" property of the action #GObject
572
+ * instance.
573
+ *
574
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
575
+ * if `target_property` on `target` changes then the `source_property` on `source`
576
+ * will be updated as well.
577
+ *
578
+ * The binding will automatically be removed when either the `source` or the
579
+ * `target` instances are finalized. To remove the binding without affecting the
580
+ * `source` and the `target` you can just call g_object_unref() on the returned
581
+ * #GBinding instance.
582
+ *
583
+ * Removing the binding by calling g_object_unref() on it must only be done if
584
+ * the binding, `source` and `target` are only used from a single thread and it
585
+ * is clear that both `source` and `target` outlive the binding. Especially it
586
+ * is not safe to rely on this if the binding, `source` or `target` can be
587
+ * finalized from different threads. Keep another reference to the binding and
588
+ * use g_binding_unbind() instead to be on the safe side.
589
+ *
590
+ * A #GObject can have multiple bindings.
591
+ * @param source_property the property on @source to bind
592
+ * @param target the target #GObject
593
+ * @param target_property the property on @target to bind
594
+ * @param flags flags to pass to #GBinding
595
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
596
+ */
597
+ bind_property(
598
+ source_property: string,
599
+ target: GObject.Object,
600
+ target_property: string,
601
+ flags: GObject.BindingFlags,
602
+ ): GObject.Binding;
603
+ /**
604
+ * Complete version of g_object_bind_property().
605
+ *
606
+ * Creates a binding between `source_property` on `source` and `target_property`
607
+ * on `target,` allowing you to set the transformation functions to be used by
608
+ * the binding.
609
+ *
610
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
611
+ * if `target_property` on `target` changes then the `source_property` on `source`
612
+ * will be updated as well. The `transform_from` function is only used in case
613
+ * of bidirectional bindings, otherwise it will be ignored
614
+ *
615
+ * The binding will automatically be removed when either the `source` or the
616
+ * `target` instances are finalized. This will release the reference that is
617
+ * being held on the #GBinding instance; if you want to hold on to the
618
+ * #GBinding instance, you will need to hold a reference to it.
619
+ *
620
+ * To remove the binding, call g_binding_unbind().
621
+ *
622
+ * A #GObject can have multiple bindings.
623
+ *
624
+ * The same `user_data` parameter will be used for both `transform_to`
625
+ * and `transform_from` transformation functions; the `notify` function will
626
+ * be called once, when the binding is removed. If you need different data
627
+ * for each transformation function, please use
628
+ * g_object_bind_property_with_closures() instead.
629
+ * @param source_property the property on @source to bind
630
+ * @param target the target #GObject
631
+ * @param target_property the property on @target to bind
632
+ * @param flags flags to pass to #GBinding
633
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
634
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
635
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
636
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
637
+ */
638
+ bind_property_full(
639
+ source_property: string,
640
+ target: GObject.Object,
641
+ target_property: string,
642
+ flags: GObject.BindingFlags,
643
+ transform_to?: GObject.BindingTransformFunc | null,
644
+ transform_from?: GObject.BindingTransformFunc | null,
645
+ notify?: GLib.DestroyNotify | null,
646
+ ): GObject.Binding;
647
+ // Conflicted with GObject.Object.bind_property_full
648
+ bind_property_full(...args: never[]): any;
649
+ /**
650
+ * This function is intended for #GObject implementations to re-enforce
651
+ * a [floating][floating-ref] object reference. Doing this is seldom
652
+ * required: all #GInitiallyUnowneds are created with a floating reference
653
+ * which usually just needs to be sunken by calling g_object_ref_sink().
654
+ */
655
+ force_floating(): void;
656
+ /**
657
+ * Increases the freeze count on `object`. If the freeze count is
658
+ * non-zero, the emission of "notify" signals on `object` is
659
+ * stopped. The signals are queued until the freeze count is decreased
660
+ * to zero. Duplicate notifications are squashed so that at most one
661
+ * #GObject::notify signal is emitted for each property modified while the
662
+ * object is frozen.
663
+ *
664
+ * This is necessary for accessors that modify multiple properties to prevent
665
+ * premature notification while the object is still being modified.
666
+ */
667
+ freeze_notify(): void;
668
+ /**
669
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
670
+ * @param key name of the key for that association
671
+ * @returns the data if found, or %NULL if no such data exists.
672
+ */
673
+ get_data(key: string): any | null;
674
+ get_property(property_name: string): any;
675
+ /**
676
+ * This function gets back user data pointers stored via
677
+ * g_object_set_qdata().
678
+ * @param quark A #GQuark, naming the user data pointer
679
+ * @returns The user data pointer set, or %NULL
680
+ */
681
+ get_qdata(quark: GLib.Quark): any | null;
682
+ /**
683
+ * Gets `n_properties` properties for an `object`.
684
+ * Obtained properties will be set to `values`. All properties must be valid.
685
+ * Warnings will be emitted and undefined behaviour may result if invalid
686
+ * properties are passed in.
687
+ * @param names the names of each property to get
688
+ * @param values the values of each property to get
689
+ */
690
+ getv(names: string[], values: (GObject.Value | any)[]): void;
691
+ /**
692
+ * Checks whether `object` has a [floating][floating-ref] reference.
693
+ * @returns %TRUE if @object has a floating reference
694
+ */
695
+ is_floating(): boolean;
696
+ /**
697
+ * Emits a "notify" signal for the property `property_name` on `object`.
698
+ *
699
+ * When possible, eg. when signaling a property change from within the class
700
+ * that registered the property, you should use g_object_notify_by_pspec()
701
+ * instead.
702
+ *
703
+ * Note that emission of the notify signal may be blocked with
704
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
705
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
706
+ * called.
707
+ * @param property_name the name of a property installed on the class of @object.
708
+ */
709
+ notify(property_name: string): void;
710
+ /**
711
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
712
+ *
713
+ * This function omits the property name lookup, hence it is faster than
714
+ * g_object_notify().
715
+ *
716
+ * One way to avoid using g_object_notify() from within the
717
+ * class that registered the properties, and using g_object_notify_by_pspec()
718
+ * instead, is to store the GParamSpec used with
719
+ * g_object_class_install_property() inside a static array, e.g.:
720
+ *
721
+ *
722
+ * ```c
723
+ * typedef enum
724
+ * {
725
+ * PROP_FOO = 1,
726
+ * PROP_LAST
727
+ * } MyObjectProperty;
728
+ *
729
+ * static GParamSpec *properties[PROP_LAST];
730
+ *
731
+ * static void
732
+ * my_object_class_init (MyObjectClass *klass)
733
+ * {
734
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
735
+ * 0, 100,
736
+ * 50,
737
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
738
+ * g_object_class_install_property (gobject_class,
739
+ * PROP_FOO,
740
+ * properties[PROP_FOO]);
741
+ * }
742
+ * ```
743
+ *
744
+ *
745
+ * and then notify a change on the "foo" property with:
746
+ *
747
+ *
748
+ * ```c
749
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
750
+ * ```
751
+ *
752
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
753
+ */
754
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
755
+ /**
756
+ * Increases the reference count of `object`.
757
+ *
758
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
759
+ * of `object` will be propagated to the return type (using the GCC typeof()
760
+ * extension), so any casting the caller needs to do on the return type must be
761
+ * explicit.
762
+ * @returns the same @object
763
+ */
764
+ ref(): GObject.Object;
765
+ /**
766
+ * Increase the reference count of `object,` and possibly remove the
767
+ * [floating][floating-ref] reference, if `object` has a floating reference.
768
+ *
769
+ * In other words, if the object is floating, then this call "assumes
770
+ * ownership" of the floating reference, converting it to a normal
771
+ * reference by clearing the floating flag while leaving the reference
772
+ * count unchanged. If the object is not floating, then this call
773
+ * adds a new normal reference increasing the reference count by one.
774
+ *
775
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
776
+ * under the same conditions as for g_object_ref().
777
+ * @returns @object
778
+ */
779
+ ref_sink(): GObject.Object;
780
+ /**
781
+ * Releases all references to other objects. This can be used to break
782
+ * reference cycles.
783
+ *
784
+ * This function should only be called from object system implementations.
785
+ */
786
+ run_dispose(): void;
787
+ /**
788
+ * Each object carries around a table of associations from
789
+ * strings to pointers. This function lets you set an association.
790
+ *
791
+ * If the object already had an association with that name,
792
+ * the old association will be destroyed.
793
+ *
794
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
795
+ * This means a copy of `key` is kept permanently (even after `object` has been
796
+ * finalized) — so it is recommended to only use a small, bounded set of values
797
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
798
+ * @param key name of the key
799
+ * @param data data to associate with that key
800
+ */
801
+ set_data(key: string, data?: any | null): void;
802
+ set_property(property_name: string, value: any): void;
803
+ /**
804
+ * Remove a specified datum from the object's data associations,
805
+ * without invoking the association's destroy handler.
806
+ * @param key name of the key
807
+ * @returns the data if found, or %NULL if no such data exists.
808
+ */
809
+ steal_data(key: string): any | null;
810
+ /**
811
+ * This function gets back user data pointers stored via
812
+ * g_object_set_qdata() and removes the `data` from object
813
+ * without invoking its destroy() function (if any was
814
+ * set).
815
+ * Usually, calling this function is only required to update
816
+ * user data pointers with a destroy notifier, for example:
817
+ *
818
+ * ```c
819
+ * void
820
+ * object_add_to_user_list (GObject *object,
821
+ * const gchar *new_string)
822
+ * {
823
+ * // the quark, naming the object data
824
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
825
+ * // retrieve the old string list
826
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
827
+ *
828
+ * // prepend new string
829
+ * list = g_list_prepend (list, g_strdup (new_string));
830
+ * // this changed 'list', so we need to set it again
831
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
832
+ * }
833
+ * static void
834
+ * free_string_list (gpointer data)
835
+ * {
836
+ * GList *node, *list = data;
837
+ *
838
+ * for (node = list; node; node = node->next)
839
+ * g_free (node->data);
840
+ * g_list_free (list);
841
+ * }
842
+ * ```
843
+ *
844
+ * Using g_object_get_qdata() in the above example, instead of
845
+ * g_object_steal_qdata() would have left the destroy function set,
846
+ * and thus the partial string list would have been freed upon
847
+ * g_object_set_qdata_full().
848
+ * @param quark A #GQuark, naming the user data pointer
849
+ * @returns The user data pointer set, or %NULL
850
+ */
851
+ steal_qdata(quark: GLib.Quark): any | null;
852
+ /**
853
+ * Reverts the effect of a previous call to
854
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
855
+ * and when it reaches zero, queued "notify" signals are emitted.
856
+ *
857
+ * Duplicate notifications for each property are squashed so that at most one
858
+ * #GObject::notify signal is emitted for each property, in the reverse order
859
+ * in which they have been queued.
860
+ *
861
+ * It is an error to call this function when the freeze count is zero.
862
+ */
863
+ thaw_notify(): void;
864
+ /**
865
+ * Decreases the reference count of `object`. When its reference count
866
+ * drops to 0, the object is finalized (i.e. its memory is freed).
867
+ *
868
+ * If the pointer to the #GObject may be reused in future (for example, if it is
869
+ * an instance variable of another object), it is recommended to clear the
870
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
871
+ * invalid #GObject instance. Use g_clear_object() for this.
872
+ */
873
+ unref(): void;
874
+ /**
875
+ * This function essentially limits the life time of the `closure` to
876
+ * the life time of the object. That is, when the object is finalized,
877
+ * the `closure` is invalidated by calling g_closure_invalidate() on
878
+ * it, in order to prevent invocations of the closure with a finalized
879
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
880
+ * added as marshal guards to the `closure,` to ensure that an extra
881
+ * reference count is held on `object` during invocation of the
882
+ * `closure`. Usually, this function will be called on closures that
883
+ * use this `object` as closure data.
884
+ * @param closure #GClosure to watch
885
+ */
886
+ watch_closure(closure: GObject.Closure): void;
887
+ vfunc_constructed(): void;
888
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
889
+ vfunc_dispose(): void;
890
+ vfunc_finalize(): void;
891
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
892
+ /**
893
+ * Emits a "notify" signal for the property `property_name` on `object`.
894
+ *
895
+ * When possible, eg. when signaling a property change from within the class
896
+ * that registered the property, you should use g_object_notify_by_pspec()
897
+ * instead.
898
+ *
899
+ * Note that emission of the notify signal may be blocked with
900
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
901
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
902
+ * called.
903
+ * @param pspec
904
+ */
905
+ vfunc_notify(pspec: GObject.ParamSpec): void;
906
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
907
+ disconnect(id: number): void;
908
+ set(properties: { [key: string]: any }): void;
909
+ block_signal_handler(id: number): any;
910
+ unblock_signal_handler(id: number): any;
911
+ stop_emission_by_name(detailedName: string): any;
912
+ }
913
+
914
+ module MapImage {
915
+ // Constructor properties interface
916
+
917
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
918
+ pixbuf: GdkPixbuf.Pixbuf;
919
+ point: MapPoint;
920
+ rotation: number;
921
+ x_align: number;
922
+ xAlign: number;
923
+ y_align: number;
924
+ yAlign: number;
925
+ z_order: number;
926
+ zOrder: number;
927
+ }
928
+ }
929
+
930
+ class MapImage extends GObject.Object {
931
+ static $gtype: GObject.GType<MapImage>;
932
+
933
+ // Own properties of OsmGpsMap.MapImage
934
+
935
+ get pixbuf(): GdkPixbuf.Pixbuf;
936
+ set pixbuf(val: GdkPixbuf.Pixbuf);
937
+ get point(): MapPoint;
938
+ set point(val: MapPoint);
939
+ get rotation(): number;
940
+ set rotation(val: number);
941
+ get x_align(): number;
942
+ set x_align(val: number);
943
+ get xAlign(): number;
944
+ set xAlign(val: number);
945
+ get y_align(): number;
946
+ set y_align(val: number);
947
+ get yAlign(): number;
948
+ set yAlign(val: number);
949
+ get z_order(): number;
950
+ set z_order(val: number);
951
+ get zOrder(): number;
952
+ set zOrder(val: number);
953
+
954
+ // Constructors of OsmGpsMap.MapImage
955
+
956
+ constructor(properties?: Partial<MapImage.ConstructorProps>, ...args: any[]);
957
+
958
+ _init(...args: any[]): void;
959
+
960
+ static ['new'](): MapImage;
961
+
962
+ // Own methods of OsmGpsMap.MapImage
963
+
964
+ draw(cr: cairo.Context, rect: Gdk.Rectangle): void;
965
+ get_point(): MapPoint;
966
+ get_rotation(): number;
967
+ get_zorder(): number;
968
+ set_rotation(rot: number): void;
969
+ }
970
+
971
+ module MapOsd {
972
+ // Constructor properties interface
973
+
974
+ interface ConstructorProps extends GObject.Object.ConstructorProps, MapLayer.ConstructorProps {
975
+ dpad_radius: number;
976
+ dpadRadius: number;
977
+ osd_x: number;
978
+ osdX: number;
979
+ osd_y: number;
980
+ osdY: number;
981
+ show_coordinates: boolean;
982
+ showCoordinates: boolean;
983
+ show_crosshair: boolean;
984
+ showCrosshair: boolean;
985
+ show_dpad: boolean;
986
+ showDpad: boolean;
987
+ show_gps_in_dpad: boolean;
988
+ showGpsInDpad: boolean;
989
+ show_gps_in_zoom: boolean;
990
+ showGpsInZoom: boolean;
991
+ show_scale: boolean;
992
+ showScale: boolean;
993
+ show_zoom: boolean;
994
+ showZoom: boolean;
995
+ }
996
+ }
997
+
998
+ class MapOsd extends GObject.Object implements MapLayer {
999
+ static $gtype: GObject.GType<MapOsd>;
1000
+
1001
+ // Own properties of OsmGpsMap.MapOsd
1002
+
1003
+ /**
1004
+ * The dpad radius property.
1005
+ */
1006
+ get dpad_radius(): number;
1007
+ set dpad_radius(val: number);
1008
+ /**
1009
+ * The dpad radius property.
1010
+ */
1011
+ get dpadRadius(): number;
1012
+ set dpadRadius(val: number);
1013
+ /**
1014
+ * The osd x property.
1015
+ */
1016
+ get osd_x(): number;
1017
+ set osd_x(val: number);
1018
+ /**
1019
+ * The osd x property.
1020
+ */
1021
+ get osdX(): number;
1022
+ set osdX(val: number);
1023
+ /**
1024
+ * The osd y property.
1025
+ */
1026
+ get osd_y(): number;
1027
+ set osd_y(val: number);
1028
+ /**
1029
+ * The osd y property.
1030
+ */
1031
+ get osdY(): number;
1032
+ set osdY(val: number);
1033
+ /**
1034
+ * The show coordinates of map centre property.
1035
+ */
1036
+ get show_coordinates(): boolean;
1037
+ set show_coordinates(val: boolean);
1038
+ /**
1039
+ * The show coordinates of map centre property.
1040
+ */
1041
+ get showCoordinates(): boolean;
1042
+ set showCoordinates(val: boolean);
1043
+ /**
1044
+ * The show crosshair at map centre property.
1045
+ */
1046
+ get show_crosshair(): boolean;
1047
+ set show_crosshair(val: boolean);
1048
+ /**
1049
+ * The show crosshair at map centre property.
1050
+ */
1051
+ get showCrosshair(): boolean;
1052
+ set showCrosshair(val: boolean);
1053
+ /**
1054
+ * The show dpad for map navigation property.
1055
+ */
1056
+ get show_dpad(): boolean;
1057
+ set show_dpad(val: boolean);
1058
+ /**
1059
+ * The show dpad for map navigation property.
1060
+ */
1061
+ get showDpad(): boolean;
1062
+ set showDpad(val: boolean);
1063
+ /**
1064
+ * The show gps indicator in middle of dpad property.
1065
+ */
1066
+ get show_gps_in_dpad(): boolean;
1067
+ set show_gps_in_dpad(val: boolean);
1068
+ /**
1069
+ * The show gps indicator in middle of dpad property.
1070
+ */
1071
+ get showGpsInDpad(): boolean;
1072
+ set showGpsInDpad(val: boolean);
1073
+ /**
1074
+ * The show gps indicator in middle of zoom control property.
1075
+ */
1076
+ get show_gps_in_zoom(): boolean;
1077
+ set show_gps_in_zoom(val: boolean);
1078
+ /**
1079
+ * The show gps indicator in middle of zoom control property.
1080
+ */
1081
+ get showGpsInZoom(): boolean;
1082
+ set showGpsInZoom(val: boolean);
1083
+ /**
1084
+ * The show scale on the map property.
1085
+ */
1086
+ get show_scale(): boolean;
1087
+ set show_scale(val: boolean);
1088
+ /**
1089
+ * The show scale on the map property.
1090
+ */
1091
+ get showScale(): boolean;
1092
+ set showScale(val: boolean);
1093
+ /**
1094
+ * The show zoom control for map navigation property.
1095
+ */
1096
+ get show_zoom(): boolean;
1097
+ set show_zoom(val: boolean);
1098
+ /**
1099
+ * The show zoom control for map navigation property.
1100
+ */
1101
+ get showZoom(): boolean;
1102
+ set showZoom(val: boolean);
1103
+
1104
+ // Constructors of OsmGpsMap.MapOsd
1105
+
1106
+ constructor(properties?: Partial<MapOsd.ConstructorProps>, ...args: any[]);
1107
+
1108
+ _init(...args: any[]): void;
1109
+
1110
+ static ['new'](): MapOsd;
1111
+
1112
+ // Inherited methods
1113
+ busy(): boolean;
1114
+ button_press(map: Map, event: Gdk.EventButton): boolean;
1115
+ draw(map: Map, cr: cairo.Context): void;
1116
+ render(map: Map): void;
1117
+ vfunc_busy(): boolean;
1118
+ vfunc_button_press(map: Map, event: Gdk.EventButton): boolean;
1119
+ vfunc_draw(map: Map, cr: cairo.Context): void;
1120
+ vfunc_render(map: Map): void;
1121
+ /**
1122
+ * Creates a binding between `source_property` on `source` and `target_property`
1123
+ * on `target`.
1124
+ *
1125
+ * Whenever the `source_property` is changed the `target_property` is
1126
+ * updated using the same value. For instance:
1127
+ *
1128
+ *
1129
+ * ```c
1130
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
1131
+ * ```
1132
+ *
1133
+ *
1134
+ * Will result in the "sensitive" property of the widget #GObject instance to be
1135
+ * updated with the same value of the "active" property of the action #GObject
1136
+ * instance.
1137
+ *
1138
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1139
+ * if `target_property` on `target` changes then the `source_property` on `source`
1140
+ * will be updated as well.
1141
+ *
1142
+ * The binding will automatically be removed when either the `source` or the
1143
+ * `target` instances are finalized. To remove the binding without affecting the
1144
+ * `source` and the `target` you can just call g_object_unref() on the returned
1145
+ * #GBinding instance.
1146
+ *
1147
+ * Removing the binding by calling g_object_unref() on it must only be done if
1148
+ * the binding, `source` and `target` are only used from a single thread and it
1149
+ * is clear that both `source` and `target` outlive the binding. Especially it
1150
+ * is not safe to rely on this if the binding, `source` or `target` can be
1151
+ * finalized from different threads. Keep another reference to the binding and
1152
+ * use g_binding_unbind() instead to be on the safe side.
1153
+ *
1154
+ * A #GObject can have multiple bindings.
1155
+ * @param source_property the property on @source to bind
1156
+ * @param target the target #GObject
1157
+ * @param target_property the property on @target to bind
1158
+ * @param flags flags to pass to #GBinding
1159
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1160
+ */
1161
+ bind_property(
1162
+ source_property: string,
1163
+ target: GObject.Object,
1164
+ target_property: string,
1165
+ flags: GObject.BindingFlags,
1166
+ ): GObject.Binding;
1167
+ /**
1168
+ * Complete version of g_object_bind_property().
1169
+ *
1170
+ * Creates a binding between `source_property` on `source` and `target_property`
1171
+ * on `target,` allowing you to set the transformation functions to be used by
1172
+ * the binding.
1173
+ *
1174
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1175
+ * if `target_property` on `target` changes then the `source_property` on `source`
1176
+ * will be updated as well. The `transform_from` function is only used in case
1177
+ * of bidirectional bindings, otherwise it will be ignored
1178
+ *
1179
+ * The binding will automatically be removed when either the `source` or the
1180
+ * `target` instances are finalized. This will release the reference that is
1181
+ * being held on the #GBinding instance; if you want to hold on to the
1182
+ * #GBinding instance, you will need to hold a reference to it.
1183
+ *
1184
+ * To remove the binding, call g_binding_unbind().
1185
+ *
1186
+ * A #GObject can have multiple bindings.
1187
+ *
1188
+ * The same `user_data` parameter will be used for both `transform_to`
1189
+ * and `transform_from` transformation functions; the `notify` function will
1190
+ * be called once, when the binding is removed. If you need different data
1191
+ * for each transformation function, please use
1192
+ * g_object_bind_property_with_closures() instead.
1193
+ * @param source_property the property on @source to bind
1194
+ * @param target the target #GObject
1195
+ * @param target_property the property on @target to bind
1196
+ * @param flags flags to pass to #GBinding
1197
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
1198
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
1199
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
1200
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1201
+ */
1202
+ bind_property_full(
1203
+ source_property: string,
1204
+ target: GObject.Object,
1205
+ target_property: string,
1206
+ flags: GObject.BindingFlags,
1207
+ transform_to?: GObject.BindingTransformFunc | null,
1208
+ transform_from?: GObject.BindingTransformFunc | null,
1209
+ notify?: GLib.DestroyNotify | null,
1210
+ ): GObject.Binding;
1211
+ // Conflicted with GObject.Object.bind_property_full
1212
+ bind_property_full(...args: never[]): any;
1213
+ /**
1214
+ * This function is intended for #GObject implementations to re-enforce
1215
+ * a [floating][floating-ref] object reference. Doing this is seldom
1216
+ * required: all #GInitiallyUnowneds are created with a floating reference
1217
+ * which usually just needs to be sunken by calling g_object_ref_sink().
1218
+ */
1219
+ force_floating(): void;
1220
+ /**
1221
+ * Increases the freeze count on `object`. If the freeze count is
1222
+ * non-zero, the emission of "notify" signals on `object` is
1223
+ * stopped. The signals are queued until the freeze count is decreased
1224
+ * to zero. Duplicate notifications are squashed so that at most one
1225
+ * #GObject::notify signal is emitted for each property modified while the
1226
+ * object is frozen.
1227
+ *
1228
+ * This is necessary for accessors that modify multiple properties to prevent
1229
+ * premature notification while the object is still being modified.
1230
+ */
1231
+ freeze_notify(): void;
1232
+ /**
1233
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
1234
+ * @param key name of the key for that association
1235
+ * @returns the data if found, or %NULL if no such data exists.
1236
+ */
1237
+ get_data(key: string): any | null;
1238
+ get_property(property_name: string): any;
1239
+ /**
1240
+ * This function gets back user data pointers stored via
1241
+ * g_object_set_qdata().
1242
+ * @param quark A #GQuark, naming the user data pointer
1243
+ * @returns The user data pointer set, or %NULL
1244
+ */
1245
+ get_qdata(quark: GLib.Quark): any | null;
1246
+ /**
1247
+ * Gets `n_properties` properties for an `object`.
1248
+ * Obtained properties will be set to `values`. All properties must be valid.
1249
+ * Warnings will be emitted and undefined behaviour may result if invalid
1250
+ * properties are passed in.
1251
+ * @param names the names of each property to get
1252
+ * @param values the values of each property to get
1253
+ */
1254
+ getv(names: string[], values: (GObject.Value | any)[]): void;
1255
+ /**
1256
+ * Checks whether `object` has a [floating][floating-ref] reference.
1257
+ * @returns %TRUE if @object has a floating reference
1258
+ */
1259
+ is_floating(): boolean;
1260
+ /**
1261
+ * Emits a "notify" signal for the property `property_name` on `object`.
1262
+ *
1263
+ * When possible, eg. when signaling a property change from within the class
1264
+ * that registered the property, you should use g_object_notify_by_pspec()
1265
+ * instead.
1266
+ *
1267
+ * Note that emission of the notify signal may be blocked with
1268
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1269
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1270
+ * called.
1271
+ * @param property_name the name of a property installed on the class of @object.
1272
+ */
1273
+ notify(property_name: string): void;
1274
+ /**
1275
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
1276
+ *
1277
+ * This function omits the property name lookup, hence it is faster than
1278
+ * g_object_notify().
1279
+ *
1280
+ * One way to avoid using g_object_notify() from within the
1281
+ * class that registered the properties, and using g_object_notify_by_pspec()
1282
+ * instead, is to store the GParamSpec used with
1283
+ * g_object_class_install_property() inside a static array, e.g.:
1284
+ *
1285
+ *
1286
+ * ```c
1287
+ * typedef enum
1288
+ * {
1289
+ * PROP_FOO = 1,
1290
+ * PROP_LAST
1291
+ * } MyObjectProperty;
1292
+ *
1293
+ * static GParamSpec *properties[PROP_LAST];
1294
+ *
1295
+ * static void
1296
+ * my_object_class_init (MyObjectClass *klass)
1297
+ * {
1298
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
1299
+ * 0, 100,
1300
+ * 50,
1301
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
1302
+ * g_object_class_install_property (gobject_class,
1303
+ * PROP_FOO,
1304
+ * properties[PROP_FOO]);
1305
+ * }
1306
+ * ```
1307
+ *
1308
+ *
1309
+ * and then notify a change on the "foo" property with:
1310
+ *
1311
+ *
1312
+ * ```c
1313
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
1314
+ * ```
1315
+ *
1316
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
1317
+ */
1318
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
1319
+ /**
1320
+ * Increases the reference count of `object`.
1321
+ *
1322
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
1323
+ * of `object` will be propagated to the return type (using the GCC typeof()
1324
+ * extension), so any casting the caller needs to do on the return type must be
1325
+ * explicit.
1326
+ * @returns the same @object
1327
+ */
1328
+ ref(): GObject.Object;
1329
+ /**
1330
+ * Increase the reference count of `object,` and possibly remove the
1331
+ * [floating][floating-ref] reference, if `object` has a floating reference.
1332
+ *
1333
+ * In other words, if the object is floating, then this call "assumes
1334
+ * ownership" of the floating reference, converting it to a normal
1335
+ * reference by clearing the floating flag while leaving the reference
1336
+ * count unchanged. If the object is not floating, then this call
1337
+ * adds a new normal reference increasing the reference count by one.
1338
+ *
1339
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
1340
+ * under the same conditions as for g_object_ref().
1341
+ * @returns @object
1342
+ */
1343
+ ref_sink(): GObject.Object;
1344
+ /**
1345
+ * Releases all references to other objects. This can be used to break
1346
+ * reference cycles.
1347
+ *
1348
+ * This function should only be called from object system implementations.
1349
+ */
1350
+ run_dispose(): void;
1351
+ /**
1352
+ * Each object carries around a table of associations from
1353
+ * strings to pointers. This function lets you set an association.
1354
+ *
1355
+ * If the object already had an association with that name,
1356
+ * the old association will be destroyed.
1357
+ *
1358
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
1359
+ * This means a copy of `key` is kept permanently (even after `object` has been
1360
+ * finalized) — so it is recommended to only use a small, bounded set of values
1361
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
1362
+ * @param key name of the key
1363
+ * @param data data to associate with that key
1364
+ */
1365
+ set_data(key: string, data?: any | null): void;
1366
+ set_property(property_name: string, value: any): void;
1367
+ /**
1368
+ * Remove a specified datum from the object's data associations,
1369
+ * without invoking the association's destroy handler.
1370
+ * @param key name of the key
1371
+ * @returns the data if found, or %NULL if no such data exists.
1372
+ */
1373
+ steal_data(key: string): any | null;
1374
+ /**
1375
+ * This function gets back user data pointers stored via
1376
+ * g_object_set_qdata() and removes the `data` from object
1377
+ * without invoking its destroy() function (if any was
1378
+ * set).
1379
+ * Usually, calling this function is only required to update
1380
+ * user data pointers with a destroy notifier, for example:
1381
+ *
1382
+ * ```c
1383
+ * void
1384
+ * object_add_to_user_list (GObject *object,
1385
+ * const gchar *new_string)
1386
+ * {
1387
+ * // the quark, naming the object data
1388
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
1389
+ * // retrieve the old string list
1390
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
1391
+ *
1392
+ * // prepend new string
1393
+ * list = g_list_prepend (list, g_strdup (new_string));
1394
+ * // this changed 'list', so we need to set it again
1395
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
1396
+ * }
1397
+ * static void
1398
+ * free_string_list (gpointer data)
1399
+ * {
1400
+ * GList *node, *list = data;
1401
+ *
1402
+ * for (node = list; node; node = node->next)
1403
+ * g_free (node->data);
1404
+ * g_list_free (list);
1405
+ * }
1406
+ * ```
1407
+ *
1408
+ * Using g_object_get_qdata() in the above example, instead of
1409
+ * g_object_steal_qdata() would have left the destroy function set,
1410
+ * and thus the partial string list would have been freed upon
1411
+ * g_object_set_qdata_full().
1412
+ * @param quark A #GQuark, naming the user data pointer
1413
+ * @returns The user data pointer set, or %NULL
1414
+ */
1415
+ steal_qdata(quark: GLib.Quark): any | null;
1416
+ /**
1417
+ * Reverts the effect of a previous call to
1418
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
1419
+ * and when it reaches zero, queued "notify" signals are emitted.
1420
+ *
1421
+ * Duplicate notifications for each property are squashed so that at most one
1422
+ * #GObject::notify signal is emitted for each property, in the reverse order
1423
+ * in which they have been queued.
1424
+ *
1425
+ * It is an error to call this function when the freeze count is zero.
1426
+ */
1427
+ thaw_notify(): void;
1428
+ /**
1429
+ * Decreases the reference count of `object`. When its reference count
1430
+ * drops to 0, the object is finalized (i.e. its memory is freed).
1431
+ *
1432
+ * If the pointer to the #GObject may be reused in future (for example, if it is
1433
+ * an instance variable of another object), it is recommended to clear the
1434
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
1435
+ * invalid #GObject instance. Use g_clear_object() for this.
1436
+ */
1437
+ unref(): void;
1438
+ /**
1439
+ * This function essentially limits the life time of the `closure` to
1440
+ * the life time of the object. That is, when the object is finalized,
1441
+ * the `closure` is invalidated by calling g_closure_invalidate() on
1442
+ * it, in order to prevent invocations of the closure with a finalized
1443
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
1444
+ * added as marshal guards to the `closure,` to ensure that an extra
1445
+ * reference count is held on `object` during invocation of the
1446
+ * `closure`. Usually, this function will be called on closures that
1447
+ * use this `object` as closure data.
1448
+ * @param closure #GClosure to watch
1449
+ */
1450
+ watch_closure(closure: GObject.Closure): void;
1451
+ vfunc_constructed(): void;
1452
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
1453
+ vfunc_dispose(): void;
1454
+ vfunc_finalize(): void;
1455
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1456
+ /**
1457
+ * Emits a "notify" signal for the property `property_name` on `object`.
1458
+ *
1459
+ * When possible, eg. when signaling a property change from within the class
1460
+ * that registered the property, you should use g_object_notify_by_pspec()
1461
+ * instead.
1462
+ *
1463
+ * Note that emission of the notify signal may be blocked with
1464
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1465
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1466
+ * called.
1467
+ * @param pspec
1468
+ */
1469
+ vfunc_notify(pspec: GObject.ParamSpec): void;
1470
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1471
+ disconnect(id: number): void;
1472
+ set(properties: { [key: string]: any }): void;
1473
+ block_signal_handler(id: number): any;
1474
+ unblock_signal_handler(id: number): any;
1475
+ stop_emission_by_name(detailedName: string): any;
1476
+ }
1477
+
1478
+ module MapPolygon {
1479
+ // Constructor properties interface
1480
+
1481
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1482
+ editable: boolean;
1483
+ shaded: boolean;
1484
+ track: any;
1485
+ visible: boolean;
1486
+ }
1487
+ }
1488
+
1489
+ class MapPolygon extends GObject.Object {
1490
+ static $gtype: GObject.GType<MapPolygon>;
1491
+
1492
+ // Own properties of OsmGpsMap.MapPolygon
1493
+
1494
+ get editable(): boolean;
1495
+ set editable(val: boolean);
1496
+ get shaded(): boolean;
1497
+ set shaded(val: boolean);
1498
+ get track(): any;
1499
+ set track(val: any);
1500
+ get visible(): boolean;
1501
+ set visible(val: boolean);
1502
+
1503
+ // Constructors of OsmGpsMap.MapPolygon
1504
+
1505
+ constructor(properties?: Partial<MapPolygon.ConstructorProps>, ...args: any[]);
1506
+
1507
+ _init(...args: any[]): void;
1508
+
1509
+ static ['new'](): MapPolygon;
1510
+ }
1511
+
1512
+ module MapTrack {
1513
+ // Signal callback interfaces
1514
+
1515
+ interface PointAdded {
1516
+ (object: MapPoint): void;
1517
+ }
1518
+
1519
+ interface PointChanged {
1520
+ (object: number): void;
1521
+ }
1522
+
1523
+ interface PointInserted {
1524
+ (object: number): void;
1525
+ }
1526
+
1527
+ interface PointRemoved {
1528
+ (object: number): void;
1529
+ }
1530
+
1531
+ // Constructor properties interface
1532
+
1533
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1534
+ alpha: number;
1535
+ color: Gdk.RGBA;
1536
+ editable: boolean;
1537
+ line_width: number;
1538
+ lineWidth: number;
1539
+ track: any;
1540
+ visible: boolean;
1541
+ }
1542
+ }
1543
+
1544
+ class MapTrack extends GObject.Object {
1545
+ static $gtype: GObject.GType<MapTrack>;
1546
+
1547
+ // Own properties of OsmGpsMap.MapTrack
1548
+
1549
+ get alpha(): number;
1550
+ set alpha(val: number);
1551
+ get color(): Gdk.RGBA;
1552
+ set color(val: Gdk.RGBA);
1553
+ get editable(): boolean;
1554
+ set editable(val: boolean);
1555
+ get line_width(): number;
1556
+ set line_width(val: number);
1557
+ get lineWidth(): number;
1558
+ set lineWidth(val: number);
1559
+ get track(): any;
1560
+ get visible(): boolean;
1561
+ set visible(val: boolean);
1562
+
1563
+ // Constructors of OsmGpsMap.MapTrack
1564
+
1565
+ constructor(properties?: Partial<MapTrack.ConstructorProps>, ...args: any[]);
1566
+
1567
+ _init(...args: any[]): void;
1568
+
1569
+ static ['new'](): MapTrack;
1570
+
1571
+ // Own signals of OsmGpsMap.MapTrack
1572
+
1573
+ connect(id: string, callback: (...args: any[]) => any): number;
1574
+ connect_after(id: string, callback: (...args: any[]) => any): number;
1575
+ emit(id: string, ...args: any[]): void;
1576
+ connect(signal: 'point-added', callback: (_source: this, object: MapPoint) => void): number;
1577
+ connect_after(signal: 'point-added', callback: (_source: this, object: MapPoint) => void): number;
1578
+ emit(signal: 'point-added', object: MapPoint): void;
1579
+ connect(signal: 'point-changed', callback: (_source: this, object: number) => void): number;
1580
+ connect_after(signal: 'point-changed', callback: (_source: this, object: number) => void): number;
1581
+ emit(signal: 'point-changed', object: number): void;
1582
+ connect(signal: 'point-inserted', callback: (_source: this, object: number) => void): number;
1583
+ connect_after(signal: 'point-inserted', callback: (_source: this, object: number) => void): number;
1584
+ emit(signal: 'point-inserted', object: number): void;
1585
+ connect(signal: 'point-removed', callback: (_source: this, object: number) => void): number;
1586
+ connect_after(signal: 'point-removed', callback: (_source: this, object: number) => void): number;
1587
+ emit(signal: 'point-removed', object: number): void;
1588
+
1589
+ // Own methods of OsmGpsMap.MapTrack
1590
+
1591
+ /**
1592
+ * track (in,out): a #OsmGpsMapTrack
1593
+ * `point` (in): point to add
1594
+ * @param point
1595
+ */
1596
+ add_point(point: MapPoint): void;
1597
+ get_color(color: Gdk.RGBA): void;
1598
+ /**
1599
+ * `track` (in): a #OsmGpsMapTrack
1600
+ * @returns the length of the track in meters.
1601
+ */
1602
+ get_length(): number;
1603
+ get_point(pos: number): MapPoint;
1604
+ /**
1605
+ * `track` (in): a #OsmGpsMapTrack
1606
+ * @returns list of #OsmGpsMapPoint
1607
+ */
1608
+ get_points(): MapPoint[];
1609
+ insert_point(np: MapPoint, pos: number): void;
1610
+ n_points(): number;
1611
+ /**
1612
+ * `track` (in): a #OsmGpsMapTrack
1613
+ * @param pos Position of the point to remove
1614
+ */
1615
+ remove_point(pos: number): void;
1616
+ set_color(color: Gdk.RGBA): void;
1617
+ }
1618
+
1619
+ type MapClass = typeof Map;
1620
+ type MapImageClass = typeof MapImage;
1621
+ abstract class MapImagePrivate {
1622
+ static $gtype: GObject.GType<MapImagePrivate>;
1623
+
1624
+ // Constructors of OsmGpsMap.MapImagePrivate
1625
+
1626
+ _init(...args: any[]): void;
1627
+ }
1628
+
1629
+ type MapLayerIface = typeof MapLayer;
1630
+ type MapOsdClass = typeof MapOsd;
1631
+ abstract class MapOsdPrivate {
1632
+ static $gtype: GObject.GType<MapOsdPrivate>;
1633
+
1634
+ // Constructors of OsmGpsMap.MapOsdPrivate
1635
+
1636
+ _init(...args: any[]): void;
1637
+ }
1638
+
1639
+ class MapPoint {
1640
+ static $gtype: GObject.GType<MapPoint>;
1641
+
1642
+ // Own fields of OsmGpsMap.MapPoint
1643
+
1644
+ rlat: number;
1645
+ rlon: number;
1646
+
1647
+ // Constructors of OsmGpsMap.MapPoint
1648
+
1649
+ constructor(
1650
+ properties?: Partial<{
1651
+ rlat: number;
1652
+ rlon: number;
1653
+ }>,
1654
+ );
1655
+ _init(...args: any[]): void;
1656
+
1657
+ static new_degrees(lat: number, lon: number): MapPoint;
1658
+
1659
+ static new_radians(rlat: number, rlon: number): MapPoint;
1660
+
1661
+ // Own methods of OsmGpsMap.MapPoint
1662
+
1663
+ copy(): MapPoint;
1664
+ free(): void;
1665
+ /**
1666
+ * Returns the lagitude and longitude in degrees.
1667
+ * of the current window, i.e the top left and bottom right corners.
1668
+ */
1669
+ get_degrees(): [number, number];
1670
+ get_radians(rlat: number, rlon: number): void;
1671
+ set_degrees(lat: number, lon: number): void;
1672
+ set_radians(rlat: number, rlon: number): void;
1673
+ }
1674
+
1675
+ type MapPolygonClass = typeof MapPolygon;
1676
+ abstract class MapPolygonPrivate {
1677
+ static $gtype: GObject.GType<MapPolygonPrivate>;
1678
+
1679
+ // Constructors of OsmGpsMap.MapPolygonPrivate
1680
+
1681
+ _init(...args: any[]): void;
1682
+ }
1683
+
1684
+ abstract class MapPrivate {
1685
+ static $gtype: GObject.GType<MapPrivate>;
1686
+
1687
+ // Constructors of OsmGpsMap.MapPrivate
1688
+
1689
+ _init(...args: any[]): void;
1690
+ }
1691
+
1692
+ type MapTrackClass = typeof MapTrack;
1693
+ abstract class MapTrackPrivate {
1694
+ static $gtype: GObject.GType<MapTrackPrivate>;
1695
+
1696
+ // Constructors of OsmGpsMap.MapTrackPrivate
1697
+
1698
+ _init(...args: any[]): void;
1699
+ }
1700
+
1701
+ module MapLayer {
1702
+ // Constructor properties interface
1703
+
1704
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1705
+ }
1706
+
1707
+ export interface MapLayerNamespace {
1708
+ $gtype: GObject.GType<MapLayer>;
1709
+ prototype: MapLayer;
1710
+ }
1711
+ interface MapLayer extends GObject.Object {
1712
+ // Own methods of OsmGpsMap.MapLayer
1713
+
1714
+ busy(): boolean;
1715
+ button_press(map: Map, event: Gdk.EventButton): boolean;
1716
+ draw(map: Map, cr: cairo.Context): void;
1717
+ render(map: Map): void;
1718
+
1719
+ // Own virtual methods of OsmGpsMap.MapLayer
1720
+
1721
+ vfunc_busy(): boolean;
1722
+ vfunc_button_press(map: Map, event: Gdk.EventButton): boolean;
1723
+ vfunc_draw(map: Map, cr: cairo.Context): void;
1724
+ vfunc_render(map: Map): void;
1725
+ }
1726
+
1727
+ export const MapLayer: MapLayerNamespace;
1728
+
1729
+ /**
1730
+ * Name of the imported GIR library
1731
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
1732
+ */
1733
+ const __name__: string;
1734
+ /**
1735
+ * Version of the imported GIR library
1736
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
1737
+ */
1738
+ const __version__: string;
1739
+ }
1740
+
1741
+ export default OsmGpsMap;
1742
+ // END