| 1 | /// <reference path="./gio-2.0.d.ts" /> |
| 2 | /// <reference path="./gobject-2.0.d.ts" /> |
| 3 | /// <reference path="./glib-2.0.d.ts" /> |
| 4 | /// <reference path="./gmodule-2.0.d.ts" /> |
| 5 | |
| 6 | /** |
| 7 | * Type Definitions for Gjs (https://gjs.guide/) |
| 8 | * |
| 9 | * These type definitions are automatically generated, do not edit them by hand. |
| 10 | * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir |
| 11 | * |
| 12 | * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ... |
| 13 | */ |
| 14 | |
| 15 | declare module 'gi://Geoclue?version=2.0' { |
| 16 | // Module dependencies |
| 17 | import type Gio from 'gi://Gio?version=2.0'; |
| 18 | import type GObject from 'gi://GObject?version=2.0'; |
| 19 | import type GLib from 'gi://GLib?version=2.0'; |
| 20 | import type GModule from 'gi://GModule?version=2.0'; |
| 21 | |
| 22 | export namespace Geoclue { |
| 23 | /** |
| 24 | * Geoclue-2.0 |
| 25 | */ |
| 26 | |
| 27 | export namespace AccuracyLevel { |
| 28 | export const $gtype: GObject.GType<AccuracyLevel>; |
| 29 | } |
| 30 | |
| 31 | enum AccuracyLevel { |
| 32 | NONE, |
| 33 | COUNTRY, |
| 34 | CITY, |
| 35 | NEIGHBORHOOD, |
| 36 | STREET, |
| 37 | EXACT, |
| 38 | } |
| 39 | /** |
| 40 | * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page">org.freedesktop.GeoClue2.Client</link> D-Bus interface. |
| 41 | * @returns A #GDBusInterfaceInfo. Do not free. |
| 42 | */ |
| 43 | function client_interface_info(): Gio.DBusInterfaceInfo; |
| 44 | /** |
| 45 | * Overrides all #GObject properties in the #GClueClient interface for a concrete class. |
| 46 | * The properties are overridden in the order they are defined. |
| 47 | * @param klass The class structure for a #GObject derived class. |
| 48 | * @param property_id_begin The property id to assign to the first overridden property. |
| 49 | * @returns The last property id. |
| 50 | */ |
| 51 | function client_override_properties(klass: typeof GObject.Object, property_id_begin: number): number; |
| 52 | /** |
| 53 | * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Location.top_of_page">org.freedesktop.GeoClue2.Location</link> D-Bus interface. |
| 54 | * @returns A #GDBusInterfaceInfo. Do not free. |
| 55 | */ |
| 56 | function location_interface_info(): Gio.DBusInterfaceInfo; |
| 57 | /** |
| 58 | * Overrides all #GObject properties in the #GClueLocation interface for a concrete class. |
| 59 | * The properties are overridden in the order they are defined. |
| 60 | * @param klass The class structure for a #GObject derived class. |
| 61 | * @param property_id_begin The property id to assign to the first overridden property. |
| 62 | * @returns The last property id. |
| 63 | */ |
| 64 | function location_override_properties(klass: typeof GObject.Object, property_id_begin: number): number; |
| 65 | /** |
| 66 | * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Manager.top_of_page">org.freedesktop.GeoClue2.Manager</link> D-Bus interface. |
| 67 | * @returns A #GDBusInterfaceInfo. Do not free. |
| 68 | */ |
| 69 | function manager_interface_info(): Gio.DBusInterfaceInfo; |
| 70 | /** |
| 71 | * Overrides all #GObject properties in the #GClueManager interface for a concrete class. |
| 72 | * The properties are overridden in the order they are defined. |
| 73 | * @param klass The class structure for a #GObject derived class. |
| 74 | * @param property_id_begin The property id to assign to the first overridden property. |
| 75 | * @returns The last property id. |
| 76 | */ |
| 77 | function manager_override_properties(klass: typeof GObject.Object, property_id_begin: number): number; |
| 78 | |
| 79 | export namespace ClientProxyCreateFlags { |
| 80 | export const $gtype: GObject.GType<ClientProxyCreateFlags>; |
| 81 | } |
| 82 | |
| 83 | enum ClientProxyCreateFlags { |
| 84 | NONE, |
| 85 | AUTO_DELETE, |
| 86 | } |
| 87 | namespace ClientProxy { |
| 88 | // Constructor properties interface |
| 89 | |
| 90 | interface ConstructorProps |
| 91 | extends Gio.DBusProxy.ConstructorProps, |
| 92 | Client.ConstructorProps, |
| 93 | Gio.AsyncInitable.ConstructorProps, |
| 94 | Gio.DBusInterface.ConstructorProps, |
| 95 | Gio.Initable.ConstructorProps {} |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * The #GClueClientProxy structure contains only private data and should only be accessed using the provided API. |
| 100 | */ |
| 101 | class ClientProxy |
| 102 | extends Gio.DBusProxy |
| 103 | implements Client, Gio.AsyncInitable<ClientProxy>, Gio.DBusInterface, Gio.Initable |
| 104 | { |
| 105 | static $gtype: GObject.GType<ClientProxy>; |
| 106 | |
| 107 | // Constructors |
| 108 | |
| 109 | constructor(properties?: Partial<ClientProxy.ConstructorProps>, ...args: any[]); |
| 110 | |
| 111 | _init(...args: any[]): void; |
| 112 | |
| 113 | static new_finish(res: Gio.AsyncResult): ClientProxy; |
| 114 | // Conflicted with Gio.AsyncInitable.new_finish |
| 115 | |
| 116 | static new_finish(...args: never[]): any; |
| 117 | |
| 118 | static new_for_bus_finish(res: Gio.AsyncResult): ClientProxy; |
| 119 | |
| 120 | static new_for_bus_sync( |
| 121 | bus_type: Gio.BusType, |
| 122 | flags: Gio.DBusProxyFlags, |
| 123 | name: string, |
| 124 | object_path: string, |
| 125 | cancellable?: Gio.Cancellable | null, |
| 126 | ): ClientProxy; |
| 127 | // Conflicted with Gio.DBusProxy.new_for_bus_sync |
| 128 | |
| 129 | static new_for_bus_sync(...args: never[]): any; |
| 130 | |
| 131 | static new_sync( |
| 132 | connection: Gio.DBusConnection, |
| 133 | flags: Gio.DBusProxyFlags, |
| 134 | name: string | null, |
| 135 | object_path: string, |
| 136 | cancellable?: Gio.Cancellable | null, |
| 137 | ): ClientProxy; |
| 138 | // Conflicted with Gio.DBusProxy.new_sync |
| 139 | |
| 140 | static new_sync(...args: never[]): any; |
| 141 | |
| 142 | // Static methods |
| 143 | |
| 144 | /** |
| 145 | * A utility function to create a #GClueClientProxy without having to deal with |
| 146 | * a #GClueManager. See also gclue_client_proxy_create_full() which improves |
| 147 | * resource management. |
| 148 | * |
| 149 | * This is identitcal to calling gclue_client_proxy_create_full() without any |
| 150 | * flags set. |
| 151 | * |
| 152 | * See #gclue_client_proxy_create_sync() for the synchronous, blocking version |
| 153 | * of this function. |
| 154 | * @param desktop_id The desktop file id (the basename of the desktop file). |
| 155 | * @param accuracy_level The requested accuracy level as #GClueAccuracyLevel. |
| 156 | * @param cancellable A #GCancellable or %NULL. |
| 157 | * @param callback A #GAsyncReadyCallback to call when the results are ready. |
| 158 | */ |
| 159 | static create( |
| 160 | desktop_id: string, |
| 161 | accuracy_level: AccuracyLevel, |
| 162 | cancellable?: Gio.Cancellable | null, |
| 163 | callback?: Gio.AsyncReadyCallback<ClientProxy> | null, |
| 164 | ): void; |
| 165 | /** |
| 166 | * Finishes an operation started with gclue_client_proxy_create(). |
| 167 | * @param result The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_proxy_create(). |
| 168 | */ |
| 169 | static create_finish(result: Gio.AsyncResult): ClientProxy; |
| 170 | /** |
| 171 | * A utility function to create a #GClueClientProxy without having to deal with |
| 172 | * a #GClueManager. |
| 173 | * |
| 174 | * By setting the #GCLUE_CLIENT_PROXY_CREATE_AUTO_DELETE flag you can ensure |
| 175 | * that the client will be deleted again from the geoclue service when |
| 176 | * it is destroyed. This flag should be used unless you are doing explicit |
| 177 | * resource management. |
| 178 | * |
| 179 | * See #gclue_client_proxy_create_full_sync() for the synchronous, blocking |
| 180 | * version of this function. |
| 181 | * @param desktop_id The desktop file id (the basename of the desktop file). |
| 182 | * @param accuracy_level The requested accuracy level as #GClueAccuracyLevel. |
| 183 | * @param flags #GClueClientProxyCreateFlags to modify the creation. |
| 184 | * @param cancellable A #GCancellable or %NULL. |
| 185 | * @param callback A #GAsyncReadyCallback to call when the results are ready. |
| 186 | */ |
| 187 | static create_full( |
| 188 | desktop_id: string, |
| 189 | accuracy_level: AccuracyLevel, |
| 190 | flags: ClientProxyCreateFlags, |
| 191 | cancellable?: Gio.Cancellable | null, |
| 192 | callback?: Gio.AsyncReadyCallback<ClientProxy> | null, |
| 193 | ): void; |
| 194 | /** |
| 195 | * Finishes an operation started with gclue_client_proxy_create_full(). |
| 196 | * @param result The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_proxy_create(). |
| 197 | */ |
| 198 | static create_full_finish(result: Gio.AsyncResult): ClientProxy; |
| 199 | /** |
| 200 | * The synchronous and blocking version of #gclue_client_proxy_create_full(). |
| 201 | * |
| 202 | * By setting the #GCLUE_CLIENT_PROXY_CREATE_AUTO_DELETE flag you can ensure |
| 203 | * that the client will be deleted again from the geoclue service when |
| 204 | * it is destroyed. This flag should be used unless you are doing explicit |
| 205 | * resource management. |
| 206 | * @param desktop_id The desktop file id (the basename of the desktop file). |
| 207 | * @param accuracy_level The requested accuracy level as #GClueAccuracyLevel. |
| 208 | * @param flags #GClueClientProxyCreateFlags to modify the creation. |
| 209 | * @param cancellable A #GCancellable or %NULL. |
| 210 | */ |
| 211 | static create_full_sync( |
| 212 | desktop_id: string, |
| 213 | accuracy_level: AccuracyLevel, |
| 214 | flags: ClientProxyCreateFlags, |
| 215 | cancellable?: Gio.Cancellable | null, |
| 216 | ): ClientProxy; |
| 217 | /** |
| 218 | * The synchronous and blocking version of #gclue_client_proxy_create(). |
| 219 | * See also gclue_client_proxy_create_full_sync() which improves resource |
| 220 | * management. |
| 221 | * |
| 222 | * This function is identical to calling gclue_client_proxy_create_full_sync() |
| 223 | * without any flags set. |
| 224 | * @param desktop_id The desktop file id (the basename of the desktop file). |
| 225 | * @param accuracy_level The requested accuracy level as #GClueAccuracyLevel. |
| 226 | * @param cancellable A #GCancellable or %NULL. |
| 227 | */ |
| 228 | static create_sync( |
| 229 | desktop_id: string, |
| 230 | accuracy_level: AccuracyLevel, |
| 231 | cancellable?: Gio.Cancellable | null, |
| 232 | ): ClientProxy; |
| 233 | /** |
| 234 | * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page">org.freedesktop.GeoClue2.Client</link>. See g_dbus_proxy_new() for more details. |
| 235 | * |
| 236 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 237 | * You can then call gclue_client_proxy_new_finish() to get the result of the operation. |
| 238 | * |
| 239 | * See gclue_client_proxy_new_sync() for the synchronous, blocking version of this constructor. |
| 240 | * @param connection A #GDBusConnection. |
| 241 | * @param flags Flags from the #GDBusProxyFlags enumeration. |
| 242 | * @param name A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
| 243 | * @param object_path An object path. |
| 244 | * @param cancellable A #GCancellable or %NULL. |
| 245 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied. |
| 246 | */ |
| 247 | static ['new']( |
| 248 | connection: Gio.DBusConnection, |
| 249 | flags: Gio.DBusProxyFlags, |
| 250 | name: string | null, |
| 251 | object_path: string, |
| 252 | cancellable?: Gio.Cancellable | null, |
| 253 | callback?: Gio.AsyncReadyCallback<ClientProxy> | null, |
| 254 | ): void; |
| 255 | // Conflicted with Gio.DBusProxy.new |
| 256 | static ['new'](...args: never[]): any; |
| 257 | /** |
| 258 | * Like gclue_client_proxy_new() but takes a #GBusType instead of a #GDBusConnection. |
| 259 | * |
| 260 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 261 | * You can then call gclue_client_proxy_new_for_bus_finish() to get the result of the operation. |
| 262 | * |
| 263 | * See gclue_client_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. |
| 264 | * @param bus_type A #GBusType. |
| 265 | * @param flags Flags from the #GDBusProxyFlags enumeration. |
| 266 | * @param name A bus name (well-known or unique). |
| 267 | * @param object_path An object path. |
| 268 | * @param cancellable A #GCancellable or %NULL. |
| 269 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied. |
| 270 | */ |
| 271 | static new_for_bus( |
| 272 | bus_type: Gio.BusType, |
| 273 | flags: Gio.DBusProxyFlags, |
| 274 | name: string, |
| 275 | object_path: string, |
| 276 | cancellable?: Gio.Cancellable | null, |
| 277 | callback?: Gio.AsyncReadyCallback<ClientProxy> | null, |
| 278 | ): void; |
| 279 | // Conflicted with Gio.DBusProxy.new_for_bus |
| 280 | static new_for_bus(...args: never[]): any; |
| 281 | |
| 282 | // Inherited properties |
| 283 | /** |
| 284 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Active">"Active"</link>. |
| 285 | * |
| 286 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 287 | */ |
| 288 | get active(): boolean; |
| 289 | set active(val: boolean); |
| 290 | /** |
| 291 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link>. |
| 292 | * |
| 293 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 294 | */ |
| 295 | get desktop_id(): string; |
| 296 | set desktop_id(val: string); |
| 297 | /** |
| 298 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link>. |
| 299 | * |
| 300 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 301 | */ |
| 302 | get desktopId(): string; |
| 303 | set desktopId(val: string); |
| 304 | /** |
| 305 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link>. |
| 306 | * |
| 307 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 308 | */ |
| 309 | get distance_threshold(): number; |
| 310 | set distance_threshold(val: number); |
| 311 | /** |
| 312 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link>. |
| 313 | * |
| 314 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 315 | */ |
| 316 | get distanceThreshold(): number; |
| 317 | set distanceThreshold(val: number); |
| 318 | /** |
| 319 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link>. |
| 320 | * |
| 321 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 322 | */ |
| 323 | get location(): string; |
| 324 | set location(val: string); |
| 325 | /** |
| 326 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link>. |
| 327 | * |
| 328 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 329 | */ |
| 330 | get requested_accuracy_level(): number; |
| 331 | set requested_accuracy_level(val: number); |
| 332 | /** |
| 333 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link>. |
| 334 | * |
| 335 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 336 | */ |
| 337 | get requestedAccuracyLevel(): number; |
| 338 | set requestedAccuracyLevel(val: number); |
| 339 | /** |
| 340 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link>. |
| 341 | * |
| 342 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 343 | */ |
| 344 | get time_threshold(): number; |
| 345 | set time_threshold(val: number); |
| 346 | /** |
| 347 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link>. |
| 348 | * |
| 349 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 350 | */ |
| 351 | get timeThreshold(): number; |
| 352 | set timeThreshold(val: number); |
| 353 | |
| 354 | // Inherited methods |
| 355 | /** |
| 356 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. |
| 357 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 358 | * You can then call gclue_client_call_start_finish() to get the result of the operation. |
| 359 | * |
| 360 | * See gclue_client_call_start_sync() for the synchronous, blocking version of this method. |
| 361 | * @param cancellable A #GCancellable or %NULL. |
| 362 | */ |
| 363 | call_start(cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 364 | /** |
| 365 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. |
| 366 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 367 | * You can then call gclue_client_call_start_finish() to get the result of the operation. |
| 368 | * |
| 369 | * See gclue_client_call_start_sync() for the synchronous, blocking version of this method. |
| 370 | * @param cancellable A #GCancellable or %NULL. |
| 371 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 372 | */ |
| 373 | call_start(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void; |
| 374 | /** |
| 375 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. |
| 376 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 377 | * You can then call gclue_client_call_start_finish() to get the result of the operation. |
| 378 | * |
| 379 | * See gclue_client_call_start_sync() for the synchronous, blocking version of this method. |
| 380 | * @param cancellable A #GCancellable or %NULL. |
| 381 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 382 | */ |
| 383 | call_start( |
| 384 | cancellable?: Gio.Cancellable | null, |
| 385 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 386 | ): Promise<boolean> | void; |
| 387 | /** |
| 388 | * Finishes an operation started with gclue_client_call_start(). |
| 389 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_call_start(). |
| 390 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 391 | */ |
| 392 | call_start_finish(res: Gio.AsyncResult): boolean; |
| 393 | /** |
| 394 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 395 | * |
| 396 | * See gclue_client_call_start() for the asynchronous version of this method. |
| 397 | * @param cancellable A #GCancellable or %NULL. |
| 398 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 399 | */ |
| 400 | call_start_sync(cancellable?: Gio.Cancellable | null): boolean; |
| 401 | /** |
| 402 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. |
| 403 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 404 | * You can then call gclue_client_call_stop_finish() to get the result of the operation. |
| 405 | * |
| 406 | * See gclue_client_call_stop_sync() for the synchronous, blocking version of this method. |
| 407 | * @param cancellable A #GCancellable or %NULL. |
| 408 | */ |
| 409 | call_stop(cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 410 | /** |
| 411 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. |
| 412 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 413 | * You can then call gclue_client_call_stop_finish() to get the result of the operation. |
| 414 | * |
| 415 | * See gclue_client_call_stop_sync() for the synchronous, blocking version of this method. |
| 416 | * @param cancellable A #GCancellable or %NULL. |
| 417 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 418 | */ |
| 419 | call_stop(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void; |
| 420 | /** |
| 421 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. |
| 422 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 423 | * You can then call gclue_client_call_stop_finish() to get the result of the operation. |
| 424 | * |
| 425 | * See gclue_client_call_stop_sync() for the synchronous, blocking version of this method. |
| 426 | * @param cancellable A #GCancellable or %NULL. |
| 427 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 428 | */ |
| 429 | call_stop( |
| 430 | cancellable?: Gio.Cancellable | null, |
| 431 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 432 | ): Promise<boolean> | void; |
| 433 | /** |
| 434 | * Finishes an operation started with gclue_client_call_stop(). |
| 435 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_call_stop(). |
| 436 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 437 | */ |
| 438 | call_stop_finish(res: Gio.AsyncResult): boolean; |
| 439 | /** |
| 440 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 441 | * |
| 442 | * See gclue_client_call_stop() for the asynchronous version of this method. |
| 443 | * @param cancellable A #GCancellable or %NULL. |
| 444 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 445 | */ |
| 446 | call_stop_sync(cancellable?: Gio.Cancellable | null): boolean; |
| 447 | /** |
| 448 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 449 | * |
| 450 | * This method will free `invocation,` you cannot use it afterwards. |
| 451 | * @param invocation A #GDBusMethodInvocation. |
| 452 | */ |
| 453 | complete_start(invocation: Gio.DBusMethodInvocation): void; |
| 454 | /** |
| 455 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 456 | * |
| 457 | * This method will free `invocation,` you cannot use it afterwards. |
| 458 | * @param invocation A #GDBusMethodInvocation. |
| 459 | */ |
| 460 | complete_stop(invocation: Gio.DBusMethodInvocation): void; |
| 461 | /** |
| 462 | * Emits the <link linkend="gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated">"LocationUpdated"</link> D-Bus signal. |
| 463 | * @param arg_old Argument to pass with the signal. |
| 464 | * @param arg_new Argument to pass with the signal. |
| 465 | */ |
| 466 | emit_location_updated(arg_old: string, arg_new: string): void; |
| 467 | /** |
| 468 | * Handler for the #GClueClient::handle-start signal. |
| 469 | * @param invocation |
| 470 | */ |
| 471 | vfunc_handle_start(invocation: Gio.DBusMethodInvocation): boolean; |
| 472 | /** |
| 473 | * Handler for the #GClueClient::handle-stop signal. |
| 474 | * @param invocation |
| 475 | */ |
| 476 | vfunc_handle_stop(invocation: Gio.DBusMethodInvocation): boolean; |
| 477 | /** |
| 478 | * Handler for the #GClueClient::location-updated signal. |
| 479 | * @param arg_old |
| 480 | * @param arg_new |
| 481 | */ |
| 482 | vfunc_location_updated(arg_old: string, arg_new: string): void; |
| 483 | /** |
| 484 | * Starts asynchronous initialization of the object implementing the |
| 485 | * interface. This must be done before any real use of the object after |
| 486 | * initial construction. If the object also implements #GInitable you can |
| 487 | * optionally call g_initable_init() instead. |
| 488 | * |
| 489 | * This method is intended for language bindings. If writing in C, |
| 490 | * g_async_initable_new_async() should typically be used instead. |
| 491 | * |
| 492 | * When the initialization is finished, `callback` will be called. You can |
| 493 | * then call g_async_initable_init_finish() to get the result of the |
| 494 | * initialization. |
| 495 | * |
| 496 | * Implementations may also support cancellation. If `cancellable` is not |
| 497 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 498 | * object from another thread. If the operation was cancelled, the error |
| 499 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 500 | * the object doesn't support cancellable initialization, the error |
| 501 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 502 | * |
| 503 | * As with #GInitable, if the object is not initialized, or initialization |
| 504 | * returns with an error, then all operations on the object except |
| 505 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 506 | * have undefined behaviour. They will often fail with g_critical() or |
| 507 | * g_warning(), but this must not be relied on. |
| 508 | * |
| 509 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 510 | * be initialized multiple times; for more information, see g_initable_init(). |
| 511 | * If a class explicitly supports being initialized multiple times, |
| 512 | * implementation requires yielding all subsequent calls to init_async() on the |
| 513 | * results of the first call. |
| 514 | * |
| 515 | * For classes that also support the #GInitable interface, the default |
| 516 | * implementation of this method will run the g_initable_init() function |
| 517 | * in a thread, so if you want to support asynchronous initialization via |
| 518 | * threads, just implement the #GAsyncInitable interface without overriding |
| 519 | * any interface methods. |
| 520 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 521 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 522 | */ |
| 523 | init_async(io_priority: number, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 524 | /** |
| 525 | * Starts asynchronous initialization of the object implementing the |
| 526 | * interface. This must be done before any real use of the object after |
| 527 | * initial construction. If the object also implements #GInitable you can |
| 528 | * optionally call g_initable_init() instead. |
| 529 | * |
| 530 | * This method is intended for language bindings. If writing in C, |
| 531 | * g_async_initable_new_async() should typically be used instead. |
| 532 | * |
| 533 | * When the initialization is finished, `callback` will be called. You can |
| 534 | * then call g_async_initable_init_finish() to get the result of the |
| 535 | * initialization. |
| 536 | * |
| 537 | * Implementations may also support cancellation. If `cancellable` is not |
| 538 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 539 | * object from another thread. If the operation was cancelled, the error |
| 540 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 541 | * the object doesn't support cancellable initialization, the error |
| 542 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 543 | * |
| 544 | * As with #GInitable, if the object is not initialized, or initialization |
| 545 | * returns with an error, then all operations on the object except |
| 546 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 547 | * have undefined behaviour. They will often fail with g_critical() or |
| 548 | * g_warning(), but this must not be relied on. |
| 549 | * |
| 550 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 551 | * be initialized multiple times; for more information, see g_initable_init(). |
| 552 | * If a class explicitly supports being initialized multiple times, |
| 553 | * implementation requires yielding all subsequent calls to init_async() on the |
| 554 | * results of the first call. |
| 555 | * |
| 556 | * For classes that also support the #GInitable interface, the default |
| 557 | * implementation of this method will run the g_initable_init() function |
| 558 | * in a thread, so if you want to support asynchronous initialization via |
| 559 | * threads, just implement the #GAsyncInitable interface without overriding |
| 560 | * any interface methods. |
| 561 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 562 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 563 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 564 | */ |
| 565 | init_async( |
| 566 | io_priority: number, |
| 567 | cancellable: Gio.Cancellable | null, |
| 568 | callback: Gio.AsyncReadyCallback<this> | null, |
| 569 | ): void; |
| 570 | /** |
| 571 | * Starts asynchronous initialization of the object implementing the |
| 572 | * interface. This must be done before any real use of the object after |
| 573 | * initial construction. If the object also implements #GInitable you can |
| 574 | * optionally call g_initable_init() instead. |
| 575 | * |
| 576 | * This method is intended for language bindings. If writing in C, |
| 577 | * g_async_initable_new_async() should typically be used instead. |
| 578 | * |
| 579 | * When the initialization is finished, `callback` will be called. You can |
| 580 | * then call g_async_initable_init_finish() to get the result of the |
| 581 | * initialization. |
| 582 | * |
| 583 | * Implementations may also support cancellation. If `cancellable` is not |
| 584 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 585 | * object from another thread. If the operation was cancelled, the error |
| 586 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 587 | * the object doesn't support cancellable initialization, the error |
| 588 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 589 | * |
| 590 | * As with #GInitable, if the object is not initialized, or initialization |
| 591 | * returns with an error, then all operations on the object except |
| 592 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 593 | * have undefined behaviour. They will often fail with g_critical() or |
| 594 | * g_warning(), but this must not be relied on. |
| 595 | * |
| 596 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 597 | * be initialized multiple times; for more information, see g_initable_init(). |
| 598 | * If a class explicitly supports being initialized multiple times, |
| 599 | * implementation requires yielding all subsequent calls to init_async() on the |
| 600 | * results of the first call. |
| 601 | * |
| 602 | * For classes that also support the #GInitable interface, the default |
| 603 | * implementation of this method will run the g_initable_init() function |
| 604 | * in a thread, so if you want to support asynchronous initialization via |
| 605 | * threads, just implement the #GAsyncInitable interface without overriding |
| 606 | * any interface methods. |
| 607 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 608 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 609 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 610 | */ |
| 611 | init_async( |
| 612 | io_priority: number, |
| 613 | cancellable?: Gio.Cancellable | null, |
| 614 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 615 | ): Promise<boolean> | void; |
| 616 | /** |
| 617 | * Finishes asynchronous initialization and returns the result. |
| 618 | * See g_async_initable_init_async(). |
| 619 | * @param res a #GAsyncResult. |
| 620 | * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. |
| 621 | */ |
| 622 | init_finish(res: Gio.AsyncResult): boolean; |
| 623 | /** |
| 624 | * Finishes the async construction for the various g_async_initable_new |
| 625 | * calls, returning the created object or %NULL on error. |
| 626 | * @param res the #GAsyncResult from the callback |
| 627 | * @returns a newly created #GObject, or %NULL on error. Free with g_object_unref(). |
| 628 | */ |
| 629 | new_finish(res: Gio.AsyncResult): ClientProxy; |
| 630 | // Conflicted with Gio.DBusProxy.new_finish |
| 631 | new_finish(...args: never[]): any; |
| 632 | /** |
| 633 | * Starts asynchronous initialization of the object implementing the |
| 634 | * interface. This must be done before any real use of the object after |
| 635 | * initial construction. If the object also implements #GInitable you can |
| 636 | * optionally call g_initable_init() instead. |
| 637 | * |
| 638 | * This method is intended for language bindings. If writing in C, |
| 639 | * g_async_initable_new_async() should typically be used instead. |
| 640 | * |
| 641 | * When the initialization is finished, `callback` will be called. You can |
| 642 | * then call g_async_initable_init_finish() to get the result of the |
| 643 | * initialization. |
| 644 | * |
| 645 | * Implementations may also support cancellation. If `cancellable` is not |
| 646 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 647 | * object from another thread. If the operation was cancelled, the error |
| 648 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 649 | * the object doesn't support cancellable initialization, the error |
| 650 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 651 | * |
| 652 | * As with #GInitable, if the object is not initialized, or initialization |
| 653 | * returns with an error, then all operations on the object except |
| 654 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 655 | * have undefined behaviour. They will often fail with g_critical() or |
| 656 | * g_warning(), but this must not be relied on. |
| 657 | * |
| 658 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 659 | * be initialized multiple times; for more information, see g_initable_init(). |
| 660 | * If a class explicitly supports being initialized multiple times, |
| 661 | * implementation requires yielding all subsequent calls to init_async() on the |
| 662 | * results of the first call. |
| 663 | * |
| 664 | * For classes that also support the #GInitable interface, the default |
| 665 | * implementation of this method will run the g_initable_init() function |
| 666 | * in a thread, so if you want to support asynchronous initialization via |
| 667 | * threads, just implement the #GAsyncInitable interface without overriding |
| 668 | * any interface methods. |
| 669 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 670 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 671 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 672 | */ |
| 673 | vfunc_init_async( |
| 674 | io_priority: number, |
| 675 | cancellable?: Gio.Cancellable | null, |
| 676 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 677 | ): void; |
| 678 | /** |
| 679 | * Finishes asynchronous initialization and returns the result. |
| 680 | * See g_async_initable_init_async(). |
| 681 | * @param res a #GAsyncResult. |
| 682 | */ |
| 683 | vfunc_init_finish(res: Gio.AsyncResult): boolean; |
| 684 | /** |
| 685 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 686 | * @returns A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref(). |
| 687 | */ |
| 688 | get_object(): Gio.DBusObject | null; |
| 689 | /** |
| 690 | * Gets D-Bus introspection information for the D-Bus interface |
| 691 | * implemented by `interface_`. |
| 692 | * @returns A #GDBusInterfaceInfo. Do not free. |
| 693 | */ |
| 694 | get_info(): Gio.DBusInterfaceInfo; |
| 695 | /** |
| 696 | * Sets the #GDBusObject for `interface_` to `object`. |
| 697 | * |
| 698 | * Note that `interface_` will hold a weak reference to `object`. |
| 699 | * @param object A #GDBusObject or %NULL. |
| 700 | */ |
| 701 | set_object(object?: Gio.DBusObject | null): void; |
| 702 | /** |
| 703 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 704 | */ |
| 705 | vfunc_dup_object(): Gio.DBusObject | null; |
| 706 | /** |
| 707 | * Gets D-Bus introspection information for the D-Bus interface |
| 708 | * implemented by `interface_`. |
| 709 | */ |
| 710 | vfunc_get_info(): Gio.DBusInterfaceInfo; |
| 711 | /** |
| 712 | * Sets the #GDBusObject for `interface_` to `object`. |
| 713 | * |
| 714 | * Note that `interface_` will hold a weak reference to `object`. |
| 715 | * @param object A #GDBusObject or %NULL. |
| 716 | */ |
| 717 | vfunc_set_object(object?: Gio.DBusObject | null): void; |
| 718 | /** |
| 719 | * Initializes the object implementing the interface. |
| 720 | * |
| 721 | * This method is intended for language bindings. If writing in C, |
| 722 | * g_initable_new() should typically be used instead. |
| 723 | * |
| 724 | * The object must be initialized before any real use after initial |
| 725 | * construction, either with this function or g_async_initable_init_async(). |
| 726 | * |
| 727 | * Implementations may also support cancellation. If `cancellable` is not %NULL, |
| 728 | * then initialization can be cancelled by triggering the cancellable object |
| 729 | * from another thread. If the operation was cancelled, the error |
| 730 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and |
| 731 | * the object doesn't support cancellable initialization the error |
| 732 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 733 | * |
| 734 | * If the object is not initialized, or initialization returns with an |
| 735 | * error, then all operations on the object except g_object_ref() and |
| 736 | * g_object_unref() are considered to be invalid, and have undefined |
| 737 | * behaviour. See the [description][iface`Gio`.Initable#description] for more details. |
| 738 | * |
| 739 | * Callers should not assume that a class which implements #GInitable can be |
| 740 | * initialized multiple times, unless the class explicitly documents itself as |
| 741 | * supporting this. Generally, a class’ implementation of init() can assume |
| 742 | * (and assert) that it will only be called once. Previously, this documentation |
| 743 | * recommended all #GInitable implementations should be idempotent; that |
| 744 | * recommendation was relaxed in GLib 2.54. |
| 745 | * |
| 746 | * If a class explicitly supports being initialized multiple times, it is |
| 747 | * recommended that the method is idempotent: multiple calls with the same |
| 748 | * arguments should return the same results. Only the first call initializes |
| 749 | * the object; further calls return the result of the first call. |
| 750 | * |
| 751 | * One reason why a class might need to support idempotent initialization is if |
| 752 | * it is designed to be used via the singleton pattern, with a |
| 753 | * #GObjectClass.constructor that sometimes returns an existing instance. |
| 754 | * In this pattern, a caller would expect to be able to call g_initable_init() |
| 755 | * on the result of g_object_new(), regardless of whether it is in fact a new |
| 756 | * instance. |
| 757 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 758 | * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. |
| 759 | */ |
| 760 | init(cancellable?: Gio.Cancellable | null): boolean; |
| 761 | /** |
| 762 | * Initializes the object implementing the interface. |
| 763 | * |
| 764 | * This method is intended for language bindings. If writing in C, |
| 765 | * g_initable_new() should typically be used instead. |
| 766 | * |
| 767 | * The object must be initialized before any real use after initial |
| 768 | * construction, either with this function or g_async_initable_init_async(). |
| 769 | * |
| 770 | * Implementations may also support cancellation. If `cancellable` is not %NULL, |
| 771 | * then initialization can be cancelled by triggering the cancellable object |
| 772 | * from another thread. If the operation was cancelled, the error |
| 773 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and |
| 774 | * the object doesn't support cancellable initialization the error |
| 775 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 776 | * |
| 777 | * If the object is not initialized, or initialization returns with an |
| 778 | * error, then all operations on the object except g_object_ref() and |
| 779 | * g_object_unref() are considered to be invalid, and have undefined |
| 780 | * behaviour. See the [description][iface`Gio`.Initable#description] for more details. |
| 781 | * |
| 782 | * Callers should not assume that a class which implements #GInitable can be |
| 783 | * initialized multiple times, unless the class explicitly documents itself as |
| 784 | * supporting this. Generally, a class’ implementation of init() can assume |
| 785 | * (and assert) that it will only be called once. Previously, this documentation |
| 786 | * recommended all #GInitable implementations should be idempotent; that |
| 787 | * recommendation was relaxed in GLib 2.54. |
| 788 | * |
| 789 | * If a class explicitly supports being initialized multiple times, it is |
| 790 | * recommended that the method is idempotent: multiple calls with the same |
| 791 | * arguments should return the same results. Only the first call initializes |
| 792 | * the object; further calls return the result of the first call. |
| 793 | * |
| 794 | * One reason why a class might need to support idempotent initialization is if |
| 795 | * it is designed to be used via the singleton pattern, with a |
| 796 | * #GObjectClass.constructor that sometimes returns an existing instance. |
| 797 | * In this pattern, a caller would expect to be able to call g_initable_init() |
| 798 | * on the result of g_object_new(), regardless of whether it is in fact a new |
| 799 | * instance. |
| 800 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 801 | */ |
| 802 | vfunc_init(cancellable?: Gio.Cancellable | null): boolean; |
| 803 | /** |
| 804 | * Creates a binding between `source_property` on `source` and `target_property` |
| 805 | * on `target`. |
| 806 | * |
| 807 | * Whenever the `source_property` is changed the `target_property` is |
| 808 | * updated using the same value. For instance: |
| 809 | * |
| 810 | * |
| 811 | * ```c |
| 812 | * g_object_bind_property (action, "active", widget, "sensitive", 0); |
| 813 | * ``` |
| 814 | * |
| 815 | * |
| 816 | * Will result in the "sensitive" property of the widget #GObject instance to be |
| 817 | * updated with the same value of the "active" property of the action #GObject |
| 818 | * instance. |
| 819 | * |
| 820 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 821 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 822 | * will be updated as well. |
| 823 | * |
| 824 | * The binding will automatically be removed when either the `source` or the |
| 825 | * `target` instances are finalized. To remove the binding without affecting the |
| 826 | * `source` and the `target` you can just call g_object_unref() on the returned |
| 827 | * #GBinding instance. |
| 828 | * |
| 829 | * Removing the binding by calling g_object_unref() on it must only be done if |
| 830 | * the binding, `source` and `target` are only used from a single thread and it |
| 831 | * is clear that both `source` and `target` outlive the binding. Especially it |
| 832 | * is not safe to rely on this if the binding, `source` or `target` can be |
| 833 | * finalized from different threads. Keep another reference to the binding and |
| 834 | * use g_binding_unbind() instead to be on the safe side. |
| 835 | * |
| 836 | * A #GObject can have multiple bindings. |
| 837 | * @param source_property the property on @source to bind |
| 838 | * @param target the target #GObject |
| 839 | * @param target_property the property on @target to bind |
| 840 | * @param flags flags to pass to #GBinding |
| 841 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 842 | */ |
| 843 | bind_property( |
| 844 | source_property: string, |
| 845 | target: GObject.Object, |
| 846 | target_property: string, |
| 847 | flags: GObject.BindingFlags | null, |
| 848 | ): GObject.Binding; |
| 849 | /** |
| 850 | * Complete version of g_object_bind_property(). |
| 851 | * |
| 852 | * Creates a binding between `source_property` on `source` and `target_property` |
| 853 | * on `target,` allowing you to set the transformation functions to be used by |
| 854 | * the binding. |
| 855 | * |
| 856 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 857 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 858 | * will be updated as well. The `transform_from` function is only used in case |
| 859 | * of bidirectional bindings, otherwise it will be ignored |
| 860 | * |
| 861 | * The binding will automatically be removed when either the `source` or the |
| 862 | * `target` instances are finalized. This will release the reference that is |
| 863 | * being held on the #GBinding instance; if you want to hold on to the |
| 864 | * #GBinding instance, you will need to hold a reference to it. |
| 865 | * |
| 866 | * To remove the binding, call g_binding_unbind(). |
| 867 | * |
| 868 | * A #GObject can have multiple bindings. |
| 869 | * |
| 870 | * The same `user_data` parameter will be used for both `transform_to` |
| 871 | * and `transform_from` transformation functions; the `notify` function will |
| 872 | * be called once, when the binding is removed. If you need different data |
| 873 | * for each transformation function, please use |
| 874 | * g_object_bind_property_with_closures() instead. |
| 875 | * @param source_property the property on @source to bind |
| 876 | * @param target the target #GObject |
| 877 | * @param target_property the property on @target to bind |
| 878 | * @param flags flags to pass to #GBinding |
| 879 | * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default |
| 880 | * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default |
| 881 | * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required |
| 882 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 883 | */ |
| 884 | bind_property_full( |
| 885 | source_property: string, |
| 886 | target: GObject.Object, |
| 887 | target_property: string, |
| 888 | flags: GObject.BindingFlags | null, |
| 889 | transform_to?: GObject.BindingTransformFunc | null, |
| 890 | transform_from?: GObject.BindingTransformFunc | null, |
| 891 | notify?: GLib.DestroyNotify | null, |
| 892 | ): GObject.Binding; |
| 893 | // Conflicted with GObject.Object.bind_property_full |
| 894 | bind_property_full(...args: never[]): any; |
| 895 | /** |
| 896 | * This function is intended for #GObject implementations to re-enforce |
| 897 | * a [floating][floating-ref] object reference. Doing this is seldom |
| 898 | * required: all #GInitiallyUnowneds are created with a floating reference |
| 899 | * which usually just needs to be sunken by calling g_object_ref_sink(). |
| 900 | */ |
| 901 | force_floating(): void; |
| 902 | /** |
| 903 | * Increases the freeze count on `object`. If the freeze count is |
| 904 | * non-zero, the emission of "notify" signals on `object` is |
| 905 | * stopped. The signals are queued until the freeze count is decreased |
| 906 | * to zero. Duplicate notifications are squashed so that at most one |
| 907 | * #GObject::notify signal is emitted for each property modified while the |
| 908 | * object is frozen. |
| 909 | * |
| 910 | * This is necessary for accessors that modify multiple properties to prevent |
| 911 | * premature notification while the object is still being modified. |
| 912 | */ |
| 913 | freeze_notify(): void; |
| 914 | /** |
| 915 | * Gets a named field from the objects table of associations (see g_object_set_data()). |
| 916 | * @param key name of the key for that association |
| 917 | * @returns the data if found, or %NULL if no such data exists. |
| 918 | */ |
| 919 | get_data(key: string): any | null; |
| 920 | /** |
| 921 | * Gets a property of an object. |
| 922 | * |
| 923 | * The value can be: |
| 924 | * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) |
| 925 | * - a GObject.Value initialized with the expected type of the property |
| 926 | * - a GObject.Value initialized with a type to which the expected type of the property can be transformed |
| 927 | * |
| 928 | * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. |
| 929 | * |
| 930 | * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. |
| 931 | * @param property_name The name of the property to get |
| 932 | * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type |
| 933 | */ |
| 934 | get_property(property_name: string, value: GObject.Value | any): any; |
| 935 | /** |
| 936 | * This function gets back user data pointers stored via |
| 937 | * g_object_set_qdata(). |
| 938 | * @param quark A #GQuark, naming the user data pointer |
| 939 | * @returns The user data pointer set, or %NULL |
| 940 | */ |
| 941 | get_qdata(quark: GLib.Quark): any | null; |
| 942 | /** |
| 943 | * Gets `n_properties` properties for an `object`. |
| 944 | * Obtained properties will be set to `values`. All properties must be valid. |
| 945 | * Warnings will be emitted and undefined behaviour may result if invalid |
| 946 | * properties are passed in. |
| 947 | * @param names the names of each property to get |
| 948 | * @param values the values of each property to get |
| 949 | */ |
| 950 | getv(names: string[], values: (GObject.Value | any)[]): void; |
| 951 | /** |
| 952 | * Checks whether `object` has a [floating][floating-ref] reference. |
| 953 | * @returns %TRUE if @object has a floating reference |
| 954 | */ |
| 955 | is_floating(): boolean; |
| 956 | /** |
| 957 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 958 | * |
| 959 | * When possible, eg. when signaling a property change from within the class |
| 960 | * that registered the property, you should use g_object_notify_by_pspec() |
| 961 | * instead. |
| 962 | * |
| 963 | * Note that emission of the notify signal may be blocked with |
| 964 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 965 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 966 | * called. |
| 967 | * @param property_name the name of a property installed on the class of @object. |
| 968 | */ |
| 969 | notify(property_name: string): void; |
| 970 | /** |
| 971 | * Emits a "notify" signal for the property specified by `pspec` on `object`. |
| 972 | * |
| 973 | * This function omits the property name lookup, hence it is faster than |
| 974 | * g_object_notify(). |
| 975 | * |
| 976 | * One way to avoid using g_object_notify() from within the |
| 977 | * class that registered the properties, and using g_object_notify_by_pspec() |
| 978 | * instead, is to store the GParamSpec used with |
| 979 | * g_object_class_install_property() inside a static array, e.g.: |
| 980 | * |
| 981 | * |
| 982 | * ```c |
| 983 | * typedef enum |
| 984 | * { |
| 985 | * PROP_FOO = 1, |
| 986 | * PROP_LAST |
| 987 | * } MyObjectProperty; |
| 988 | * |
| 989 | * static GParamSpec *properties[PROP_LAST]; |
| 990 | * |
| 991 | * static void |
| 992 | * my_object_class_init (MyObjectClass *klass) |
| 993 | * { |
| 994 | * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, |
| 995 | * 0, 100, |
| 996 | * 50, |
| 997 | * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 998 | * g_object_class_install_property (gobject_class, |
| 999 | * PROP_FOO, |
| 1000 | * properties[PROP_FOO]); |
| 1001 | * } |
| 1002 | * ``` |
| 1003 | * |
| 1004 | * |
| 1005 | * and then notify a change on the "foo" property with: |
| 1006 | * |
| 1007 | * |
| 1008 | * ```c |
| 1009 | * g_object_notify_by_pspec (self, properties[PROP_FOO]); |
| 1010 | * ``` |
| 1011 | * |
| 1012 | * @param pspec the #GParamSpec of a property installed on the class of @object. |
| 1013 | */ |
| 1014 | notify_by_pspec(pspec: GObject.ParamSpec): void; |
| 1015 | /** |
| 1016 | * Increases the reference count of `object`. |
| 1017 | * |
| 1018 | * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type |
| 1019 | * of `object` will be propagated to the return type (using the GCC typeof() |
| 1020 | * extension), so any casting the caller needs to do on the return type must be |
| 1021 | * explicit. |
| 1022 | * @returns the same @object |
| 1023 | */ |
| 1024 | ref(): GObject.Object; |
| 1025 | /** |
| 1026 | * Increase the reference count of `object,` and possibly remove the |
| 1027 | * [floating][floating-ref] reference, if `object` has a floating reference. |
| 1028 | * |
| 1029 | * In other words, if the object is floating, then this call "assumes |
| 1030 | * ownership" of the floating reference, converting it to a normal |
| 1031 | * reference by clearing the floating flag while leaving the reference |
| 1032 | * count unchanged. If the object is not floating, then this call |
| 1033 | * adds a new normal reference increasing the reference count by one. |
| 1034 | * |
| 1035 | * Since GLib 2.56, the type of `object` will be propagated to the return type |
| 1036 | * under the same conditions as for g_object_ref(). |
| 1037 | * @returns @object |
| 1038 | */ |
| 1039 | ref_sink(): GObject.Object; |
| 1040 | /** |
| 1041 | * Releases all references to other objects. This can be used to break |
| 1042 | * reference cycles. |
| 1043 | * |
| 1044 | * This function should only be called from object system implementations. |
| 1045 | */ |
| 1046 | run_dispose(): void; |
| 1047 | /** |
| 1048 | * Each object carries around a table of associations from |
| 1049 | * strings to pointers. This function lets you set an association. |
| 1050 | * |
| 1051 | * If the object already had an association with that name, |
| 1052 | * the old association will be destroyed. |
| 1053 | * |
| 1054 | * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). |
| 1055 | * This means a copy of `key` is kept permanently (even after `object` has been |
| 1056 | * finalized) — so it is recommended to only use a small, bounded set of values |
| 1057 | * for `key` in your program, to avoid the #GQuark storage growing unbounded. |
| 1058 | * @param key name of the key |
| 1059 | * @param data data to associate with that key |
| 1060 | */ |
| 1061 | set_data(key: string, data?: any | null): void; |
| 1062 | /** |
| 1063 | * Sets a property on an object. |
| 1064 | * @param property_name The name of the property to set |
| 1065 | * @param value The value to set the property to |
| 1066 | */ |
| 1067 | set_property(property_name: string, value: GObject.Value | any): void; |
| 1068 | /** |
| 1069 | * Remove a specified datum from the object's data associations, |
| 1070 | * without invoking the association's destroy handler. |
| 1071 | * @param key name of the key |
| 1072 | * @returns the data if found, or %NULL if no such data exists. |
| 1073 | */ |
| 1074 | steal_data(key: string): any | null; |
| 1075 | /** |
| 1076 | * This function gets back user data pointers stored via |
| 1077 | * g_object_set_qdata() and removes the `data` from object |
| 1078 | * without invoking its destroy() function (if any was |
| 1079 | * set). |
| 1080 | * Usually, calling this function is only required to update |
| 1081 | * user data pointers with a destroy notifier, for example: |
| 1082 | * |
| 1083 | * ```c |
| 1084 | * void |
| 1085 | * object_add_to_user_list (GObject *object, |
| 1086 | * const gchar *new_string) |
| 1087 | * { |
| 1088 | * // the quark, naming the object data |
| 1089 | * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); |
| 1090 | * // retrieve the old string list |
| 1091 | * GList *list = g_object_steal_qdata (object, quark_string_list); |
| 1092 | * |
| 1093 | * // prepend new string |
| 1094 | * list = g_list_prepend (list, g_strdup (new_string)); |
| 1095 | * // this changed 'list', so we need to set it again |
| 1096 | * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); |
| 1097 | * } |
| 1098 | * static void |
| 1099 | * free_string_list (gpointer data) |
| 1100 | * { |
| 1101 | * GList *node, *list = data; |
| 1102 | * |
| 1103 | * for (node = list; node; node = node->next) |
| 1104 | * g_free (node->data); |
| 1105 | * g_list_free (list); |
| 1106 | * } |
| 1107 | * ``` |
| 1108 | * |
| 1109 | * Using g_object_get_qdata() in the above example, instead of |
| 1110 | * g_object_steal_qdata() would have left the destroy function set, |
| 1111 | * and thus the partial string list would have been freed upon |
| 1112 | * g_object_set_qdata_full(). |
| 1113 | * @param quark A #GQuark, naming the user data pointer |
| 1114 | * @returns The user data pointer set, or %NULL |
| 1115 | */ |
| 1116 | steal_qdata(quark: GLib.Quark): any | null; |
| 1117 | /** |
| 1118 | * Reverts the effect of a previous call to |
| 1119 | * g_object_freeze_notify(). The freeze count is decreased on `object` |
| 1120 | * and when it reaches zero, queued "notify" signals are emitted. |
| 1121 | * |
| 1122 | * Duplicate notifications for each property are squashed so that at most one |
| 1123 | * #GObject::notify signal is emitted for each property, in the reverse order |
| 1124 | * in which they have been queued. |
| 1125 | * |
| 1126 | * It is an error to call this function when the freeze count is zero. |
| 1127 | */ |
| 1128 | thaw_notify(): void; |
| 1129 | /** |
| 1130 | * Decreases the reference count of `object`. When its reference count |
| 1131 | * drops to 0, the object is finalized (i.e. its memory is freed). |
| 1132 | * |
| 1133 | * If the pointer to the #GObject may be reused in future (for example, if it is |
| 1134 | * an instance variable of another object), it is recommended to clear the |
| 1135 | * pointer to %NULL rather than retain a dangling pointer to a potentially |
| 1136 | * invalid #GObject instance. Use g_clear_object() for this. |
| 1137 | */ |
| 1138 | unref(): void; |
| 1139 | /** |
| 1140 | * This function essentially limits the life time of the `closure` to |
| 1141 | * the life time of the object. That is, when the object is finalized, |
| 1142 | * the `closure` is invalidated by calling g_closure_invalidate() on |
| 1143 | * it, in order to prevent invocations of the closure with a finalized |
| 1144 | * (nonexisting) object. Also, g_object_ref() and g_object_unref() are |
| 1145 | * added as marshal guards to the `closure,` to ensure that an extra |
| 1146 | * reference count is held on `object` during invocation of the |
| 1147 | * `closure`. Usually, this function will be called on closures that |
| 1148 | * use this `object` as closure data. |
| 1149 | * @param closure #GClosure to watch |
| 1150 | */ |
| 1151 | watch_closure(closure: GObject.Closure): void; |
| 1152 | /** |
| 1153 | * the `constructed` function is called by g_object_new() as the |
| 1154 | * final step of the object creation process. At the point of the call, all |
| 1155 | * construction properties have been set on the object. The purpose of this |
| 1156 | * call is to allow for object initialisation steps that can only be performed |
| 1157 | * after construction properties have been set. `constructed` implementors |
| 1158 | * should chain up to the `constructed` call of their parent class to allow it |
| 1159 | * to complete its initialisation. |
| 1160 | */ |
| 1161 | vfunc_constructed(): void; |
| 1162 | /** |
| 1163 | * emits property change notification for a bunch |
| 1164 | * of properties. Overriding `dispatch_properties_changed` should be rarely |
| 1165 | * needed. |
| 1166 | * @param n_pspecs |
| 1167 | * @param pspecs |
| 1168 | */ |
| 1169 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; |
| 1170 | /** |
| 1171 | * the `dispose` function is supposed to drop all references to other |
| 1172 | * objects, but keep the instance otherwise intact, so that client method |
| 1173 | * invocations still work. It may be run multiple times (due to reference |
| 1174 | * loops). Before returning, `dispose` should chain up to the `dispose` method |
| 1175 | * of the parent class. |
| 1176 | */ |
| 1177 | vfunc_dispose(): void; |
| 1178 | /** |
| 1179 | * instance finalization function, should finish the finalization of |
| 1180 | * the instance begun in `dispose` and chain up to the `finalize` method of the |
| 1181 | * parent class. |
| 1182 | */ |
| 1183 | vfunc_finalize(): void; |
| 1184 | /** |
| 1185 | * the generic getter for all properties of this type. Should be |
| 1186 | * overridden for every type with properties. |
| 1187 | * @param property_id |
| 1188 | * @param value |
| 1189 | * @param pspec |
| 1190 | */ |
| 1191 | vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 1192 | /** |
| 1193 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 1194 | * |
| 1195 | * When possible, eg. when signaling a property change from within the class |
| 1196 | * that registered the property, you should use g_object_notify_by_pspec() |
| 1197 | * instead. |
| 1198 | * |
| 1199 | * Note that emission of the notify signal may be blocked with |
| 1200 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 1201 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 1202 | * called. |
| 1203 | * @param pspec |
| 1204 | */ |
| 1205 | vfunc_notify(pspec: GObject.ParamSpec): void; |
| 1206 | /** |
| 1207 | * the generic setter for all properties of this type. Should be |
| 1208 | * overridden for every type with properties. If implementations of |
| 1209 | * `set_property` don't emit property change notification explicitly, this will |
| 1210 | * be done implicitly by the type system. However, if the notify signal is |
| 1211 | * emitted explicitly, the type system will not emit it a second time. |
| 1212 | * @param property_id |
| 1213 | * @param value |
| 1214 | * @param pspec |
| 1215 | */ |
| 1216 | vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 1217 | /** |
| 1218 | * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. |
| 1219 | * @param id Handler ID of the handler to be disconnected |
| 1220 | */ |
| 1221 | disconnect(id: number): void; |
| 1222 | /** |
| 1223 | * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. |
| 1224 | * @param properties Object containing the properties to set |
| 1225 | */ |
| 1226 | set(properties: { [key: string]: any }): void; |
| 1227 | /** |
| 1228 | * Blocks a handler of an instance so it will not be called during any signal emissions |
| 1229 | * @param id Handler ID of the handler to be blocked |
| 1230 | */ |
| 1231 | block_signal_handler(id: number): void; |
| 1232 | /** |
| 1233 | * Unblocks a handler so it will be called again during any signal emissions |
| 1234 | * @param id Handler ID of the handler to be unblocked |
| 1235 | */ |
| 1236 | unblock_signal_handler(id: number): void; |
| 1237 | /** |
| 1238 | * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. |
| 1239 | * @param detailedName Name of the signal to stop emission of |
| 1240 | */ |
| 1241 | stop_emission_by_name(detailedName: string): void; |
| 1242 | } |
| 1243 | |
| 1244 | namespace ClientSkeleton { |
| 1245 | // Constructor properties interface |
| 1246 | |
| 1247 | interface ConstructorProps |
| 1248 | extends Gio.DBusInterfaceSkeleton.ConstructorProps, |
| 1249 | Client.ConstructorProps, |
| 1250 | Gio.DBusInterface.ConstructorProps {} |
| 1251 | } |
| 1252 | |
| 1253 | /** |
| 1254 | * The #GClueClientSkeleton structure contains only private data and should only be accessed using the provided API. |
| 1255 | */ |
| 1256 | class ClientSkeleton extends Gio.DBusInterfaceSkeleton implements Client, Gio.DBusInterface { |
| 1257 | static $gtype: GObject.GType<ClientSkeleton>; |
| 1258 | |
| 1259 | // Constructors |
| 1260 | |
| 1261 | constructor(properties?: Partial<ClientSkeleton.ConstructorProps>, ...args: any[]); |
| 1262 | |
| 1263 | _init(...args: any[]): void; |
| 1264 | |
| 1265 | static ['new'](): ClientSkeleton; |
| 1266 | |
| 1267 | // Inherited properties |
| 1268 | /** |
| 1269 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Active">"Active"</link>. |
| 1270 | * |
| 1271 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 1272 | */ |
| 1273 | get active(): boolean; |
| 1274 | set active(val: boolean); |
| 1275 | /** |
| 1276 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link>. |
| 1277 | * |
| 1278 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 1279 | */ |
| 1280 | get desktop_id(): string; |
| 1281 | set desktop_id(val: string); |
| 1282 | /** |
| 1283 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link>. |
| 1284 | * |
| 1285 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 1286 | */ |
| 1287 | get desktopId(): string; |
| 1288 | set desktopId(val: string); |
| 1289 | /** |
| 1290 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link>. |
| 1291 | * |
| 1292 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 1293 | */ |
| 1294 | get distance_threshold(): number; |
| 1295 | set distance_threshold(val: number); |
| 1296 | /** |
| 1297 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link>. |
| 1298 | * |
| 1299 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 1300 | */ |
| 1301 | get distanceThreshold(): number; |
| 1302 | set distanceThreshold(val: number); |
| 1303 | /** |
| 1304 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link>. |
| 1305 | * |
| 1306 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 1307 | */ |
| 1308 | get location(): string; |
| 1309 | set location(val: string); |
| 1310 | /** |
| 1311 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link>. |
| 1312 | * |
| 1313 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 1314 | */ |
| 1315 | get requested_accuracy_level(): number; |
| 1316 | set requested_accuracy_level(val: number); |
| 1317 | /** |
| 1318 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link>. |
| 1319 | * |
| 1320 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 1321 | */ |
| 1322 | get requestedAccuracyLevel(): number; |
| 1323 | set requestedAccuracyLevel(val: number); |
| 1324 | /** |
| 1325 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link>. |
| 1326 | * |
| 1327 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 1328 | */ |
| 1329 | get time_threshold(): number; |
| 1330 | set time_threshold(val: number); |
| 1331 | /** |
| 1332 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link>. |
| 1333 | * |
| 1334 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 1335 | */ |
| 1336 | get timeThreshold(): number; |
| 1337 | set timeThreshold(val: number); |
| 1338 | |
| 1339 | // Inherited methods |
| 1340 | /** |
| 1341 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. |
| 1342 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 1343 | * You can then call gclue_client_call_start_finish() to get the result of the operation. |
| 1344 | * |
| 1345 | * See gclue_client_call_start_sync() for the synchronous, blocking version of this method. |
| 1346 | * @param cancellable A #GCancellable or %NULL. |
| 1347 | */ |
| 1348 | call_start(cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 1349 | /** |
| 1350 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. |
| 1351 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 1352 | * You can then call gclue_client_call_start_finish() to get the result of the operation. |
| 1353 | * |
| 1354 | * See gclue_client_call_start_sync() for the synchronous, blocking version of this method. |
| 1355 | * @param cancellable A #GCancellable or %NULL. |
| 1356 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 1357 | */ |
| 1358 | call_start(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void; |
| 1359 | /** |
| 1360 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. |
| 1361 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 1362 | * You can then call gclue_client_call_start_finish() to get the result of the operation. |
| 1363 | * |
| 1364 | * See gclue_client_call_start_sync() for the synchronous, blocking version of this method. |
| 1365 | * @param cancellable A #GCancellable or %NULL. |
| 1366 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 1367 | */ |
| 1368 | call_start( |
| 1369 | cancellable?: Gio.Cancellable | null, |
| 1370 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 1371 | ): Promise<boolean> | void; |
| 1372 | /** |
| 1373 | * Finishes an operation started with gclue_client_call_start(). |
| 1374 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_call_start(). |
| 1375 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 1376 | */ |
| 1377 | call_start_finish(res: Gio.AsyncResult): boolean; |
| 1378 | /** |
| 1379 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 1380 | * |
| 1381 | * See gclue_client_call_start() for the asynchronous version of this method. |
| 1382 | * @param cancellable A #GCancellable or %NULL. |
| 1383 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 1384 | */ |
| 1385 | call_start_sync(cancellable?: Gio.Cancellable | null): boolean; |
| 1386 | /** |
| 1387 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. |
| 1388 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 1389 | * You can then call gclue_client_call_stop_finish() to get the result of the operation. |
| 1390 | * |
| 1391 | * See gclue_client_call_stop_sync() for the synchronous, blocking version of this method. |
| 1392 | * @param cancellable A #GCancellable or %NULL. |
| 1393 | */ |
| 1394 | call_stop(cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 1395 | /** |
| 1396 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. |
| 1397 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 1398 | * You can then call gclue_client_call_stop_finish() to get the result of the operation. |
| 1399 | * |
| 1400 | * See gclue_client_call_stop_sync() for the synchronous, blocking version of this method. |
| 1401 | * @param cancellable A #GCancellable or %NULL. |
| 1402 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 1403 | */ |
| 1404 | call_stop(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void; |
| 1405 | /** |
| 1406 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. |
| 1407 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 1408 | * You can then call gclue_client_call_stop_finish() to get the result of the operation. |
| 1409 | * |
| 1410 | * See gclue_client_call_stop_sync() for the synchronous, blocking version of this method. |
| 1411 | * @param cancellable A #GCancellable or %NULL. |
| 1412 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 1413 | */ |
| 1414 | call_stop( |
| 1415 | cancellable?: Gio.Cancellable | null, |
| 1416 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 1417 | ): Promise<boolean> | void; |
| 1418 | /** |
| 1419 | * Finishes an operation started with gclue_client_call_stop(). |
| 1420 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_call_stop(). |
| 1421 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 1422 | */ |
| 1423 | call_stop_finish(res: Gio.AsyncResult): boolean; |
| 1424 | /** |
| 1425 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 1426 | * |
| 1427 | * See gclue_client_call_stop() for the asynchronous version of this method. |
| 1428 | * @param cancellable A #GCancellable or %NULL. |
| 1429 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 1430 | */ |
| 1431 | call_stop_sync(cancellable?: Gio.Cancellable | null): boolean; |
| 1432 | /** |
| 1433 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 1434 | * |
| 1435 | * This method will free `invocation,` you cannot use it afterwards. |
| 1436 | * @param invocation A #GDBusMethodInvocation. |
| 1437 | */ |
| 1438 | complete_start(invocation: Gio.DBusMethodInvocation): void; |
| 1439 | /** |
| 1440 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 1441 | * |
| 1442 | * This method will free `invocation,` you cannot use it afterwards. |
| 1443 | * @param invocation A #GDBusMethodInvocation. |
| 1444 | */ |
| 1445 | complete_stop(invocation: Gio.DBusMethodInvocation): void; |
| 1446 | /** |
| 1447 | * Emits the <link linkend="gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated">"LocationUpdated"</link> D-Bus signal. |
| 1448 | * @param arg_old Argument to pass with the signal. |
| 1449 | * @param arg_new Argument to pass with the signal. |
| 1450 | */ |
| 1451 | emit_location_updated(arg_old: string, arg_new: string): void; |
| 1452 | /** |
| 1453 | * Handler for the #GClueClient::handle-start signal. |
| 1454 | * @param invocation |
| 1455 | */ |
| 1456 | vfunc_handle_start(invocation: Gio.DBusMethodInvocation): boolean; |
| 1457 | /** |
| 1458 | * Handler for the #GClueClient::handle-stop signal. |
| 1459 | * @param invocation |
| 1460 | */ |
| 1461 | vfunc_handle_stop(invocation: Gio.DBusMethodInvocation): boolean; |
| 1462 | /** |
| 1463 | * Handler for the #GClueClient::location-updated signal. |
| 1464 | * @param arg_old |
| 1465 | * @param arg_new |
| 1466 | */ |
| 1467 | vfunc_location_updated(arg_old: string, arg_new: string): void; |
| 1468 | /** |
| 1469 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 1470 | * @returns A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref(). |
| 1471 | */ |
| 1472 | get_object(): Gio.DBusObject | null; |
| 1473 | /** |
| 1474 | * Gets D-Bus introspection information for the D-Bus interface |
| 1475 | * implemented by `interface_`. |
| 1476 | * @returns A #GDBusInterfaceInfo. Do not free. |
| 1477 | */ |
| 1478 | get_info(): Gio.DBusInterfaceInfo; |
| 1479 | /** |
| 1480 | * Sets the #GDBusObject for `interface_` to `object`. |
| 1481 | * |
| 1482 | * Note that `interface_` will hold a weak reference to `object`. |
| 1483 | * @param object A #GDBusObject or %NULL. |
| 1484 | */ |
| 1485 | set_object(object?: Gio.DBusObject | null): void; |
| 1486 | /** |
| 1487 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 1488 | */ |
| 1489 | vfunc_dup_object(): Gio.DBusObject | null; |
| 1490 | /** |
| 1491 | * Gets D-Bus introspection information for the D-Bus interface |
| 1492 | * implemented by `interface_`. |
| 1493 | */ |
| 1494 | vfunc_get_info(): Gio.DBusInterfaceInfo; |
| 1495 | /** |
| 1496 | * Sets the #GDBusObject for `interface_` to `object`. |
| 1497 | * |
| 1498 | * Note that `interface_` will hold a weak reference to `object`. |
| 1499 | * @param object A #GDBusObject or %NULL. |
| 1500 | */ |
| 1501 | vfunc_set_object(object?: Gio.DBusObject | null): void; |
| 1502 | /** |
| 1503 | * Creates a binding between `source_property` on `source` and `target_property` |
| 1504 | * on `target`. |
| 1505 | * |
| 1506 | * Whenever the `source_property` is changed the `target_property` is |
| 1507 | * updated using the same value. For instance: |
| 1508 | * |
| 1509 | * |
| 1510 | * ```c |
| 1511 | * g_object_bind_property (action, "active", widget, "sensitive", 0); |
| 1512 | * ``` |
| 1513 | * |
| 1514 | * |
| 1515 | * Will result in the "sensitive" property of the widget #GObject instance to be |
| 1516 | * updated with the same value of the "active" property of the action #GObject |
| 1517 | * instance. |
| 1518 | * |
| 1519 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 1520 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 1521 | * will be updated as well. |
| 1522 | * |
| 1523 | * The binding will automatically be removed when either the `source` or the |
| 1524 | * `target` instances are finalized. To remove the binding without affecting the |
| 1525 | * `source` and the `target` you can just call g_object_unref() on the returned |
| 1526 | * #GBinding instance. |
| 1527 | * |
| 1528 | * Removing the binding by calling g_object_unref() on it must only be done if |
| 1529 | * the binding, `source` and `target` are only used from a single thread and it |
| 1530 | * is clear that both `source` and `target` outlive the binding. Especially it |
| 1531 | * is not safe to rely on this if the binding, `source` or `target` can be |
| 1532 | * finalized from different threads. Keep another reference to the binding and |
| 1533 | * use g_binding_unbind() instead to be on the safe side. |
| 1534 | * |
| 1535 | * A #GObject can have multiple bindings. |
| 1536 | * @param source_property the property on @source to bind |
| 1537 | * @param target the target #GObject |
| 1538 | * @param target_property the property on @target to bind |
| 1539 | * @param flags flags to pass to #GBinding |
| 1540 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 1541 | */ |
| 1542 | bind_property( |
| 1543 | source_property: string, |
| 1544 | target: GObject.Object, |
| 1545 | target_property: string, |
| 1546 | flags: GObject.BindingFlags | null, |
| 1547 | ): GObject.Binding; |
| 1548 | /** |
| 1549 | * Complete version of g_object_bind_property(). |
| 1550 | * |
| 1551 | * Creates a binding between `source_property` on `source` and `target_property` |
| 1552 | * on `target,` allowing you to set the transformation functions to be used by |
| 1553 | * the binding. |
| 1554 | * |
| 1555 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 1556 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 1557 | * will be updated as well. The `transform_from` function is only used in case |
| 1558 | * of bidirectional bindings, otherwise it will be ignored |
| 1559 | * |
| 1560 | * The binding will automatically be removed when either the `source` or the |
| 1561 | * `target` instances are finalized. This will release the reference that is |
| 1562 | * being held on the #GBinding instance; if you want to hold on to the |
| 1563 | * #GBinding instance, you will need to hold a reference to it. |
| 1564 | * |
| 1565 | * To remove the binding, call g_binding_unbind(). |
| 1566 | * |
| 1567 | * A #GObject can have multiple bindings. |
| 1568 | * |
| 1569 | * The same `user_data` parameter will be used for both `transform_to` |
| 1570 | * and `transform_from` transformation functions; the `notify` function will |
| 1571 | * be called once, when the binding is removed. If you need different data |
| 1572 | * for each transformation function, please use |
| 1573 | * g_object_bind_property_with_closures() instead. |
| 1574 | * @param source_property the property on @source to bind |
| 1575 | * @param target the target #GObject |
| 1576 | * @param target_property the property on @target to bind |
| 1577 | * @param flags flags to pass to #GBinding |
| 1578 | * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default |
| 1579 | * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default |
| 1580 | * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required |
| 1581 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 1582 | */ |
| 1583 | bind_property_full( |
| 1584 | source_property: string, |
| 1585 | target: GObject.Object, |
| 1586 | target_property: string, |
| 1587 | flags: GObject.BindingFlags | null, |
| 1588 | transform_to?: GObject.BindingTransformFunc | null, |
| 1589 | transform_from?: GObject.BindingTransformFunc | null, |
| 1590 | notify?: GLib.DestroyNotify | null, |
| 1591 | ): GObject.Binding; |
| 1592 | // Conflicted with GObject.Object.bind_property_full |
| 1593 | bind_property_full(...args: never[]): any; |
| 1594 | /** |
| 1595 | * This function is intended for #GObject implementations to re-enforce |
| 1596 | * a [floating][floating-ref] object reference. Doing this is seldom |
| 1597 | * required: all #GInitiallyUnowneds are created with a floating reference |
| 1598 | * which usually just needs to be sunken by calling g_object_ref_sink(). |
| 1599 | */ |
| 1600 | force_floating(): void; |
| 1601 | /** |
| 1602 | * Increases the freeze count on `object`. If the freeze count is |
| 1603 | * non-zero, the emission of "notify" signals on `object` is |
| 1604 | * stopped. The signals are queued until the freeze count is decreased |
| 1605 | * to zero. Duplicate notifications are squashed so that at most one |
| 1606 | * #GObject::notify signal is emitted for each property modified while the |
| 1607 | * object is frozen. |
| 1608 | * |
| 1609 | * This is necessary for accessors that modify multiple properties to prevent |
| 1610 | * premature notification while the object is still being modified. |
| 1611 | */ |
| 1612 | freeze_notify(): void; |
| 1613 | /** |
| 1614 | * Gets a named field from the objects table of associations (see g_object_set_data()). |
| 1615 | * @param key name of the key for that association |
| 1616 | * @returns the data if found, or %NULL if no such data exists. |
| 1617 | */ |
| 1618 | get_data(key: string): any | null; |
| 1619 | /** |
| 1620 | * Gets a property of an object. |
| 1621 | * |
| 1622 | * The value can be: |
| 1623 | * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) |
| 1624 | * - a GObject.Value initialized with the expected type of the property |
| 1625 | * - a GObject.Value initialized with a type to which the expected type of the property can be transformed |
| 1626 | * |
| 1627 | * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. |
| 1628 | * |
| 1629 | * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. |
| 1630 | * @param property_name The name of the property to get |
| 1631 | * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type |
| 1632 | */ |
| 1633 | get_property(property_name: string, value: GObject.Value | any): any; |
| 1634 | /** |
| 1635 | * This function gets back user data pointers stored via |
| 1636 | * g_object_set_qdata(). |
| 1637 | * @param quark A #GQuark, naming the user data pointer |
| 1638 | * @returns The user data pointer set, or %NULL |
| 1639 | */ |
| 1640 | get_qdata(quark: GLib.Quark): any | null; |
| 1641 | /** |
| 1642 | * Gets `n_properties` properties for an `object`. |
| 1643 | * Obtained properties will be set to `values`. All properties must be valid. |
| 1644 | * Warnings will be emitted and undefined behaviour may result if invalid |
| 1645 | * properties are passed in. |
| 1646 | * @param names the names of each property to get |
| 1647 | * @param values the values of each property to get |
| 1648 | */ |
| 1649 | getv(names: string[], values: (GObject.Value | any)[]): void; |
| 1650 | /** |
| 1651 | * Checks whether `object` has a [floating][floating-ref] reference. |
| 1652 | * @returns %TRUE if @object has a floating reference |
| 1653 | */ |
| 1654 | is_floating(): boolean; |
| 1655 | /** |
| 1656 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 1657 | * |
| 1658 | * When possible, eg. when signaling a property change from within the class |
| 1659 | * that registered the property, you should use g_object_notify_by_pspec() |
| 1660 | * instead. |
| 1661 | * |
| 1662 | * Note that emission of the notify signal may be blocked with |
| 1663 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 1664 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 1665 | * called. |
| 1666 | * @param property_name the name of a property installed on the class of @object. |
| 1667 | */ |
| 1668 | notify(property_name: string): void; |
| 1669 | /** |
| 1670 | * Emits a "notify" signal for the property specified by `pspec` on `object`. |
| 1671 | * |
| 1672 | * This function omits the property name lookup, hence it is faster than |
| 1673 | * g_object_notify(). |
| 1674 | * |
| 1675 | * One way to avoid using g_object_notify() from within the |
| 1676 | * class that registered the properties, and using g_object_notify_by_pspec() |
| 1677 | * instead, is to store the GParamSpec used with |
| 1678 | * g_object_class_install_property() inside a static array, e.g.: |
| 1679 | * |
| 1680 | * |
| 1681 | * ```c |
| 1682 | * typedef enum |
| 1683 | * { |
| 1684 | * PROP_FOO = 1, |
| 1685 | * PROP_LAST |
| 1686 | * } MyObjectProperty; |
| 1687 | * |
| 1688 | * static GParamSpec *properties[PROP_LAST]; |
| 1689 | * |
| 1690 | * static void |
| 1691 | * my_object_class_init (MyObjectClass *klass) |
| 1692 | * { |
| 1693 | * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, |
| 1694 | * 0, 100, |
| 1695 | * 50, |
| 1696 | * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 1697 | * g_object_class_install_property (gobject_class, |
| 1698 | * PROP_FOO, |
| 1699 | * properties[PROP_FOO]); |
| 1700 | * } |
| 1701 | * ``` |
| 1702 | * |
| 1703 | * |
| 1704 | * and then notify a change on the "foo" property with: |
| 1705 | * |
| 1706 | * |
| 1707 | * ```c |
| 1708 | * g_object_notify_by_pspec (self, properties[PROP_FOO]); |
| 1709 | * ``` |
| 1710 | * |
| 1711 | * @param pspec the #GParamSpec of a property installed on the class of @object. |
| 1712 | */ |
| 1713 | notify_by_pspec(pspec: GObject.ParamSpec): void; |
| 1714 | /** |
| 1715 | * Increases the reference count of `object`. |
| 1716 | * |
| 1717 | * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type |
| 1718 | * of `object` will be propagated to the return type (using the GCC typeof() |
| 1719 | * extension), so any casting the caller needs to do on the return type must be |
| 1720 | * explicit. |
| 1721 | * @returns the same @object |
| 1722 | */ |
| 1723 | ref(): GObject.Object; |
| 1724 | /** |
| 1725 | * Increase the reference count of `object,` and possibly remove the |
| 1726 | * [floating][floating-ref] reference, if `object` has a floating reference. |
| 1727 | * |
| 1728 | * In other words, if the object is floating, then this call "assumes |
| 1729 | * ownership" of the floating reference, converting it to a normal |
| 1730 | * reference by clearing the floating flag while leaving the reference |
| 1731 | * count unchanged. If the object is not floating, then this call |
| 1732 | * adds a new normal reference increasing the reference count by one. |
| 1733 | * |
| 1734 | * Since GLib 2.56, the type of `object` will be propagated to the return type |
| 1735 | * under the same conditions as for g_object_ref(). |
| 1736 | * @returns @object |
| 1737 | */ |
| 1738 | ref_sink(): GObject.Object; |
| 1739 | /** |
| 1740 | * Releases all references to other objects. This can be used to break |
| 1741 | * reference cycles. |
| 1742 | * |
| 1743 | * This function should only be called from object system implementations. |
| 1744 | */ |
| 1745 | run_dispose(): void; |
| 1746 | /** |
| 1747 | * Each object carries around a table of associations from |
| 1748 | * strings to pointers. This function lets you set an association. |
| 1749 | * |
| 1750 | * If the object already had an association with that name, |
| 1751 | * the old association will be destroyed. |
| 1752 | * |
| 1753 | * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). |
| 1754 | * This means a copy of `key` is kept permanently (even after `object` has been |
| 1755 | * finalized) — so it is recommended to only use a small, bounded set of values |
| 1756 | * for `key` in your program, to avoid the #GQuark storage growing unbounded. |
| 1757 | * @param key name of the key |
| 1758 | * @param data data to associate with that key |
| 1759 | */ |
| 1760 | set_data(key: string, data?: any | null): void; |
| 1761 | /** |
| 1762 | * Sets a property on an object. |
| 1763 | * @param property_name The name of the property to set |
| 1764 | * @param value The value to set the property to |
| 1765 | */ |
| 1766 | set_property(property_name: string, value: GObject.Value | any): void; |
| 1767 | /** |
| 1768 | * Remove a specified datum from the object's data associations, |
| 1769 | * without invoking the association's destroy handler. |
| 1770 | * @param key name of the key |
| 1771 | * @returns the data if found, or %NULL if no such data exists. |
| 1772 | */ |
| 1773 | steal_data(key: string): any | null; |
| 1774 | /** |
| 1775 | * This function gets back user data pointers stored via |
| 1776 | * g_object_set_qdata() and removes the `data` from object |
| 1777 | * without invoking its destroy() function (if any was |
| 1778 | * set). |
| 1779 | * Usually, calling this function is only required to update |
| 1780 | * user data pointers with a destroy notifier, for example: |
| 1781 | * |
| 1782 | * ```c |
| 1783 | * void |
| 1784 | * object_add_to_user_list (GObject *object, |
| 1785 | * const gchar *new_string) |
| 1786 | * { |
| 1787 | * // the quark, naming the object data |
| 1788 | * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); |
| 1789 | * // retrieve the old string list |
| 1790 | * GList *list = g_object_steal_qdata (object, quark_string_list); |
| 1791 | * |
| 1792 | * // prepend new string |
| 1793 | * list = g_list_prepend (list, g_strdup (new_string)); |
| 1794 | * // this changed 'list', so we need to set it again |
| 1795 | * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); |
| 1796 | * } |
| 1797 | * static void |
| 1798 | * free_string_list (gpointer data) |
| 1799 | * { |
| 1800 | * GList *node, *list = data; |
| 1801 | * |
| 1802 | * for (node = list; node; node = node->next) |
| 1803 | * g_free (node->data); |
| 1804 | * g_list_free (list); |
| 1805 | * } |
| 1806 | * ``` |
| 1807 | * |
| 1808 | * Using g_object_get_qdata() in the above example, instead of |
| 1809 | * g_object_steal_qdata() would have left the destroy function set, |
| 1810 | * and thus the partial string list would have been freed upon |
| 1811 | * g_object_set_qdata_full(). |
| 1812 | * @param quark A #GQuark, naming the user data pointer |
| 1813 | * @returns The user data pointer set, or %NULL |
| 1814 | */ |
| 1815 | steal_qdata(quark: GLib.Quark): any | null; |
| 1816 | /** |
| 1817 | * Reverts the effect of a previous call to |
| 1818 | * g_object_freeze_notify(). The freeze count is decreased on `object` |
| 1819 | * and when it reaches zero, queued "notify" signals are emitted. |
| 1820 | * |
| 1821 | * Duplicate notifications for each property are squashed so that at most one |
| 1822 | * #GObject::notify signal is emitted for each property, in the reverse order |
| 1823 | * in which they have been queued. |
| 1824 | * |
| 1825 | * It is an error to call this function when the freeze count is zero. |
| 1826 | */ |
| 1827 | thaw_notify(): void; |
| 1828 | /** |
| 1829 | * Decreases the reference count of `object`. When its reference count |
| 1830 | * drops to 0, the object is finalized (i.e. its memory is freed). |
| 1831 | * |
| 1832 | * If the pointer to the #GObject may be reused in future (for example, if it is |
| 1833 | * an instance variable of another object), it is recommended to clear the |
| 1834 | * pointer to %NULL rather than retain a dangling pointer to a potentially |
| 1835 | * invalid #GObject instance. Use g_clear_object() for this. |
| 1836 | */ |
| 1837 | unref(): void; |
| 1838 | /** |
| 1839 | * This function essentially limits the life time of the `closure` to |
| 1840 | * the life time of the object. That is, when the object is finalized, |
| 1841 | * the `closure` is invalidated by calling g_closure_invalidate() on |
| 1842 | * it, in order to prevent invocations of the closure with a finalized |
| 1843 | * (nonexisting) object. Also, g_object_ref() and g_object_unref() are |
| 1844 | * added as marshal guards to the `closure,` to ensure that an extra |
| 1845 | * reference count is held on `object` during invocation of the |
| 1846 | * `closure`. Usually, this function will be called on closures that |
| 1847 | * use this `object` as closure data. |
| 1848 | * @param closure #GClosure to watch |
| 1849 | */ |
| 1850 | watch_closure(closure: GObject.Closure): void; |
| 1851 | /** |
| 1852 | * the `constructed` function is called by g_object_new() as the |
| 1853 | * final step of the object creation process. At the point of the call, all |
| 1854 | * construction properties have been set on the object. The purpose of this |
| 1855 | * call is to allow for object initialisation steps that can only be performed |
| 1856 | * after construction properties have been set. `constructed` implementors |
| 1857 | * should chain up to the `constructed` call of their parent class to allow it |
| 1858 | * to complete its initialisation. |
| 1859 | */ |
| 1860 | vfunc_constructed(): void; |
| 1861 | /** |
| 1862 | * emits property change notification for a bunch |
| 1863 | * of properties. Overriding `dispatch_properties_changed` should be rarely |
| 1864 | * needed. |
| 1865 | * @param n_pspecs |
| 1866 | * @param pspecs |
| 1867 | */ |
| 1868 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; |
| 1869 | /** |
| 1870 | * the `dispose` function is supposed to drop all references to other |
| 1871 | * objects, but keep the instance otherwise intact, so that client method |
| 1872 | * invocations still work. It may be run multiple times (due to reference |
| 1873 | * loops). Before returning, `dispose` should chain up to the `dispose` method |
| 1874 | * of the parent class. |
| 1875 | */ |
| 1876 | vfunc_dispose(): void; |
| 1877 | /** |
| 1878 | * instance finalization function, should finish the finalization of |
| 1879 | * the instance begun in `dispose` and chain up to the `finalize` method of the |
| 1880 | * parent class. |
| 1881 | */ |
| 1882 | vfunc_finalize(): void; |
| 1883 | /** |
| 1884 | * the generic getter for all properties of this type. Should be |
| 1885 | * overridden for every type with properties. |
| 1886 | * @param property_id |
| 1887 | * @param value |
| 1888 | * @param pspec |
| 1889 | */ |
| 1890 | vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 1891 | /** |
| 1892 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 1893 | * |
| 1894 | * When possible, eg. when signaling a property change from within the class |
| 1895 | * that registered the property, you should use g_object_notify_by_pspec() |
| 1896 | * instead. |
| 1897 | * |
| 1898 | * Note that emission of the notify signal may be blocked with |
| 1899 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 1900 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 1901 | * called. |
| 1902 | * @param pspec |
| 1903 | */ |
| 1904 | vfunc_notify(pspec: GObject.ParamSpec): void; |
| 1905 | /** |
| 1906 | * the generic setter for all properties of this type. Should be |
| 1907 | * overridden for every type with properties. If implementations of |
| 1908 | * `set_property` don't emit property change notification explicitly, this will |
| 1909 | * be done implicitly by the type system. However, if the notify signal is |
| 1910 | * emitted explicitly, the type system will not emit it a second time. |
| 1911 | * @param property_id |
| 1912 | * @param value |
| 1913 | * @param pspec |
| 1914 | */ |
| 1915 | vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 1916 | /** |
| 1917 | * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. |
| 1918 | * @param id Handler ID of the handler to be disconnected |
| 1919 | */ |
| 1920 | disconnect(id: number): void; |
| 1921 | /** |
| 1922 | * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. |
| 1923 | * @param properties Object containing the properties to set |
| 1924 | */ |
| 1925 | set(properties: { [key: string]: any }): void; |
| 1926 | /** |
| 1927 | * Blocks a handler of an instance so it will not be called during any signal emissions |
| 1928 | * @param id Handler ID of the handler to be blocked |
| 1929 | */ |
| 1930 | block_signal_handler(id: number): void; |
| 1931 | /** |
| 1932 | * Unblocks a handler so it will be called again during any signal emissions |
| 1933 | * @param id Handler ID of the handler to be unblocked |
| 1934 | */ |
| 1935 | unblock_signal_handler(id: number): void; |
| 1936 | /** |
| 1937 | * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. |
| 1938 | * @param detailedName Name of the signal to stop emission of |
| 1939 | */ |
| 1940 | stop_emission_by_name(detailedName: string): void; |
| 1941 | } |
| 1942 | |
| 1943 | namespace LocationProxy { |
| 1944 | // Constructor properties interface |
| 1945 | |
| 1946 | interface ConstructorProps |
| 1947 | extends Gio.DBusProxy.ConstructorProps, |
| 1948 | Location.ConstructorProps, |
| 1949 | Gio.AsyncInitable.ConstructorProps, |
| 1950 | Gio.DBusInterface.ConstructorProps, |
| 1951 | Gio.Initable.ConstructorProps {} |
| 1952 | } |
| 1953 | |
| 1954 | /** |
| 1955 | * The #GClueLocationProxy structure contains only private data and should only be accessed using the provided API. |
| 1956 | */ |
| 1957 | class LocationProxy |
| 1958 | extends Gio.DBusProxy |
| 1959 | implements Location, Gio.AsyncInitable<LocationProxy>, Gio.DBusInterface, Gio.Initable |
| 1960 | { |
| 1961 | static $gtype: GObject.GType<LocationProxy>; |
| 1962 | |
| 1963 | // Constructors |
| 1964 | |
| 1965 | constructor(properties?: Partial<LocationProxy.ConstructorProps>, ...args: any[]); |
| 1966 | |
| 1967 | _init(...args: any[]): void; |
| 1968 | |
| 1969 | static new_finish(res: Gio.AsyncResult): LocationProxy; |
| 1970 | // Conflicted with Gio.AsyncInitable.new_finish |
| 1971 | |
| 1972 | static new_finish(...args: never[]): any; |
| 1973 | |
| 1974 | static new_for_bus_finish(res: Gio.AsyncResult): LocationProxy; |
| 1975 | |
| 1976 | static new_for_bus_sync( |
| 1977 | bus_type: Gio.BusType, |
| 1978 | flags: Gio.DBusProxyFlags, |
| 1979 | name: string, |
| 1980 | object_path: string, |
| 1981 | cancellable?: Gio.Cancellable | null, |
| 1982 | ): LocationProxy; |
| 1983 | // Conflicted with Gio.DBusProxy.new_for_bus_sync |
| 1984 | |
| 1985 | static new_for_bus_sync(...args: never[]): any; |
| 1986 | |
| 1987 | static new_sync( |
| 1988 | connection: Gio.DBusConnection, |
| 1989 | flags: Gio.DBusProxyFlags, |
| 1990 | name: string | null, |
| 1991 | object_path: string, |
| 1992 | cancellable?: Gio.Cancellable | null, |
| 1993 | ): LocationProxy; |
| 1994 | // Conflicted with Gio.DBusProxy.new_sync |
| 1995 | |
| 1996 | static new_sync(...args: never[]): any; |
| 1997 | |
| 1998 | // Static methods |
| 1999 | |
| 2000 | /** |
| 2001 | * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Location.top_of_page">org.freedesktop.GeoClue2.Location</link>. See g_dbus_proxy_new() for more details. |
| 2002 | * |
| 2003 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 2004 | * You can then call gclue_location_proxy_new_finish() to get the result of the operation. |
| 2005 | * |
| 2006 | * See gclue_location_proxy_new_sync() for the synchronous, blocking version of this constructor. |
| 2007 | * @param connection A #GDBusConnection. |
| 2008 | * @param flags Flags from the #GDBusProxyFlags enumeration. |
| 2009 | * @param name A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
| 2010 | * @param object_path An object path. |
| 2011 | * @param cancellable A #GCancellable or %NULL. |
| 2012 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied. |
| 2013 | */ |
| 2014 | static ['new']( |
| 2015 | connection: Gio.DBusConnection, |
| 2016 | flags: Gio.DBusProxyFlags, |
| 2017 | name: string | null, |
| 2018 | object_path: string, |
| 2019 | cancellable?: Gio.Cancellable | null, |
| 2020 | callback?: Gio.AsyncReadyCallback<LocationProxy> | null, |
| 2021 | ): void; |
| 2022 | // Conflicted with Gio.DBusProxy.new |
| 2023 | static ['new'](...args: never[]): any; |
| 2024 | /** |
| 2025 | * Like gclue_location_proxy_new() but takes a #GBusType instead of a #GDBusConnection. |
| 2026 | * |
| 2027 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 2028 | * You can then call gclue_location_proxy_new_for_bus_finish() to get the result of the operation. |
| 2029 | * |
| 2030 | * See gclue_location_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. |
| 2031 | * @param bus_type A #GBusType. |
| 2032 | * @param flags Flags from the #GDBusProxyFlags enumeration. |
| 2033 | * @param name A bus name (well-known or unique). |
| 2034 | * @param object_path An object path. |
| 2035 | * @param cancellable A #GCancellable or %NULL. |
| 2036 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied. |
| 2037 | */ |
| 2038 | static new_for_bus( |
| 2039 | bus_type: Gio.BusType, |
| 2040 | flags: Gio.DBusProxyFlags, |
| 2041 | name: string, |
| 2042 | object_path: string, |
| 2043 | cancellable?: Gio.Cancellable | null, |
| 2044 | callback?: Gio.AsyncReadyCallback<LocationProxy> | null, |
| 2045 | ): void; |
| 2046 | // Conflicted with Gio.DBusProxy.new_for_bus |
| 2047 | static new_for_bus(...args: never[]): any; |
| 2048 | |
| 2049 | // Inherited properties |
| 2050 | /** |
| 2051 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Accuracy">"Accuracy"</link>. |
| 2052 | * |
| 2053 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2054 | */ |
| 2055 | get accuracy(): number; |
| 2056 | set accuracy(val: number); |
| 2057 | /** |
| 2058 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Altitude">"Altitude"</link>. |
| 2059 | * |
| 2060 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2061 | */ |
| 2062 | get altitude(): number; |
| 2063 | set altitude(val: number); |
| 2064 | /** |
| 2065 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Description">"Description"</link>. |
| 2066 | * |
| 2067 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2068 | */ |
| 2069 | get description(): string; |
| 2070 | set description(val: string); |
| 2071 | /** |
| 2072 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Heading">"Heading"</link>. |
| 2073 | * |
| 2074 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2075 | */ |
| 2076 | get heading(): number; |
| 2077 | set heading(val: number); |
| 2078 | /** |
| 2079 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Latitude">"Latitude"</link>. |
| 2080 | * |
| 2081 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2082 | */ |
| 2083 | get latitude(): number; |
| 2084 | set latitude(val: number); |
| 2085 | /** |
| 2086 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Longitude">"Longitude"</link>. |
| 2087 | * |
| 2088 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2089 | */ |
| 2090 | get longitude(): number; |
| 2091 | set longitude(val: number); |
| 2092 | /** |
| 2093 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Speed">"Speed"</link>. |
| 2094 | * |
| 2095 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2096 | */ |
| 2097 | get speed(): number; |
| 2098 | set speed(val: number); |
| 2099 | /** |
| 2100 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Timestamp">"Timestamp"</link>. |
| 2101 | * |
| 2102 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2103 | */ |
| 2104 | get timestamp(): GLib.Variant; |
| 2105 | set timestamp(val: GLib.Variant); |
| 2106 | |
| 2107 | // Inherited methods |
| 2108 | /** |
| 2109 | * Starts asynchronous initialization of the object implementing the |
| 2110 | * interface. This must be done before any real use of the object after |
| 2111 | * initial construction. If the object also implements #GInitable you can |
| 2112 | * optionally call g_initable_init() instead. |
| 2113 | * |
| 2114 | * This method is intended for language bindings. If writing in C, |
| 2115 | * g_async_initable_new_async() should typically be used instead. |
| 2116 | * |
| 2117 | * When the initialization is finished, `callback` will be called. You can |
| 2118 | * then call g_async_initable_init_finish() to get the result of the |
| 2119 | * initialization. |
| 2120 | * |
| 2121 | * Implementations may also support cancellation. If `cancellable` is not |
| 2122 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 2123 | * object from another thread. If the operation was cancelled, the error |
| 2124 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 2125 | * the object doesn't support cancellable initialization, the error |
| 2126 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 2127 | * |
| 2128 | * As with #GInitable, if the object is not initialized, or initialization |
| 2129 | * returns with an error, then all operations on the object except |
| 2130 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 2131 | * have undefined behaviour. They will often fail with g_critical() or |
| 2132 | * g_warning(), but this must not be relied on. |
| 2133 | * |
| 2134 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 2135 | * be initialized multiple times; for more information, see g_initable_init(). |
| 2136 | * If a class explicitly supports being initialized multiple times, |
| 2137 | * implementation requires yielding all subsequent calls to init_async() on the |
| 2138 | * results of the first call. |
| 2139 | * |
| 2140 | * For classes that also support the #GInitable interface, the default |
| 2141 | * implementation of this method will run the g_initable_init() function |
| 2142 | * in a thread, so if you want to support asynchronous initialization via |
| 2143 | * threads, just implement the #GAsyncInitable interface without overriding |
| 2144 | * any interface methods. |
| 2145 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 2146 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 2147 | */ |
| 2148 | init_async(io_priority: number, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 2149 | /** |
| 2150 | * Starts asynchronous initialization of the object implementing the |
| 2151 | * interface. This must be done before any real use of the object after |
| 2152 | * initial construction. If the object also implements #GInitable you can |
| 2153 | * optionally call g_initable_init() instead. |
| 2154 | * |
| 2155 | * This method is intended for language bindings. If writing in C, |
| 2156 | * g_async_initable_new_async() should typically be used instead. |
| 2157 | * |
| 2158 | * When the initialization is finished, `callback` will be called. You can |
| 2159 | * then call g_async_initable_init_finish() to get the result of the |
| 2160 | * initialization. |
| 2161 | * |
| 2162 | * Implementations may also support cancellation. If `cancellable` is not |
| 2163 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 2164 | * object from another thread. If the operation was cancelled, the error |
| 2165 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 2166 | * the object doesn't support cancellable initialization, the error |
| 2167 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 2168 | * |
| 2169 | * As with #GInitable, if the object is not initialized, or initialization |
| 2170 | * returns with an error, then all operations on the object except |
| 2171 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 2172 | * have undefined behaviour. They will often fail with g_critical() or |
| 2173 | * g_warning(), but this must not be relied on. |
| 2174 | * |
| 2175 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 2176 | * be initialized multiple times; for more information, see g_initable_init(). |
| 2177 | * If a class explicitly supports being initialized multiple times, |
| 2178 | * implementation requires yielding all subsequent calls to init_async() on the |
| 2179 | * results of the first call. |
| 2180 | * |
| 2181 | * For classes that also support the #GInitable interface, the default |
| 2182 | * implementation of this method will run the g_initable_init() function |
| 2183 | * in a thread, so if you want to support asynchronous initialization via |
| 2184 | * threads, just implement the #GAsyncInitable interface without overriding |
| 2185 | * any interface methods. |
| 2186 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 2187 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 2188 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 2189 | */ |
| 2190 | init_async( |
| 2191 | io_priority: number, |
| 2192 | cancellable: Gio.Cancellable | null, |
| 2193 | callback: Gio.AsyncReadyCallback<this> | null, |
| 2194 | ): void; |
| 2195 | /** |
| 2196 | * Starts asynchronous initialization of the object implementing the |
| 2197 | * interface. This must be done before any real use of the object after |
| 2198 | * initial construction. If the object also implements #GInitable you can |
| 2199 | * optionally call g_initable_init() instead. |
| 2200 | * |
| 2201 | * This method is intended for language bindings. If writing in C, |
| 2202 | * g_async_initable_new_async() should typically be used instead. |
| 2203 | * |
| 2204 | * When the initialization is finished, `callback` will be called. You can |
| 2205 | * then call g_async_initable_init_finish() to get the result of the |
| 2206 | * initialization. |
| 2207 | * |
| 2208 | * Implementations may also support cancellation. If `cancellable` is not |
| 2209 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 2210 | * object from another thread. If the operation was cancelled, the error |
| 2211 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 2212 | * the object doesn't support cancellable initialization, the error |
| 2213 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 2214 | * |
| 2215 | * As with #GInitable, if the object is not initialized, or initialization |
| 2216 | * returns with an error, then all operations on the object except |
| 2217 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 2218 | * have undefined behaviour. They will often fail with g_critical() or |
| 2219 | * g_warning(), but this must not be relied on. |
| 2220 | * |
| 2221 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 2222 | * be initialized multiple times; for more information, see g_initable_init(). |
| 2223 | * If a class explicitly supports being initialized multiple times, |
| 2224 | * implementation requires yielding all subsequent calls to init_async() on the |
| 2225 | * results of the first call. |
| 2226 | * |
| 2227 | * For classes that also support the #GInitable interface, the default |
| 2228 | * implementation of this method will run the g_initable_init() function |
| 2229 | * in a thread, so if you want to support asynchronous initialization via |
| 2230 | * threads, just implement the #GAsyncInitable interface without overriding |
| 2231 | * any interface methods. |
| 2232 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 2233 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 2234 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 2235 | */ |
| 2236 | init_async( |
| 2237 | io_priority: number, |
| 2238 | cancellable?: Gio.Cancellable | null, |
| 2239 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 2240 | ): Promise<boolean> | void; |
| 2241 | /** |
| 2242 | * Finishes asynchronous initialization and returns the result. |
| 2243 | * See g_async_initable_init_async(). |
| 2244 | * @param res a #GAsyncResult. |
| 2245 | * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. |
| 2246 | */ |
| 2247 | init_finish(res: Gio.AsyncResult): boolean; |
| 2248 | /** |
| 2249 | * Finishes the async construction for the various g_async_initable_new |
| 2250 | * calls, returning the created object or %NULL on error. |
| 2251 | * @param res the #GAsyncResult from the callback |
| 2252 | * @returns a newly created #GObject, or %NULL on error. Free with g_object_unref(). |
| 2253 | */ |
| 2254 | new_finish(res: Gio.AsyncResult): LocationProxy; |
| 2255 | // Conflicted with Gio.DBusProxy.new_finish |
| 2256 | new_finish(...args: never[]): any; |
| 2257 | /** |
| 2258 | * Starts asynchronous initialization of the object implementing the |
| 2259 | * interface. This must be done before any real use of the object after |
| 2260 | * initial construction. If the object also implements #GInitable you can |
| 2261 | * optionally call g_initable_init() instead. |
| 2262 | * |
| 2263 | * This method is intended for language bindings. If writing in C, |
| 2264 | * g_async_initable_new_async() should typically be used instead. |
| 2265 | * |
| 2266 | * When the initialization is finished, `callback` will be called. You can |
| 2267 | * then call g_async_initable_init_finish() to get the result of the |
| 2268 | * initialization. |
| 2269 | * |
| 2270 | * Implementations may also support cancellation. If `cancellable` is not |
| 2271 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 2272 | * object from another thread. If the operation was cancelled, the error |
| 2273 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 2274 | * the object doesn't support cancellable initialization, the error |
| 2275 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 2276 | * |
| 2277 | * As with #GInitable, if the object is not initialized, or initialization |
| 2278 | * returns with an error, then all operations on the object except |
| 2279 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 2280 | * have undefined behaviour. They will often fail with g_critical() or |
| 2281 | * g_warning(), but this must not be relied on. |
| 2282 | * |
| 2283 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 2284 | * be initialized multiple times; for more information, see g_initable_init(). |
| 2285 | * If a class explicitly supports being initialized multiple times, |
| 2286 | * implementation requires yielding all subsequent calls to init_async() on the |
| 2287 | * results of the first call. |
| 2288 | * |
| 2289 | * For classes that also support the #GInitable interface, the default |
| 2290 | * implementation of this method will run the g_initable_init() function |
| 2291 | * in a thread, so if you want to support asynchronous initialization via |
| 2292 | * threads, just implement the #GAsyncInitable interface without overriding |
| 2293 | * any interface methods. |
| 2294 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 2295 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 2296 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 2297 | */ |
| 2298 | vfunc_init_async( |
| 2299 | io_priority: number, |
| 2300 | cancellable?: Gio.Cancellable | null, |
| 2301 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 2302 | ): void; |
| 2303 | /** |
| 2304 | * Finishes asynchronous initialization and returns the result. |
| 2305 | * See g_async_initable_init_async(). |
| 2306 | * @param res a #GAsyncResult. |
| 2307 | */ |
| 2308 | vfunc_init_finish(res: Gio.AsyncResult): boolean; |
| 2309 | /** |
| 2310 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 2311 | * @returns A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref(). |
| 2312 | */ |
| 2313 | get_object(): Gio.DBusObject | null; |
| 2314 | /** |
| 2315 | * Gets D-Bus introspection information for the D-Bus interface |
| 2316 | * implemented by `interface_`. |
| 2317 | * @returns A #GDBusInterfaceInfo. Do not free. |
| 2318 | */ |
| 2319 | get_info(): Gio.DBusInterfaceInfo; |
| 2320 | /** |
| 2321 | * Sets the #GDBusObject for `interface_` to `object`. |
| 2322 | * |
| 2323 | * Note that `interface_` will hold a weak reference to `object`. |
| 2324 | * @param object A #GDBusObject or %NULL. |
| 2325 | */ |
| 2326 | set_object(object?: Gio.DBusObject | null): void; |
| 2327 | /** |
| 2328 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 2329 | */ |
| 2330 | vfunc_dup_object(): Gio.DBusObject | null; |
| 2331 | /** |
| 2332 | * Gets D-Bus introspection information for the D-Bus interface |
| 2333 | * implemented by `interface_`. |
| 2334 | */ |
| 2335 | vfunc_get_info(): Gio.DBusInterfaceInfo; |
| 2336 | /** |
| 2337 | * Sets the #GDBusObject for `interface_` to `object`. |
| 2338 | * |
| 2339 | * Note that `interface_` will hold a weak reference to `object`. |
| 2340 | * @param object A #GDBusObject or %NULL. |
| 2341 | */ |
| 2342 | vfunc_set_object(object?: Gio.DBusObject | null): void; |
| 2343 | /** |
| 2344 | * Initializes the object implementing the interface. |
| 2345 | * |
| 2346 | * This method is intended for language bindings. If writing in C, |
| 2347 | * g_initable_new() should typically be used instead. |
| 2348 | * |
| 2349 | * The object must be initialized before any real use after initial |
| 2350 | * construction, either with this function or g_async_initable_init_async(). |
| 2351 | * |
| 2352 | * Implementations may also support cancellation. If `cancellable` is not %NULL, |
| 2353 | * then initialization can be cancelled by triggering the cancellable object |
| 2354 | * from another thread. If the operation was cancelled, the error |
| 2355 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and |
| 2356 | * the object doesn't support cancellable initialization the error |
| 2357 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 2358 | * |
| 2359 | * If the object is not initialized, or initialization returns with an |
| 2360 | * error, then all operations on the object except g_object_ref() and |
| 2361 | * g_object_unref() are considered to be invalid, and have undefined |
| 2362 | * behaviour. See the [description][iface`Gio`.Initable#description] for more details. |
| 2363 | * |
| 2364 | * Callers should not assume that a class which implements #GInitable can be |
| 2365 | * initialized multiple times, unless the class explicitly documents itself as |
| 2366 | * supporting this. Generally, a class’ implementation of init() can assume |
| 2367 | * (and assert) that it will only be called once. Previously, this documentation |
| 2368 | * recommended all #GInitable implementations should be idempotent; that |
| 2369 | * recommendation was relaxed in GLib 2.54. |
| 2370 | * |
| 2371 | * If a class explicitly supports being initialized multiple times, it is |
| 2372 | * recommended that the method is idempotent: multiple calls with the same |
| 2373 | * arguments should return the same results. Only the first call initializes |
| 2374 | * the object; further calls return the result of the first call. |
| 2375 | * |
| 2376 | * One reason why a class might need to support idempotent initialization is if |
| 2377 | * it is designed to be used via the singleton pattern, with a |
| 2378 | * #GObjectClass.constructor that sometimes returns an existing instance. |
| 2379 | * In this pattern, a caller would expect to be able to call g_initable_init() |
| 2380 | * on the result of g_object_new(), regardless of whether it is in fact a new |
| 2381 | * instance. |
| 2382 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 2383 | * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. |
| 2384 | */ |
| 2385 | init(cancellable?: Gio.Cancellable | null): boolean; |
| 2386 | /** |
| 2387 | * Initializes the object implementing the interface. |
| 2388 | * |
| 2389 | * This method is intended for language bindings. If writing in C, |
| 2390 | * g_initable_new() should typically be used instead. |
| 2391 | * |
| 2392 | * The object must be initialized before any real use after initial |
| 2393 | * construction, either with this function or g_async_initable_init_async(). |
| 2394 | * |
| 2395 | * Implementations may also support cancellation. If `cancellable` is not %NULL, |
| 2396 | * then initialization can be cancelled by triggering the cancellable object |
| 2397 | * from another thread. If the operation was cancelled, the error |
| 2398 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and |
| 2399 | * the object doesn't support cancellable initialization the error |
| 2400 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 2401 | * |
| 2402 | * If the object is not initialized, or initialization returns with an |
| 2403 | * error, then all operations on the object except g_object_ref() and |
| 2404 | * g_object_unref() are considered to be invalid, and have undefined |
| 2405 | * behaviour. See the [description][iface`Gio`.Initable#description] for more details. |
| 2406 | * |
| 2407 | * Callers should not assume that a class which implements #GInitable can be |
| 2408 | * initialized multiple times, unless the class explicitly documents itself as |
| 2409 | * supporting this. Generally, a class’ implementation of init() can assume |
| 2410 | * (and assert) that it will only be called once. Previously, this documentation |
| 2411 | * recommended all #GInitable implementations should be idempotent; that |
| 2412 | * recommendation was relaxed in GLib 2.54. |
| 2413 | * |
| 2414 | * If a class explicitly supports being initialized multiple times, it is |
| 2415 | * recommended that the method is idempotent: multiple calls with the same |
| 2416 | * arguments should return the same results. Only the first call initializes |
| 2417 | * the object; further calls return the result of the first call. |
| 2418 | * |
| 2419 | * One reason why a class might need to support idempotent initialization is if |
| 2420 | * it is designed to be used via the singleton pattern, with a |
| 2421 | * #GObjectClass.constructor that sometimes returns an existing instance. |
| 2422 | * In this pattern, a caller would expect to be able to call g_initable_init() |
| 2423 | * on the result of g_object_new(), regardless of whether it is in fact a new |
| 2424 | * instance. |
| 2425 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 2426 | */ |
| 2427 | vfunc_init(cancellable?: Gio.Cancellable | null): boolean; |
| 2428 | /** |
| 2429 | * Creates a binding between `source_property` on `source` and `target_property` |
| 2430 | * on `target`. |
| 2431 | * |
| 2432 | * Whenever the `source_property` is changed the `target_property` is |
| 2433 | * updated using the same value. For instance: |
| 2434 | * |
| 2435 | * |
| 2436 | * ```c |
| 2437 | * g_object_bind_property (action, "active", widget, "sensitive", 0); |
| 2438 | * ``` |
| 2439 | * |
| 2440 | * |
| 2441 | * Will result in the "sensitive" property of the widget #GObject instance to be |
| 2442 | * updated with the same value of the "active" property of the action #GObject |
| 2443 | * instance. |
| 2444 | * |
| 2445 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 2446 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 2447 | * will be updated as well. |
| 2448 | * |
| 2449 | * The binding will automatically be removed when either the `source` or the |
| 2450 | * `target` instances are finalized. To remove the binding without affecting the |
| 2451 | * `source` and the `target` you can just call g_object_unref() on the returned |
| 2452 | * #GBinding instance. |
| 2453 | * |
| 2454 | * Removing the binding by calling g_object_unref() on it must only be done if |
| 2455 | * the binding, `source` and `target` are only used from a single thread and it |
| 2456 | * is clear that both `source` and `target` outlive the binding. Especially it |
| 2457 | * is not safe to rely on this if the binding, `source` or `target` can be |
| 2458 | * finalized from different threads. Keep another reference to the binding and |
| 2459 | * use g_binding_unbind() instead to be on the safe side. |
| 2460 | * |
| 2461 | * A #GObject can have multiple bindings. |
| 2462 | * @param source_property the property on @source to bind |
| 2463 | * @param target the target #GObject |
| 2464 | * @param target_property the property on @target to bind |
| 2465 | * @param flags flags to pass to #GBinding |
| 2466 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 2467 | */ |
| 2468 | bind_property( |
| 2469 | source_property: string, |
| 2470 | target: GObject.Object, |
| 2471 | target_property: string, |
| 2472 | flags: GObject.BindingFlags | null, |
| 2473 | ): GObject.Binding; |
| 2474 | /** |
| 2475 | * Complete version of g_object_bind_property(). |
| 2476 | * |
| 2477 | * Creates a binding between `source_property` on `source` and `target_property` |
| 2478 | * on `target,` allowing you to set the transformation functions to be used by |
| 2479 | * the binding. |
| 2480 | * |
| 2481 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 2482 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 2483 | * will be updated as well. The `transform_from` function is only used in case |
| 2484 | * of bidirectional bindings, otherwise it will be ignored |
| 2485 | * |
| 2486 | * The binding will automatically be removed when either the `source` or the |
| 2487 | * `target` instances are finalized. This will release the reference that is |
| 2488 | * being held on the #GBinding instance; if you want to hold on to the |
| 2489 | * #GBinding instance, you will need to hold a reference to it. |
| 2490 | * |
| 2491 | * To remove the binding, call g_binding_unbind(). |
| 2492 | * |
| 2493 | * A #GObject can have multiple bindings. |
| 2494 | * |
| 2495 | * The same `user_data` parameter will be used for both `transform_to` |
| 2496 | * and `transform_from` transformation functions; the `notify` function will |
| 2497 | * be called once, when the binding is removed. If you need different data |
| 2498 | * for each transformation function, please use |
| 2499 | * g_object_bind_property_with_closures() instead. |
| 2500 | * @param source_property the property on @source to bind |
| 2501 | * @param target the target #GObject |
| 2502 | * @param target_property the property on @target to bind |
| 2503 | * @param flags flags to pass to #GBinding |
| 2504 | * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default |
| 2505 | * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default |
| 2506 | * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required |
| 2507 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 2508 | */ |
| 2509 | bind_property_full( |
| 2510 | source_property: string, |
| 2511 | target: GObject.Object, |
| 2512 | target_property: string, |
| 2513 | flags: GObject.BindingFlags | null, |
| 2514 | transform_to?: GObject.BindingTransformFunc | null, |
| 2515 | transform_from?: GObject.BindingTransformFunc | null, |
| 2516 | notify?: GLib.DestroyNotify | null, |
| 2517 | ): GObject.Binding; |
| 2518 | // Conflicted with GObject.Object.bind_property_full |
| 2519 | bind_property_full(...args: never[]): any; |
| 2520 | /** |
| 2521 | * This function is intended for #GObject implementations to re-enforce |
| 2522 | * a [floating][floating-ref] object reference. Doing this is seldom |
| 2523 | * required: all #GInitiallyUnowneds are created with a floating reference |
| 2524 | * which usually just needs to be sunken by calling g_object_ref_sink(). |
| 2525 | */ |
| 2526 | force_floating(): void; |
| 2527 | /** |
| 2528 | * Increases the freeze count on `object`. If the freeze count is |
| 2529 | * non-zero, the emission of "notify" signals on `object` is |
| 2530 | * stopped. The signals are queued until the freeze count is decreased |
| 2531 | * to zero. Duplicate notifications are squashed so that at most one |
| 2532 | * #GObject::notify signal is emitted for each property modified while the |
| 2533 | * object is frozen. |
| 2534 | * |
| 2535 | * This is necessary for accessors that modify multiple properties to prevent |
| 2536 | * premature notification while the object is still being modified. |
| 2537 | */ |
| 2538 | freeze_notify(): void; |
| 2539 | /** |
| 2540 | * Gets a named field from the objects table of associations (see g_object_set_data()). |
| 2541 | * @param key name of the key for that association |
| 2542 | * @returns the data if found, or %NULL if no such data exists. |
| 2543 | */ |
| 2544 | get_data(key: string): any | null; |
| 2545 | /** |
| 2546 | * Gets a property of an object. |
| 2547 | * |
| 2548 | * The value can be: |
| 2549 | * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) |
| 2550 | * - a GObject.Value initialized with the expected type of the property |
| 2551 | * - a GObject.Value initialized with a type to which the expected type of the property can be transformed |
| 2552 | * |
| 2553 | * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. |
| 2554 | * |
| 2555 | * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. |
| 2556 | * @param property_name The name of the property to get |
| 2557 | * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type |
| 2558 | */ |
| 2559 | get_property(property_name: string, value: GObject.Value | any): any; |
| 2560 | /** |
| 2561 | * This function gets back user data pointers stored via |
| 2562 | * g_object_set_qdata(). |
| 2563 | * @param quark A #GQuark, naming the user data pointer |
| 2564 | * @returns The user data pointer set, or %NULL |
| 2565 | */ |
| 2566 | get_qdata(quark: GLib.Quark): any | null; |
| 2567 | /** |
| 2568 | * Gets `n_properties` properties for an `object`. |
| 2569 | * Obtained properties will be set to `values`. All properties must be valid. |
| 2570 | * Warnings will be emitted and undefined behaviour may result if invalid |
| 2571 | * properties are passed in. |
| 2572 | * @param names the names of each property to get |
| 2573 | * @param values the values of each property to get |
| 2574 | */ |
| 2575 | getv(names: string[], values: (GObject.Value | any)[]): void; |
| 2576 | /** |
| 2577 | * Checks whether `object` has a [floating][floating-ref] reference. |
| 2578 | * @returns %TRUE if @object has a floating reference |
| 2579 | */ |
| 2580 | is_floating(): boolean; |
| 2581 | /** |
| 2582 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 2583 | * |
| 2584 | * When possible, eg. when signaling a property change from within the class |
| 2585 | * that registered the property, you should use g_object_notify_by_pspec() |
| 2586 | * instead. |
| 2587 | * |
| 2588 | * Note that emission of the notify signal may be blocked with |
| 2589 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 2590 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 2591 | * called. |
| 2592 | * @param property_name the name of a property installed on the class of @object. |
| 2593 | */ |
| 2594 | notify(property_name: string): void; |
| 2595 | /** |
| 2596 | * Emits a "notify" signal for the property specified by `pspec` on `object`. |
| 2597 | * |
| 2598 | * This function omits the property name lookup, hence it is faster than |
| 2599 | * g_object_notify(). |
| 2600 | * |
| 2601 | * One way to avoid using g_object_notify() from within the |
| 2602 | * class that registered the properties, and using g_object_notify_by_pspec() |
| 2603 | * instead, is to store the GParamSpec used with |
| 2604 | * g_object_class_install_property() inside a static array, e.g.: |
| 2605 | * |
| 2606 | * |
| 2607 | * ```c |
| 2608 | * typedef enum |
| 2609 | * { |
| 2610 | * PROP_FOO = 1, |
| 2611 | * PROP_LAST |
| 2612 | * } MyObjectProperty; |
| 2613 | * |
| 2614 | * static GParamSpec *properties[PROP_LAST]; |
| 2615 | * |
| 2616 | * static void |
| 2617 | * my_object_class_init (MyObjectClass *klass) |
| 2618 | * { |
| 2619 | * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, |
| 2620 | * 0, 100, |
| 2621 | * 50, |
| 2622 | * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 2623 | * g_object_class_install_property (gobject_class, |
| 2624 | * PROP_FOO, |
| 2625 | * properties[PROP_FOO]); |
| 2626 | * } |
| 2627 | * ``` |
| 2628 | * |
| 2629 | * |
| 2630 | * and then notify a change on the "foo" property with: |
| 2631 | * |
| 2632 | * |
| 2633 | * ```c |
| 2634 | * g_object_notify_by_pspec (self, properties[PROP_FOO]); |
| 2635 | * ``` |
| 2636 | * |
| 2637 | * @param pspec the #GParamSpec of a property installed on the class of @object. |
| 2638 | */ |
| 2639 | notify_by_pspec(pspec: GObject.ParamSpec): void; |
| 2640 | /** |
| 2641 | * Increases the reference count of `object`. |
| 2642 | * |
| 2643 | * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type |
| 2644 | * of `object` will be propagated to the return type (using the GCC typeof() |
| 2645 | * extension), so any casting the caller needs to do on the return type must be |
| 2646 | * explicit. |
| 2647 | * @returns the same @object |
| 2648 | */ |
| 2649 | ref(): GObject.Object; |
| 2650 | /** |
| 2651 | * Increase the reference count of `object,` and possibly remove the |
| 2652 | * [floating][floating-ref] reference, if `object` has a floating reference. |
| 2653 | * |
| 2654 | * In other words, if the object is floating, then this call "assumes |
| 2655 | * ownership" of the floating reference, converting it to a normal |
| 2656 | * reference by clearing the floating flag while leaving the reference |
| 2657 | * count unchanged. If the object is not floating, then this call |
| 2658 | * adds a new normal reference increasing the reference count by one. |
| 2659 | * |
| 2660 | * Since GLib 2.56, the type of `object` will be propagated to the return type |
| 2661 | * under the same conditions as for g_object_ref(). |
| 2662 | * @returns @object |
| 2663 | */ |
| 2664 | ref_sink(): GObject.Object; |
| 2665 | /** |
| 2666 | * Releases all references to other objects. This can be used to break |
| 2667 | * reference cycles. |
| 2668 | * |
| 2669 | * This function should only be called from object system implementations. |
| 2670 | */ |
| 2671 | run_dispose(): void; |
| 2672 | /** |
| 2673 | * Each object carries around a table of associations from |
| 2674 | * strings to pointers. This function lets you set an association. |
| 2675 | * |
| 2676 | * If the object already had an association with that name, |
| 2677 | * the old association will be destroyed. |
| 2678 | * |
| 2679 | * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). |
| 2680 | * This means a copy of `key` is kept permanently (even after `object` has been |
| 2681 | * finalized) — so it is recommended to only use a small, bounded set of values |
| 2682 | * for `key` in your program, to avoid the #GQuark storage growing unbounded. |
| 2683 | * @param key name of the key |
| 2684 | * @param data data to associate with that key |
| 2685 | */ |
| 2686 | set_data(key: string, data?: any | null): void; |
| 2687 | /** |
| 2688 | * Sets a property on an object. |
| 2689 | * @param property_name The name of the property to set |
| 2690 | * @param value The value to set the property to |
| 2691 | */ |
| 2692 | set_property(property_name: string, value: GObject.Value | any): void; |
| 2693 | /** |
| 2694 | * Remove a specified datum from the object's data associations, |
| 2695 | * without invoking the association's destroy handler. |
| 2696 | * @param key name of the key |
| 2697 | * @returns the data if found, or %NULL if no such data exists. |
| 2698 | */ |
| 2699 | steal_data(key: string): any | null; |
| 2700 | /** |
| 2701 | * This function gets back user data pointers stored via |
| 2702 | * g_object_set_qdata() and removes the `data` from object |
| 2703 | * without invoking its destroy() function (if any was |
| 2704 | * set). |
| 2705 | * Usually, calling this function is only required to update |
| 2706 | * user data pointers with a destroy notifier, for example: |
| 2707 | * |
| 2708 | * ```c |
| 2709 | * void |
| 2710 | * object_add_to_user_list (GObject *object, |
| 2711 | * const gchar *new_string) |
| 2712 | * { |
| 2713 | * // the quark, naming the object data |
| 2714 | * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); |
| 2715 | * // retrieve the old string list |
| 2716 | * GList *list = g_object_steal_qdata (object, quark_string_list); |
| 2717 | * |
| 2718 | * // prepend new string |
| 2719 | * list = g_list_prepend (list, g_strdup (new_string)); |
| 2720 | * // this changed 'list', so we need to set it again |
| 2721 | * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); |
| 2722 | * } |
| 2723 | * static void |
| 2724 | * free_string_list (gpointer data) |
| 2725 | * { |
| 2726 | * GList *node, *list = data; |
| 2727 | * |
| 2728 | * for (node = list; node; node = node->next) |
| 2729 | * g_free (node->data); |
| 2730 | * g_list_free (list); |
| 2731 | * } |
| 2732 | * ``` |
| 2733 | * |
| 2734 | * Using g_object_get_qdata() in the above example, instead of |
| 2735 | * g_object_steal_qdata() would have left the destroy function set, |
| 2736 | * and thus the partial string list would have been freed upon |
| 2737 | * g_object_set_qdata_full(). |
| 2738 | * @param quark A #GQuark, naming the user data pointer |
| 2739 | * @returns The user data pointer set, or %NULL |
| 2740 | */ |
| 2741 | steal_qdata(quark: GLib.Quark): any | null; |
| 2742 | /** |
| 2743 | * Reverts the effect of a previous call to |
| 2744 | * g_object_freeze_notify(). The freeze count is decreased on `object` |
| 2745 | * and when it reaches zero, queued "notify" signals are emitted. |
| 2746 | * |
| 2747 | * Duplicate notifications for each property are squashed so that at most one |
| 2748 | * #GObject::notify signal is emitted for each property, in the reverse order |
| 2749 | * in which they have been queued. |
| 2750 | * |
| 2751 | * It is an error to call this function when the freeze count is zero. |
| 2752 | */ |
| 2753 | thaw_notify(): void; |
| 2754 | /** |
| 2755 | * Decreases the reference count of `object`. When its reference count |
| 2756 | * drops to 0, the object is finalized (i.e. its memory is freed). |
| 2757 | * |
| 2758 | * If the pointer to the #GObject may be reused in future (for example, if it is |
| 2759 | * an instance variable of another object), it is recommended to clear the |
| 2760 | * pointer to %NULL rather than retain a dangling pointer to a potentially |
| 2761 | * invalid #GObject instance. Use g_clear_object() for this. |
| 2762 | */ |
| 2763 | unref(): void; |
| 2764 | /** |
| 2765 | * This function essentially limits the life time of the `closure` to |
| 2766 | * the life time of the object. That is, when the object is finalized, |
| 2767 | * the `closure` is invalidated by calling g_closure_invalidate() on |
| 2768 | * it, in order to prevent invocations of the closure with a finalized |
| 2769 | * (nonexisting) object. Also, g_object_ref() and g_object_unref() are |
| 2770 | * added as marshal guards to the `closure,` to ensure that an extra |
| 2771 | * reference count is held on `object` during invocation of the |
| 2772 | * `closure`. Usually, this function will be called on closures that |
| 2773 | * use this `object` as closure data. |
| 2774 | * @param closure #GClosure to watch |
| 2775 | */ |
| 2776 | watch_closure(closure: GObject.Closure): void; |
| 2777 | /** |
| 2778 | * the `constructed` function is called by g_object_new() as the |
| 2779 | * final step of the object creation process. At the point of the call, all |
| 2780 | * construction properties have been set on the object. The purpose of this |
| 2781 | * call is to allow for object initialisation steps that can only be performed |
| 2782 | * after construction properties have been set. `constructed` implementors |
| 2783 | * should chain up to the `constructed` call of their parent class to allow it |
| 2784 | * to complete its initialisation. |
| 2785 | */ |
| 2786 | vfunc_constructed(): void; |
| 2787 | /** |
| 2788 | * emits property change notification for a bunch |
| 2789 | * of properties. Overriding `dispatch_properties_changed` should be rarely |
| 2790 | * needed. |
| 2791 | * @param n_pspecs |
| 2792 | * @param pspecs |
| 2793 | */ |
| 2794 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; |
| 2795 | /** |
| 2796 | * the `dispose` function is supposed to drop all references to other |
| 2797 | * objects, but keep the instance otherwise intact, so that client method |
| 2798 | * invocations still work. It may be run multiple times (due to reference |
| 2799 | * loops). Before returning, `dispose` should chain up to the `dispose` method |
| 2800 | * of the parent class. |
| 2801 | */ |
| 2802 | vfunc_dispose(): void; |
| 2803 | /** |
| 2804 | * instance finalization function, should finish the finalization of |
| 2805 | * the instance begun in `dispose` and chain up to the `finalize` method of the |
| 2806 | * parent class. |
| 2807 | */ |
| 2808 | vfunc_finalize(): void; |
| 2809 | /** |
| 2810 | * the generic getter for all properties of this type. Should be |
| 2811 | * overridden for every type with properties. |
| 2812 | * @param property_id |
| 2813 | * @param value |
| 2814 | * @param pspec |
| 2815 | */ |
| 2816 | vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 2817 | /** |
| 2818 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 2819 | * |
| 2820 | * When possible, eg. when signaling a property change from within the class |
| 2821 | * that registered the property, you should use g_object_notify_by_pspec() |
| 2822 | * instead. |
| 2823 | * |
| 2824 | * Note that emission of the notify signal may be blocked with |
| 2825 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 2826 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 2827 | * called. |
| 2828 | * @param pspec |
| 2829 | */ |
| 2830 | vfunc_notify(pspec: GObject.ParamSpec): void; |
| 2831 | /** |
| 2832 | * the generic setter for all properties of this type. Should be |
| 2833 | * overridden for every type with properties. If implementations of |
| 2834 | * `set_property` don't emit property change notification explicitly, this will |
| 2835 | * be done implicitly by the type system. However, if the notify signal is |
| 2836 | * emitted explicitly, the type system will not emit it a second time. |
| 2837 | * @param property_id |
| 2838 | * @param value |
| 2839 | * @param pspec |
| 2840 | */ |
| 2841 | vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 2842 | /** |
| 2843 | * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. |
| 2844 | * @param id Handler ID of the handler to be disconnected |
| 2845 | */ |
| 2846 | disconnect(id: number): void; |
| 2847 | /** |
| 2848 | * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. |
| 2849 | * @param properties Object containing the properties to set |
| 2850 | */ |
| 2851 | set(properties: { [key: string]: any }): void; |
| 2852 | /** |
| 2853 | * Blocks a handler of an instance so it will not be called during any signal emissions |
| 2854 | * @param id Handler ID of the handler to be blocked |
| 2855 | */ |
| 2856 | block_signal_handler(id: number): void; |
| 2857 | /** |
| 2858 | * Unblocks a handler so it will be called again during any signal emissions |
| 2859 | * @param id Handler ID of the handler to be unblocked |
| 2860 | */ |
| 2861 | unblock_signal_handler(id: number): void; |
| 2862 | /** |
| 2863 | * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. |
| 2864 | * @param detailedName Name of the signal to stop emission of |
| 2865 | */ |
| 2866 | stop_emission_by_name(detailedName: string): void; |
| 2867 | } |
| 2868 | |
| 2869 | namespace LocationSkeleton { |
| 2870 | // Constructor properties interface |
| 2871 | |
| 2872 | interface ConstructorProps |
| 2873 | extends Gio.DBusInterfaceSkeleton.ConstructorProps, |
| 2874 | Location.ConstructorProps, |
| 2875 | Gio.DBusInterface.ConstructorProps {} |
| 2876 | } |
| 2877 | |
| 2878 | /** |
| 2879 | * The #GClueLocationSkeleton structure contains only private data and should only be accessed using the provided API. |
| 2880 | */ |
| 2881 | class LocationSkeleton extends Gio.DBusInterfaceSkeleton implements Location, Gio.DBusInterface { |
| 2882 | static $gtype: GObject.GType<LocationSkeleton>; |
| 2883 | |
| 2884 | // Constructors |
| 2885 | |
| 2886 | constructor(properties?: Partial<LocationSkeleton.ConstructorProps>, ...args: any[]); |
| 2887 | |
| 2888 | _init(...args: any[]): void; |
| 2889 | |
| 2890 | static ['new'](): LocationSkeleton; |
| 2891 | |
| 2892 | // Inherited properties |
| 2893 | /** |
| 2894 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Accuracy">"Accuracy"</link>. |
| 2895 | * |
| 2896 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2897 | */ |
| 2898 | get accuracy(): number; |
| 2899 | set accuracy(val: number); |
| 2900 | /** |
| 2901 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Altitude">"Altitude"</link>. |
| 2902 | * |
| 2903 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2904 | */ |
| 2905 | get altitude(): number; |
| 2906 | set altitude(val: number); |
| 2907 | /** |
| 2908 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Description">"Description"</link>. |
| 2909 | * |
| 2910 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2911 | */ |
| 2912 | get description(): string; |
| 2913 | set description(val: string); |
| 2914 | /** |
| 2915 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Heading">"Heading"</link>. |
| 2916 | * |
| 2917 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2918 | */ |
| 2919 | get heading(): number; |
| 2920 | set heading(val: number); |
| 2921 | /** |
| 2922 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Latitude">"Latitude"</link>. |
| 2923 | * |
| 2924 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2925 | */ |
| 2926 | get latitude(): number; |
| 2927 | set latitude(val: number); |
| 2928 | /** |
| 2929 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Longitude">"Longitude"</link>. |
| 2930 | * |
| 2931 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2932 | */ |
| 2933 | get longitude(): number; |
| 2934 | set longitude(val: number); |
| 2935 | /** |
| 2936 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Speed">"Speed"</link>. |
| 2937 | * |
| 2938 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2939 | */ |
| 2940 | get speed(): number; |
| 2941 | set speed(val: number); |
| 2942 | /** |
| 2943 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Timestamp">"Timestamp"</link>. |
| 2944 | * |
| 2945 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 2946 | */ |
| 2947 | get timestamp(): GLib.Variant; |
| 2948 | set timestamp(val: GLib.Variant); |
| 2949 | |
| 2950 | // Inherited methods |
| 2951 | /** |
| 2952 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 2953 | * @returns A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref(). |
| 2954 | */ |
| 2955 | get_object(): Gio.DBusObject | null; |
| 2956 | /** |
| 2957 | * Gets D-Bus introspection information for the D-Bus interface |
| 2958 | * implemented by `interface_`. |
| 2959 | * @returns A #GDBusInterfaceInfo. Do not free. |
| 2960 | */ |
| 2961 | get_info(): Gio.DBusInterfaceInfo; |
| 2962 | /** |
| 2963 | * Sets the #GDBusObject for `interface_` to `object`. |
| 2964 | * |
| 2965 | * Note that `interface_` will hold a weak reference to `object`. |
| 2966 | * @param object A #GDBusObject or %NULL. |
| 2967 | */ |
| 2968 | set_object(object?: Gio.DBusObject | null): void; |
| 2969 | /** |
| 2970 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 2971 | */ |
| 2972 | vfunc_dup_object(): Gio.DBusObject | null; |
| 2973 | /** |
| 2974 | * Gets D-Bus introspection information for the D-Bus interface |
| 2975 | * implemented by `interface_`. |
| 2976 | */ |
| 2977 | vfunc_get_info(): Gio.DBusInterfaceInfo; |
| 2978 | /** |
| 2979 | * Sets the #GDBusObject for `interface_` to `object`. |
| 2980 | * |
| 2981 | * Note that `interface_` will hold a weak reference to `object`. |
| 2982 | * @param object A #GDBusObject or %NULL. |
| 2983 | */ |
| 2984 | vfunc_set_object(object?: Gio.DBusObject | null): void; |
| 2985 | /** |
| 2986 | * Creates a binding between `source_property` on `source` and `target_property` |
| 2987 | * on `target`. |
| 2988 | * |
| 2989 | * Whenever the `source_property` is changed the `target_property` is |
| 2990 | * updated using the same value. For instance: |
| 2991 | * |
| 2992 | * |
| 2993 | * ```c |
| 2994 | * g_object_bind_property (action, "active", widget, "sensitive", 0); |
| 2995 | * ``` |
| 2996 | * |
| 2997 | * |
| 2998 | * Will result in the "sensitive" property of the widget #GObject instance to be |
| 2999 | * updated with the same value of the "active" property of the action #GObject |
| 3000 | * instance. |
| 3001 | * |
| 3002 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 3003 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 3004 | * will be updated as well. |
| 3005 | * |
| 3006 | * The binding will automatically be removed when either the `source` or the |
| 3007 | * `target` instances are finalized. To remove the binding without affecting the |
| 3008 | * `source` and the `target` you can just call g_object_unref() on the returned |
| 3009 | * #GBinding instance. |
| 3010 | * |
| 3011 | * Removing the binding by calling g_object_unref() on it must only be done if |
| 3012 | * the binding, `source` and `target` are only used from a single thread and it |
| 3013 | * is clear that both `source` and `target` outlive the binding. Especially it |
| 3014 | * is not safe to rely on this if the binding, `source` or `target` can be |
| 3015 | * finalized from different threads. Keep another reference to the binding and |
| 3016 | * use g_binding_unbind() instead to be on the safe side. |
| 3017 | * |
| 3018 | * A #GObject can have multiple bindings. |
| 3019 | * @param source_property the property on @source to bind |
| 3020 | * @param target the target #GObject |
| 3021 | * @param target_property the property on @target to bind |
| 3022 | * @param flags flags to pass to #GBinding |
| 3023 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 3024 | */ |
| 3025 | bind_property( |
| 3026 | source_property: string, |
| 3027 | target: GObject.Object, |
| 3028 | target_property: string, |
| 3029 | flags: GObject.BindingFlags | null, |
| 3030 | ): GObject.Binding; |
| 3031 | /** |
| 3032 | * Complete version of g_object_bind_property(). |
| 3033 | * |
| 3034 | * Creates a binding between `source_property` on `source` and `target_property` |
| 3035 | * on `target,` allowing you to set the transformation functions to be used by |
| 3036 | * the binding. |
| 3037 | * |
| 3038 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 3039 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 3040 | * will be updated as well. The `transform_from` function is only used in case |
| 3041 | * of bidirectional bindings, otherwise it will be ignored |
| 3042 | * |
| 3043 | * The binding will automatically be removed when either the `source` or the |
| 3044 | * `target` instances are finalized. This will release the reference that is |
| 3045 | * being held on the #GBinding instance; if you want to hold on to the |
| 3046 | * #GBinding instance, you will need to hold a reference to it. |
| 3047 | * |
| 3048 | * To remove the binding, call g_binding_unbind(). |
| 3049 | * |
| 3050 | * A #GObject can have multiple bindings. |
| 3051 | * |
| 3052 | * The same `user_data` parameter will be used for both `transform_to` |
| 3053 | * and `transform_from` transformation functions; the `notify` function will |
| 3054 | * be called once, when the binding is removed. If you need different data |
| 3055 | * for each transformation function, please use |
| 3056 | * g_object_bind_property_with_closures() instead. |
| 3057 | * @param source_property the property on @source to bind |
| 3058 | * @param target the target #GObject |
| 3059 | * @param target_property the property on @target to bind |
| 3060 | * @param flags flags to pass to #GBinding |
| 3061 | * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default |
| 3062 | * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default |
| 3063 | * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required |
| 3064 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 3065 | */ |
| 3066 | bind_property_full( |
| 3067 | source_property: string, |
| 3068 | target: GObject.Object, |
| 3069 | target_property: string, |
| 3070 | flags: GObject.BindingFlags | null, |
| 3071 | transform_to?: GObject.BindingTransformFunc | null, |
| 3072 | transform_from?: GObject.BindingTransformFunc | null, |
| 3073 | notify?: GLib.DestroyNotify | null, |
| 3074 | ): GObject.Binding; |
| 3075 | // Conflicted with GObject.Object.bind_property_full |
| 3076 | bind_property_full(...args: never[]): any; |
| 3077 | /** |
| 3078 | * This function is intended for #GObject implementations to re-enforce |
| 3079 | * a [floating][floating-ref] object reference. Doing this is seldom |
| 3080 | * required: all #GInitiallyUnowneds are created with a floating reference |
| 3081 | * which usually just needs to be sunken by calling g_object_ref_sink(). |
| 3082 | */ |
| 3083 | force_floating(): void; |
| 3084 | /** |
| 3085 | * Increases the freeze count on `object`. If the freeze count is |
| 3086 | * non-zero, the emission of "notify" signals on `object` is |
| 3087 | * stopped. The signals are queued until the freeze count is decreased |
| 3088 | * to zero. Duplicate notifications are squashed so that at most one |
| 3089 | * #GObject::notify signal is emitted for each property modified while the |
| 3090 | * object is frozen. |
| 3091 | * |
| 3092 | * This is necessary for accessors that modify multiple properties to prevent |
| 3093 | * premature notification while the object is still being modified. |
| 3094 | */ |
| 3095 | freeze_notify(): void; |
| 3096 | /** |
| 3097 | * Gets a named field from the objects table of associations (see g_object_set_data()). |
| 3098 | * @param key name of the key for that association |
| 3099 | * @returns the data if found, or %NULL if no such data exists. |
| 3100 | */ |
| 3101 | get_data(key: string): any | null; |
| 3102 | /** |
| 3103 | * Gets a property of an object. |
| 3104 | * |
| 3105 | * The value can be: |
| 3106 | * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) |
| 3107 | * - a GObject.Value initialized with the expected type of the property |
| 3108 | * - a GObject.Value initialized with a type to which the expected type of the property can be transformed |
| 3109 | * |
| 3110 | * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. |
| 3111 | * |
| 3112 | * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. |
| 3113 | * @param property_name The name of the property to get |
| 3114 | * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type |
| 3115 | */ |
| 3116 | get_property(property_name: string, value: GObject.Value | any): any; |
| 3117 | /** |
| 3118 | * This function gets back user data pointers stored via |
| 3119 | * g_object_set_qdata(). |
| 3120 | * @param quark A #GQuark, naming the user data pointer |
| 3121 | * @returns The user data pointer set, or %NULL |
| 3122 | */ |
| 3123 | get_qdata(quark: GLib.Quark): any | null; |
| 3124 | /** |
| 3125 | * Gets `n_properties` properties for an `object`. |
| 3126 | * Obtained properties will be set to `values`. All properties must be valid. |
| 3127 | * Warnings will be emitted and undefined behaviour may result if invalid |
| 3128 | * properties are passed in. |
| 3129 | * @param names the names of each property to get |
| 3130 | * @param values the values of each property to get |
| 3131 | */ |
| 3132 | getv(names: string[], values: (GObject.Value | any)[]): void; |
| 3133 | /** |
| 3134 | * Checks whether `object` has a [floating][floating-ref] reference. |
| 3135 | * @returns %TRUE if @object has a floating reference |
| 3136 | */ |
| 3137 | is_floating(): boolean; |
| 3138 | /** |
| 3139 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 3140 | * |
| 3141 | * When possible, eg. when signaling a property change from within the class |
| 3142 | * that registered the property, you should use g_object_notify_by_pspec() |
| 3143 | * instead. |
| 3144 | * |
| 3145 | * Note that emission of the notify signal may be blocked with |
| 3146 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 3147 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 3148 | * called. |
| 3149 | * @param property_name the name of a property installed on the class of @object. |
| 3150 | */ |
| 3151 | notify(property_name: string): void; |
| 3152 | /** |
| 3153 | * Emits a "notify" signal for the property specified by `pspec` on `object`. |
| 3154 | * |
| 3155 | * This function omits the property name lookup, hence it is faster than |
| 3156 | * g_object_notify(). |
| 3157 | * |
| 3158 | * One way to avoid using g_object_notify() from within the |
| 3159 | * class that registered the properties, and using g_object_notify_by_pspec() |
| 3160 | * instead, is to store the GParamSpec used with |
| 3161 | * g_object_class_install_property() inside a static array, e.g.: |
| 3162 | * |
| 3163 | * |
| 3164 | * ```c |
| 3165 | * typedef enum |
| 3166 | * { |
| 3167 | * PROP_FOO = 1, |
| 3168 | * PROP_LAST |
| 3169 | * } MyObjectProperty; |
| 3170 | * |
| 3171 | * static GParamSpec *properties[PROP_LAST]; |
| 3172 | * |
| 3173 | * static void |
| 3174 | * my_object_class_init (MyObjectClass *klass) |
| 3175 | * { |
| 3176 | * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, |
| 3177 | * 0, 100, |
| 3178 | * 50, |
| 3179 | * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 3180 | * g_object_class_install_property (gobject_class, |
| 3181 | * PROP_FOO, |
| 3182 | * properties[PROP_FOO]); |
| 3183 | * } |
| 3184 | * ``` |
| 3185 | * |
| 3186 | * |
| 3187 | * and then notify a change on the "foo" property with: |
| 3188 | * |
| 3189 | * |
| 3190 | * ```c |
| 3191 | * g_object_notify_by_pspec (self, properties[PROP_FOO]); |
| 3192 | * ``` |
| 3193 | * |
| 3194 | * @param pspec the #GParamSpec of a property installed on the class of @object. |
| 3195 | */ |
| 3196 | notify_by_pspec(pspec: GObject.ParamSpec): void; |
| 3197 | /** |
| 3198 | * Increases the reference count of `object`. |
| 3199 | * |
| 3200 | * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type |
| 3201 | * of `object` will be propagated to the return type (using the GCC typeof() |
| 3202 | * extension), so any casting the caller needs to do on the return type must be |
| 3203 | * explicit. |
| 3204 | * @returns the same @object |
| 3205 | */ |
| 3206 | ref(): GObject.Object; |
| 3207 | /** |
| 3208 | * Increase the reference count of `object,` and possibly remove the |
| 3209 | * [floating][floating-ref] reference, if `object` has a floating reference. |
| 3210 | * |
| 3211 | * In other words, if the object is floating, then this call "assumes |
| 3212 | * ownership" of the floating reference, converting it to a normal |
| 3213 | * reference by clearing the floating flag while leaving the reference |
| 3214 | * count unchanged. If the object is not floating, then this call |
| 3215 | * adds a new normal reference increasing the reference count by one. |
| 3216 | * |
| 3217 | * Since GLib 2.56, the type of `object` will be propagated to the return type |
| 3218 | * under the same conditions as for g_object_ref(). |
| 3219 | * @returns @object |
| 3220 | */ |
| 3221 | ref_sink(): GObject.Object; |
| 3222 | /** |
| 3223 | * Releases all references to other objects. This can be used to break |
| 3224 | * reference cycles. |
| 3225 | * |
| 3226 | * This function should only be called from object system implementations. |
| 3227 | */ |
| 3228 | run_dispose(): void; |
| 3229 | /** |
| 3230 | * Each object carries around a table of associations from |
| 3231 | * strings to pointers. This function lets you set an association. |
| 3232 | * |
| 3233 | * If the object already had an association with that name, |
| 3234 | * the old association will be destroyed. |
| 3235 | * |
| 3236 | * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). |
| 3237 | * This means a copy of `key` is kept permanently (even after `object` has been |
| 3238 | * finalized) — so it is recommended to only use a small, bounded set of values |
| 3239 | * for `key` in your program, to avoid the #GQuark storage growing unbounded. |
| 3240 | * @param key name of the key |
| 3241 | * @param data data to associate with that key |
| 3242 | */ |
| 3243 | set_data(key: string, data?: any | null): void; |
| 3244 | /** |
| 3245 | * Sets a property on an object. |
| 3246 | * @param property_name The name of the property to set |
| 3247 | * @param value The value to set the property to |
| 3248 | */ |
| 3249 | set_property(property_name: string, value: GObject.Value | any): void; |
| 3250 | /** |
| 3251 | * Remove a specified datum from the object's data associations, |
| 3252 | * without invoking the association's destroy handler. |
| 3253 | * @param key name of the key |
| 3254 | * @returns the data if found, or %NULL if no such data exists. |
| 3255 | */ |
| 3256 | steal_data(key: string): any | null; |
| 3257 | /** |
| 3258 | * This function gets back user data pointers stored via |
| 3259 | * g_object_set_qdata() and removes the `data` from object |
| 3260 | * without invoking its destroy() function (if any was |
| 3261 | * set). |
| 3262 | * Usually, calling this function is only required to update |
| 3263 | * user data pointers with a destroy notifier, for example: |
| 3264 | * |
| 3265 | * ```c |
| 3266 | * void |
| 3267 | * object_add_to_user_list (GObject *object, |
| 3268 | * const gchar *new_string) |
| 3269 | * { |
| 3270 | * // the quark, naming the object data |
| 3271 | * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); |
| 3272 | * // retrieve the old string list |
| 3273 | * GList *list = g_object_steal_qdata (object, quark_string_list); |
| 3274 | * |
| 3275 | * // prepend new string |
| 3276 | * list = g_list_prepend (list, g_strdup (new_string)); |
| 3277 | * // this changed 'list', so we need to set it again |
| 3278 | * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); |
| 3279 | * } |
| 3280 | * static void |
| 3281 | * free_string_list (gpointer data) |
| 3282 | * { |
| 3283 | * GList *node, *list = data; |
| 3284 | * |
| 3285 | * for (node = list; node; node = node->next) |
| 3286 | * g_free (node->data); |
| 3287 | * g_list_free (list); |
| 3288 | * } |
| 3289 | * ``` |
| 3290 | * |
| 3291 | * Using g_object_get_qdata() in the above example, instead of |
| 3292 | * g_object_steal_qdata() would have left the destroy function set, |
| 3293 | * and thus the partial string list would have been freed upon |
| 3294 | * g_object_set_qdata_full(). |
| 3295 | * @param quark A #GQuark, naming the user data pointer |
| 3296 | * @returns The user data pointer set, or %NULL |
| 3297 | */ |
| 3298 | steal_qdata(quark: GLib.Quark): any | null; |
| 3299 | /** |
| 3300 | * Reverts the effect of a previous call to |
| 3301 | * g_object_freeze_notify(). The freeze count is decreased on `object` |
| 3302 | * and when it reaches zero, queued "notify" signals are emitted. |
| 3303 | * |
| 3304 | * Duplicate notifications for each property are squashed so that at most one |
| 3305 | * #GObject::notify signal is emitted for each property, in the reverse order |
| 3306 | * in which they have been queued. |
| 3307 | * |
| 3308 | * It is an error to call this function when the freeze count is zero. |
| 3309 | */ |
| 3310 | thaw_notify(): void; |
| 3311 | /** |
| 3312 | * Decreases the reference count of `object`. When its reference count |
| 3313 | * drops to 0, the object is finalized (i.e. its memory is freed). |
| 3314 | * |
| 3315 | * If the pointer to the #GObject may be reused in future (for example, if it is |
| 3316 | * an instance variable of another object), it is recommended to clear the |
| 3317 | * pointer to %NULL rather than retain a dangling pointer to a potentially |
| 3318 | * invalid #GObject instance. Use g_clear_object() for this. |
| 3319 | */ |
| 3320 | unref(): void; |
| 3321 | /** |
| 3322 | * This function essentially limits the life time of the `closure` to |
| 3323 | * the life time of the object. That is, when the object is finalized, |
| 3324 | * the `closure` is invalidated by calling g_closure_invalidate() on |
| 3325 | * it, in order to prevent invocations of the closure with a finalized |
| 3326 | * (nonexisting) object. Also, g_object_ref() and g_object_unref() are |
| 3327 | * added as marshal guards to the `closure,` to ensure that an extra |
| 3328 | * reference count is held on `object` during invocation of the |
| 3329 | * `closure`. Usually, this function will be called on closures that |
| 3330 | * use this `object` as closure data. |
| 3331 | * @param closure #GClosure to watch |
| 3332 | */ |
| 3333 | watch_closure(closure: GObject.Closure): void; |
| 3334 | /** |
| 3335 | * the `constructed` function is called by g_object_new() as the |
| 3336 | * final step of the object creation process. At the point of the call, all |
| 3337 | * construction properties have been set on the object. The purpose of this |
| 3338 | * call is to allow for object initialisation steps that can only be performed |
| 3339 | * after construction properties have been set. `constructed` implementors |
| 3340 | * should chain up to the `constructed` call of their parent class to allow it |
| 3341 | * to complete its initialisation. |
| 3342 | */ |
| 3343 | vfunc_constructed(): void; |
| 3344 | /** |
| 3345 | * emits property change notification for a bunch |
| 3346 | * of properties. Overriding `dispatch_properties_changed` should be rarely |
| 3347 | * needed. |
| 3348 | * @param n_pspecs |
| 3349 | * @param pspecs |
| 3350 | */ |
| 3351 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; |
| 3352 | /** |
| 3353 | * the `dispose` function is supposed to drop all references to other |
| 3354 | * objects, but keep the instance otherwise intact, so that client method |
| 3355 | * invocations still work. It may be run multiple times (due to reference |
| 3356 | * loops). Before returning, `dispose` should chain up to the `dispose` method |
| 3357 | * of the parent class. |
| 3358 | */ |
| 3359 | vfunc_dispose(): void; |
| 3360 | /** |
| 3361 | * instance finalization function, should finish the finalization of |
| 3362 | * the instance begun in `dispose` and chain up to the `finalize` method of the |
| 3363 | * parent class. |
| 3364 | */ |
| 3365 | vfunc_finalize(): void; |
| 3366 | /** |
| 3367 | * the generic getter for all properties of this type. Should be |
| 3368 | * overridden for every type with properties. |
| 3369 | * @param property_id |
| 3370 | * @param value |
| 3371 | * @param pspec |
| 3372 | */ |
| 3373 | vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 3374 | /** |
| 3375 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 3376 | * |
| 3377 | * When possible, eg. when signaling a property change from within the class |
| 3378 | * that registered the property, you should use g_object_notify_by_pspec() |
| 3379 | * instead. |
| 3380 | * |
| 3381 | * Note that emission of the notify signal may be blocked with |
| 3382 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 3383 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 3384 | * called. |
| 3385 | * @param pspec |
| 3386 | */ |
| 3387 | vfunc_notify(pspec: GObject.ParamSpec): void; |
| 3388 | /** |
| 3389 | * the generic setter for all properties of this type. Should be |
| 3390 | * overridden for every type with properties. If implementations of |
| 3391 | * `set_property` don't emit property change notification explicitly, this will |
| 3392 | * be done implicitly by the type system. However, if the notify signal is |
| 3393 | * emitted explicitly, the type system will not emit it a second time. |
| 3394 | * @param property_id |
| 3395 | * @param value |
| 3396 | * @param pspec |
| 3397 | */ |
| 3398 | vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 3399 | /** |
| 3400 | * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. |
| 3401 | * @param id Handler ID of the handler to be disconnected |
| 3402 | */ |
| 3403 | disconnect(id: number): void; |
| 3404 | /** |
| 3405 | * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. |
| 3406 | * @param properties Object containing the properties to set |
| 3407 | */ |
| 3408 | set(properties: { [key: string]: any }): void; |
| 3409 | /** |
| 3410 | * Blocks a handler of an instance so it will not be called during any signal emissions |
| 3411 | * @param id Handler ID of the handler to be blocked |
| 3412 | */ |
| 3413 | block_signal_handler(id: number): void; |
| 3414 | /** |
| 3415 | * Unblocks a handler so it will be called again during any signal emissions |
| 3416 | * @param id Handler ID of the handler to be unblocked |
| 3417 | */ |
| 3418 | unblock_signal_handler(id: number): void; |
| 3419 | /** |
| 3420 | * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. |
| 3421 | * @param detailedName Name of the signal to stop emission of |
| 3422 | */ |
| 3423 | stop_emission_by_name(detailedName: string): void; |
| 3424 | } |
| 3425 | |
| 3426 | namespace ManagerProxy { |
| 3427 | // Constructor properties interface |
| 3428 | |
| 3429 | interface ConstructorProps |
| 3430 | extends Gio.DBusProxy.ConstructorProps, |
| 3431 | Manager.ConstructorProps, |
| 3432 | Gio.AsyncInitable.ConstructorProps, |
| 3433 | Gio.DBusInterface.ConstructorProps, |
| 3434 | Gio.Initable.ConstructorProps {} |
| 3435 | } |
| 3436 | |
| 3437 | /** |
| 3438 | * The #GClueManagerProxy structure contains only private data and should only be accessed using the provided API. |
| 3439 | */ |
| 3440 | class ManagerProxy |
| 3441 | extends Gio.DBusProxy |
| 3442 | implements Manager, Gio.AsyncInitable<ManagerProxy>, Gio.DBusInterface, Gio.Initable |
| 3443 | { |
| 3444 | static $gtype: GObject.GType<ManagerProxy>; |
| 3445 | |
| 3446 | // Constructors |
| 3447 | |
| 3448 | constructor(properties?: Partial<ManagerProxy.ConstructorProps>, ...args: any[]); |
| 3449 | |
| 3450 | _init(...args: any[]): void; |
| 3451 | |
| 3452 | static new_finish(res: Gio.AsyncResult): ManagerProxy; |
| 3453 | // Conflicted with Gio.AsyncInitable.new_finish |
| 3454 | |
| 3455 | static new_finish(...args: never[]): any; |
| 3456 | |
| 3457 | static new_for_bus_finish(res: Gio.AsyncResult): ManagerProxy; |
| 3458 | |
| 3459 | static new_for_bus_sync( |
| 3460 | bus_type: Gio.BusType, |
| 3461 | flags: Gio.DBusProxyFlags, |
| 3462 | name: string, |
| 3463 | object_path: string, |
| 3464 | cancellable?: Gio.Cancellable | null, |
| 3465 | ): ManagerProxy; |
| 3466 | // Conflicted with Gio.DBusProxy.new_for_bus_sync |
| 3467 | |
| 3468 | static new_for_bus_sync(...args: never[]): any; |
| 3469 | |
| 3470 | static new_sync( |
| 3471 | connection: Gio.DBusConnection, |
| 3472 | flags: Gio.DBusProxyFlags, |
| 3473 | name: string | null, |
| 3474 | object_path: string, |
| 3475 | cancellable?: Gio.Cancellable | null, |
| 3476 | ): ManagerProxy; |
| 3477 | // Conflicted with Gio.DBusProxy.new_sync |
| 3478 | |
| 3479 | static new_sync(...args: never[]): any; |
| 3480 | |
| 3481 | // Static methods |
| 3482 | |
| 3483 | /** |
| 3484 | * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Manager.top_of_page">org.freedesktop.GeoClue2.Manager</link>. See g_dbus_proxy_new() for more details. |
| 3485 | * |
| 3486 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3487 | * You can then call gclue_manager_proxy_new_finish() to get the result of the operation. |
| 3488 | * |
| 3489 | * See gclue_manager_proxy_new_sync() for the synchronous, blocking version of this constructor. |
| 3490 | * @param connection A #GDBusConnection. |
| 3491 | * @param flags Flags from the #GDBusProxyFlags enumeration. |
| 3492 | * @param name A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. |
| 3493 | * @param object_path An object path. |
| 3494 | * @param cancellable A #GCancellable or %NULL. |
| 3495 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied. |
| 3496 | */ |
| 3497 | static ['new']( |
| 3498 | connection: Gio.DBusConnection, |
| 3499 | flags: Gio.DBusProxyFlags, |
| 3500 | name: string | null, |
| 3501 | object_path: string, |
| 3502 | cancellable?: Gio.Cancellable | null, |
| 3503 | callback?: Gio.AsyncReadyCallback<ManagerProxy> | null, |
| 3504 | ): void; |
| 3505 | // Conflicted with Gio.DBusProxy.new |
| 3506 | static ['new'](...args: never[]): any; |
| 3507 | /** |
| 3508 | * Like gclue_manager_proxy_new() but takes a #GBusType instead of a #GDBusConnection. |
| 3509 | * |
| 3510 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3511 | * You can then call gclue_manager_proxy_new_for_bus_finish() to get the result of the operation. |
| 3512 | * |
| 3513 | * See gclue_manager_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. |
| 3514 | * @param bus_type A #GBusType. |
| 3515 | * @param flags Flags from the #GDBusProxyFlags enumeration. |
| 3516 | * @param name A bus name (well-known or unique). |
| 3517 | * @param object_path An object path. |
| 3518 | * @param cancellable A #GCancellable or %NULL. |
| 3519 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied. |
| 3520 | */ |
| 3521 | static new_for_bus( |
| 3522 | bus_type: Gio.BusType, |
| 3523 | flags: Gio.DBusProxyFlags, |
| 3524 | name: string, |
| 3525 | object_path: string, |
| 3526 | cancellable?: Gio.Cancellable | null, |
| 3527 | callback?: Gio.AsyncReadyCallback<ManagerProxy> | null, |
| 3528 | ): void; |
| 3529 | // Conflicted with Gio.DBusProxy.new_for_bus |
| 3530 | static new_for_bus(...args: never[]): any; |
| 3531 | |
| 3532 | // Inherited properties |
| 3533 | /** |
| 3534 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.AvailableAccuracyLevel">"AvailableAccuracyLevel"</link>. |
| 3535 | * |
| 3536 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 3537 | */ |
| 3538 | get available_accuracy_level(): number; |
| 3539 | set available_accuracy_level(val: number); |
| 3540 | /** |
| 3541 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.AvailableAccuracyLevel">"AvailableAccuracyLevel"</link>. |
| 3542 | * |
| 3543 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 3544 | */ |
| 3545 | get availableAccuracyLevel(): number; |
| 3546 | set availableAccuracyLevel(val: number); |
| 3547 | /** |
| 3548 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.InUse">"InUse"</link>. |
| 3549 | * |
| 3550 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 3551 | */ |
| 3552 | get in_use(): boolean; |
| 3553 | set in_use(val: boolean); |
| 3554 | /** |
| 3555 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.InUse">"InUse"</link>. |
| 3556 | * |
| 3557 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 3558 | */ |
| 3559 | get inUse(): boolean; |
| 3560 | set inUse(val: boolean); |
| 3561 | |
| 3562 | // Inherited methods |
| 3563 | /** |
| 3564 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. |
| 3565 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3566 | * You can then call gclue_manager_call_add_agent_finish() to get the result of the operation. |
| 3567 | * |
| 3568 | * See gclue_manager_call_add_agent_sync() for the synchronous, blocking version of this method. |
| 3569 | * @param arg_id Argument to pass with the method invocation. |
| 3570 | * @param cancellable A #GCancellable or %NULL. |
| 3571 | */ |
| 3572 | call_add_agent(arg_id: string, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 3573 | /** |
| 3574 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. |
| 3575 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3576 | * You can then call gclue_manager_call_add_agent_finish() to get the result of the operation. |
| 3577 | * |
| 3578 | * See gclue_manager_call_add_agent_sync() for the synchronous, blocking version of this method. |
| 3579 | * @param arg_id Argument to pass with the method invocation. |
| 3580 | * @param cancellable A #GCancellable or %NULL. |
| 3581 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 3582 | */ |
| 3583 | call_add_agent( |
| 3584 | arg_id: string, |
| 3585 | cancellable: Gio.Cancellable | null, |
| 3586 | callback: Gio.AsyncReadyCallback<this> | null, |
| 3587 | ): void; |
| 3588 | /** |
| 3589 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. |
| 3590 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3591 | * You can then call gclue_manager_call_add_agent_finish() to get the result of the operation. |
| 3592 | * |
| 3593 | * See gclue_manager_call_add_agent_sync() for the synchronous, blocking version of this method. |
| 3594 | * @param arg_id Argument to pass with the method invocation. |
| 3595 | * @param cancellable A #GCancellable or %NULL. |
| 3596 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 3597 | */ |
| 3598 | call_add_agent( |
| 3599 | arg_id: string, |
| 3600 | cancellable?: Gio.Cancellable | null, |
| 3601 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 3602 | ): Promise<boolean> | void; |
| 3603 | /** |
| 3604 | * Finishes an operation started with gclue_manager_call_add_agent(). |
| 3605 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_add_agent(). |
| 3606 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 3607 | */ |
| 3608 | call_add_agent_finish(res: Gio.AsyncResult): boolean; |
| 3609 | /** |
| 3610 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 3611 | * |
| 3612 | * See gclue_manager_call_add_agent() for the asynchronous version of this method. |
| 3613 | * @param arg_id Argument to pass with the method invocation. |
| 3614 | * @param cancellable A #GCancellable or %NULL. |
| 3615 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 3616 | */ |
| 3617 | call_add_agent_sync(arg_id: string, cancellable?: Gio.Cancellable | null): boolean; |
| 3618 | /** |
| 3619 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. |
| 3620 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3621 | * You can then call gclue_manager_call_create_client_finish() to get the result of the operation. |
| 3622 | * |
| 3623 | * See gclue_manager_call_create_client_sync() for the synchronous, blocking version of this method. |
| 3624 | * @param cancellable A #GCancellable or %NULL. |
| 3625 | */ |
| 3626 | call_create_client(cancellable?: Gio.Cancellable | null): Promise<string>; |
| 3627 | /** |
| 3628 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. |
| 3629 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3630 | * You can then call gclue_manager_call_create_client_finish() to get the result of the operation. |
| 3631 | * |
| 3632 | * See gclue_manager_call_create_client_sync() for the synchronous, blocking version of this method. |
| 3633 | * @param cancellable A #GCancellable or %NULL. |
| 3634 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 3635 | */ |
| 3636 | call_create_client( |
| 3637 | cancellable: Gio.Cancellable | null, |
| 3638 | callback: Gio.AsyncReadyCallback<this> | null, |
| 3639 | ): void; |
| 3640 | /** |
| 3641 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. |
| 3642 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3643 | * You can then call gclue_manager_call_create_client_finish() to get the result of the operation. |
| 3644 | * |
| 3645 | * See gclue_manager_call_create_client_sync() for the synchronous, blocking version of this method. |
| 3646 | * @param cancellable A #GCancellable or %NULL. |
| 3647 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 3648 | */ |
| 3649 | call_create_client( |
| 3650 | cancellable?: Gio.Cancellable | null, |
| 3651 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 3652 | ): Promise<string> | void; |
| 3653 | /** |
| 3654 | * Finishes an operation started with gclue_manager_call_create_client(). |
| 3655 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_create_client(). |
| 3656 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 3657 | */ |
| 3658 | call_create_client_finish(res: Gio.AsyncResult): [boolean, string]; |
| 3659 | /** |
| 3660 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 3661 | * |
| 3662 | * See gclue_manager_call_create_client() for the asynchronous version of this method. |
| 3663 | * @param cancellable A #GCancellable or %NULL. |
| 3664 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 3665 | */ |
| 3666 | call_create_client_sync(cancellable?: Gio.Cancellable | null): [boolean, string]; |
| 3667 | /** |
| 3668 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. |
| 3669 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3670 | * You can then call gclue_manager_call_delete_client_finish() to get the result of the operation. |
| 3671 | * |
| 3672 | * See gclue_manager_call_delete_client_sync() for the synchronous, blocking version of this method. |
| 3673 | * @param arg_client Argument to pass with the method invocation. |
| 3674 | * @param cancellable A #GCancellable or %NULL. |
| 3675 | */ |
| 3676 | call_delete_client(arg_client: string, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 3677 | /** |
| 3678 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. |
| 3679 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3680 | * You can then call gclue_manager_call_delete_client_finish() to get the result of the operation. |
| 3681 | * |
| 3682 | * See gclue_manager_call_delete_client_sync() for the synchronous, blocking version of this method. |
| 3683 | * @param arg_client Argument to pass with the method invocation. |
| 3684 | * @param cancellable A #GCancellable or %NULL. |
| 3685 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 3686 | */ |
| 3687 | call_delete_client( |
| 3688 | arg_client: string, |
| 3689 | cancellable: Gio.Cancellable | null, |
| 3690 | callback: Gio.AsyncReadyCallback<this> | null, |
| 3691 | ): void; |
| 3692 | /** |
| 3693 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. |
| 3694 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3695 | * You can then call gclue_manager_call_delete_client_finish() to get the result of the operation. |
| 3696 | * |
| 3697 | * See gclue_manager_call_delete_client_sync() for the synchronous, blocking version of this method. |
| 3698 | * @param arg_client Argument to pass with the method invocation. |
| 3699 | * @param cancellable A #GCancellable or %NULL. |
| 3700 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 3701 | */ |
| 3702 | call_delete_client( |
| 3703 | arg_client: string, |
| 3704 | cancellable?: Gio.Cancellable | null, |
| 3705 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 3706 | ): Promise<boolean> | void; |
| 3707 | /** |
| 3708 | * Finishes an operation started with gclue_manager_call_delete_client(). |
| 3709 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_delete_client(). |
| 3710 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 3711 | */ |
| 3712 | call_delete_client_finish(res: Gio.AsyncResult): boolean; |
| 3713 | /** |
| 3714 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 3715 | * |
| 3716 | * See gclue_manager_call_delete_client() for the asynchronous version of this method. |
| 3717 | * @param arg_client Argument to pass with the method invocation. |
| 3718 | * @param cancellable A #GCancellable or %NULL. |
| 3719 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 3720 | */ |
| 3721 | call_delete_client_sync(arg_client: string, cancellable?: Gio.Cancellable | null): boolean; |
| 3722 | /** |
| 3723 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. |
| 3724 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3725 | * You can then call gclue_manager_call_get_client_finish() to get the result of the operation. |
| 3726 | * |
| 3727 | * See gclue_manager_call_get_client_sync() for the synchronous, blocking version of this method. |
| 3728 | * @param cancellable A #GCancellable or %NULL. |
| 3729 | */ |
| 3730 | call_get_client(cancellable?: Gio.Cancellable | null): Promise<string>; |
| 3731 | /** |
| 3732 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. |
| 3733 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3734 | * You can then call gclue_manager_call_get_client_finish() to get the result of the operation. |
| 3735 | * |
| 3736 | * See gclue_manager_call_get_client_sync() for the synchronous, blocking version of this method. |
| 3737 | * @param cancellable A #GCancellable or %NULL. |
| 3738 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 3739 | */ |
| 3740 | call_get_client(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void; |
| 3741 | /** |
| 3742 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. |
| 3743 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 3744 | * You can then call gclue_manager_call_get_client_finish() to get the result of the operation. |
| 3745 | * |
| 3746 | * See gclue_manager_call_get_client_sync() for the synchronous, blocking version of this method. |
| 3747 | * @param cancellable A #GCancellable or %NULL. |
| 3748 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 3749 | */ |
| 3750 | call_get_client( |
| 3751 | cancellable?: Gio.Cancellable | null, |
| 3752 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 3753 | ): Promise<string> | void; |
| 3754 | /** |
| 3755 | * Finishes an operation started with gclue_manager_call_get_client(). |
| 3756 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_get_client(). |
| 3757 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 3758 | */ |
| 3759 | call_get_client_finish(res: Gio.AsyncResult): [boolean, string]; |
| 3760 | /** |
| 3761 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 3762 | * |
| 3763 | * See gclue_manager_call_get_client() for the asynchronous version of this method. |
| 3764 | * @param cancellable A #GCancellable or %NULL. |
| 3765 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 3766 | */ |
| 3767 | call_get_client_sync(cancellable?: Gio.Cancellable | null): [boolean, string]; |
| 3768 | /** |
| 3769 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 3770 | * |
| 3771 | * This method will free `invocation,` you cannot use it afterwards. |
| 3772 | * @param invocation A #GDBusMethodInvocation. |
| 3773 | */ |
| 3774 | complete_add_agent(invocation: Gio.DBusMethodInvocation): void; |
| 3775 | /** |
| 3776 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 3777 | * |
| 3778 | * This method will free `invocation,` you cannot use it afterwards. |
| 3779 | * @param invocation A #GDBusMethodInvocation. |
| 3780 | * @param client Parameter to return. |
| 3781 | */ |
| 3782 | complete_create_client(invocation: Gio.DBusMethodInvocation, client: string): void; |
| 3783 | /** |
| 3784 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 3785 | * |
| 3786 | * This method will free `invocation,` you cannot use it afterwards. |
| 3787 | * @param invocation A #GDBusMethodInvocation. |
| 3788 | */ |
| 3789 | complete_delete_client(invocation: Gio.DBusMethodInvocation): void; |
| 3790 | /** |
| 3791 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 3792 | * |
| 3793 | * This method will free `invocation,` you cannot use it afterwards. |
| 3794 | * @param invocation A #GDBusMethodInvocation. |
| 3795 | * @param client Parameter to return. |
| 3796 | */ |
| 3797 | complete_get_client(invocation: Gio.DBusMethodInvocation, client: string): void; |
| 3798 | /** |
| 3799 | * Handler for the #GClueManager::handle-add-agent signal. |
| 3800 | * @param invocation |
| 3801 | * @param arg_id |
| 3802 | */ |
| 3803 | vfunc_handle_add_agent(invocation: Gio.DBusMethodInvocation, arg_id: string): boolean; |
| 3804 | /** |
| 3805 | * Handler for the #GClueManager::handle-create-client signal. |
| 3806 | * @param invocation |
| 3807 | */ |
| 3808 | vfunc_handle_create_client(invocation: Gio.DBusMethodInvocation): boolean; |
| 3809 | /** |
| 3810 | * Handler for the #GClueManager::handle-delete-client signal. |
| 3811 | * @param invocation |
| 3812 | * @param arg_client |
| 3813 | */ |
| 3814 | vfunc_handle_delete_client(invocation: Gio.DBusMethodInvocation, arg_client: string): boolean; |
| 3815 | /** |
| 3816 | * Handler for the #GClueManager::handle-get-client signal. |
| 3817 | * @param invocation |
| 3818 | */ |
| 3819 | vfunc_handle_get_client(invocation: Gio.DBusMethodInvocation): boolean; |
| 3820 | /** |
| 3821 | * Starts asynchronous initialization of the object implementing the |
| 3822 | * interface. This must be done before any real use of the object after |
| 3823 | * initial construction. If the object also implements #GInitable you can |
| 3824 | * optionally call g_initable_init() instead. |
| 3825 | * |
| 3826 | * This method is intended for language bindings. If writing in C, |
| 3827 | * g_async_initable_new_async() should typically be used instead. |
| 3828 | * |
| 3829 | * When the initialization is finished, `callback` will be called. You can |
| 3830 | * then call g_async_initable_init_finish() to get the result of the |
| 3831 | * initialization. |
| 3832 | * |
| 3833 | * Implementations may also support cancellation. If `cancellable` is not |
| 3834 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 3835 | * object from another thread. If the operation was cancelled, the error |
| 3836 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 3837 | * the object doesn't support cancellable initialization, the error |
| 3838 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 3839 | * |
| 3840 | * As with #GInitable, if the object is not initialized, or initialization |
| 3841 | * returns with an error, then all operations on the object except |
| 3842 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 3843 | * have undefined behaviour. They will often fail with g_critical() or |
| 3844 | * g_warning(), but this must not be relied on. |
| 3845 | * |
| 3846 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 3847 | * be initialized multiple times; for more information, see g_initable_init(). |
| 3848 | * If a class explicitly supports being initialized multiple times, |
| 3849 | * implementation requires yielding all subsequent calls to init_async() on the |
| 3850 | * results of the first call. |
| 3851 | * |
| 3852 | * For classes that also support the #GInitable interface, the default |
| 3853 | * implementation of this method will run the g_initable_init() function |
| 3854 | * in a thread, so if you want to support asynchronous initialization via |
| 3855 | * threads, just implement the #GAsyncInitable interface without overriding |
| 3856 | * any interface methods. |
| 3857 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 3858 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 3859 | */ |
| 3860 | init_async(io_priority: number, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 3861 | /** |
| 3862 | * Starts asynchronous initialization of the object implementing the |
| 3863 | * interface. This must be done before any real use of the object after |
| 3864 | * initial construction. If the object also implements #GInitable you can |
| 3865 | * optionally call g_initable_init() instead. |
| 3866 | * |
| 3867 | * This method is intended for language bindings. If writing in C, |
| 3868 | * g_async_initable_new_async() should typically be used instead. |
| 3869 | * |
| 3870 | * When the initialization is finished, `callback` will be called. You can |
| 3871 | * then call g_async_initable_init_finish() to get the result of the |
| 3872 | * initialization. |
| 3873 | * |
| 3874 | * Implementations may also support cancellation. If `cancellable` is not |
| 3875 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 3876 | * object from another thread. If the operation was cancelled, the error |
| 3877 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 3878 | * the object doesn't support cancellable initialization, the error |
| 3879 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 3880 | * |
| 3881 | * As with #GInitable, if the object is not initialized, or initialization |
| 3882 | * returns with an error, then all operations on the object except |
| 3883 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 3884 | * have undefined behaviour. They will often fail with g_critical() or |
| 3885 | * g_warning(), but this must not be relied on. |
| 3886 | * |
| 3887 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 3888 | * be initialized multiple times; for more information, see g_initable_init(). |
| 3889 | * If a class explicitly supports being initialized multiple times, |
| 3890 | * implementation requires yielding all subsequent calls to init_async() on the |
| 3891 | * results of the first call. |
| 3892 | * |
| 3893 | * For classes that also support the #GInitable interface, the default |
| 3894 | * implementation of this method will run the g_initable_init() function |
| 3895 | * in a thread, so if you want to support asynchronous initialization via |
| 3896 | * threads, just implement the #GAsyncInitable interface without overriding |
| 3897 | * any interface methods. |
| 3898 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 3899 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 3900 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 3901 | */ |
| 3902 | init_async( |
| 3903 | io_priority: number, |
| 3904 | cancellable: Gio.Cancellable | null, |
| 3905 | callback: Gio.AsyncReadyCallback<this> | null, |
| 3906 | ): void; |
| 3907 | /** |
| 3908 | * Starts asynchronous initialization of the object implementing the |
| 3909 | * interface. This must be done before any real use of the object after |
| 3910 | * initial construction. If the object also implements #GInitable you can |
| 3911 | * optionally call g_initable_init() instead. |
| 3912 | * |
| 3913 | * This method is intended for language bindings. If writing in C, |
| 3914 | * g_async_initable_new_async() should typically be used instead. |
| 3915 | * |
| 3916 | * When the initialization is finished, `callback` will be called. You can |
| 3917 | * then call g_async_initable_init_finish() to get the result of the |
| 3918 | * initialization. |
| 3919 | * |
| 3920 | * Implementations may also support cancellation. If `cancellable` is not |
| 3921 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 3922 | * object from another thread. If the operation was cancelled, the error |
| 3923 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 3924 | * the object doesn't support cancellable initialization, the error |
| 3925 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 3926 | * |
| 3927 | * As with #GInitable, if the object is not initialized, or initialization |
| 3928 | * returns with an error, then all operations on the object except |
| 3929 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 3930 | * have undefined behaviour. They will often fail with g_critical() or |
| 3931 | * g_warning(), but this must not be relied on. |
| 3932 | * |
| 3933 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 3934 | * be initialized multiple times; for more information, see g_initable_init(). |
| 3935 | * If a class explicitly supports being initialized multiple times, |
| 3936 | * implementation requires yielding all subsequent calls to init_async() on the |
| 3937 | * results of the first call. |
| 3938 | * |
| 3939 | * For classes that also support the #GInitable interface, the default |
| 3940 | * implementation of this method will run the g_initable_init() function |
| 3941 | * in a thread, so if you want to support asynchronous initialization via |
| 3942 | * threads, just implement the #GAsyncInitable interface without overriding |
| 3943 | * any interface methods. |
| 3944 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 3945 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 3946 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 3947 | */ |
| 3948 | init_async( |
| 3949 | io_priority: number, |
| 3950 | cancellable?: Gio.Cancellable | null, |
| 3951 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 3952 | ): Promise<boolean> | void; |
| 3953 | /** |
| 3954 | * Finishes asynchronous initialization and returns the result. |
| 3955 | * See g_async_initable_init_async(). |
| 3956 | * @param res a #GAsyncResult. |
| 3957 | * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. |
| 3958 | */ |
| 3959 | init_finish(res: Gio.AsyncResult): boolean; |
| 3960 | /** |
| 3961 | * Finishes the async construction for the various g_async_initable_new |
| 3962 | * calls, returning the created object or %NULL on error. |
| 3963 | * @param res the #GAsyncResult from the callback |
| 3964 | * @returns a newly created #GObject, or %NULL on error. Free with g_object_unref(). |
| 3965 | */ |
| 3966 | new_finish(res: Gio.AsyncResult): ManagerProxy; |
| 3967 | // Conflicted with Gio.DBusProxy.new_finish |
| 3968 | new_finish(...args: never[]): any; |
| 3969 | /** |
| 3970 | * Starts asynchronous initialization of the object implementing the |
| 3971 | * interface. This must be done before any real use of the object after |
| 3972 | * initial construction. If the object also implements #GInitable you can |
| 3973 | * optionally call g_initable_init() instead. |
| 3974 | * |
| 3975 | * This method is intended for language bindings. If writing in C, |
| 3976 | * g_async_initable_new_async() should typically be used instead. |
| 3977 | * |
| 3978 | * When the initialization is finished, `callback` will be called. You can |
| 3979 | * then call g_async_initable_init_finish() to get the result of the |
| 3980 | * initialization. |
| 3981 | * |
| 3982 | * Implementations may also support cancellation. If `cancellable` is not |
| 3983 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 3984 | * object from another thread. If the operation was cancelled, the error |
| 3985 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 3986 | * the object doesn't support cancellable initialization, the error |
| 3987 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 3988 | * |
| 3989 | * As with #GInitable, if the object is not initialized, or initialization |
| 3990 | * returns with an error, then all operations on the object except |
| 3991 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 3992 | * have undefined behaviour. They will often fail with g_critical() or |
| 3993 | * g_warning(), but this must not be relied on. |
| 3994 | * |
| 3995 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 3996 | * be initialized multiple times; for more information, see g_initable_init(). |
| 3997 | * If a class explicitly supports being initialized multiple times, |
| 3998 | * implementation requires yielding all subsequent calls to init_async() on the |
| 3999 | * results of the first call. |
| 4000 | * |
| 4001 | * For classes that also support the #GInitable interface, the default |
| 4002 | * implementation of this method will run the g_initable_init() function |
| 4003 | * in a thread, so if you want to support asynchronous initialization via |
| 4004 | * threads, just implement the #GAsyncInitable interface without overriding |
| 4005 | * any interface methods. |
| 4006 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 4007 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 4008 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 4009 | */ |
| 4010 | vfunc_init_async( |
| 4011 | io_priority: number, |
| 4012 | cancellable?: Gio.Cancellable | null, |
| 4013 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 4014 | ): void; |
| 4015 | /** |
| 4016 | * Finishes asynchronous initialization and returns the result. |
| 4017 | * See g_async_initable_init_async(). |
| 4018 | * @param res a #GAsyncResult. |
| 4019 | */ |
| 4020 | vfunc_init_finish(res: Gio.AsyncResult): boolean; |
| 4021 | /** |
| 4022 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 4023 | * @returns A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref(). |
| 4024 | */ |
| 4025 | get_object(): Gio.DBusObject | null; |
| 4026 | /** |
| 4027 | * Gets D-Bus introspection information for the D-Bus interface |
| 4028 | * implemented by `interface_`. |
| 4029 | * @returns A #GDBusInterfaceInfo. Do not free. |
| 4030 | */ |
| 4031 | get_info(): Gio.DBusInterfaceInfo; |
| 4032 | /** |
| 4033 | * Sets the #GDBusObject for `interface_` to `object`. |
| 4034 | * |
| 4035 | * Note that `interface_` will hold a weak reference to `object`. |
| 4036 | * @param object A #GDBusObject or %NULL. |
| 4037 | */ |
| 4038 | set_object(object?: Gio.DBusObject | null): void; |
| 4039 | /** |
| 4040 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 4041 | */ |
| 4042 | vfunc_dup_object(): Gio.DBusObject | null; |
| 4043 | /** |
| 4044 | * Gets D-Bus introspection information for the D-Bus interface |
| 4045 | * implemented by `interface_`. |
| 4046 | */ |
| 4047 | vfunc_get_info(): Gio.DBusInterfaceInfo; |
| 4048 | /** |
| 4049 | * Sets the #GDBusObject for `interface_` to `object`. |
| 4050 | * |
| 4051 | * Note that `interface_` will hold a weak reference to `object`. |
| 4052 | * @param object A #GDBusObject or %NULL. |
| 4053 | */ |
| 4054 | vfunc_set_object(object?: Gio.DBusObject | null): void; |
| 4055 | /** |
| 4056 | * Initializes the object implementing the interface. |
| 4057 | * |
| 4058 | * This method is intended for language bindings. If writing in C, |
| 4059 | * g_initable_new() should typically be used instead. |
| 4060 | * |
| 4061 | * The object must be initialized before any real use after initial |
| 4062 | * construction, either with this function or g_async_initable_init_async(). |
| 4063 | * |
| 4064 | * Implementations may also support cancellation. If `cancellable` is not %NULL, |
| 4065 | * then initialization can be cancelled by triggering the cancellable object |
| 4066 | * from another thread. If the operation was cancelled, the error |
| 4067 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and |
| 4068 | * the object doesn't support cancellable initialization the error |
| 4069 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 4070 | * |
| 4071 | * If the object is not initialized, or initialization returns with an |
| 4072 | * error, then all operations on the object except g_object_ref() and |
| 4073 | * g_object_unref() are considered to be invalid, and have undefined |
| 4074 | * behaviour. See the [description][iface`Gio`.Initable#description] for more details. |
| 4075 | * |
| 4076 | * Callers should not assume that a class which implements #GInitable can be |
| 4077 | * initialized multiple times, unless the class explicitly documents itself as |
| 4078 | * supporting this. Generally, a class’ implementation of init() can assume |
| 4079 | * (and assert) that it will only be called once. Previously, this documentation |
| 4080 | * recommended all #GInitable implementations should be idempotent; that |
| 4081 | * recommendation was relaxed in GLib 2.54. |
| 4082 | * |
| 4083 | * If a class explicitly supports being initialized multiple times, it is |
| 4084 | * recommended that the method is idempotent: multiple calls with the same |
| 4085 | * arguments should return the same results. Only the first call initializes |
| 4086 | * the object; further calls return the result of the first call. |
| 4087 | * |
| 4088 | * One reason why a class might need to support idempotent initialization is if |
| 4089 | * it is designed to be used via the singleton pattern, with a |
| 4090 | * #GObjectClass.constructor that sometimes returns an existing instance. |
| 4091 | * In this pattern, a caller would expect to be able to call g_initable_init() |
| 4092 | * on the result of g_object_new(), regardless of whether it is in fact a new |
| 4093 | * instance. |
| 4094 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 4095 | * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. |
| 4096 | */ |
| 4097 | init(cancellable?: Gio.Cancellable | null): boolean; |
| 4098 | /** |
| 4099 | * Initializes the object implementing the interface. |
| 4100 | * |
| 4101 | * This method is intended for language bindings. If writing in C, |
| 4102 | * g_initable_new() should typically be used instead. |
| 4103 | * |
| 4104 | * The object must be initialized before any real use after initial |
| 4105 | * construction, either with this function or g_async_initable_init_async(). |
| 4106 | * |
| 4107 | * Implementations may also support cancellation. If `cancellable` is not %NULL, |
| 4108 | * then initialization can be cancelled by triggering the cancellable object |
| 4109 | * from another thread. If the operation was cancelled, the error |
| 4110 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and |
| 4111 | * the object doesn't support cancellable initialization the error |
| 4112 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 4113 | * |
| 4114 | * If the object is not initialized, or initialization returns with an |
| 4115 | * error, then all operations on the object except g_object_ref() and |
| 4116 | * g_object_unref() are considered to be invalid, and have undefined |
| 4117 | * behaviour. See the [description][iface`Gio`.Initable#description] for more details. |
| 4118 | * |
| 4119 | * Callers should not assume that a class which implements #GInitable can be |
| 4120 | * initialized multiple times, unless the class explicitly documents itself as |
| 4121 | * supporting this. Generally, a class’ implementation of init() can assume |
| 4122 | * (and assert) that it will only be called once. Previously, this documentation |
| 4123 | * recommended all #GInitable implementations should be idempotent; that |
| 4124 | * recommendation was relaxed in GLib 2.54. |
| 4125 | * |
| 4126 | * If a class explicitly supports being initialized multiple times, it is |
| 4127 | * recommended that the method is idempotent: multiple calls with the same |
| 4128 | * arguments should return the same results. Only the first call initializes |
| 4129 | * the object; further calls return the result of the first call. |
| 4130 | * |
| 4131 | * One reason why a class might need to support idempotent initialization is if |
| 4132 | * it is designed to be used via the singleton pattern, with a |
| 4133 | * #GObjectClass.constructor that sometimes returns an existing instance. |
| 4134 | * In this pattern, a caller would expect to be able to call g_initable_init() |
| 4135 | * on the result of g_object_new(), regardless of whether it is in fact a new |
| 4136 | * instance. |
| 4137 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 4138 | */ |
| 4139 | vfunc_init(cancellable?: Gio.Cancellable | null): boolean; |
| 4140 | /** |
| 4141 | * Creates a binding between `source_property` on `source` and `target_property` |
| 4142 | * on `target`. |
| 4143 | * |
| 4144 | * Whenever the `source_property` is changed the `target_property` is |
| 4145 | * updated using the same value. For instance: |
| 4146 | * |
| 4147 | * |
| 4148 | * ```c |
| 4149 | * g_object_bind_property (action, "active", widget, "sensitive", 0); |
| 4150 | * ``` |
| 4151 | * |
| 4152 | * |
| 4153 | * Will result in the "sensitive" property of the widget #GObject instance to be |
| 4154 | * updated with the same value of the "active" property of the action #GObject |
| 4155 | * instance. |
| 4156 | * |
| 4157 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 4158 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 4159 | * will be updated as well. |
| 4160 | * |
| 4161 | * The binding will automatically be removed when either the `source` or the |
| 4162 | * `target` instances are finalized. To remove the binding without affecting the |
| 4163 | * `source` and the `target` you can just call g_object_unref() on the returned |
| 4164 | * #GBinding instance. |
| 4165 | * |
| 4166 | * Removing the binding by calling g_object_unref() on it must only be done if |
| 4167 | * the binding, `source` and `target` are only used from a single thread and it |
| 4168 | * is clear that both `source` and `target` outlive the binding. Especially it |
| 4169 | * is not safe to rely on this if the binding, `source` or `target` can be |
| 4170 | * finalized from different threads. Keep another reference to the binding and |
| 4171 | * use g_binding_unbind() instead to be on the safe side. |
| 4172 | * |
| 4173 | * A #GObject can have multiple bindings. |
| 4174 | * @param source_property the property on @source to bind |
| 4175 | * @param target the target #GObject |
| 4176 | * @param target_property the property on @target to bind |
| 4177 | * @param flags flags to pass to #GBinding |
| 4178 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 4179 | */ |
| 4180 | bind_property( |
| 4181 | source_property: string, |
| 4182 | target: GObject.Object, |
| 4183 | target_property: string, |
| 4184 | flags: GObject.BindingFlags | null, |
| 4185 | ): GObject.Binding; |
| 4186 | /** |
| 4187 | * Complete version of g_object_bind_property(). |
| 4188 | * |
| 4189 | * Creates a binding between `source_property` on `source` and `target_property` |
| 4190 | * on `target,` allowing you to set the transformation functions to be used by |
| 4191 | * the binding. |
| 4192 | * |
| 4193 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 4194 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 4195 | * will be updated as well. The `transform_from` function is only used in case |
| 4196 | * of bidirectional bindings, otherwise it will be ignored |
| 4197 | * |
| 4198 | * The binding will automatically be removed when either the `source` or the |
| 4199 | * `target` instances are finalized. This will release the reference that is |
| 4200 | * being held on the #GBinding instance; if you want to hold on to the |
| 4201 | * #GBinding instance, you will need to hold a reference to it. |
| 4202 | * |
| 4203 | * To remove the binding, call g_binding_unbind(). |
| 4204 | * |
| 4205 | * A #GObject can have multiple bindings. |
| 4206 | * |
| 4207 | * The same `user_data` parameter will be used for both `transform_to` |
| 4208 | * and `transform_from` transformation functions; the `notify` function will |
| 4209 | * be called once, when the binding is removed. If you need different data |
| 4210 | * for each transformation function, please use |
| 4211 | * g_object_bind_property_with_closures() instead. |
| 4212 | * @param source_property the property on @source to bind |
| 4213 | * @param target the target #GObject |
| 4214 | * @param target_property the property on @target to bind |
| 4215 | * @param flags flags to pass to #GBinding |
| 4216 | * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default |
| 4217 | * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default |
| 4218 | * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required |
| 4219 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 4220 | */ |
| 4221 | bind_property_full( |
| 4222 | source_property: string, |
| 4223 | target: GObject.Object, |
| 4224 | target_property: string, |
| 4225 | flags: GObject.BindingFlags | null, |
| 4226 | transform_to?: GObject.BindingTransformFunc | null, |
| 4227 | transform_from?: GObject.BindingTransformFunc | null, |
| 4228 | notify?: GLib.DestroyNotify | null, |
| 4229 | ): GObject.Binding; |
| 4230 | // Conflicted with GObject.Object.bind_property_full |
| 4231 | bind_property_full(...args: never[]): any; |
| 4232 | /** |
| 4233 | * This function is intended for #GObject implementations to re-enforce |
| 4234 | * a [floating][floating-ref] object reference. Doing this is seldom |
| 4235 | * required: all #GInitiallyUnowneds are created with a floating reference |
| 4236 | * which usually just needs to be sunken by calling g_object_ref_sink(). |
| 4237 | */ |
| 4238 | force_floating(): void; |
| 4239 | /** |
| 4240 | * Increases the freeze count on `object`. If the freeze count is |
| 4241 | * non-zero, the emission of "notify" signals on `object` is |
| 4242 | * stopped. The signals are queued until the freeze count is decreased |
| 4243 | * to zero. Duplicate notifications are squashed so that at most one |
| 4244 | * #GObject::notify signal is emitted for each property modified while the |
| 4245 | * object is frozen. |
| 4246 | * |
| 4247 | * This is necessary for accessors that modify multiple properties to prevent |
| 4248 | * premature notification while the object is still being modified. |
| 4249 | */ |
| 4250 | freeze_notify(): void; |
| 4251 | /** |
| 4252 | * Gets a named field from the objects table of associations (see g_object_set_data()). |
| 4253 | * @param key name of the key for that association |
| 4254 | * @returns the data if found, or %NULL if no such data exists. |
| 4255 | */ |
| 4256 | get_data(key: string): any | null; |
| 4257 | /** |
| 4258 | * Gets a property of an object. |
| 4259 | * |
| 4260 | * The value can be: |
| 4261 | * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) |
| 4262 | * - a GObject.Value initialized with the expected type of the property |
| 4263 | * - a GObject.Value initialized with a type to which the expected type of the property can be transformed |
| 4264 | * |
| 4265 | * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. |
| 4266 | * |
| 4267 | * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. |
| 4268 | * @param property_name The name of the property to get |
| 4269 | * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type |
| 4270 | */ |
| 4271 | get_property(property_name: string, value: GObject.Value | any): any; |
| 4272 | /** |
| 4273 | * This function gets back user data pointers stored via |
| 4274 | * g_object_set_qdata(). |
| 4275 | * @param quark A #GQuark, naming the user data pointer |
| 4276 | * @returns The user data pointer set, or %NULL |
| 4277 | */ |
| 4278 | get_qdata(quark: GLib.Quark): any | null; |
| 4279 | /** |
| 4280 | * Gets `n_properties` properties for an `object`. |
| 4281 | * Obtained properties will be set to `values`. All properties must be valid. |
| 4282 | * Warnings will be emitted and undefined behaviour may result if invalid |
| 4283 | * properties are passed in. |
| 4284 | * @param names the names of each property to get |
| 4285 | * @param values the values of each property to get |
| 4286 | */ |
| 4287 | getv(names: string[], values: (GObject.Value | any)[]): void; |
| 4288 | /** |
| 4289 | * Checks whether `object` has a [floating][floating-ref] reference. |
| 4290 | * @returns %TRUE if @object has a floating reference |
| 4291 | */ |
| 4292 | is_floating(): boolean; |
| 4293 | /** |
| 4294 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 4295 | * |
| 4296 | * When possible, eg. when signaling a property change from within the class |
| 4297 | * that registered the property, you should use g_object_notify_by_pspec() |
| 4298 | * instead. |
| 4299 | * |
| 4300 | * Note that emission of the notify signal may be blocked with |
| 4301 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 4302 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 4303 | * called. |
| 4304 | * @param property_name the name of a property installed on the class of @object. |
| 4305 | */ |
| 4306 | notify(property_name: string): void; |
| 4307 | /** |
| 4308 | * Emits a "notify" signal for the property specified by `pspec` on `object`. |
| 4309 | * |
| 4310 | * This function omits the property name lookup, hence it is faster than |
| 4311 | * g_object_notify(). |
| 4312 | * |
| 4313 | * One way to avoid using g_object_notify() from within the |
| 4314 | * class that registered the properties, and using g_object_notify_by_pspec() |
| 4315 | * instead, is to store the GParamSpec used with |
| 4316 | * g_object_class_install_property() inside a static array, e.g.: |
| 4317 | * |
| 4318 | * |
| 4319 | * ```c |
| 4320 | * typedef enum |
| 4321 | * { |
| 4322 | * PROP_FOO = 1, |
| 4323 | * PROP_LAST |
| 4324 | * } MyObjectProperty; |
| 4325 | * |
| 4326 | * static GParamSpec *properties[PROP_LAST]; |
| 4327 | * |
| 4328 | * static void |
| 4329 | * my_object_class_init (MyObjectClass *klass) |
| 4330 | * { |
| 4331 | * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, |
| 4332 | * 0, 100, |
| 4333 | * 50, |
| 4334 | * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 4335 | * g_object_class_install_property (gobject_class, |
| 4336 | * PROP_FOO, |
| 4337 | * properties[PROP_FOO]); |
| 4338 | * } |
| 4339 | * ``` |
| 4340 | * |
| 4341 | * |
| 4342 | * and then notify a change on the "foo" property with: |
| 4343 | * |
| 4344 | * |
| 4345 | * ```c |
| 4346 | * g_object_notify_by_pspec (self, properties[PROP_FOO]); |
| 4347 | * ``` |
| 4348 | * |
| 4349 | * @param pspec the #GParamSpec of a property installed on the class of @object. |
| 4350 | */ |
| 4351 | notify_by_pspec(pspec: GObject.ParamSpec): void; |
| 4352 | /** |
| 4353 | * Increases the reference count of `object`. |
| 4354 | * |
| 4355 | * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type |
| 4356 | * of `object` will be propagated to the return type (using the GCC typeof() |
| 4357 | * extension), so any casting the caller needs to do on the return type must be |
| 4358 | * explicit. |
| 4359 | * @returns the same @object |
| 4360 | */ |
| 4361 | ref(): GObject.Object; |
| 4362 | /** |
| 4363 | * Increase the reference count of `object,` and possibly remove the |
| 4364 | * [floating][floating-ref] reference, if `object` has a floating reference. |
| 4365 | * |
| 4366 | * In other words, if the object is floating, then this call "assumes |
| 4367 | * ownership" of the floating reference, converting it to a normal |
| 4368 | * reference by clearing the floating flag while leaving the reference |
| 4369 | * count unchanged. If the object is not floating, then this call |
| 4370 | * adds a new normal reference increasing the reference count by one. |
| 4371 | * |
| 4372 | * Since GLib 2.56, the type of `object` will be propagated to the return type |
| 4373 | * under the same conditions as for g_object_ref(). |
| 4374 | * @returns @object |
| 4375 | */ |
| 4376 | ref_sink(): GObject.Object; |
| 4377 | /** |
| 4378 | * Releases all references to other objects. This can be used to break |
| 4379 | * reference cycles. |
| 4380 | * |
| 4381 | * This function should only be called from object system implementations. |
| 4382 | */ |
| 4383 | run_dispose(): void; |
| 4384 | /** |
| 4385 | * Each object carries around a table of associations from |
| 4386 | * strings to pointers. This function lets you set an association. |
| 4387 | * |
| 4388 | * If the object already had an association with that name, |
| 4389 | * the old association will be destroyed. |
| 4390 | * |
| 4391 | * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). |
| 4392 | * This means a copy of `key` is kept permanently (even after `object` has been |
| 4393 | * finalized) — so it is recommended to only use a small, bounded set of values |
| 4394 | * for `key` in your program, to avoid the #GQuark storage growing unbounded. |
| 4395 | * @param key name of the key |
| 4396 | * @param data data to associate with that key |
| 4397 | */ |
| 4398 | set_data(key: string, data?: any | null): void; |
| 4399 | /** |
| 4400 | * Sets a property on an object. |
| 4401 | * @param property_name The name of the property to set |
| 4402 | * @param value The value to set the property to |
| 4403 | */ |
| 4404 | set_property(property_name: string, value: GObject.Value | any): void; |
| 4405 | /** |
| 4406 | * Remove a specified datum from the object's data associations, |
| 4407 | * without invoking the association's destroy handler. |
| 4408 | * @param key name of the key |
| 4409 | * @returns the data if found, or %NULL if no such data exists. |
| 4410 | */ |
| 4411 | steal_data(key: string): any | null; |
| 4412 | /** |
| 4413 | * This function gets back user data pointers stored via |
| 4414 | * g_object_set_qdata() and removes the `data` from object |
| 4415 | * without invoking its destroy() function (if any was |
| 4416 | * set). |
| 4417 | * Usually, calling this function is only required to update |
| 4418 | * user data pointers with a destroy notifier, for example: |
| 4419 | * |
| 4420 | * ```c |
| 4421 | * void |
| 4422 | * object_add_to_user_list (GObject *object, |
| 4423 | * const gchar *new_string) |
| 4424 | * { |
| 4425 | * // the quark, naming the object data |
| 4426 | * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); |
| 4427 | * // retrieve the old string list |
| 4428 | * GList *list = g_object_steal_qdata (object, quark_string_list); |
| 4429 | * |
| 4430 | * // prepend new string |
| 4431 | * list = g_list_prepend (list, g_strdup (new_string)); |
| 4432 | * // this changed 'list', so we need to set it again |
| 4433 | * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); |
| 4434 | * } |
| 4435 | * static void |
| 4436 | * free_string_list (gpointer data) |
| 4437 | * { |
| 4438 | * GList *node, *list = data; |
| 4439 | * |
| 4440 | * for (node = list; node; node = node->next) |
| 4441 | * g_free (node->data); |
| 4442 | * g_list_free (list); |
| 4443 | * } |
| 4444 | * ``` |
| 4445 | * |
| 4446 | * Using g_object_get_qdata() in the above example, instead of |
| 4447 | * g_object_steal_qdata() would have left the destroy function set, |
| 4448 | * and thus the partial string list would have been freed upon |
| 4449 | * g_object_set_qdata_full(). |
| 4450 | * @param quark A #GQuark, naming the user data pointer |
| 4451 | * @returns The user data pointer set, or %NULL |
| 4452 | */ |
| 4453 | steal_qdata(quark: GLib.Quark): any | null; |
| 4454 | /** |
| 4455 | * Reverts the effect of a previous call to |
| 4456 | * g_object_freeze_notify(). The freeze count is decreased on `object` |
| 4457 | * and when it reaches zero, queued "notify" signals are emitted. |
| 4458 | * |
| 4459 | * Duplicate notifications for each property are squashed so that at most one |
| 4460 | * #GObject::notify signal is emitted for each property, in the reverse order |
| 4461 | * in which they have been queued. |
| 4462 | * |
| 4463 | * It is an error to call this function when the freeze count is zero. |
| 4464 | */ |
| 4465 | thaw_notify(): void; |
| 4466 | /** |
| 4467 | * Decreases the reference count of `object`. When its reference count |
| 4468 | * drops to 0, the object is finalized (i.e. its memory is freed). |
| 4469 | * |
| 4470 | * If the pointer to the #GObject may be reused in future (for example, if it is |
| 4471 | * an instance variable of another object), it is recommended to clear the |
| 4472 | * pointer to %NULL rather than retain a dangling pointer to a potentially |
| 4473 | * invalid #GObject instance. Use g_clear_object() for this. |
| 4474 | */ |
| 4475 | unref(): void; |
| 4476 | /** |
| 4477 | * This function essentially limits the life time of the `closure` to |
| 4478 | * the life time of the object. That is, when the object is finalized, |
| 4479 | * the `closure` is invalidated by calling g_closure_invalidate() on |
| 4480 | * it, in order to prevent invocations of the closure with a finalized |
| 4481 | * (nonexisting) object. Also, g_object_ref() and g_object_unref() are |
| 4482 | * added as marshal guards to the `closure,` to ensure that an extra |
| 4483 | * reference count is held on `object` during invocation of the |
| 4484 | * `closure`. Usually, this function will be called on closures that |
| 4485 | * use this `object` as closure data. |
| 4486 | * @param closure #GClosure to watch |
| 4487 | */ |
| 4488 | watch_closure(closure: GObject.Closure): void; |
| 4489 | /** |
| 4490 | * the `constructed` function is called by g_object_new() as the |
| 4491 | * final step of the object creation process. At the point of the call, all |
| 4492 | * construction properties have been set on the object. The purpose of this |
| 4493 | * call is to allow for object initialisation steps that can only be performed |
| 4494 | * after construction properties have been set. `constructed` implementors |
| 4495 | * should chain up to the `constructed` call of their parent class to allow it |
| 4496 | * to complete its initialisation. |
| 4497 | */ |
| 4498 | vfunc_constructed(): void; |
| 4499 | /** |
| 4500 | * emits property change notification for a bunch |
| 4501 | * of properties. Overriding `dispatch_properties_changed` should be rarely |
| 4502 | * needed. |
| 4503 | * @param n_pspecs |
| 4504 | * @param pspecs |
| 4505 | */ |
| 4506 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; |
| 4507 | /** |
| 4508 | * the `dispose` function is supposed to drop all references to other |
| 4509 | * objects, but keep the instance otherwise intact, so that client method |
| 4510 | * invocations still work. It may be run multiple times (due to reference |
| 4511 | * loops). Before returning, `dispose` should chain up to the `dispose` method |
| 4512 | * of the parent class. |
| 4513 | */ |
| 4514 | vfunc_dispose(): void; |
| 4515 | /** |
| 4516 | * instance finalization function, should finish the finalization of |
| 4517 | * the instance begun in `dispose` and chain up to the `finalize` method of the |
| 4518 | * parent class. |
| 4519 | */ |
| 4520 | vfunc_finalize(): void; |
| 4521 | /** |
| 4522 | * the generic getter for all properties of this type. Should be |
| 4523 | * overridden for every type with properties. |
| 4524 | * @param property_id |
| 4525 | * @param value |
| 4526 | * @param pspec |
| 4527 | */ |
| 4528 | vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 4529 | /** |
| 4530 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 4531 | * |
| 4532 | * When possible, eg. when signaling a property change from within the class |
| 4533 | * that registered the property, you should use g_object_notify_by_pspec() |
| 4534 | * instead. |
| 4535 | * |
| 4536 | * Note that emission of the notify signal may be blocked with |
| 4537 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 4538 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 4539 | * called. |
| 4540 | * @param pspec |
| 4541 | */ |
| 4542 | vfunc_notify(pspec: GObject.ParamSpec): void; |
| 4543 | /** |
| 4544 | * the generic setter for all properties of this type. Should be |
| 4545 | * overridden for every type with properties. If implementations of |
| 4546 | * `set_property` don't emit property change notification explicitly, this will |
| 4547 | * be done implicitly by the type system. However, if the notify signal is |
| 4548 | * emitted explicitly, the type system will not emit it a second time. |
| 4549 | * @param property_id |
| 4550 | * @param value |
| 4551 | * @param pspec |
| 4552 | */ |
| 4553 | vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 4554 | /** |
| 4555 | * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. |
| 4556 | * @param id Handler ID of the handler to be disconnected |
| 4557 | */ |
| 4558 | disconnect(id: number): void; |
| 4559 | /** |
| 4560 | * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. |
| 4561 | * @param properties Object containing the properties to set |
| 4562 | */ |
| 4563 | set(properties: { [key: string]: any }): void; |
| 4564 | /** |
| 4565 | * Blocks a handler of an instance so it will not be called during any signal emissions |
| 4566 | * @param id Handler ID of the handler to be blocked |
| 4567 | */ |
| 4568 | block_signal_handler(id: number): void; |
| 4569 | /** |
| 4570 | * Unblocks a handler so it will be called again during any signal emissions |
| 4571 | * @param id Handler ID of the handler to be unblocked |
| 4572 | */ |
| 4573 | unblock_signal_handler(id: number): void; |
| 4574 | /** |
| 4575 | * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. |
| 4576 | * @param detailedName Name of the signal to stop emission of |
| 4577 | */ |
| 4578 | stop_emission_by_name(detailedName: string): void; |
| 4579 | } |
| 4580 | |
| 4581 | namespace ManagerSkeleton { |
| 4582 | // Constructor properties interface |
| 4583 | |
| 4584 | interface ConstructorProps |
| 4585 | extends Gio.DBusInterfaceSkeleton.ConstructorProps, |
| 4586 | Manager.ConstructorProps, |
| 4587 | Gio.DBusInterface.ConstructorProps {} |
| 4588 | } |
| 4589 | |
| 4590 | /** |
| 4591 | * The #GClueManagerSkeleton structure contains only private data and should only be accessed using the provided API. |
| 4592 | */ |
| 4593 | class ManagerSkeleton extends Gio.DBusInterfaceSkeleton implements Manager, Gio.DBusInterface { |
| 4594 | static $gtype: GObject.GType<ManagerSkeleton>; |
| 4595 | |
| 4596 | // Constructors |
| 4597 | |
| 4598 | constructor(properties?: Partial<ManagerSkeleton.ConstructorProps>, ...args: any[]); |
| 4599 | |
| 4600 | _init(...args: any[]): void; |
| 4601 | |
| 4602 | static ['new'](): ManagerSkeleton; |
| 4603 | |
| 4604 | // Inherited properties |
| 4605 | /** |
| 4606 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.AvailableAccuracyLevel">"AvailableAccuracyLevel"</link>. |
| 4607 | * |
| 4608 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 4609 | */ |
| 4610 | get available_accuracy_level(): number; |
| 4611 | set available_accuracy_level(val: number); |
| 4612 | /** |
| 4613 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.AvailableAccuracyLevel">"AvailableAccuracyLevel"</link>. |
| 4614 | * |
| 4615 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 4616 | */ |
| 4617 | get availableAccuracyLevel(): number; |
| 4618 | set availableAccuracyLevel(val: number); |
| 4619 | /** |
| 4620 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.InUse">"InUse"</link>. |
| 4621 | * |
| 4622 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 4623 | */ |
| 4624 | get in_use(): boolean; |
| 4625 | set in_use(val: boolean); |
| 4626 | /** |
| 4627 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.InUse">"InUse"</link>. |
| 4628 | * |
| 4629 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 4630 | */ |
| 4631 | get inUse(): boolean; |
| 4632 | set inUse(val: boolean); |
| 4633 | |
| 4634 | // Inherited methods |
| 4635 | /** |
| 4636 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. |
| 4637 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4638 | * You can then call gclue_manager_call_add_agent_finish() to get the result of the operation. |
| 4639 | * |
| 4640 | * See gclue_manager_call_add_agent_sync() for the synchronous, blocking version of this method. |
| 4641 | * @param arg_id Argument to pass with the method invocation. |
| 4642 | * @param cancellable A #GCancellable or %NULL. |
| 4643 | */ |
| 4644 | call_add_agent(arg_id: string, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 4645 | /** |
| 4646 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. |
| 4647 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4648 | * You can then call gclue_manager_call_add_agent_finish() to get the result of the operation. |
| 4649 | * |
| 4650 | * See gclue_manager_call_add_agent_sync() for the synchronous, blocking version of this method. |
| 4651 | * @param arg_id Argument to pass with the method invocation. |
| 4652 | * @param cancellable A #GCancellable or %NULL. |
| 4653 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 4654 | */ |
| 4655 | call_add_agent( |
| 4656 | arg_id: string, |
| 4657 | cancellable: Gio.Cancellable | null, |
| 4658 | callback: Gio.AsyncReadyCallback<this> | null, |
| 4659 | ): void; |
| 4660 | /** |
| 4661 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. |
| 4662 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4663 | * You can then call gclue_manager_call_add_agent_finish() to get the result of the operation. |
| 4664 | * |
| 4665 | * See gclue_manager_call_add_agent_sync() for the synchronous, blocking version of this method. |
| 4666 | * @param arg_id Argument to pass with the method invocation. |
| 4667 | * @param cancellable A #GCancellable or %NULL. |
| 4668 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 4669 | */ |
| 4670 | call_add_agent( |
| 4671 | arg_id: string, |
| 4672 | cancellable?: Gio.Cancellable | null, |
| 4673 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 4674 | ): Promise<boolean> | void; |
| 4675 | /** |
| 4676 | * Finishes an operation started with gclue_manager_call_add_agent(). |
| 4677 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_add_agent(). |
| 4678 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 4679 | */ |
| 4680 | call_add_agent_finish(res: Gio.AsyncResult): boolean; |
| 4681 | /** |
| 4682 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 4683 | * |
| 4684 | * See gclue_manager_call_add_agent() for the asynchronous version of this method. |
| 4685 | * @param arg_id Argument to pass with the method invocation. |
| 4686 | * @param cancellable A #GCancellable or %NULL. |
| 4687 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 4688 | */ |
| 4689 | call_add_agent_sync(arg_id: string, cancellable?: Gio.Cancellable | null): boolean; |
| 4690 | /** |
| 4691 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. |
| 4692 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4693 | * You can then call gclue_manager_call_create_client_finish() to get the result of the operation. |
| 4694 | * |
| 4695 | * See gclue_manager_call_create_client_sync() for the synchronous, blocking version of this method. |
| 4696 | * @param cancellable A #GCancellable or %NULL. |
| 4697 | */ |
| 4698 | call_create_client(cancellable?: Gio.Cancellable | null): Promise<string>; |
| 4699 | /** |
| 4700 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. |
| 4701 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4702 | * You can then call gclue_manager_call_create_client_finish() to get the result of the operation. |
| 4703 | * |
| 4704 | * See gclue_manager_call_create_client_sync() for the synchronous, blocking version of this method. |
| 4705 | * @param cancellable A #GCancellable or %NULL. |
| 4706 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 4707 | */ |
| 4708 | call_create_client( |
| 4709 | cancellable: Gio.Cancellable | null, |
| 4710 | callback: Gio.AsyncReadyCallback<this> | null, |
| 4711 | ): void; |
| 4712 | /** |
| 4713 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. |
| 4714 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4715 | * You can then call gclue_manager_call_create_client_finish() to get the result of the operation. |
| 4716 | * |
| 4717 | * See gclue_manager_call_create_client_sync() for the synchronous, blocking version of this method. |
| 4718 | * @param cancellable A #GCancellable or %NULL. |
| 4719 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 4720 | */ |
| 4721 | call_create_client( |
| 4722 | cancellable?: Gio.Cancellable | null, |
| 4723 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 4724 | ): Promise<string> | void; |
| 4725 | /** |
| 4726 | * Finishes an operation started with gclue_manager_call_create_client(). |
| 4727 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_create_client(). |
| 4728 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 4729 | */ |
| 4730 | call_create_client_finish(res: Gio.AsyncResult): [boolean, string]; |
| 4731 | /** |
| 4732 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 4733 | * |
| 4734 | * See gclue_manager_call_create_client() for the asynchronous version of this method. |
| 4735 | * @param cancellable A #GCancellable or %NULL. |
| 4736 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 4737 | */ |
| 4738 | call_create_client_sync(cancellable?: Gio.Cancellable | null): [boolean, string]; |
| 4739 | /** |
| 4740 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. |
| 4741 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4742 | * You can then call gclue_manager_call_delete_client_finish() to get the result of the operation. |
| 4743 | * |
| 4744 | * See gclue_manager_call_delete_client_sync() for the synchronous, blocking version of this method. |
| 4745 | * @param arg_client Argument to pass with the method invocation. |
| 4746 | * @param cancellable A #GCancellable or %NULL. |
| 4747 | */ |
| 4748 | call_delete_client(arg_client: string, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 4749 | /** |
| 4750 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. |
| 4751 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4752 | * You can then call gclue_manager_call_delete_client_finish() to get the result of the operation. |
| 4753 | * |
| 4754 | * See gclue_manager_call_delete_client_sync() for the synchronous, blocking version of this method. |
| 4755 | * @param arg_client Argument to pass with the method invocation. |
| 4756 | * @param cancellable A #GCancellable or %NULL. |
| 4757 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 4758 | */ |
| 4759 | call_delete_client( |
| 4760 | arg_client: string, |
| 4761 | cancellable: Gio.Cancellable | null, |
| 4762 | callback: Gio.AsyncReadyCallback<this> | null, |
| 4763 | ): void; |
| 4764 | /** |
| 4765 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. |
| 4766 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4767 | * You can then call gclue_manager_call_delete_client_finish() to get the result of the operation. |
| 4768 | * |
| 4769 | * See gclue_manager_call_delete_client_sync() for the synchronous, blocking version of this method. |
| 4770 | * @param arg_client Argument to pass with the method invocation. |
| 4771 | * @param cancellable A #GCancellable or %NULL. |
| 4772 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 4773 | */ |
| 4774 | call_delete_client( |
| 4775 | arg_client: string, |
| 4776 | cancellable?: Gio.Cancellable | null, |
| 4777 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 4778 | ): Promise<boolean> | void; |
| 4779 | /** |
| 4780 | * Finishes an operation started with gclue_manager_call_delete_client(). |
| 4781 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_delete_client(). |
| 4782 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 4783 | */ |
| 4784 | call_delete_client_finish(res: Gio.AsyncResult): boolean; |
| 4785 | /** |
| 4786 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 4787 | * |
| 4788 | * See gclue_manager_call_delete_client() for the asynchronous version of this method. |
| 4789 | * @param arg_client Argument to pass with the method invocation. |
| 4790 | * @param cancellable A #GCancellable or %NULL. |
| 4791 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 4792 | */ |
| 4793 | call_delete_client_sync(arg_client: string, cancellable?: Gio.Cancellable | null): boolean; |
| 4794 | /** |
| 4795 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. |
| 4796 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4797 | * You can then call gclue_manager_call_get_client_finish() to get the result of the operation. |
| 4798 | * |
| 4799 | * See gclue_manager_call_get_client_sync() for the synchronous, blocking version of this method. |
| 4800 | * @param cancellable A #GCancellable or %NULL. |
| 4801 | */ |
| 4802 | call_get_client(cancellable?: Gio.Cancellable | null): Promise<string>; |
| 4803 | /** |
| 4804 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. |
| 4805 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4806 | * You can then call gclue_manager_call_get_client_finish() to get the result of the operation. |
| 4807 | * |
| 4808 | * See gclue_manager_call_get_client_sync() for the synchronous, blocking version of this method. |
| 4809 | * @param cancellable A #GCancellable or %NULL. |
| 4810 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 4811 | */ |
| 4812 | call_get_client(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void; |
| 4813 | /** |
| 4814 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. |
| 4815 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 4816 | * You can then call gclue_manager_call_get_client_finish() to get the result of the operation. |
| 4817 | * |
| 4818 | * See gclue_manager_call_get_client_sync() for the synchronous, blocking version of this method. |
| 4819 | * @param cancellable A #GCancellable or %NULL. |
| 4820 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 4821 | */ |
| 4822 | call_get_client( |
| 4823 | cancellable?: Gio.Cancellable | null, |
| 4824 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 4825 | ): Promise<string> | void; |
| 4826 | /** |
| 4827 | * Finishes an operation started with gclue_manager_call_get_client(). |
| 4828 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_get_client(). |
| 4829 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 4830 | */ |
| 4831 | call_get_client_finish(res: Gio.AsyncResult): [boolean, string]; |
| 4832 | /** |
| 4833 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 4834 | * |
| 4835 | * See gclue_manager_call_get_client() for the asynchronous version of this method. |
| 4836 | * @param cancellable A #GCancellable or %NULL. |
| 4837 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 4838 | */ |
| 4839 | call_get_client_sync(cancellable?: Gio.Cancellable | null): [boolean, string]; |
| 4840 | /** |
| 4841 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 4842 | * |
| 4843 | * This method will free `invocation,` you cannot use it afterwards. |
| 4844 | * @param invocation A #GDBusMethodInvocation. |
| 4845 | */ |
| 4846 | complete_add_agent(invocation: Gio.DBusMethodInvocation): void; |
| 4847 | /** |
| 4848 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 4849 | * |
| 4850 | * This method will free `invocation,` you cannot use it afterwards. |
| 4851 | * @param invocation A #GDBusMethodInvocation. |
| 4852 | * @param client Parameter to return. |
| 4853 | */ |
| 4854 | complete_create_client(invocation: Gio.DBusMethodInvocation, client: string): void; |
| 4855 | /** |
| 4856 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 4857 | * |
| 4858 | * This method will free `invocation,` you cannot use it afterwards. |
| 4859 | * @param invocation A #GDBusMethodInvocation. |
| 4860 | */ |
| 4861 | complete_delete_client(invocation: Gio.DBusMethodInvocation): void; |
| 4862 | /** |
| 4863 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 4864 | * |
| 4865 | * This method will free `invocation,` you cannot use it afterwards. |
| 4866 | * @param invocation A #GDBusMethodInvocation. |
| 4867 | * @param client Parameter to return. |
| 4868 | */ |
| 4869 | complete_get_client(invocation: Gio.DBusMethodInvocation, client: string): void; |
| 4870 | /** |
| 4871 | * Handler for the #GClueManager::handle-add-agent signal. |
| 4872 | * @param invocation |
| 4873 | * @param arg_id |
| 4874 | */ |
| 4875 | vfunc_handle_add_agent(invocation: Gio.DBusMethodInvocation, arg_id: string): boolean; |
| 4876 | /** |
| 4877 | * Handler for the #GClueManager::handle-create-client signal. |
| 4878 | * @param invocation |
| 4879 | */ |
| 4880 | vfunc_handle_create_client(invocation: Gio.DBusMethodInvocation): boolean; |
| 4881 | /** |
| 4882 | * Handler for the #GClueManager::handle-delete-client signal. |
| 4883 | * @param invocation |
| 4884 | * @param arg_client |
| 4885 | */ |
| 4886 | vfunc_handle_delete_client(invocation: Gio.DBusMethodInvocation, arg_client: string): boolean; |
| 4887 | /** |
| 4888 | * Handler for the #GClueManager::handle-get-client signal. |
| 4889 | * @param invocation |
| 4890 | */ |
| 4891 | vfunc_handle_get_client(invocation: Gio.DBusMethodInvocation): boolean; |
| 4892 | /** |
| 4893 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 4894 | * @returns A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref(). |
| 4895 | */ |
| 4896 | get_object(): Gio.DBusObject | null; |
| 4897 | /** |
| 4898 | * Gets D-Bus introspection information for the D-Bus interface |
| 4899 | * implemented by `interface_`. |
| 4900 | * @returns A #GDBusInterfaceInfo. Do not free. |
| 4901 | */ |
| 4902 | get_info(): Gio.DBusInterfaceInfo; |
| 4903 | /** |
| 4904 | * Sets the #GDBusObject for `interface_` to `object`. |
| 4905 | * |
| 4906 | * Note that `interface_` will hold a weak reference to `object`. |
| 4907 | * @param object A #GDBusObject or %NULL. |
| 4908 | */ |
| 4909 | set_object(object?: Gio.DBusObject | null): void; |
| 4910 | /** |
| 4911 | * Gets the #GDBusObject that `interface_` belongs to, if any. |
| 4912 | */ |
| 4913 | vfunc_dup_object(): Gio.DBusObject | null; |
| 4914 | /** |
| 4915 | * Gets D-Bus introspection information for the D-Bus interface |
| 4916 | * implemented by `interface_`. |
| 4917 | */ |
| 4918 | vfunc_get_info(): Gio.DBusInterfaceInfo; |
| 4919 | /** |
| 4920 | * Sets the #GDBusObject for `interface_` to `object`. |
| 4921 | * |
| 4922 | * Note that `interface_` will hold a weak reference to `object`. |
| 4923 | * @param object A #GDBusObject or %NULL. |
| 4924 | */ |
| 4925 | vfunc_set_object(object?: Gio.DBusObject | null): void; |
| 4926 | /** |
| 4927 | * Creates a binding between `source_property` on `source` and `target_property` |
| 4928 | * on `target`. |
| 4929 | * |
| 4930 | * Whenever the `source_property` is changed the `target_property` is |
| 4931 | * updated using the same value. For instance: |
| 4932 | * |
| 4933 | * |
| 4934 | * ```c |
| 4935 | * g_object_bind_property (action, "active", widget, "sensitive", 0); |
| 4936 | * ``` |
| 4937 | * |
| 4938 | * |
| 4939 | * Will result in the "sensitive" property of the widget #GObject instance to be |
| 4940 | * updated with the same value of the "active" property of the action #GObject |
| 4941 | * instance. |
| 4942 | * |
| 4943 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 4944 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 4945 | * will be updated as well. |
| 4946 | * |
| 4947 | * The binding will automatically be removed when either the `source` or the |
| 4948 | * `target` instances are finalized. To remove the binding without affecting the |
| 4949 | * `source` and the `target` you can just call g_object_unref() on the returned |
| 4950 | * #GBinding instance. |
| 4951 | * |
| 4952 | * Removing the binding by calling g_object_unref() on it must only be done if |
| 4953 | * the binding, `source` and `target` are only used from a single thread and it |
| 4954 | * is clear that both `source` and `target` outlive the binding. Especially it |
| 4955 | * is not safe to rely on this if the binding, `source` or `target` can be |
| 4956 | * finalized from different threads. Keep another reference to the binding and |
| 4957 | * use g_binding_unbind() instead to be on the safe side. |
| 4958 | * |
| 4959 | * A #GObject can have multiple bindings. |
| 4960 | * @param source_property the property on @source to bind |
| 4961 | * @param target the target #GObject |
| 4962 | * @param target_property the property on @target to bind |
| 4963 | * @param flags flags to pass to #GBinding |
| 4964 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 4965 | */ |
| 4966 | bind_property( |
| 4967 | source_property: string, |
| 4968 | target: GObject.Object, |
| 4969 | target_property: string, |
| 4970 | flags: GObject.BindingFlags | null, |
| 4971 | ): GObject.Binding; |
| 4972 | /** |
| 4973 | * Complete version of g_object_bind_property(). |
| 4974 | * |
| 4975 | * Creates a binding between `source_property` on `source` and `target_property` |
| 4976 | * on `target,` allowing you to set the transformation functions to be used by |
| 4977 | * the binding. |
| 4978 | * |
| 4979 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 4980 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 4981 | * will be updated as well. The `transform_from` function is only used in case |
| 4982 | * of bidirectional bindings, otherwise it will be ignored |
| 4983 | * |
| 4984 | * The binding will automatically be removed when either the `source` or the |
| 4985 | * `target` instances are finalized. This will release the reference that is |
| 4986 | * being held on the #GBinding instance; if you want to hold on to the |
| 4987 | * #GBinding instance, you will need to hold a reference to it. |
| 4988 | * |
| 4989 | * To remove the binding, call g_binding_unbind(). |
| 4990 | * |
| 4991 | * A #GObject can have multiple bindings. |
| 4992 | * |
| 4993 | * The same `user_data` parameter will be used for both `transform_to` |
| 4994 | * and `transform_from` transformation functions; the `notify` function will |
| 4995 | * be called once, when the binding is removed. If you need different data |
| 4996 | * for each transformation function, please use |
| 4997 | * g_object_bind_property_with_closures() instead. |
| 4998 | * @param source_property the property on @source to bind |
| 4999 | * @param target the target #GObject |
| 5000 | * @param target_property the property on @target to bind |
| 5001 | * @param flags flags to pass to #GBinding |
| 5002 | * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default |
| 5003 | * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default |
| 5004 | * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required |
| 5005 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 5006 | */ |
| 5007 | bind_property_full( |
| 5008 | source_property: string, |
| 5009 | target: GObject.Object, |
| 5010 | target_property: string, |
| 5011 | flags: GObject.BindingFlags | null, |
| 5012 | transform_to?: GObject.BindingTransformFunc | null, |
| 5013 | transform_from?: GObject.BindingTransformFunc | null, |
| 5014 | notify?: GLib.DestroyNotify | null, |
| 5015 | ): GObject.Binding; |
| 5016 | // Conflicted with GObject.Object.bind_property_full |
| 5017 | bind_property_full(...args: never[]): any; |
| 5018 | /** |
| 5019 | * This function is intended for #GObject implementations to re-enforce |
| 5020 | * a [floating][floating-ref] object reference. Doing this is seldom |
| 5021 | * required: all #GInitiallyUnowneds are created with a floating reference |
| 5022 | * which usually just needs to be sunken by calling g_object_ref_sink(). |
| 5023 | */ |
| 5024 | force_floating(): void; |
| 5025 | /** |
| 5026 | * Increases the freeze count on `object`. If the freeze count is |
| 5027 | * non-zero, the emission of "notify" signals on `object` is |
| 5028 | * stopped. The signals are queued until the freeze count is decreased |
| 5029 | * to zero. Duplicate notifications are squashed so that at most one |
| 5030 | * #GObject::notify signal is emitted for each property modified while the |
| 5031 | * object is frozen. |
| 5032 | * |
| 5033 | * This is necessary for accessors that modify multiple properties to prevent |
| 5034 | * premature notification while the object is still being modified. |
| 5035 | */ |
| 5036 | freeze_notify(): void; |
| 5037 | /** |
| 5038 | * Gets a named field from the objects table of associations (see g_object_set_data()). |
| 5039 | * @param key name of the key for that association |
| 5040 | * @returns the data if found, or %NULL if no such data exists. |
| 5041 | */ |
| 5042 | get_data(key: string): any | null; |
| 5043 | /** |
| 5044 | * Gets a property of an object. |
| 5045 | * |
| 5046 | * The value can be: |
| 5047 | * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) |
| 5048 | * - a GObject.Value initialized with the expected type of the property |
| 5049 | * - a GObject.Value initialized with a type to which the expected type of the property can be transformed |
| 5050 | * |
| 5051 | * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. |
| 5052 | * |
| 5053 | * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. |
| 5054 | * @param property_name The name of the property to get |
| 5055 | * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type |
| 5056 | */ |
| 5057 | get_property(property_name: string, value: GObject.Value | any): any; |
| 5058 | /** |
| 5059 | * This function gets back user data pointers stored via |
| 5060 | * g_object_set_qdata(). |
| 5061 | * @param quark A #GQuark, naming the user data pointer |
| 5062 | * @returns The user data pointer set, or %NULL |
| 5063 | */ |
| 5064 | get_qdata(quark: GLib.Quark): any | null; |
| 5065 | /** |
| 5066 | * Gets `n_properties` properties for an `object`. |
| 5067 | * Obtained properties will be set to `values`. All properties must be valid. |
| 5068 | * Warnings will be emitted and undefined behaviour may result if invalid |
| 5069 | * properties are passed in. |
| 5070 | * @param names the names of each property to get |
| 5071 | * @param values the values of each property to get |
| 5072 | */ |
| 5073 | getv(names: string[], values: (GObject.Value | any)[]): void; |
| 5074 | /** |
| 5075 | * Checks whether `object` has a [floating][floating-ref] reference. |
| 5076 | * @returns %TRUE if @object has a floating reference |
| 5077 | */ |
| 5078 | is_floating(): boolean; |
| 5079 | /** |
| 5080 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 5081 | * |
| 5082 | * When possible, eg. when signaling a property change from within the class |
| 5083 | * that registered the property, you should use g_object_notify_by_pspec() |
| 5084 | * instead. |
| 5085 | * |
| 5086 | * Note that emission of the notify signal may be blocked with |
| 5087 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 5088 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 5089 | * called. |
| 5090 | * @param property_name the name of a property installed on the class of @object. |
| 5091 | */ |
| 5092 | notify(property_name: string): void; |
| 5093 | /** |
| 5094 | * Emits a "notify" signal for the property specified by `pspec` on `object`. |
| 5095 | * |
| 5096 | * This function omits the property name lookup, hence it is faster than |
| 5097 | * g_object_notify(). |
| 5098 | * |
| 5099 | * One way to avoid using g_object_notify() from within the |
| 5100 | * class that registered the properties, and using g_object_notify_by_pspec() |
| 5101 | * instead, is to store the GParamSpec used with |
| 5102 | * g_object_class_install_property() inside a static array, e.g.: |
| 5103 | * |
| 5104 | * |
| 5105 | * ```c |
| 5106 | * typedef enum |
| 5107 | * { |
| 5108 | * PROP_FOO = 1, |
| 5109 | * PROP_LAST |
| 5110 | * } MyObjectProperty; |
| 5111 | * |
| 5112 | * static GParamSpec *properties[PROP_LAST]; |
| 5113 | * |
| 5114 | * static void |
| 5115 | * my_object_class_init (MyObjectClass *klass) |
| 5116 | * { |
| 5117 | * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, |
| 5118 | * 0, 100, |
| 5119 | * 50, |
| 5120 | * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 5121 | * g_object_class_install_property (gobject_class, |
| 5122 | * PROP_FOO, |
| 5123 | * properties[PROP_FOO]); |
| 5124 | * } |
| 5125 | * ``` |
| 5126 | * |
| 5127 | * |
| 5128 | * and then notify a change on the "foo" property with: |
| 5129 | * |
| 5130 | * |
| 5131 | * ```c |
| 5132 | * g_object_notify_by_pspec (self, properties[PROP_FOO]); |
| 5133 | * ``` |
| 5134 | * |
| 5135 | * @param pspec the #GParamSpec of a property installed on the class of @object. |
| 5136 | */ |
| 5137 | notify_by_pspec(pspec: GObject.ParamSpec): void; |
| 5138 | /** |
| 5139 | * Increases the reference count of `object`. |
| 5140 | * |
| 5141 | * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type |
| 5142 | * of `object` will be propagated to the return type (using the GCC typeof() |
| 5143 | * extension), so any casting the caller needs to do on the return type must be |
| 5144 | * explicit. |
| 5145 | * @returns the same @object |
| 5146 | */ |
| 5147 | ref(): GObject.Object; |
| 5148 | /** |
| 5149 | * Increase the reference count of `object,` and possibly remove the |
| 5150 | * [floating][floating-ref] reference, if `object` has a floating reference. |
| 5151 | * |
| 5152 | * In other words, if the object is floating, then this call "assumes |
| 5153 | * ownership" of the floating reference, converting it to a normal |
| 5154 | * reference by clearing the floating flag while leaving the reference |
| 5155 | * count unchanged. If the object is not floating, then this call |
| 5156 | * adds a new normal reference increasing the reference count by one. |
| 5157 | * |
| 5158 | * Since GLib 2.56, the type of `object` will be propagated to the return type |
| 5159 | * under the same conditions as for g_object_ref(). |
| 5160 | * @returns @object |
| 5161 | */ |
| 5162 | ref_sink(): GObject.Object; |
| 5163 | /** |
| 5164 | * Releases all references to other objects. This can be used to break |
| 5165 | * reference cycles. |
| 5166 | * |
| 5167 | * This function should only be called from object system implementations. |
| 5168 | */ |
| 5169 | run_dispose(): void; |
| 5170 | /** |
| 5171 | * Each object carries around a table of associations from |
| 5172 | * strings to pointers. This function lets you set an association. |
| 5173 | * |
| 5174 | * If the object already had an association with that name, |
| 5175 | * the old association will be destroyed. |
| 5176 | * |
| 5177 | * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). |
| 5178 | * This means a copy of `key` is kept permanently (even after `object` has been |
| 5179 | * finalized) — so it is recommended to only use a small, bounded set of values |
| 5180 | * for `key` in your program, to avoid the #GQuark storage growing unbounded. |
| 5181 | * @param key name of the key |
| 5182 | * @param data data to associate with that key |
| 5183 | */ |
| 5184 | set_data(key: string, data?: any | null): void; |
| 5185 | /** |
| 5186 | * Sets a property on an object. |
| 5187 | * @param property_name The name of the property to set |
| 5188 | * @param value The value to set the property to |
| 5189 | */ |
| 5190 | set_property(property_name: string, value: GObject.Value | any): void; |
| 5191 | /** |
| 5192 | * Remove a specified datum from the object's data associations, |
| 5193 | * without invoking the association's destroy handler. |
| 5194 | * @param key name of the key |
| 5195 | * @returns the data if found, or %NULL if no such data exists. |
| 5196 | */ |
| 5197 | steal_data(key: string): any | null; |
| 5198 | /** |
| 5199 | * This function gets back user data pointers stored via |
| 5200 | * g_object_set_qdata() and removes the `data` from object |
| 5201 | * without invoking its destroy() function (if any was |
| 5202 | * set). |
| 5203 | * Usually, calling this function is only required to update |
| 5204 | * user data pointers with a destroy notifier, for example: |
| 5205 | * |
| 5206 | * ```c |
| 5207 | * void |
| 5208 | * object_add_to_user_list (GObject *object, |
| 5209 | * const gchar *new_string) |
| 5210 | * { |
| 5211 | * // the quark, naming the object data |
| 5212 | * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); |
| 5213 | * // retrieve the old string list |
| 5214 | * GList *list = g_object_steal_qdata (object, quark_string_list); |
| 5215 | * |
| 5216 | * // prepend new string |
| 5217 | * list = g_list_prepend (list, g_strdup (new_string)); |
| 5218 | * // this changed 'list', so we need to set it again |
| 5219 | * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); |
| 5220 | * } |
| 5221 | * static void |
| 5222 | * free_string_list (gpointer data) |
| 5223 | * { |
| 5224 | * GList *node, *list = data; |
| 5225 | * |
| 5226 | * for (node = list; node; node = node->next) |
| 5227 | * g_free (node->data); |
| 5228 | * g_list_free (list); |
| 5229 | * } |
| 5230 | * ``` |
| 5231 | * |
| 5232 | * Using g_object_get_qdata() in the above example, instead of |
| 5233 | * g_object_steal_qdata() would have left the destroy function set, |
| 5234 | * and thus the partial string list would have been freed upon |
| 5235 | * g_object_set_qdata_full(). |
| 5236 | * @param quark A #GQuark, naming the user data pointer |
| 5237 | * @returns The user data pointer set, or %NULL |
| 5238 | */ |
| 5239 | steal_qdata(quark: GLib.Quark): any | null; |
| 5240 | /** |
| 5241 | * Reverts the effect of a previous call to |
| 5242 | * g_object_freeze_notify(). The freeze count is decreased on `object` |
| 5243 | * and when it reaches zero, queued "notify" signals are emitted. |
| 5244 | * |
| 5245 | * Duplicate notifications for each property are squashed so that at most one |
| 5246 | * #GObject::notify signal is emitted for each property, in the reverse order |
| 5247 | * in which they have been queued. |
| 5248 | * |
| 5249 | * It is an error to call this function when the freeze count is zero. |
| 5250 | */ |
| 5251 | thaw_notify(): void; |
| 5252 | /** |
| 5253 | * Decreases the reference count of `object`. When its reference count |
| 5254 | * drops to 0, the object is finalized (i.e. its memory is freed). |
| 5255 | * |
| 5256 | * If the pointer to the #GObject may be reused in future (for example, if it is |
| 5257 | * an instance variable of another object), it is recommended to clear the |
| 5258 | * pointer to %NULL rather than retain a dangling pointer to a potentially |
| 5259 | * invalid #GObject instance. Use g_clear_object() for this. |
| 5260 | */ |
| 5261 | unref(): void; |
| 5262 | /** |
| 5263 | * This function essentially limits the life time of the `closure` to |
| 5264 | * the life time of the object. That is, when the object is finalized, |
| 5265 | * the `closure` is invalidated by calling g_closure_invalidate() on |
| 5266 | * it, in order to prevent invocations of the closure with a finalized |
| 5267 | * (nonexisting) object. Also, g_object_ref() and g_object_unref() are |
| 5268 | * added as marshal guards to the `closure,` to ensure that an extra |
| 5269 | * reference count is held on `object` during invocation of the |
| 5270 | * `closure`. Usually, this function will be called on closures that |
| 5271 | * use this `object` as closure data. |
| 5272 | * @param closure #GClosure to watch |
| 5273 | */ |
| 5274 | watch_closure(closure: GObject.Closure): void; |
| 5275 | /** |
| 5276 | * the `constructed` function is called by g_object_new() as the |
| 5277 | * final step of the object creation process. At the point of the call, all |
| 5278 | * construction properties have been set on the object. The purpose of this |
| 5279 | * call is to allow for object initialisation steps that can only be performed |
| 5280 | * after construction properties have been set. `constructed` implementors |
| 5281 | * should chain up to the `constructed` call of their parent class to allow it |
| 5282 | * to complete its initialisation. |
| 5283 | */ |
| 5284 | vfunc_constructed(): void; |
| 5285 | /** |
| 5286 | * emits property change notification for a bunch |
| 5287 | * of properties. Overriding `dispatch_properties_changed` should be rarely |
| 5288 | * needed. |
| 5289 | * @param n_pspecs |
| 5290 | * @param pspecs |
| 5291 | */ |
| 5292 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; |
| 5293 | /** |
| 5294 | * the `dispose` function is supposed to drop all references to other |
| 5295 | * objects, but keep the instance otherwise intact, so that client method |
| 5296 | * invocations still work. It may be run multiple times (due to reference |
| 5297 | * loops). Before returning, `dispose` should chain up to the `dispose` method |
| 5298 | * of the parent class. |
| 5299 | */ |
| 5300 | vfunc_dispose(): void; |
| 5301 | /** |
| 5302 | * instance finalization function, should finish the finalization of |
| 5303 | * the instance begun in `dispose` and chain up to the `finalize` method of the |
| 5304 | * parent class. |
| 5305 | */ |
| 5306 | vfunc_finalize(): void; |
| 5307 | /** |
| 5308 | * the generic getter for all properties of this type. Should be |
| 5309 | * overridden for every type with properties. |
| 5310 | * @param property_id |
| 5311 | * @param value |
| 5312 | * @param pspec |
| 5313 | */ |
| 5314 | vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 5315 | /** |
| 5316 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 5317 | * |
| 5318 | * When possible, eg. when signaling a property change from within the class |
| 5319 | * that registered the property, you should use g_object_notify_by_pspec() |
| 5320 | * instead. |
| 5321 | * |
| 5322 | * Note that emission of the notify signal may be blocked with |
| 5323 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 5324 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 5325 | * called. |
| 5326 | * @param pspec |
| 5327 | */ |
| 5328 | vfunc_notify(pspec: GObject.ParamSpec): void; |
| 5329 | /** |
| 5330 | * the generic setter for all properties of this type. Should be |
| 5331 | * overridden for every type with properties. If implementations of |
| 5332 | * `set_property` don't emit property change notification explicitly, this will |
| 5333 | * be done implicitly by the type system. However, if the notify signal is |
| 5334 | * emitted explicitly, the type system will not emit it a second time. |
| 5335 | * @param property_id |
| 5336 | * @param value |
| 5337 | * @param pspec |
| 5338 | */ |
| 5339 | vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 5340 | /** |
| 5341 | * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. |
| 5342 | * @param id Handler ID of the handler to be disconnected |
| 5343 | */ |
| 5344 | disconnect(id: number): void; |
| 5345 | /** |
| 5346 | * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. |
| 5347 | * @param properties Object containing the properties to set |
| 5348 | */ |
| 5349 | set(properties: { [key: string]: any }): void; |
| 5350 | /** |
| 5351 | * Blocks a handler of an instance so it will not be called during any signal emissions |
| 5352 | * @param id Handler ID of the handler to be blocked |
| 5353 | */ |
| 5354 | block_signal_handler(id: number): void; |
| 5355 | /** |
| 5356 | * Unblocks a handler so it will be called again during any signal emissions |
| 5357 | * @param id Handler ID of the handler to be unblocked |
| 5358 | */ |
| 5359 | unblock_signal_handler(id: number): void; |
| 5360 | /** |
| 5361 | * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. |
| 5362 | * @param detailedName Name of the signal to stop emission of |
| 5363 | */ |
| 5364 | stop_emission_by_name(detailedName: string): void; |
| 5365 | } |
| 5366 | |
| 5367 | namespace Simple { |
| 5368 | // Constructor properties interface |
| 5369 | |
| 5370 | interface ConstructorProps extends GObject.Object.ConstructorProps, Gio.AsyncInitable.ConstructorProps { |
| 5371 | accuracy_level: AccuracyLevel; |
| 5372 | accuracyLevel: AccuracyLevel; |
| 5373 | client: ClientProxy; |
| 5374 | desktop_id: string; |
| 5375 | desktopId: string; |
| 5376 | distance_threshold: number; |
| 5377 | distanceThreshold: number; |
| 5378 | location: LocationProxy; |
| 5379 | time_threshold: number; |
| 5380 | timeThreshold: number; |
| 5381 | } |
| 5382 | } |
| 5383 | |
| 5384 | class Simple extends GObject.Object implements Gio.AsyncInitable<Simple> { |
| 5385 | static $gtype: GObject.GType<Simple>; |
| 5386 | |
| 5387 | // Properties |
| 5388 | |
| 5389 | /** |
| 5390 | * The requested maximum accuracy level. |
| 5391 | */ |
| 5392 | set accuracy_level(val: AccuracyLevel); |
| 5393 | /** |
| 5394 | * The requested maximum accuracy level. |
| 5395 | */ |
| 5396 | set accuracyLevel(val: AccuracyLevel); |
| 5397 | /** |
| 5398 | * The client proxy. This is %NULL if `simple` is not using a client proxy |
| 5399 | * (i-e when inside the Flatpak sandbox). |
| 5400 | */ |
| 5401 | get client(): ClientProxy; |
| 5402 | /** |
| 5403 | * The Desktop ID of the application. |
| 5404 | */ |
| 5405 | set desktop_id(val: string); |
| 5406 | /** |
| 5407 | * The Desktop ID of the application. |
| 5408 | */ |
| 5409 | set desktopId(val: string); |
| 5410 | /** |
| 5411 | * The current distance threshold in meters. This value is used by the |
| 5412 | * service when it gets new location info. If the distance moved is |
| 5413 | * below the threshold, it won't emit the LocationUpdated signal. |
| 5414 | * |
| 5415 | * When set to 0 (default), it always emits the signal. |
| 5416 | */ |
| 5417 | get distance_threshold(): number; |
| 5418 | /** |
| 5419 | * The current distance threshold in meters. This value is used by the |
| 5420 | * service when it gets new location info. If the distance moved is |
| 5421 | * below the threshold, it won't emit the LocationUpdated signal. |
| 5422 | * |
| 5423 | * When set to 0 (default), it always emits the signal. |
| 5424 | */ |
| 5425 | get distanceThreshold(): number; |
| 5426 | /** |
| 5427 | * The current location. |
| 5428 | */ |
| 5429 | get location(): LocationProxy; |
| 5430 | /** |
| 5431 | * The current time threshold in seconds. This value is used by the |
| 5432 | * service when it gets new location info. If the time passed is |
| 5433 | * below the threshold, it won't emit the LocationUpdated signal. |
| 5434 | * |
| 5435 | * When set to 0 (default), it always emits the signal. |
| 5436 | */ |
| 5437 | get time_threshold(): number; |
| 5438 | /** |
| 5439 | * The current time threshold in seconds. This value is used by the |
| 5440 | * service when it gets new location info. If the time passed is |
| 5441 | * below the threshold, it won't emit the LocationUpdated signal. |
| 5442 | * |
| 5443 | * When set to 0 (default), it always emits the signal. |
| 5444 | */ |
| 5445 | get timeThreshold(): number; |
| 5446 | |
| 5447 | // Constructors |
| 5448 | |
| 5449 | constructor(properties?: Partial<Simple.ConstructorProps>, ...args: any[]); |
| 5450 | |
| 5451 | _init(...args: any[]): void; |
| 5452 | |
| 5453 | static new_finish(result: Gio.AsyncResult): Simple; |
| 5454 | // Conflicted with Gio.AsyncInitable.new_finish |
| 5455 | |
| 5456 | static new_finish(...args: never[]): any; |
| 5457 | |
| 5458 | static new_sync( |
| 5459 | desktop_id: string, |
| 5460 | accuracy_level: AccuracyLevel, |
| 5461 | cancellable?: Gio.Cancellable | null, |
| 5462 | ): Simple; |
| 5463 | |
| 5464 | static new_with_thresholds_finish(result: Gio.AsyncResult): Simple; |
| 5465 | |
| 5466 | static new_with_thresholds_sync( |
| 5467 | desktop_id: string, |
| 5468 | accuracy_level: AccuracyLevel, |
| 5469 | time_threshold: number, |
| 5470 | distance_threshold: number, |
| 5471 | cancellable?: Gio.Cancellable | null, |
| 5472 | ): Simple; |
| 5473 | |
| 5474 | // Static methods |
| 5475 | |
| 5476 | /** |
| 5477 | * Asynchronously creates a #GClueSimple instance. Use |
| 5478 | * #gclue_simple_new_finish() to get the created #GClueSimple instance. |
| 5479 | * |
| 5480 | * See #gclue_simple_new_sync() for the synchronous, blocking version |
| 5481 | * of this function. |
| 5482 | * @param desktop_id The desktop file id (the basename of the desktop file). |
| 5483 | * @param accuracy_level The requested accuracy level as #GClueAccuracyLevel. |
| 5484 | * @param cancellable A #GCancellable or %NULL. |
| 5485 | * @param callback A #GAsyncReadyCallback to call when the results are ready. |
| 5486 | */ |
| 5487 | static ['new']( |
| 5488 | desktop_id: string, |
| 5489 | accuracy_level: AccuracyLevel, |
| 5490 | cancellable?: Gio.Cancellable | null, |
| 5491 | callback?: Gio.AsyncReadyCallback<Simple> | null, |
| 5492 | ): void; |
| 5493 | /** |
| 5494 | * Asynchronously creates a #GClueSimple instance. Use |
| 5495 | * #gclue_simple_new_with_thresholds_finish() to get the created #GClueSimple instance. |
| 5496 | * |
| 5497 | * See #gclue_simple_new_with_thresholds_sync() for the synchronous, |
| 5498 | * blocking version of this function. |
| 5499 | * @param desktop_id The desktop file id (the basename of the desktop file). |
| 5500 | * @param accuracy_level The requested accuracy level as #GClueAccuracyLevel. |
| 5501 | * @param time_threshold Time threshold in seconds, 0 for no limit. |
| 5502 | * @param distance_threshold Distance threshold in meters, 0 for no limit. |
| 5503 | * @param cancellable A #GCancellable or %NULL. |
| 5504 | * @param callback A #GAsyncReadyCallback to call when the results are ready. |
| 5505 | */ |
| 5506 | static new_with_thresholds( |
| 5507 | desktop_id: string, |
| 5508 | accuracy_level: AccuracyLevel, |
| 5509 | time_threshold: number, |
| 5510 | distance_threshold: number, |
| 5511 | cancellable?: Gio.Cancellable | null, |
| 5512 | callback?: Gio.AsyncReadyCallback<Simple> | null, |
| 5513 | ): void; |
| 5514 | |
| 5515 | // Methods |
| 5516 | |
| 5517 | /** |
| 5518 | * Gets the client proxy, or %NULL if `simple` is not using a client proxy (i-e |
| 5519 | * when inside the Flatpak sandbox). |
| 5520 | * @returns The client object. |
| 5521 | */ |
| 5522 | get_client(): ClientProxy | null; |
| 5523 | /** |
| 5524 | * Gets the current location. |
| 5525 | * @returns The last known location as #GClueLocation. |
| 5526 | */ |
| 5527 | get_location(): Location | null; |
| 5528 | |
| 5529 | // Inherited methods |
| 5530 | /** |
| 5531 | * Starts asynchronous initialization of the object implementing the |
| 5532 | * interface. This must be done before any real use of the object after |
| 5533 | * initial construction. If the object also implements #GInitable you can |
| 5534 | * optionally call g_initable_init() instead. |
| 5535 | * |
| 5536 | * This method is intended for language bindings. If writing in C, |
| 5537 | * g_async_initable_new_async() should typically be used instead. |
| 5538 | * |
| 5539 | * When the initialization is finished, `callback` will be called. You can |
| 5540 | * then call g_async_initable_init_finish() to get the result of the |
| 5541 | * initialization. |
| 5542 | * |
| 5543 | * Implementations may also support cancellation. If `cancellable` is not |
| 5544 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 5545 | * object from another thread. If the operation was cancelled, the error |
| 5546 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 5547 | * the object doesn't support cancellable initialization, the error |
| 5548 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 5549 | * |
| 5550 | * As with #GInitable, if the object is not initialized, or initialization |
| 5551 | * returns with an error, then all operations on the object except |
| 5552 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 5553 | * have undefined behaviour. They will often fail with g_critical() or |
| 5554 | * g_warning(), but this must not be relied on. |
| 5555 | * |
| 5556 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 5557 | * be initialized multiple times; for more information, see g_initable_init(). |
| 5558 | * If a class explicitly supports being initialized multiple times, |
| 5559 | * implementation requires yielding all subsequent calls to init_async() on the |
| 5560 | * results of the first call. |
| 5561 | * |
| 5562 | * For classes that also support the #GInitable interface, the default |
| 5563 | * implementation of this method will run the g_initable_init() function |
| 5564 | * in a thread, so if you want to support asynchronous initialization via |
| 5565 | * threads, just implement the #GAsyncInitable interface without overriding |
| 5566 | * any interface methods. |
| 5567 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 5568 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 5569 | */ |
| 5570 | init_async(io_priority: number, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 5571 | /** |
| 5572 | * Starts asynchronous initialization of the object implementing the |
| 5573 | * interface. This must be done before any real use of the object after |
| 5574 | * initial construction. If the object also implements #GInitable you can |
| 5575 | * optionally call g_initable_init() instead. |
| 5576 | * |
| 5577 | * This method is intended for language bindings. If writing in C, |
| 5578 | * g_async_initable_new_async() should typically be used instead. |
| 5579 | * |
| 5580 | * When the initialization is finished, `callback` will be called. You can |
| 5581 | * then call g_async_initable_init_finish() to get the result of the |
| 5582 | * initialization. |
| 5583 | * |
| 5584 | * Implementations may also support cancellation. If `cancellable` is not |
| 5585 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 5586 | * object from another thread. If the operation was cancelled, the error |
| 5587 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 5588 | * the object doesn't support cancellable initialization, the error |
| 5589 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 5590 | * |
| 5591 | * As with #GInitable, if the object is not initialized, or initialization |
| 5592 | * returns with an error, then all operations on the object except |
| 5593 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 5594 | * have undefined behaviour. They will often fail with g_critical() or |
| 5595 | * g_warning(), but this must not be relied on. |
| 5596 | * |
| 5597 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 5598 | * be initialized multiple times; for more information, see g_initable_init(). |
| 5599 | * If a class explicitly supports being initialized multiple times, |
| 5600 | * implementation requires yielding all subsequent calls to init_async() on the |
| 5601 | * results of the first call. |
| 5602 | * |
| 5603 | * For classes that also support the #GInitable interface, the default |
| 5604 | * implementation of this method will run the g_initable_init() function |
| 5605 | * in a thread, so if you want to support asynchronous initialization via |
| 5606 | * threads, just implement the #GAsyncInitable interface without overriding |
| 5607 | * any interface methods. |
| 5608 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 5609 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 5610 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 5611 | */ |
| 5612 | init_async( |
| 5613 | io_priority: number, |
| 5614 | cancellable: Gio.Cancellable | null, |
| 5615 | callback: Gio.AsyncReadyCallback<this> | null, |
| 5616 | ): void; |
| 5617 | /** |
| 5618 | * Starts asynchronous initialization of the object implementing the |
| 5619 | * interface. This must be done before any real use of the object after |
| 5620 | * initial construction. If the object also implements #GInitable you can |
| 5621 | * optionally call g_initable_init() instead. |
| 5622 | * |
| 5623 | * This method is intended for language bindings. If writing in C, |
| 5624 | * g_async_initable_new_async() should typically be used instead. |
| 5625 | * |
| 5626 | * When the initialization is finished, `callback` will be called. You can |
| 5627 | * then call g_async_initable_init_finish() to get the result of the |
| 5628 | * initialization. |
| 5629 | * |
| 5630 | * Implementations may also support cancellation. If `cancellable` is not |
| 5631 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 5632 | * object from another thread. If the operation was cancelled, the error |
| 5633 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 5634 | * the object doesn't support cancellable initialization, the error |
| 5635 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 5636 | * |
| 5637 | * As with #GInitable, if the object is not initialized, or initialization |
| 5638 | * returns with an error, then all operations on the object except |
| 5639 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 5640 | * have undefined behaviour. They will often fail with g_critical() or |
| 5641 | * g_warning(), but this must not be relied on. |
| 5642 | * |
| 5643 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 5644 | * be initialized multiple times; for more information, see g_initable_init(). |
| 5645 | * If a class explicitly supports being initialized multiple times, |
| 5646 | * implementation requires yielding all subsequent calls to init_async() on the |
| 5647 | * results of the first call. |
| 5648 | * |
| 5649 | * For classes that also support the #GInitable interface, the default |
| 5650 | * implementation of this method will run the g_initable_init() function |
| 5651 | * in a thread, so if you want to support asynchronous initialization via |
| 5652 | * threads, just implement the #GAsyncInitable interface without overriding |
| 5653 | * any interface methods. |
| 5654 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 5655 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 5656 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 5657 | */ |
| 5658 | init_async( |
| 5659 | io_priority: number, |
| 5660 | cancellable?: Gio.Cancellable | null, |
| 5661 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 5662 | ): Promise<boolean> | void; |
| 5663 | /** |
| 5664 | * Finishes asynchronous initialization and returns the result. |
| 5665 | * See g_async_initable_init_async(). |
| 5666 | * @param res a #GAsyncResult. |
| 5667 | * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. |
| 5668 | */ |
| 5669 | init_finish(res: Gio.AsyncResult): boolean; |
| 5670 | /** |
| 5671 | * Finishes the async construction for the various g_async_initable_new |
| 5672 | * calls, returning the created object or %NULL on error. |
| 5673 | * @param res the #GAsyncResult from the callback |
| 5674 | * @returns a newly created #GObject, or %NULL on error. Free with g_object_unref(). |
| 5675 | */ |
| 5676 | new_finish(res: Gio.AsyncResult): Simple; |
| 5677 | /** |
| 5678 | * Starts asynchronous initialization of the object implementing the |
| 5679 | * interface. This must be done before any real use of the object after |
| 5680 | * initial construction. If the object also implements #GInitable you can |
| 5681 | * optionally call g_initable_init() instead. |
| 5682 | * |
| 5683 | * This method is intended for language bindings. If writing in C, |
| 5684 | * g_async_initable_new_async() should typically be used instead. |
| 5685 | * |
| 5686 | * When the initialization is finished, `callback` will be called. You can |
| 5687 | * then call g_async_initable_init_finish() to get the result of the |
| 5688 | * initialization. |
| 5689 | * |
| 5690 | * Implementations may also support cancellation. If `cancellable` is not |
| 5691 | * %NULL, then initialization can be cancelled by triggering the cancellable |
| 5692 | * object from another thread. If the operation was cancelled, the error |
| 5693 | * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and |
| 5694 | * the object doesn't support cancellable initialization, the error |
| 5695 | * %G_IO_ERROR_NOT_SUPPORTED will be returned. |
| 5696 | * |
| 5697 | * As with #GInitable, if the object is not initialized, or initialization |
| 5698 | * returns with an error, then all operations on the object except |
| 5699 | * g_object_ref() and g_object_unref() are considered to be invalid, and |
| 5700 | * have undefined behaviour. They will often fail with g_critical() or |
| 5701 | * g_warning(), but this must not be relied on. |
| 5702 | * |
| 5703 | * Callers should not assume that a class which implements #GAsyncInitable can |
| 5704 | * be initialized multiple times; for more information, see g_initable_init(). |
| 5705 | * If a class explicitly supports being initialized multiple times, |
| 5706 | * implementation requires yielding all subsequent calls to init_async() on the |
| 5707 | * results of the first call. |
| 5708 | * |
| 5709 | * For classes that also support the #GInitable interface, the default |
| 5710 | * implementation of this method will run the g_initable_init() function |
| 5711 | * in a thread, so if you want to support asynchronous initialization via |
| 5712 | * threads, just implement the #GAsyncInitable interface without overriding |
| 5713 | * any interface methods. |
| 5714 | * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation |
| 5715 | * @param cancellable optional #GCancellable object, %NULL to ignore. |
| 5716 | * @param callback a #GAsyncReadyCallback to call when the request is satisfied |
| 5717 | */ |
| 5718 | vfunc_init_async( |
| 5719 | io_priority: number, |
| 5720 | cancellable?: Gio.Cancellable | null, |
| 5721 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 5722 | ): void; |
| 5723 | /** |
| 5724 | * Finishes asynchronous initialization and returns the result. |
| 5725 | * See g_async_initable_init_async(). |
| 5726 | * @param res a #GAsyncResult. |
| 5727 | */ |
| 5728 | vfunc_init_finish(res: Gio.AsyncResult): boolean; |
| 5729 | /** |
| 5730 | * Creates a binding between `source_property` on `source` and `target_property` |
| 5731 | * on `target`. |
| 5732 | * |
| 5733 | * Whenever the `source_property` is changed the `target_property` is |
| 5734 | * updated using the same value. For instance: |
| 5735 | * |
| 5736 | * |
| 5737 | * ```c |
| 5738 | * g_object_bind_property (action, "active", widget, "sensitive", 0); |
| 5739 | * ``` |
| 5740 | * |
| 5741 | * |
| 5742 | * Will result in the "sensitive" property of the widget #GObject instance to be |
| 5743 | * updated with the same value of the "active" property of the action #GObject |
| 5744 | * instance. |
| 5745 | * |
| 5746 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 5747 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 5748 | * will be updated as well. |
| 5749 | * |
| 5750 | * The binding will automatically be removed when either the `source` or the |
| 5751 | * `target` instances are finalized. To remove the binding without affecting the |
| 5752 | * `source` and the `target` you can just call g_object_unref() on the returned |
| 5753 | * #GBinding instance. |
| 5754 | * |
| 5755 | * Removing the binding by calling g_object_unref() on it must only be done if |
| 5756 | * the binding, `source` and `target` are only used from a single thread and it |
| 5757 | * is clear that both `source` and `target` outlive the binding. Especially it |
| 5758 | * is not safe to rely on this if the binding, `source` or `target` can be |
| 5759 | * finalized from different threads. Keep another reference to the binding and |
| 5760 | * use g_binding_unbind() instead to be on the safe side. |
| 5761 | * |
| 5762 | * A #GObject can have multiple bindings. |
| 5763 | * @param source_property the property on @source to bind |
| 5764 | * @param target the target #GObject |
| 5765 | * @param target_property the property on @target to bind |
| 5766 | * @param flags flags to pass to #GBinding |
| 5767 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 5768 | */ |
| 5769 | bind_property( |
| 5770 | source_property: string, |
| 5771 | target: GObject.Object, |
| 5772 | target_property: string, |
| 5773 | flags: GObject.BindingFlags | null, |
| 5774 | ): GObject.Binding; |
| 5775 | /** |
| 5776 | * Complete version of g_object_bind_property(). |
| 5777 | * |
| 5778 | * Creates a binding between `source_property` on `source` and `target_property` |
| 5779 | * on `target,` allowing you to set the transformation functions to be used by |
| 5780 | * the binding. |
| 5781 | * |
| 5782 | * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: |
| 5783 | * if `target_property` on `target` changes then the `source_property` on `source` |
| 5784 | * will be updated as well. The `transform_from` function is only used in case |
| 5785 | * of bidirectional bindings, otherwise it will be ignored |
| 5786 | * |
| 5787 | * The binding will automatically be removed when either the `source` or the |
| 5788 | * `target` instances are finalized. This will release the reference that is |
| 5789 | * being held on the #GBinding instance; if you want to hold on to the |
| 5790 | * #GBinding instance, you will need to hold a reference to it. |
| 5791 | * |
| 5792 | * To remove the binding, call g_binding_unbind(). |
| 5793 | * |
| 5794 | * A #GObject can have multiple bindings. |
| 5795 | * |
| 5796 | * The same `user_data` parameter will be used for both `transform_to` |
| 5797 | * and `transform_from` transformation functions; the `notify` function will |
| 5798 | * be called once, when the binding is removed. If you need different data |
| 5799 | * for each transformation function, please use |
| 5800 | * g_object_bind_property_with_closures() instead. |
| 5801 | * @param source_property the property on @source to bind |
| 5802 | * @param target the target #GObject |
| 5803 | * @param target_property the property on @target to bind |
| 5804 | * @param flags flags to pass to #GBinding |
| 5805 | * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default |
| 5806 | * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default |
| 5807 | * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required |
| 5808 | * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero. |
| 5809 | */ |
| 5810 | bind_property_full( |
| 5811 | source_property: string, |
| 5812 | target: GObject.Object, |
| 5813 | target_property: string, |
| 5814 | flags: GObject.BindingFlags | null, |
| 5815 | transform_to?: GObject.BindingTransformFunc | null, |
| 5816 | transform_from?: GObject.BindingTransformFunc | null, |
| 5817 | notify?: GLib.DestroyNotify | null, |
| 5818 | ): GObject.Binding; |
| 5819 | // Conflicted with GObject.Object.bind_property_full |
| 5820 | bind_property_full(...args: never[]): any; |
| 5821 | /** |
| 5822 | * This function is intended for #GObject implementations to re-enforce |
| 5823 | * a [floating][floating-ref] object reference. Doing this is seldom |
| 5824 | * required: all #GInitiallyUnowneds are created with a floating reference |
| 5825 | * which usually just needs to be sunken by calling g_object_ref_sink(). |
| 5826 | */ |
| 5827 | force_floating(): void; |
| 5828 | /** |
| 5829 | * Increases the freeze count on `object`. If the freeze count is |
| 5830 | * non-zero, the emission of "notify" signals on `object` is |
| 5831 | * stopped. The signals are queued until the freeze count is decreased |
| 5832 | * to zero. Duplicate notifications are squashed so that at most one |
| 5833 | * #GObject::notify signal is emitted for each property modified while the |
| 5834 | * object is frozen. |
| 5835 | * |
| 5836 | * This is necessary for accessors that modify multiple properties to prevent |
| 5837 | * premature notification while the object is still being modified. |
| 5838 | */ |
| 5839 | freeze_notify(): void; |
| 5840 | /** |
| 5841 | * Gets a named field from the objects table of associations (see g_object_set_data()). |
| 5842 | * @param key name of the key for that association |
| 5843 | * @returns the data if found, or %NULL if no such data exists. |
| 5844 | */ |
| 5845 | get_data(key: string): any | null; |
| 5846 | /** |
| 5847 | * Gets a property of an object. |
| 5848 | * |
| 5849 | * The value can be: |
| 5850 | * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60) |
| 5851 | * - a GObject.Value initialized with the expected type of the property |
| 5852 | * - a GObject.Value initialized with a type to which the expected type of the property can be transformed |
| 5853 | * |
| 5854 | * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset. |
| 5855 | * |
| 5856 | * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming. |
| 5857 | * @param property_name The name of the property to get |
| 5858 | * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type |
| 5859 | */ |
| 5860 | get_property(property_name: string, value: GObject.Value | any): any; |
| 5861 | /** |
| 5862 | * This function gets back user data pointers stored via |
| 5863 | * g_object_set_qdata(). |
| 5864 | * @param quark A #GQuark, naming the user data pointer |
| 5865 | * @returns The user data pointer set, or %NULL |
| 5866 | */ |
| 5867 | get_qdata(quark: GLib.Quark): any | null; |
| 5868 | /** |
| 5869 | * Gets `n_properties` properties for an `object`. |
| 5870 | * Obtained properties will be set to `values`. All properties must be valid. |
| 5871 | * Warnings will be emitted and undefined behaviour may result if invalid |
| 5872 | * properties are passed in. |
| 5873 | * @param names the names of each property to get |
| 5874 | * @param values the values of each property to get |
| 5875 | */ |
| 5876 | getv(names: string[], values: (GObject.Value | any)[]): void; |
| 5877 | /** |
| 5878 | * Checks whether `object` has a [floating][floating-ref] reference. |
| 5879 | * @returns %TRUE if @object has a floating reference |
| 5880 | */ |
| 5881 | is_floating(): boolean; |
| 5882 | /** |
| 5883 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 5884 | * |
| 5885 | * When possible, eg. when signaling a property change from within the class |
| 5886 | * that registered the property, you should use g_object_notify_by_pspec() |
| 5887 | * instead. |
| 5888 | * |
| 5889 | * Note that emission of the notify signal may be blocked with |
| 5890 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 5891 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 5892 | * called. |
| 5893 | * @param property_name the name of a property installed on the class of @object. |
| 5894 | */ |
| 5895 | notify(property_name: string): void; |
| 5896 | /** |
| 5897 | * Emits a "notify" signal for the property specified by `pspec` on `object`. |
| 5898 | * |
| 5899 | * This function omits the property name lookup, hence it is faster than |
| 5900 | * g_object_notify(). |
| 5901 | * |
| 5902 | * One way to avoid using g_object_notify() from within the |
| 5903 | * class that registered the properties, and using g_object_notify_by_pspec() |
| 5904 | * instead, is to store the GParamSpec used with |
| 5905 | * g_object_class_install_property() inside a static array, e.g.: |
| 5906 | * |
| 5907 | * |
| 5908 | * ```c |
| 5909 | * typedef enum |
| 5910 | * { |
| 5911 | * PROP_FOO = 1, |
| 5912 | * PROP_LAST |
| 5913 | * } MyObjectProperty; |
| 5914 | * |
| 5915 | * static GParamSpec *properties[PROP_LAST]; |
| 5916 | * |
| 5917 | * static void |
| 5918 | * my_object_class_init (MyObjectClass *klass) |
| 5919 | * { |
| 5920 | * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL, |
| 5921 | * 0, 100, |
| 5922 | * 50, |
| 5923 | * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 5924 | * g_object_class_install_property (gobject_class, |
| 5925 | * PROP_FOO, |
| 5926 | * properties[PROP_FOO]); |
| 5927 | * } |
| 5928 | * ``` |
| 5929 | * |
| 5930 | * |
| 5931 | * and then notify a change on the "foo" property with: |
| 5932 | * |
| 5933 | * |
| 5934 | * ```c |
| 5935 | * g_object_notify_by_pspec (self, properties[PROP_FOO]); |
| 5936 | * ``` |
| 5937 | * |
| 5938 | * @param pspec the #GParamSpec of a property installed on the class of @object. |
| 5939 | */ |
| 5940 | notify_by_pspec(pspec: GObject.ParamSpec): void; |
| 5941 | /** |
| 5942 | * Increases the reference count of `object`. |
| 5943 | * |
| 5944 | * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type |
| 5945 | * of `object` will be propagated to the return type (using the GCC typeof() |
| 5946 | * extension), so any casting the caller needs to do on the return type must be |
| 5947 | * explicit. |
| 5948 | * @returns the same @object |
| 5949 | */ |
| 5950 | ref(): GObject.Object; |
| 5951 | /** |
| 5952 | * Increase the reference count of `object,` and possibly remove the |
| 5953 | * [floating][floating-ref] reference, if `object` has a floating reference. |
| 5954 | * |
| 5955 | * In other words, if the object is floating, then this call "assumes |
| 5956 | * ownership" of the floating reference, converting it to a normal |
| 5957 | * reference by clearing the floating flag while leaving the reference |
| 5958 | * count unchanged. If the object is not floating, then this call |
| 5959 | * adds a new normal reference increasing the reference count by one. |
| 5960 | * |
| 5961 | * Since GLib 2.56, the type of `object` will be propagated to the return type |
| 5962 | * under the same conditions as for g_object_ref(). |
| 5963 | * @returns @object |
| 5964 | */ |
| 5965 | ref_sink(): GObject.Object; |
| 5966 | /** |
| 5967 | * Releases all references to other objects. This can be used to break |
| 5968 | * reference cycles. |
| 5969 | * |
| 5970 | * This function should only be called from object system implementations. |
| 5971 | */ |
| 5972 | run_dispose(): void; |
| 5973 | /** |
| 5974 | * Each object carries around a table of associations from |
| 5975 | * strings to pointers. This function lets you set an association. |
| 5976 | * |
| 5977 | * If the object already had an association with that name, |
| 5978 | * the old association will be destroyed. |
| 5979 | * |
| 5980 | * Internally, the `key` is converted to a #GQuark using g_quark_from_string(). |
| 5981 | * This means a copy of `key` is kept permanently (even after `object` has been |
| 5982 | * finalized) — so it is recommended to only use a small, bounded set of values |
| 5983 | * for `key` in your program, to avoid the #GQuark storage growing unbounded. |
| 5984 | * @param key name of the key |
| 5985 | * @param data data to associate with that key |
| 5986 | */ |
| 5987 | set_data(key: string, data?: any | null): void; |
| 5988 | /** |
| 5989 | * Sets a property on an object. |
| 5990 | * @param property_name The name of the property to set |
| 5991 | * @param value The value to set the property to |
| 5992 | */ |
| 5993 | set_property(property_name: string, value: GObject.Value | any): void; |
| 5994 | /** |
| 5995 | * Remove a specified datum from the object's data associations, |
| 5996 | * without invoking the association's destroy handler. |
| 5997 | * @param key name of the key |
| 5998 | * @returns the data if found, or %NULL if no such data exists. |
| 5999 | */ |
| 6000 | steal_data(key: string): any | null; |
| 6001 | /** |
| 6002 | * This function gets back user data pointers stored via |
| 6003 | * g_object_set_qdata() and removes the `data` from object |
| 6004 | * without invoking its destroy() function (if any was |
| 6005 | * set). |
| 6006 | * Usually, calling this function is only required to update |
| 6007 | * user data pointers with a destroy notifier, for example: |
| 6008 | * |
| 6009 | * ```c |
| 6010 | * void |
| 6011 | * object_add_to_user_list (GObject *object, |
| 6012 | * const gchar *new_string) |
| 6013 | * { |
| 6014 | * // the quark, naming the object data |
| 6015 | * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); |
| 6016 | * // retrieve the old string list |
| 6017 | * GList *list = g_object_steal_qdata (object, quark_string_list); |
| 6018 | * |
| 6019 | * // prepend new string |
| 6020 | * list = g_list_prepend (list, g_strdup (new_string)); |
| 6021 | * // this changed 'list', so we need to set it again |
| 6022 | * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); |
| 6023 | * } |
| 6024 | * static void |
| 6025 | * free_string_list (gpointer data) |
| 6026 | * { |
| 6027 | * GList *node, *list = data; |
| 6028 | * |
| 6029 | * for (node = list; node; node = node->next) |
| 6030 | * g_free (node->data); |
| 6031 | * g_list_free (list); |
| 6032 | * } |
| 6033 | * ``` |
| 6034 | * |
| 6035 | * Using g_object_get_qdata() in the above example, instead of |
| 6036 | * g_object_steal_qdata() would have left the destroy function set, |
| 6037 | * and thus the partial string list would have been freed upon |
| 6038 | * g_object_set_qdata_full(). |
| 6039 | * @param quark A #GQuark, naming the user data pointer |
| 6040 | * @returns The user data pointer set, or %NULL |
| 6041 | */ |
| 6042 | steal_qdata(quark: GLib.Quark): any | null; |
| 6043 | /** |
| 6044 | * Reverts the effect of a previous call to |
| 6045 | * g_object_freeze_notify(). The freeze count is decreased on `object` |
| 6046 | * and when it reaches zero, queued "notify" signals are emitted. |
| 6047 | * |
| 6048 | * Duplicate notifications for each property are squashed so that at most one |
| 6049 | * #GObject::notify signal is emitted for each property, in the reverse order |
| 6050 | * in which they have been queued. |
| 6051 | * |
| 6052 | * It is an error to call this function when the freeze count is zero. |
| 6053 | */ |
| 6054 | thaw_notify(): void; |
| 6055 | /** |
| 6056 | * Decreases the reference count of `object`. When its reference count |
| 6057 | * drops to 0, the object is finalized (i.e. its memory is freed). |
| 6058 | * |
| 6059 | * If the pointer to the #GObject may be reused in future (for example, if it is |
| 6060 | * an instance variable of another object), it is recommended to clear the |
| 6061 | * pointer to %NULL rather than retain a dangling pointer to a potentially |
| 6062 | * invalid #GObject instance. Use g_clear_object() for this. |
| 6063 | */ |
| 6064 | unref(): void; |
| 6065 | /** |
| 6066 | * This function essentially limits the life time of the `closure` to |
| 6067 | * the life time of the object. That is, when the object is finalized, |
| 6068 | * the `closure` is invalidated by calling g_closure_invalidate() on |
| 6069 | * it, in order to prevent invocations of the closure with a finalized |
| 6070 | * (nonexisting) object. Also, g_object_ref() and g_object_unref() are |
| 6071 | * added as marshal guards to the `closure,` to ensure that an extra |
| 6072 | * reference count is held on `object` during invocation of the |
| 6073 | * `closure`. Usually, this function will be called on closures that |
| 6074 | * use this `object` as closure data. |
| 6075 | * @param closure #GClosure to watch |
| 6076 | */ |
| 6077 | watch_closure(closure: GObject.Closure): void; |
| 6078 | /** |
| 6079 | * the `constructed` function is called by g_object_new() as the |
| 6080 | * final step of the object creation process. At the point of the call, all |
| 6081 | * construction properties have been set on the object. The purpose of this |
| 6082 | * call is to allow for object initialisation steps that can only be performed |
| 6083 | * after construction properties have been set. `constructed` implementors |
| 6084 | * should chain up to the `constructed` call of their parent class to allow it |
| 6085 | * to complete its initialisation. |
| 6086 | */ |
| 6087 | vfunc_constructed(): void; |
| 6088 | /** |
| 6089 | * emits property change notification for a bunch |
| 6090 | * of properties. Overriding `dispatch_properties_changed` should be rarely |
| 6091 | * needed. |
| 6092 | * @param n_pspecs |
| 6093 | * @param pspecs |
| 6094 | */ |
| 6095 | vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void; |
| 6096 | /** |
| 6097 | * the `dispose` function is supposed to drop all references to other |
| 6098 | * objects, but keep the instance otherwise intact, so that client method |
| 6099 | * invocations still work. It may be run multiple times (due to reference |
| 6100 | * loops). Before returning, `dispose` should chain up to the `dispose` method |
| 6101 | * of the parent class. |
| 6102 | */ |
| 6103 | vfunc_dispose(): void; |
| 6104 | /** |
| 6105 | * instance finalization function, should finish the finalization of |
| 6106 | * the instance begun in `dispose` and chain up to the `finalize` method of the |
| 6107 | * parent class. |
| 6108 | */ |
| 6109 | vfunc_finalize(): void; |
| 6110 | /** |
| 6111 | * the generic getter for all properties of this type. Should be |
| 6112 | * overridden for every type with properties. |
| 6113 | * @param property_id |
| 6114 | * @param value |
| 6115 | * @param pspec |
| 6116 | */ |
| 6117 | vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 6118 | /** |
| 6119 | * Emits a "notify" signal for the property `property_name` on `object`. |
| 6120 | * |
| 6121 | * When possible, eg. when signaling a property change from within the class |
| 6122 | * that registered the property, you should use g_object_notify_by_pspec() |
| 6123 | * instead. |
| 6124 | * |
| 6125 | * Note that emission of the notify signal may be blocked with |
| 6126 | * g_object_freeze_notify(). In this case, the signal emissions are queued |
| 6127 | * and will be emitted (in reverse order) when g_object_thaw_notify() is |
| 6128 | * called. |
| 6129 | * @param pspec |
| 6130 | */ |
| 6131 | vfunc_notify(pspec: GObject.ParamSpec): void; |
| 6132 | /** |
| 6133 | * the generic setter for all properties of this type. Should be |
| 6134 | * overridden for every type with properties. If implementations of |
| 6135 | * `set_property` don't emit property change notification explicitly, this will |
| 6136 | * be done implicitly by the type system. However, if the notify signal is |
| 6137 | * emitted explicitly, the type system will not emit it a second time. |
| 6138 | * @param property_id |
| 6139 | * @param value |
| 6140 | * @param pspec |
| 6141 | */ |
| 6142 | vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void; |
| 6143 | /** |
| 6144 | * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. |
| 6145 | * @param id Handler ID of the handler to be disconnected |
| 6146 | */ |
| 6147 | disconnect(id: number): void; |
| 6148 | /** |
| 6149 | * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values. |
| 6150 | * @param properties Object containing the properties to set |
| 6151 | */ |
| 6152 | set(properties: { [key: string]: any }): void; |
| 6153 | /** |
| 6154 | * Blocks a handler of an instance so it will not be called during any signal emissions |
| 6155 | * @param id Handler ID of the handler to be blocked |
| 6156 | */ |
| 6157 | block_signal_handler(id: number): void; |
| 6158 | /** |
| 6159 | * Unblocks a handler so it will be called again during any signal emissions |
| 6160 | * @param id Handler ID of the handler to be unblocked |
| 6161 | */ |
| 6162 | unblock_signal_handler(id: number): void; |
| 6163 | /** |
| 6164 | * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked. |
| 6165 | * @param detailedName Name of the signal to stop emission of |
| 6166 | */ |
| 6167 | stop_emission_by_name(detailedName: string): void; |
| 6168 | } |
| 6169 | |
| 6170 | type ClientIface = typeof Client; |
| 6171 | type ClientProxyClass = typeof ClientProxy; |
| 6172 | abstract class ClientProxyPrivate { |
| 6173 | static $gtype: GObject.GType<ClientProxyPrivate>; |
| 6174 | |
| 6175 | // Constructors |
| 6176 | |
| 6177 | _init(...args: any[]): void; |
| 6178 | } |
| 6179 | |
| 6180 | type ClientSkeletonClass = typeof ClientSkeleton; |
| 6181 | abstract class ClientSkeletonPrivate { |
| 6182 | static $gtype: GObject.GType<ClientSkeletonPrivate>; |
| 6183 | |
| 6184 | // Constructors |
| 6185 | |
| 6186 | _init(...args: any[]): void; |
| 6187 | } |
| 6188 | |
| 6189 | type LocationIface = typeof Location; |
| 6190 | type LocationProxyClass = typeof LocationProxy; |
| 6191 | abstract class LocationProxyPrivate { |
| 6192 | static $gtype: GObject.GType<LocationProxyPrivate>; |
| 6193 | |
| 6194 | // Constructors |
| 6195 | |
| 6196 | _init(...args: any[]): void; |
| 6197 | } |
| 6198 | |
| 6199 | type LocationSkeletonClass = typeof LocationSkeleton; |
| 6200 | abstract class LocationSkeletonPrivate { |
| 6201 | static $gtype: GObject.GType<LocationSkeletonPrivate>; |
| 6202 | |
| 6203 | // Constructors |
| 6204 | |
| 6205 | _init(...args: any[]): void; |
| 6206 | } |
| 6207 | |
| 6208 | type ManagerIface = typeof Manager; |
| 6209 | type ManagerProxyClass = typeof ManagerProxy; |
| 6210 | abstract class ManagerProxyPrivate { |
| 6211 | static $gtype: GObject.GType<ManagerProxyPrivate>; |
| 6212 | |
| 6213 | // Constructors |
| 6214 | |
| 6215 | _init(...args: any[]): void; |
| 6216 | } |
| 6217 | |
| 6218 | type ManagerSkeletonClass = typeof ManagerSkeleton; |
| 6219 | abstract class ManagerSkeletonPrivate { |
| 6220 | static $gtype: GObject.GType<ManagerSkeletonPrivate>; |
| 6221 | |
| 6222 | // Constructors |
| 6223 | |
| 6224 | _init(...args: any[]): void; |
| 6225 | } |
| 6226 | |
| 6227 | type SimpleClass = typeof Simple; |
| 6228 | abstract class SimplePrivate { |
| 6229 | static $gtype: GObject.GType<SimplePrivate>; |
| 6230 | |
| 6231 | // Constructors |
| 6232 | |
| 6233 | _init(...args: any[]): void; |
| 6234 | } |
| 6235 | |
| 6236 | namespace Client { |
| 6237 | // Constructor properties interface |
| 6238 | |
| 6239 | interface ConstructorProps extends GObject.Object.ConstructorProps { |
| 6240 | active: boolean; |
| 6241 | desktop_id: string; |
| 6242 | desktopId: string; |
| 6243 | distance_threshold: number; |
| 6244 | distanceThreshold: number; |
| 6245 | location: string; |
| 6246 | requested_accuracy_level: number; |
| 6247 | requestedAccuracyLevel: number; |
| 6248 | time_threshold: number; |
| 6249 | timeThreshold: number; |
| 6250 | } |
| 6251 | } |
| 6252 | |
| 6253 | export interface ClientNamespace { |
| 6254 | $gtype: GObject.GType<Client>; |
| 6255 | prototype: Client; |
| 6256 | |
| 6257 | /** |
| 6258 | * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page">org.freedesktop.GeoClue2.Client</link> D-Bus interface. |
| 6259 | */ |
| 6260 | interface_info(): Gio.DBusInterfaceInfo; |
| 6261 | /** |
| 6262 | * Overrides all #GObject properties in the #GClueClient interface for a concrete class. |
| 6263 | * The properties are overridden in the order they are defined. |
| 6264 | * @param klass The class structure for a #GObject derived class. |
| 6265 | * @param property_id_begin The property id to assign to the first overridden property. |
| 6266 | */ |
| 6267 | override_properties(klass: typeof GObject.Object, property_id_begin: number): number; |
| 6268 | } |
| 6269 | interface Client extends GObject.Object { |
| 6270 | // Properties |
| 6271 | |
| 6272 | /** |
| 6273 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Active">"Active"</link>. |
| 6274 | * |
| 6275 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6276 | */ |
| 6277 | get active(): boolean; |
| 6278 | set active(val: boolean); |
| 6279 | /** |
| 6280 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link>. |
| 6281 | * |
| 6282 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 6283 | */ |
| 6284 | get desktop_id(): string; |
| 6285 | set desktop_id(val: string); |
| 6286 | /** |
| 6287 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link>. |
| 6288 | * |
| 6289 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 6290 | */ |
| 6291 | get desktopId(): string; |
| 6292 | set desktopId(val: string); |
| 6293 | /** |
| 6294 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link>. |
| 6295 | * |
| 6296 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 6297 | */ |
| 6298 | get distance_threshold(): number; |
| 6299 | set distance_threshold(val: number); |
| 6300 | /** |
| 6301 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link>. |
| 6302 | * |
| 6303 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 6304 | */ |
| 6305 | get distanceThreshold(): number; |
| 6306 | set distanceThreshold(val: number); |
| 6307 | /** |
| 6308 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link>. |
| 6309 | * |
| 6310 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6311 | */ |
| 6312 | get location(): string; |
| 6313 | set location(val: string); |
| 6314 | /** |
| 6315 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link>. |
| 6316 | * |
| 6317 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 6318 | */ |
| 6319 | get requested_accuracy_level(): number; |
| 6320 | set requested_accuracy_level(val: number); |
| 6321 | /** |
| 6322 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link>. |
| 6323 | * |
| 6324 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 6325 | */ |
| 6326 | get requestedAccuracyLevel(): number; |
| 6327 | set requestedAccuracyLevel(val: number); |
| 6328 | /** |
| 6329 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link>. |
| 6330 | * |
| 6331 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 6332 | */ |
| 6333 | get time_threshold(): number; |
| 6334 | set time_threshold(val: number); |
| 6335 | /** |
| 6336 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link>. |
| 6337 | * |
| 6338 | * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. |
| 6339 | */ |
| 6340 | get timeThreshold(): number; |
| 6341 | set timeThreshold(val: number); |
| 6342 | |
| 6343 | // Methods |
| 6344 | |
| 6345 | /** |
| 6346 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. |
| 6347 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6348 | * You can then call gclue_client_call_start_finish() to get the result of the operation. |
| 6349 | * |
| 6350 | * See gclue_client_call_start_sync() for the synchronous, blocking version of this method. |
| 6351 | * @param cancellable A #GCancellable or %NULL. |
| 6352 | */ |
| 6353 | call_start(cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 6354 | /** |
| 6355 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. |
| 6356 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6357 | * You can then call gclue_client_call_start_finish() to get the result of the operation. |
| 6358 | * |
| 6359 | * See gclue_client_call_start_sync() for the synchronous, blocking version of this method. |
| 6360 | * @param cancellable A #GCancellable or %NULL. |
| 6361 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6362 | */ |
| 6363 | call_start(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void; |
| 6364 | /** |
| 6365 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. |
| 6366 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6367 | * You can then call gclue_client_call_start_finish() to get the result of the operation. |
| 6368 | * |
| 6369 | * See gclue_client_call_start_sync() for the synchronous, blocking version of this method. |
| 6370 | * @param cancellable A #GCancellable or %NULL. |
| 6371 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6372 | */ |
| 6373 | call_start( |
| 6374 | cancellable?: Gio.Cancellable | null, |
| 6375 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 6376 | ): Promise<boolean> | void; |
| 6377 | /** |
| 6378 | * Finishes an operation started with gclue_client_call_start(). |
| 6379 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_call_start(). |
| 6380 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6381 | */ |
| 6382 | call_start_finish(res: Gio.AsyncResult): boolean; |
| 6383 | /** |
| 6384 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 6385 | * |
| 6386 | * See gclue_client_call_start() for the asynchronous version of this method. |
| 6387 | * @param cancellable A #GCancellable or %NULL. |
| 6388 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6389 | */ |
| 6390 | call_start_sync(cancellable?: Gio.Cancellable | null): boolean; |
| 6391 | /** |
| 6392 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. |
| 6393 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6394 | * You can then call gclue_client_call_stop_finish() to get the result of the operation. |
| 6395 | * |
| 6396 | * See gclue_client_call_stop_sync() for the synchronous, blocking version of this method. |
| 6397 | * @param cancellable A #GCancellable or %NULL. |
| 6398 | */ |
| 6399 | call_stop(cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 6400 | /** |
| 6401 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. |
| 6402 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6403 | * You can then call gclue_client_call_stop_finish() to get the result of the operation. |
| 6404 | * |
| 6405 | * See gclue_client_call_stop_sync() for the synchronous, blocking version of this method. |
| 6406 | * @param cancellable A #GCancellable or %NULL. |
| 6407 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6408 | */ |
| 6409 | call_stop(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void; |
| 6410 | /** |
| 6411 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. |
| 6412 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6413 | * You can then call gclue_client_call_stop_finish() to get the result of the operation. |
| 6414 | * |
| 6415 | * See gclue_client_call_stop_sync() for the synchronous, blocking version of this method. |
| 6416 | * @param cancellable A #GCancellable or %NULL. |
| 6417 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6418 | */ |
| 6419 | call_stop( |
| 6420 | cancellable?: Gio.Cancellable | null, |
| 6421 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 6422 | ): Promise<boolean> | void; |
| 6423 | /** |
| 6424 | * Finishes an operation started with gclue_client_call_stop(). |
| 6425 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_call_stop(). |
| 6426 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6427 | */ |
| 6428 | call_stop_finish(res: Gio.AsyncResult): boolean; |
| 6429 | /** |
| 6430 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 6431 | * |
| 6432 | * See gclue_client_call_stop() for the asynchronous version of this method. |
| 6433 | * @param cancellable A #GCancellable or %NULL. |
| 6434 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6435 | */ |
| 6436 | call_stop_sync(cancellable?: Gio.Cancellable | null): boolean; |
| 6437 | /** |
| 6438 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 6439 | * |
| 6440 | * This method will free `invocation,` you cannot use it afterwards. |
| 6441 | * @param invocation A #GDBusMethodInvocation. |
| 6442 | */ |
| 6443 | complete_start(invocation: Gio.DBusMethodInvocation): void; |
| 6444 | /** |
| 6445 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 6446 | * |
| 6447 | * This method will free `invocation,` you cannot use it afterwards. |
| 6448 | * @param invocation A #GDBusMethodInvocation. |
| 6449 | */ |
| 6450 | complete_stop(invocation: Gio.DBusMethodInvocation): void; |
| 6451 | /** |
| 6452 | * Emits the <link linkend="gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated">"LocationUpdated"</link> D-Bus signal. |
| 6453 | * @param arg_old Argument to pass with the signal. |
| 6454 | * @param arg_new Argument to pass with the signal. |
| 6455 | */ |
| 6456 | emit_location_updated(arg_old: string, arg_new: string): void; |
| 6457 | |
| 6458 | // Virtual methods |
| 6459 | |
| 6460 | /** |
| 6461 | * Handler for the #GClueClient::handle-start signal. |
| 6462 | * @param invocation |
| 6463 | */ |
| 6464 | vfunc_handle_start(invocation: Gio.DBusMethodInvocation): boolean; |
| 6465 | /** |
| 6466 | * Handler for the #GClueClient::handle-stop signal. |
| 6467 | * @param invocation |
| 6468 | */ |
| 6469 | vfunc_handle_stop(invocation: Gio.DBusMethodInvocation): boolean; |
| 6470 | /** |
| 6471 | * Handler for the #GClueClient::location-updated signal. |
| 6472 | * @param arg_old |
| 6473 | * @param arg_new |
| 6474 | */ |
| 6475 | vfunc_location_updated(arg_old: string, arg_new: string): void; |
| 6476 | } |
| 6477 | |
| 6478 | export const Client: ClientNamespace & { |
| 6479 | new (): Client; // This allows `obj instanceof Client` |
| 6480 | }; |
| 6481 | |
| 6482 | namespace Location { |
| 6483 | // Constructor properties interface |
| 6484 | |
| 6485 | interface ConstructorProps extends GObject.Object.ConstructorProps { |
| 6486 | accuracy: number; |
| 6487 | altitude: number; |
| 6488 | description: string; |
| 6489 | heading: number; |
| 6490 | latitude: number; |
| 6491 | longitude: number; |
| 6492 | speed: number; |
| 6493 | timestamp: GLib.Variant; |
| 6494 | } |
| 6495 | } |
| 6496 | |
| 6497 | export interface LocationNamespace { |
| 6498 | $gtype: GObject.GType<Location>; |
| 6499 | prototype: Location; |
| 6500 | |
| 6501 | /** |
| 6502 | * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Location.top_of_page">org.freedesktop.GeoClue2.Location</link> D-Bus interface. |
| 6503 | */ |
| 6504 | interface_info(): Gio.DBusInterfaceInfo; |
| 6505 | /** |
| 6506 | * Overrides all #GObject properties in the #GClueLocation interface for a concrete class. |
| 6507 | * The properties are overridden in the order they are defined. |
| 6508 | * @param klass The class structure for a #GObject derived class. |
| 6509 | * @param property_id_begin The property id to assign to the first overridden property. |
| 6510 | */ |
| 6511 | override_properties(klass: typeof GObject.Object, property_id_begin: number): number; |
| 6512 | } |
| 6513 | interface Location extends GObject.Object { |
| 6514 | // Properties |
| 6515 | |
| 6516 | /** |
| 6517 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Accuracy">"Accuracy"</link>. |
| 6518 | * |
| 6519 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6520 | */ |
| 6521 | get accuracy(): number; |
| 6522 | set accuracy(val: number); |
| 6523 | /** |
| 6524 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Altitude">"Altitude"</link>. |
| 6525 | * |
| 6526 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6527 | */ |
| 6528 | get altitude(): number; |
| 6529 | set altitude(val: number); |
| 6530 | /** |
| 6531 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Description">"Description"</link>. |
| 6532 | * |
| 6533 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6534 | */ |
| 6535 | get description(): string; |
| 6536 | set description(val: string); |
| 6537 | /** |
| 6538 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Heading">"Heading"</link>. |
| 6539 | * |
| 6540 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6541 | */ |
| 6542 | get heading(): number; |
| 6543 | set heading(val: number); |
| 6544 | /** |
| 6545 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Latitude">"Latitude"</link>. |
| 6546 | * |
| 6547 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6548 | */ |
| 6549 | get latitude(): number; |
| 6550 | set latitude(val: number); |
| 6551 | /** |
| 6552 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Longitude">"Longitude"</link>. |
| 6553 | * |
| 6554 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6555 | */ |
| 6556 | get longitude(): number; |
| 6557 | set longitude(val: number); |
| 6558 | /** |
| 6559 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Speed">"Speed"</link>. |
| 6560 | * |
| 6561 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6562 | */ |
| 6563 | get speed(): number; |
| 6564 | set speed(val: number); |
| 6565 | /** |
| 6566 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Location.Timestamp">"Timestamp"</link>. |
| 6567 | * |
| 6568 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6569 | */ |
| 6570 | get timestamp(): GLib.Variant; |
| 6571 | set timestamp(val: GLib.Variant); |
| 6572 | } |
| 6573 | |
| 6574 | export const Location: LocationNamespace & { |
| 6575 | new (): Location; // This allows `obj instanceof Location` |
| 6576 | }; |
| 6577 | |
| 6578 | namespace Manager { |
| 6579 | // Constructor properties interface |
| 6580 | |
| 6581 | interface ConstructorProps extends GObject.Object.ConstructorProps { |
| 6582 | available_accuracy_level: number; |
| 6583 | availableAccuracyLevel: number; |
| 6584 | in_use: boolean; |
| 6585 | inUse: boolean; |
| 6586 | } |
| 6587 | } |
| 6588 | |
| 6589 | export interface ManagerNamespace { |
| 6590 | $gtype: GObject.GType<Manager>; |
| 6591 | prototype: Manager; |
| 6592 | |
| 6593 | /** |
| 6594 | * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Manager.top_of_page">org.freedesktop.GeoClue2.Manager</link> D-Bus interface. |
| 6595 | */ |
| 6596 | interface_info(): Gio.DBusInterfaceInfo; |
| 6597 | /** |
| 6598 | * Overrides all #GObject properties in the #GClueManager interface for a concrete class. |
| 6599 | * The properties are overridden in the order they are defined. |
| 6600 | * @param klass The class structure for a #GObject derived class. |
| 6601 | * @param property_id_begin The property id to assign to the first overridden property. |
| 6602 | */ |
| 6603 | override_properties(klass: typeof GObject.Object, property_id_begin: number): number; |
| 6604 | } |
| 6605 | interface Manager extends GObject.Object { |
| 6606 | // Properties |
| 6607 | |
| 6608 | /** |
| 6609 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.AvailableAccuracyLevel">"AvailableAccuracyLevel"</link>. |
| 6610 | * |
| 6611 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6612 | */ |
| 6613 | get available_accuracy_level(): number; |
| 6614 | set available_accuracy_level(val: number); |
| 6615 | /** |
| 6616 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.AvailableAccuracyLevel">"AvailableAccuracyLevel"</link>. |
| 6617 | * |
| 6618 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6619 | */ |
| 6620 | get availableAccuracyLevel(): number; |
| 6621 | set availableAccuracyLevel(val: number); |
| 6622 | /** |
| 6623 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.InUse">"InUse"</link>. |
| 6624 | * |
| 6625 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6626 | */ |
| 6627 | get in_use(): boolean; |
| 6628 | set in_use(val: boolean); |
| 6629 | /** |
| 6630 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-GeoClue2-Manager.InUse">"InUse"</link>. |
| 6631 | * |
| 6632 | * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. |
| 6633 | */ |
| 6634 | get inUse(): boolean; |
| 6635 | set inUse(val: boolean); |
| 6636 | |
| 6637 | // Methods |
| 6638 | |
| 6639 | /** |
| 6640 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. |
| 6641 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6642 | * You can then call gclue_manager_call_add_agent_finish() to get the result of the operation. |
| 6643 | * |
| 6644 | * See gclue_manager_call_add_agent_sync() for the synchronous, blocking version of this method. |
| 6645 | * @param arg_id Argument to pass with the method invocation. |
| 6646 | * @param cancellable A #GCancellable or %NULL. |
| 6647 | */ |
| 6648 | call_add_agent(arg_id: string, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 6649 | /** |
| 6650 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. |
| 6651 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6652 | * You can then call gclue_manager_call_add_agent_finish() to get the result of the operation. |
| 6653 | * |
| 6654 | * See gclue_manager_call_add_agent_sync() for the synchronous, blocking version of this method. |
| 6655 | * @param arg_id Argument to pass with the method invocation. |
| 6656 | * @param cancellable A #GCancellable or %NULL. |
| 6657 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6658 | */ |
| 6659 | call_add_agent( |
| 6660 | arg_id: string, |
| 6661 | cancellable: Gio.Cancellable | null, |
| 6662 | callback: Gio.AsyncReadyCallback<this> | null, |
| 6663 | ): void; |
| 6664 | /** |
| 6665 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. |
| 6666 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6667 | * You can then call gclue_manager_call_add_agent_finish() to get the result of the operation. |
| 6668 | * |
| 6669 | * See gclue_manager_call_add_agent_sync() for the synchronous, blocking version of this method. |
| 6670 | * @param arg_id Argument to pass with the method invocation. |
| 6671 | * @param cancellable A #GCancellable or %NULL. |
| 6672 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6673 | */ |
| 6674 | call_add_agent( |
| 6675 | arg_id: string, |
| 6676 | cancellable?: Gio.Cancellable | null, |
| 6677 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 6678 | ): Promise<boolean> | void; |
| 6679 | /** |
| 6680 | * Finishes an operation started with gclue_manager_call_add_agent(). |
| 6681 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_add_agent(). |
| 6682 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6683 | */ |
| 6684 | call_add_agent_finish(res: Gio.AsyncResult): boolean; |
| 6685 | /** |
| 6686 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 6687 | * |
| 6688 | * See gclue_manager_call_add_agent() for the asynchronous version of this method. |
| 6689 | * @param arg_id Argument to pass with the method invocation. |
| 6690 | * @param cancellable A #GCancellable or %NULL. |
| 6691 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6692 | */ |
| 6693 | call_add_agent_sync(arg_id: string, cancellable?: Gio.Cancellable | null): boolean; |
| 6694 | /** |
| 6695 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. |
| 6696 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6697 | * You can then call gclue_manager_call_create_client_finish() to get the result of the operation. |
| 6698 | * |
| 6699 | * See gclue_manager_call_create_client_sync() for the synchronous, blocking version of this method. |
| 6700 | * @param cancellable A #GCancellable or %NULL. |
| 6701 | */ |
| 6702 | call_create_client(cancellable?: Gio.Cancellable | null): Promise<string>; |
| 6703 | /** |
| 6704 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. |
| 6705 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6706 | * You can then call gclue_manager_call_create_client_finish() to get the result of the operation. |
| 6707 | * |
| 6708 | * See gclue_manager_call_create_client_sync() for the synchronous, blocking version of this method. |
| 6709 | * @param cancellable A #GCancellable or %NULL. |
| 6710 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6711 | */ |
| 6712 | call_create_client( |
| 6713 | cancellable: Gio.Cancellable | null, |
| 6714 | callback: Gio.AsyncReadyCallback<this> | null, |
| 6715 | ): void; |
| 6716 | /** |
| 6717 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. |
| 6718 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6719 | * You can then call gclue_manager_call_create_client_finish() to get the result of the operation. |
| 6720 | * |
| 6721 | * See gclue_manager_call_create_client_sync() for the synchronous, blocking version of this method. |
| 6722 | * @param cancellable A #GCancellable or %NULL. |
| 6723 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6724 | */ |
| 6725 | call_create_client( |
| 6726 | cancellable?: Gio.Cancellable | null, |
| 6727 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 6728 | ): Promise<string> | void; |
| 6729 | /** |
| 6730 | * Finishes an operation started with gclue_manager_call_create_client(). |
| 6731 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_create_client(). |
| 6732 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6733 | */ |
| 6734 | call_create_client_finish(res: Gio.AsyncResult): [boolean, string]; |
| 6735 | /** |
| 6736 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 6737 | * |
| 6738 | * See gclue_manager_call_create_client() for the asynchronous version of this method. |
| 6739 | * @param cancellable A #GCancellable or %NULL. |
| 6740 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6741 | */ |
| 6742 | call_create_client_sync(cancellable?: Gio.Cancellable | null): [boolean, string]; |
| 6743 | /** |
| 6744 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. |
| 6745 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6746 | * You can then call gclue_manager_call_delete_client_finish() to get the result of the operation. |
| 6747 | * |
| 6748 | * See gclue_manager_call_delete_client_sync() for the synchronous, blocking version of this method. |
| 6749 | * @param arg_client Argument to pass with the method invocation. |
| 6750 | * @param cancellable A #GCancellable or %NULL. |
| 6751 | */ |
| 6752 | call_delete_client(arg_client: string, cancellable?: Gio.Cancellable | null): Promise<boolean>; |
| 6753 | /** |
| 6754 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. |
| 6755 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6756 | * You can then call gclue_manager_call_delete_client_finish() to get the result of the operation. |
| 6757 | * |
| 6758 | * See gclue_manager_call_delete_client_sync() for the synchronous, blocking version of this method. |
| 6759 | * @param arg_client Argument to pass with the method invocation. |
| 6760 | * @param cancellable A #GCancellable or %NULL. |
| 6761 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6762 | */ |
| 6763 | call_delete_client( |
| 6764 | arg_client: string, |
| 6765 | cancellable: Gio.Cancellable | null, |
| 6766 | callback: Gio.AsyncReadyCallback<this> | null, |
| 6767 | ): void; |
| 6768 | /** |
| 6769 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. |
| 6770 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6771 | * You can then call gclue_manager_call_delete_client_finish() to get the result of the operation. |
| 6772 | * |
| 6773 | * See gclue_manager_call_delete_client_sync() for the synchronous, blocking version of this method. |
| 6774 | * @param arg_client Argument to pass with the method invocation. |
| 6775 | * @param cancellable A #GCancellable or %NULL. |
| 6776 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6777 | */ |
| 6778 | call_delete_client( |
| 6779 | arg_client: string, |
| 6780 | cancellable?: Gio.Cancellable | null, |
| 6781 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 6782 | ): Promise<boolean> | void; |
| 6783 | /** |
| 6784 | * Finishes an operation started with gclue_manager_call_delete_client(). |
| 6785 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_delete_client(). |
| 6786 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6787 | */ |
| 6788 | call_delete_client_finish(res: Gio.AsyncResult): boolean; |
| 6789 | /** |
| 6790 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 6791 | * |
| 6792 | * See gclue_manager_call_delete_client() for the asynchronous version of this method. |
| 6793 | * @param arg_client Argument to pass with the method invocation. |
| 6794 | * @param cancellable A #GCancellable or %NULL. |
| 6795 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6796 | */ |
| 6797 | call_delete_client_sync(arg_client: string, cancellable?: Gio.Cancellable | null): boolean; |
| 6798 | /** |
| 6799 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. |
| 6800 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6801 | * You can then call gclue_manager_call_get_client_finish() to get the result of the operation. |
| 6802 | * |
| 6803 | * See gclue_manager_call_get_client_sync() for the synchronous, blocking version of this method. |
| 6804 | * @param cancellable A #GCancellable or %NULL. |
| 6805 | */ |
| 6806 | call_get_client(cancellable?: Gio.Cancellable | null): Promise<string>; |
| 6807 | /** |
| 6808 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. |
| 6809 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6810 | * You can then call gclue_manager_call_get_client_finish() to get the result of the operation. |
| 6811 | * |
| 6812 | * See gclue_manager_call_get_client_sync() for the synchronous, blocking version of this method. |
| 6813 | * @param cancellable A #GCancellable or %NULL. |
| 6814 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6815 | */ |
| 6816 | call_get_client(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void; |
| 6817 | /** |
| 6818 | * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. |
| 6819 | * When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). |
| 6820 | * You can then call gclue_manager_call_get_client_finish() to get the result of the operation. |
| 6821 | * |
| 6822 | * See gclue_manager_call_get_client_sync() for the synchronous, blocking version of this method. |
| 6823 | * @param cancellable A #GCancellable or %NULL. |
| 6824 | * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL. |
| 6825 | */ |
| 6826 | call_get_client( |
| 6827 | cancellable?: Gio.Cancellable | null, |
| 6828 | callback?: Gio.AsyncReadyCallback<this> | null, |
| 6829 | ): Promise<string> | void; |
| 6830 | /** |
| 6831 | * Finishes an operation started with gclue_manager_call_get_client(). |
| 6832 | * @param res The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_manager_call_get_client(). |
| 6833 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6834 | */ |
| 6835 | call_get_client_finish(res: Gio.AsyncResult): [boolean, string]; |
| 6836 | /** |
| 6837 | * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method on `proxy`. The calling thread is blocked until a reply is received. |
| 6838 | * |
| 6839 | * See gclue_manager_call_get_client() for the asynchronous version of this method. |
| 6840 | * @param cancellable A #GCancellable or %NULL. |
| 6841 | * @returns %TRUE if the call succeeded, %FALSE if @error is set. |
| 6842 | */ |
| 6843 | call_get_client_sync(cancellable?: Gio.Cancellable | null): [boolean, string]; |
| 6844 | /** |
| 6845 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent">AddAgent()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 6846 | * |
| 6847 | * This method will free `invocation,` you cannot use it afterwards. |
| 6848 | * @param invocation A #GDBusMethodInvocation. |
| 6849 | */ |
| 6850 | complete_add_agent(invocation: Gio.DBusMethodInvocation): void; |
| 6851 | /** |
| 6852 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient">CreateClient()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 6853 | * |
| 6854 | * This method will free `invocation,` you cannot use it afterwards. |
| 6855 | * @param invocation A #GDBusMethodInvocation. |
| 6856 | * @param client Parameter to return. |
| 6857 | */ |
| 6858 | complete_create_client(invocation: Gio.DBusMethodInvocation, client: string): void; |
| 6859 | /** |
| 6860 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient">DeleteClient()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 6861 | * |
| 6862 | * This method will free `invocation,` you cannot use it afterwards. |
| 6863 | * @param invocation A #GDBusMethodInvocation. |
| 6864 | */ |
| 6865 | complete_delete_client(invocation: Gio.DBusMethodInvocation): void; |
| 6866 | /** |
| 6867 | * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient">GetClient()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. |
| 6868 | * |
| 6869 | * This method will free `invocation,` you cannot use it afterwards. |
| 6870 | * @param invocation A #GDBusMethodInvocation. |
| 6871 | * @param client Parameter to return. |
| 6872 | */ |
| 6873 | complete_get_client(invocation: Gio.DBusMethodInvocation, client: string): void; |
| 6874 | |
| 6875 | // Virtual methods |
| 6876 | |
| 6877 | /** |
| 6878 | * Handler for the #GClueManager::handle-add-agent signal. |
| 6879 | * @param invocation |
| 6880 | * @param arg_id |
| 6881 | */ |
| 6882 | vfunc_handle_add_agent(invocation: Gio.DBusMethodInvocation, arg_id: string): boolean; |
| 6883 | /** |
| 6884 | * Handler for the #GClueManager::handle-create-client signal. |
| 6885 | * @param invocation |
| 6886 | */ |
| 6887 | vfunc_handle_create_client(invocation: Gio.DBusMethodInvocation): boolean; |
| 6888 | /** |
| 6889 | * Handler for the #GClueManager::handle-delete-client signal. |
| 6890 | * @param invocation |
| 6891 | * @param arg_client |
| 6892 | */ |
| 6893 | vfunc_handle_delete_client(invocation: Gio.DBusMethodInvocation, arg_client: string): boolean; |
| 6894 | /** |
| 6895 | * Handler for the #GClueManager::handle-get-client signal. |
| 6896 | * @param invocation |
| 6897 | */ |
| 6898 | vfunc_handle_get_client(invocation: Gio.DBusMethodInvocation): boolean; |
| 6899 | } |
| 6900 | |
| 6901 | export const Manager: ManagerNamespace & { |
| 6902 | new (): Manager; // This allows `obj instanceof Manager` |
| 6903 | }; |
| 6904 | |
| 6905 | /** |
| 6906 | * Name of the imported GIR library |
| 6907 | * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188 |
| 6908 | */ |
| 6909 | const __name__: string; |
| 6910 | /** |
| 6911 | * Version of the imported GIR library |
| 6912 | * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189 |
| 6913 | */ |
| 6914 | const __version__: string; |
| 6915 | } |
| 6916 | |
| 6917 | export default Geoclue; |
| 6918 | } |
| 6919 | |
| 6920 | declare module 'gi://Geoclue' { |
| 6921 | import Geoclue20 from 'gi://Geoclue?version=2.0'; |
| 6922 | export default Geoclue20; |
| 6923 | } |
| 6924 | // END |