@girs/gpastegtk-3 3.0.0-4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/gpastegtk-3-ambient.d.ts +8 -0
- package/gpastegtk-3-ambient.js +2 -0
- package/gpastegtk-3-import.d.ts +2 -0
- package/gpastegtk-3-import.js +3 -0
- package/gpastegtk-3.d.ts +1338 -0
- package/gpastegtk-3.js +6 -0
- package/package.json +66 -0
- package/tsconfig.json +23 -0
- package/typedoc.json +7 -0
package/gpastegtk-3.d.ts
ADDED
|
@@ -0,0 +1,1338 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Type Definitions for Gjs (https://gjs.guide/)
|
|
3
|
+
*
|
|
4
|
+
* These type definitions are automatically generated, do not edit them by hand.
|
|
5
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import './gpastegtk-3-ambient.d.ts';
|
|
9
|
+
|
|
10
|
+
import './gpastegtk-3-import.d.ts';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* GPasteGtk-3
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import type Gtk from '@girs/gtk-3.0';
|
|
17
|
+
import type xlib from '@girs/xlib-2.0';
|
|
18
|
+
import type Gdk from '@girs/gdk-3.0';
|
|
19
|
+
import type cairo from '@girs/cairo-1.0';
|
|
20
|
+
import type GObject from '@girs/gobject-2.0';
|
|
21
|
+
import type GLib from '@girs/glib-2.0';
|
|
22
|
+
import type Pango from '@girs/pango-1.0';
|
|
23
|
+
import type HarfBuzz from '@girs/harfbuzz-0.0';
|
|
24
|
+
import type freetype2 from '@girs/freetype2-2.0';
|
|
25
|
+
import type Gio from '@girs/gio-2.0';
|
|
26
|
+
import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
|
|
27
|
+
import type GModule from '@girs/gmodule-2.0';
|
|
28
|
+
import type Atk from '@girs/atk-1.0';
|
|
29
|
+
import type GPaste from '@girs/gpaste-2';
|
|
30
|
+
|
|
31
|
+
export namespace GPasteGtk {
|
|
32
|
+
/**
|
|
33
|
+
* Compute the checksum of an image
|
|
34
|
+
* @param image the #GdkPixbuf to checksum
|
|
35
|
+
* @returns the newly allocated checksum
|
|
36
|
+
*/
|
|
37
|
+
function util_compute_checksum(image: GdkPixbuf.Pixbuf): string;
|
|
38
|
+
/**
|
|
39
|
+
* Ask the user for confirmation
|
|
40
|
+
* @param parent the parent #GtkWindow
|
|
41
|
+
* @param action
|
|
42
|
+
* @param msg the message to display
|
|
43
|
+
*/
|
|
44
|
+
function util_confirm_dialog(parent: Gtk.Window | null, action: string, msg: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Empty history after prompting user for confirmation
|
|
47
|
+
* @param parent_window the parent #GtkWindow
|
|
48
|
+
* @param client a #GPasteClient instance
|
|
49
|
+
* @param settings a #GPasteSettings instance
|
|
50
|
+
* @param history the name of the history to empty
|
|
51
|
+
*/
|
|
52
|
+
function util_empty_history(
|
|
53
|
+
parent_window: Gtk.Window | null,
|
|
54
|
+
client: GPaste.Client,
|
|
55
|
+
settings: GPaste.Settings,
|
|
56
|
+
history: string,
|
|
57
|
+
): void;
|
|
58
|
+
/**
|
|
59
|
+
* Present the application's window to user
|
|
60
|
+
* @param application a #GtkApplication
|
|
61
|
+
*/
|
|
62
|
+
function util_show_win(application: Gio.Application): void;
|
|
63
|
+
interface BooleanCallback {
|
|
64
|
+
(data: boolean): void;
|
|
65
|
+
}
|
|
66
|
+
interface RangeCallback {
|
|
67
|
+
(data: number): void;
|
|
68
|
+
}
|
|
69
|
+
interface ResetCallback {
|
|
70
|
+
(): void;
|
|
71
|
+
}
|
|
72
|
+
interface TextCallback {
|
|
73
|
+
(data: string): void;
|
|
74
|
+
}
|
|
75
|
+
module SettingsUiPanel {
|
|
76
|
+
// Constructor properties interface
|
|
77
|
+
|
|
78
|
+
interface ConstructorProps
|
|
79
|
+
extends Gtk.Grid.ConstructorProps,
|
|
80
|
+
Atk.ImplementorIface.ConstructorProps,
|
|
81
|
+
Gtk.Buildable.ConstructorProps,
|
|
82
|
+
Gtk.Orientable.ConstructorProps {}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
class SettingsUiPanel extends Gtk.Grid implements Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable {
|
|
86
|
+
static $gtype: GObject.GType<SettingsUiPanel>;
|
|
87
|
+
|
|
88
|
+
// Constructors of GPasteGtk.SettingsUiPanel
|
|
89
|
+
|
|
90
|
+
constructor(properties?: Partial<SettingsUiPanel.ConstructorProps>, ...args: any[]);
|
|
91
|
+
|
|
92
|
+
_init(...args: any[]): void;
|
|
93
|
+
|
|
94
|
+
static ['new'](): SettingsUiPanel;
|
|
95
|
+
|
|
96
|
+
// Own methods of GPasteGtk.SettingsUiPanel
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Add a new boolean settings to the current pane
|
|
100
|
+
* @param label the label to display
|
|
101
|
+
* @param value the deafault value
|
|
102
|
+
* @param on_value_changed the callback to call when the value changes
|
|
103
|
+
* @param on_reset the callback to call when the value is reset
|
|
104
|
+
* @returns the #GtkSwitch we just added
|
|
105
|
+
*/
|
|
106
|
+
add_boolean_setting(
|
|
107
|
+
label: string,
|
|
108
|
+
value: boolean,
|
|
109
|
+
on_value_changed: BooleanCallback,
|
|
110
|
+
on_reset: ResetCallback,
|
|
111
|
+
): Gtk.Switch;
|
|
112
|
+
/**
|
|
113
|
+
* Add a new boolean settings to the current pane
|
|
114
|
+
* @param label the label to display
|
|
115
|
+
* @param value the deafault value
|
|
116
|
+
* @param min the minimal authorized value
|
|
117
|
+
* @param max the maximal authorized value
|
|
118
|
+
* @param step the step between proposed values
|
|
119
|
+
* @param on_value_changed the callback to call when the value changes
|
|
120
|
+
* @param on_reset the callback to call when the value is reset
|
|
121
|
+
* @returns the #GtkSpinButton we just added
|
|
122
|
+
*/
|
|
123
|
+
add_range_setting(
|
|
124
|
+
label: string,
|
|
125
|
+
value: number,
|
|
126
|
+
min: number,
|
|
127
|
+
max: number,
|
|
128
|
+
step: number,
|
|
129
|
+
on_value_changed: RangeCallback,
|
|
130
|
+
on_reset: ResetCallback,
|
|
131
|
+
): Gtk.SpinButton;
|
|
132
|
+
/**
|
|
133
|
+
* Add a new separator to the current pane
|
|
134
|
+
*/
|
|
135
|
+
add_separator(): void;
|
|
136
|
+
/**
|
|
137
|
+
* Add a new text settings to the current pane
|
|
138
|
+
* @param label the label to display
|
|
139
|
+
* @param value the deafault value
|
|
140
|
+
* @param on_value_changed the callback to call when the value changes
|
|
141
|
+
* @param on_reset the callback to call when the value is reset
|
|
142
|
+
* @returns the #GtkEntry we just added
|
|
143
|
+
*/
|
|
144
|
+
add_text_setting(
|
|
145
|
+
label: string,
|
|
146
|
+
value: string,
|
|
147
|
+
on_value_changed: TextCallback,
|
|
148
|
+
on_reset: ResetCallback,
|
|
149
|
+
): Gtk.Entry;
|
|
150
|
+
|
|
151
|
+
// Inherited properties
|
|
152
|
+
/**
|
|
153
|
+
* The orientation of the orientable.
|
|
154
|
+
*/
|
|
155
|
+
get orientation(): Gtk.Orientation;
|
|
156
|
+
set orientation(val: Gtk.Orientation);
|
|
157
|
+
|
|
158
|
+
// Inherited methods
|
|
159
|
+
/**
|
|
160
|
+
* Retrieves the orientation of the `orientable`.
|
|
161
|
+
* @returns the orientation of the @orientable.
|
|
162
|
+
*/
|
|
163
|
+
get_orientation(): Gtk.Orientation;
|
|
164
|
+
/**
|
|
165
|
+
* Sets the orientation of the `orientable`.
|
|
166
|
+
* @param orientation the orientable’s new orientation.
|
|
167
|
+
*/
|
|
168
|
+
set_orientation(orientation: Gtk.Orientation): void;
|
|
169
|
+
/**
|
|
170
|
+
* Creates a binding between `source_property` on `source` and `target_property`
|
|
171
|
+
* on `target`.
|
|
172
|
+
*
|
|
173
|
+
* Whenever the `source_property` is changed the `target_property` is
|
|
174
|
+
* updated using the same value. For instance:
|
|
175
|
+
*
|
|
176
|
+
*
|
|
177
|
+
* ```c
|
|
178
|
+
* g_object_bind_property (action, "active", widget, "sensitive", 0);
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
*
|
|
182
|
+
* Will result in the "sensitive" property of the widget #GObject instance to be
|
|
183
|
+
* updated with the same value of the "active" property of the action #GObject
|
|
184
|
+
* instance.
|
|
185
|
+
*
|
|
186
|
+
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
|
187
|
+
* if `target_property` on `target` changes then the `source_property` on `source`
|
|
188
|
+
* will be updated as well.
|
|
189
|
+
*
|
|
190
|
+
* The binding will automatically be removed when either the `source` or the
|
|
191
|
+
* `target` instances are finalized. To remove the binding without affecting the
|
|
192
|
+
* `source` and the `target` you can just call g_object_unref() on the returned
|
|
193
|
+
* #GBinding instance.
|
|
194
|
+
*
|
|
195
|
+
* Removing the binding by calling g_object_unref() on it must only be done if
|
|
196
|
+
* the binding, `source` and `target` are only used from a single thread and it
|
|
197
|
+
* is clear that both `source` and `target` outlive the binding. Especially it
|
|
198
|
+
* is not safe to rely on this if the binding, `source` or `target` can be
|
|
199
|
+
* finalized from different threads. Keep another reference to the binding and
|
|
200
|
+
* use g_binding_unbind() instead to be on the safe side.
|
|
201
|
+
*
|
|
202
|
+
* A #GObject can have multiple bindings.
|
|
203
|
+
* @param source_property the property on @source to bind
|
|
204
|
+
* @param target the target #GObject
|
|
205
|
+
* @param target_property the property on @target to bind
|
|
206
|
+
* @param flags flags to pass to #GBinding
|
|
207
|
+
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
208
|
+
*/
|
|
209
|
+
bind_property(
|
|
210
|
+
source_property: string,
|
|
211
|
+
target: GObject.Object,
|
|
212
|
+
target_property: string,
|
|
213
|
+
flags: GObject.BindingFlags,
|
|
214
|
+
): GObject.Binding;
|
|
215
|
+
/**
|
|
216
|
+
* Complete version of g_object_bind_property().
|
|
217
|
+
*
|
|
218
|
+
* Creates a binding between `source_property` on `source` and `target_property`
|
|
219
|
+
* on `target,` allowing you to set the transformation functions to be used by
|
|
220
|
+
* the binding.
|
|
221
|
+
*
|
|
222
|
+
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
|
223
|
+
* if `target_property` on `target` changes then the `source_property` on `source`
|
|
224
|
+
* will be updated as well. The `transform_from` function is only used in case
|
|
225
|
+
* of bidirectional bindings, otherwise it will be ignored
|
|
226
|
+
*
|
|
227
|
+
* The binding will automatically be removed when either the `source` or the
|
|
228
|
+
* `target` instances are finalized. This will release the reference that is
|
|
229
|
+
* being held on the #GBinding instance; if you want to hold on to the
|
|
230
|
+
* #GBinding instance, you will need to hold a reference to it.
|
|
231
|
+
*
|
|
232
|
+
* To remove the binding, call g_binding_unbind().
|
|
233
|
+
*
|
|
234
|
+
* A #GObject can have multiple bindings.
|
|
235
|
+
*
|
|
236
|
+
* The same `user_data` parameter will be used for both `transform_to`
|
|
237
|
+
* and `transform_from` transformation functions; the `notify` function will
|
|
238
|
+
* be called once, when the binding is removed. If you need different data
|
|
239
|
+
* for each transformation function, please use
|
|
240
|
+
* g_object_bind_property_with_closures() instead.
|
|
241
|
+
* @param source_property the property on @source to bind
|
|
242
|
+
* @param target the target #GObject
|
|
243
|
+
* @param target_property the property on @target to bind
|
|
244
|
+
* @param flags flags to pass to #GBinding
|
|
245
|
+
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
|
|
246
|
+
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
|
|
247
|
+
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
|
|
248
|
+
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
249
|
+
*/
|
|
250
|
+
bind_property_full(
|
|
251
|
+
source_property: string,
|
|
252
|
+
target: GObject.Object,
|
|
253
|
+
target_property: string,
|
|
254
|
+
flags: GObject.BindingFlags,
|
|
255
|
+
transform_to?: GObject.BindingTransformFunc | null,
|
|
256
|
+
transform_from?: GObject.BindingTransformFunc | null,
|
|
257
|
+
notify?: GLib.DestroyNotify | null,
|
|
258
|
+
): GObject.Binding;
|
|
259
|
+
// Conflicted with GObject.Object.bind_property_full
|
|
260
|
+
bind_property_full(...args: never[]): any;
|
|
261
|
+
/**
|
|
262
|
+
* This function is intended for #GObject implementations to re-enforce
|
|
263
|
+
* a [floating][floating-ref] object reference. Doing this is seldom
|
|
264
|
+
* required: all #GInitiallyUnowneds are created with a floating reference
|
|
265
|
+
* which usually just needs to be sunken by calling g_object_ref_sink().
|
|
266
|
+
*/
|
|
267
|
+
force_floating(): void;
|
|
268
|
+
/**
|
|
269
|
+
* Increases the freeze count on `object`. If the freeze count is
|
|
270
|
+
* non-zero, the emission of "notify" signals on `object` is
|
|
271
|
+
* stopped. The signals are queued until the freeze count is decreased
|
|
272
|
+
* to zero. Duplicate notifications are squashed so that at most one
|
|
273
|
+
* #GObject::notify signal is emitted for each property modified while the
|
|
274
|
+
* object is frozen.
|
|
275
|
+
*
|
|
276
|
+
* This is necessary for accessors that modify multiple properties to prevent
|
|
277
|
+
* premature notification while the object is still being modified.
|
|
278
|
+
*/
|
|
279
|
+
freeze_notify(): void;
|
|
280
|
+
/**
|
|
281
|
+
* Gets a named field from the objects table of associations (see g_object_set_data()).
|
|
282
|
+
* @param key name of the key for that association
|
|
283
|
+
* @returns the data if found, or %NULL if no such data exists.
|
|
284
|
+
*/
|
|
285
|
+
get_data(key: string): any | null;
|
|
286
|
+
get_property(property_name: string): any;
|
|
287
|
+
/**
|
|
288
|
+
* This function gets back user data pointers stored via
|
|
289
|
+
* g_object_set_qdata().
|
|
290
|
+
* @param quark A #GQuark, naming the user data pointer
|
|
291
|
+
* @returns The user data pointer set, or %NULL
|
|
292
|
+
*/
|
|
293
|
+
get_qdata(quark: GLib.Quark): any | null;
|
|
294
|
+
/**
|
|
295
|
+
* Gets `n_properties` properties for an `object`.
|
|
296
|
+
* Obtained properties will be set to `values`. All properties must be valid.
|
|
297
|
+
* Warnings will be emitted and undefined behaviour may result if invalid
|
|
298
|
+
* properties are passed in.
|
|
299
|
+
* @param names the names of each property to get
|
|
300
|
+
* @param values the values of each property to get
|
|
301
|
+
*/
|
|
302
|
+
getv(names: string[], values: (GObject.Value | any)[]): void;
|
|
303
|
+
/**
|
|
304
|
+
* Checks whether `object` has a [floating][floating-ref] reference.
|
|
305
|
+
* @returns %TRUE if @object has a floating reference
|
|
306
|
+
*/
|
|
307
|
+
is_floating(): boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Emits a "notify" signal for the property `property_name` on `object`.
|
|
310
|
+
*
|
|
311
|
+
* When possible, eg. when signaling a property change from within the class
|
|
312
|
+
* that registered the property, you should use g_object_notify_by_pspec()
|
|
313
|
+
* instead.
|
|
314
|
+
*
|
|
315
|
+
* Note that emission of the notify signal may be blocked with
|
|
316
|
+
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
|
317
|
+
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
|
318
|
+
* called.
|
|
319
|
+
* @param property_name the name of a property installed on the class of @object.
|
|
320
|
+
*/
|
|
321
|
+
notify(property_name: string): void;
|
|
322
|
+
/**
|
|
323
|
+
* Emits a "notify" signal for the property specified by `pspec` on `object`.
|
|
324
|
+
*
|
|
325
|
+
* This function omits the property name lookup, hence it is faster than
|
|
326
|
+
* g_object_notify().
|
|
327
|
+
*
|
|
328
|
+
* One way to avoid using g_object_notify() from within the
|
|
329
|
+
* class that registered the properties, and using g_object_notify_by_pspec()
|
|
330
|
+
* instead, is to store the GParamSpec used with
|
|
331
|
+
* g_object_class_install_property() inside a static array, e.g.:
|
|
332
|
+
*
|
|
333
|
+
*
|
|
334
|
+
* ```c
|
|
335
|
+
* typedef enum
|
|
336
|
+
* {
|
|
337
|
+
* PROP_FOO = 1,
|
|
338
|
+
* PROP_LAST
|
|
339
|
+
* } MyObjectProperty;
|
|
340
|
+
*
|
|
341
|
+
* static GParamSpec *properties[PROP_LAST];
|
|
342
|
+
*
|
|
343
|
+
* static void
|
|
344
|
+
* my_object_class_init (MyObjectClass *klass)
|
|
345
|
+
* {
|
|
346
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
347
|
+
* 0, 100,
|
|
348
|
+
* 50,
|
|
349
|
+
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
350
|
+
* g_object_class_install_property (gobject_class,
|
|
351
|
+
* PROP_FOO,
|
|
352
|
+
* properties[PROP_FOO]);
|
|
353
|
+
* }
|
|
354
|
+
* ```
|
|
355
|
+
*
|
|
356
|
+
*
|
|
357
|
+
* and then notify a change on the "foo" property with:
|
|
358
|
+
*
|
|
359
|
+
*
|
|
360
|
+
* ```c
|
|
361
|
+
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
|
|
362
|
+
* ```
|
|
363
|
+
*
|
|
364
|
+
* @param pspec the #GParamSpec of a property installed on the class of @object.
|
|
365
|
+
*/
|
|
366
|
+
notify_by_pspec(pspec: GObject.ParamSpec): void;
|
|
367
|
+
/**
|
|
368
|
+
* Increases the reference count of `object`.
|
|
369
|
+
*
|
|
370
|
+
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
|
|
371
|
+
* of `object` will be propagated to the return type (using the GCC typeof()
|
|
372
|
+
* extension), so any casting the caller needs to do on the return type must be
|
|
373
|
+
* explicit.
|
|
374
|
+
* @returns the same @object
|
|
375
|
+
*/
|
|
376
|
+
ref(): GObject.Object;
|
|
377
|
+
/**
|
|
378
|
+
* Increase the reference count of `object,` and possibly remove the
|
|
379
|
+
* [floating][floating-ref] reference, if `object` has a floating reference.
|
|
380
|
+
*
|
|
381
|
+
* In other words, if the object is floating, then this call "assumes
|
|
382
|
+
* ownership" of the floating reference, converting it to a normal
|
|
383
|
+
* reference by clearing the floating flag while leaving the reference
|
|
384
|
+
* count unchanged. If the object is not floating, then this call
|
|
385
|
+
* adds a new normal reference increasing the reference count by one.
|
|
386
|
+
*
|
|
387
|
+
* Since GLib 2.56, the type of `object` will be propagated to the return type
|
|
388
|
+
* under the same conditions as for g_object_ref().
|
|
389
|
+
* @returns @object
|
|
390
|
+
*/
|
|
391
|
+
ref_sink(): GObject.Object;
|
|
392
|
+
/**
|
|
393
|
+
* Releases all references to other objects. This can be used to break
|
|
394
|
+
* reference cycles.
|
|
395
|
+
*
|
|
396
|
+
* This function should only be called from object system implementations.
|
|
397
|
+
*/
|
|
398
|
+
run_dispose(): void;
|
|
399
|
+
/**
|
|
400
|
+
* Each object carries around a table of associations from
|
|
401
|
+
* strings to pointers. This function lets you set an association.
|
|
402
|
+
*
|
|
403
|
+
* If the object already had an association with that name,
|
|
404
|
+
* the old association will be destroyed.
|
|
405
|
+
*
|
|
406
|
+
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
|
|
407
|
+
* This means a copy of `key` is kept permanently (even after `object` has been
|
|
408
|
+
* finalized) — so it is recommended to only use a small, bounded set of values
|
|
409
|
+
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
|
|
410
|
+
* @param key name of the key
|
|
411
|
+
* @param data data to associate with that key
|
|
412
|
+
*/
|
|
413
|
+
set_data(key: string, data?: any | null): void;
|
|
414
|
+
set_property(property_name: string, value: any): void;
|
|
415
|
+
/**
|
|
416
|
+
* Remove a specified datum from the object's data associations,
|
|
417
|
+
* without invoking the association's destroy handler.
|
|
418
|
+
* @param key name of the key
|
|
419
|
+
* @returns the data if found, or %NULL if no such data exists.
|
|
420
|
+
*/
|
|
421
|
+
steal_data(key: string): any | null;
|
|
422
|
+
/**
|
|
423
|
+
* This function gets back user data pointers stored via
|
|
424
|
+
* g_object_set_qdata() and removes the `data` from object
|
|
425
|
+
* without invoking its destroy() function (if any was
|
|
426
|
+
* set).
|
|
427
|
+
* Usually, calling this function is only required to update
|
|
428
|
+
* user data pointers with a destroy notifier, for example:
|
|
429
|
+
*
|
|
430
|
+
* ```c
|
|
431
|
+
* void
|
|
432
|
+
* object_add_to_user_list (GObject *object,
|
|
433
|
+
* const gchar *new_string)
|
|
434
|
+
* {
|
|
435
|
+
* // the quark, naming the object data
|
|
436
|
+
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
|
|
437
|
+
* // retrieve the old string list
|
|
438
|
+
* GList *list = g_object_steal_qdata (object, quark_string_list);
|
|
439
|
+
*
|
|
440
|
+
* // prepend new string
|
|
441
|
+
* list = g_list_prepend (list, g_strdup (new_string));
|
|
442
|
+
* // this changed 'list', so we need to set it again
|
|
443
|
+
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
|
|
444
|
+
* }
|
|
445
|
+
* static void
|
|
446
|
+
* free_string_list (gpointer data)
|
|
447
|
+
* {
|
|
448
|
+
* GList *node, *list = data;
|
|
449
|
+
*
|
|
450
|
+
* for (node = list; node; node = node->next)
|
|
451
|
+
* g_free (node->data);
|
|
452
|
+
* g_list_free (list);
|
|
453
|
+
* }
|
|
454
|
+
* ```
|
|
455
|
+
*
|
|
456
|
+
* Using g_object_get_qdata() in the above example, instead of
|
|
457
|
+
* g_object_steal_qdata() would have left the destroy function set,
|
|
458
|
+
* and thus the partial string list would have been freed upon
|
|
459
|
+
* g_object_set_qdata_full().
|
|
460
|
+
* @param quark A #GQuark, naming the user data pointer
|
|
461
|
+
* @returns The user data pointer set, or %NULL
|
|
462
|
+
*/
|
|
463
|
+
steal_qdata(quark: GLib.Quark): any | null;
|
|
464
|
+
/**
|
|
465
|
+
* Reverts the effect of a previous call to
|
|
466
|
+
* g_object_freeze_notify(). The freeze count is decreased on `object`
|
|
467
|
+
* and when it reaches zero, queued "notify" signals are emitted.
|
|
468
|
+
*
|
|
469
|
+
* Duplicate notifications for each property are squashed so that at most one
|
|
470
|
+
* #GObject::notify signal is emitted for each property, in the reverse order
|
|
471
|
+
* in which they have been queued.
|
|
472
|
+
*
|
|
473
|
+
* It is an error to call this function when the freeze count is zero.
|
|
474
|
+
*/
|
|
475
|
+
thaw_notify(): void;
|
|
476
|
+
/**
|
|
477
|
+
* Decreases the reference count of `object`. When its reference count
|
|
478
|
+
* drops to 0, the object is finalized (i.e. its memory is freed).
|
|
479
|
+
*
|
|
480
|
+
* If the pointer to the #GObject may be reused in future (for example, if it is
|
|
481
|
+
* an instance variable of another object), it is recommended to clear the
|
|
482
|
+
* pointer to %NULL rather than retain a dangling pointer to a potentially
|
|
483
|
+
* invalid #GObject instance. Use g_clear_object() for this.
|
|
484
|
+
*/
|
|
485
|
+
unref(): void;
|
|
486
|
+
/**
|
|
487
|
+
* This function essentially limits the life time of the `closure` to
|
|
488
|
+
* the life time of the object. That is, when the object is finalized,
|
|
489
|
+
* the `closure` is invalidated by calling g_closure_invalidate() on
|
|
490
|
+
* it, in order to prevent invocations of the closure with a finalized
|
|
491
|
+
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
|
|
492
|
+
* added as marshal guards to the `closure,` to ensure that an extra
|
|
493
|
+
* reference count is held on `object` during invocation of the
|
|
494
|
+
* `closure`. Usually, this function will be called on closures that
|
|
495
|
+
* use this `object` as closure data.
|
|
496
|
+
* @param closure #GClosure to watch
|
|
497
|
+
*/
|
|
498
|
+
watch_closure(closure: GObject.Closure): void;
|
|
499
|
+
vfunc_constructed(): void;
|
|
500
|
+
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
|
|
501
|
+
vfunc_dispose(): void;
|
|
502
|
+
vfunc_finalize(): void;
|
|
503
|
+
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
|
504
|
+
/**
|
|
505
|
+
* Emits a "notify" signal for the property `property_name` on `object`.
|
|
506
|
+
*
|
|
507
|
+
* When possible, eg. when signaling a property change from within the class
|
|
508
|
+
* that registered the property, you should use g_object_notify_by_pspec()
|
|
509
|
+
* instead.
|
|
510
|
+
*
|
|
511
|
+
* Note that emission of the notify signal may be blocked with
|
|
512
|
+
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
|
513
|
+
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
|
514
|
+
* called.
|
|
515
|
+
* @param pspec
|
|
516
|
+
*/
|
|
517
|
+
vfunc_notify(pspec: GObject.ParamSpec): void;
|
|
518
|
+
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
|
519
|
+
disconnect(id: number): void;
|
|
520
|
+
set(properties: { [key: string]: any }): void;
|
|
521
|
+
block_signal_handler(id: number): any;
|
|
522
|
+
unblock_signal_handler(id: number): any;
|
|
523
|
+
stop_emission_by_name(detailedName: string): any;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
module SettingsUiStack {
|
|
527
|
+
// Constructor properties interface
|
|
528
|
+
|
|
529
|
+
interface ConstructorProps
|
|
530
|
+
extends Gtk.Stack.ConstructorProps,
|
|
531
|
+
Atk.ImplementorIface.ConstructorProps,
|
|
532
|
+
Gtk.Buildable.ConstructorProps {}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
class SettingsUiStack extends Gtk.Stack implements Atk.ImplementorIface, Gtk.Buildable {
|
|
536
|
+
static $gtype: GObject.GType<SettingsUiStack>;
|
|
537
|
+
|
|
538
|
+
// Constructors of GPasteGtk.SettingsUiStack
|
|
539
|
+
|
|
540
|
+
constructor(properties?: Partial<SettingsUiStack.ConstructorProps>, ...args: any[]);
|
|
541
|
+
|
|
542
|
+
_init(...args: any[]): void;
|
|
543
|
+
|
|
544
|
+
static ['new'](): SettingsUiStack;
|
|
545
|
+
|
|
546
|
+
// Own methods of GPasteGtk.SettingsUiStack
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Add a new panel to the #GPasteGtkSettingsUiStack
|
|
550
|
+
* @param name the name of the panel
|
|
551
|
+
* @param label the label to display
|
|
552
|
+
* @param panel the #GPasteGtkSettingsUiPanel to add
|
|
553
|
+
*/
|
|
554
|
+
add_panel(name: string, label: string, panel: SettingsUiPanel): void;
|
|
555
|
+
/**
|
|
556
|
+
* Fill the #GPasteGtkSettingsUiStack with default panels
|
|
557
|
+
*/
|
|
558
|
+
fill(): void;
|
|
559
|
+
|
|
560
|
+
// Inherited methods
|
|
561
|
+
/**
|
|
562
|
+
* Creates a binding between `source_property` on `source` and `target_property`
|
|
563
|
+
* on `target`.
|
|
564
|
+
*
|
|
565
|
+
* Whenever the `source_property` is changed the `target_property` is
|
|
566
|
+
* updated using the same value. For instance:
|
|
567
|
+
*
|
|
568
|
+
*
|
|
569
|
+
* ```c
|
|
570
|
+
* g_object_bind_property (action, "active", widget, "sensitive", 0);
|
|
571
|
+
* ```
|
|
572
|
+
*
|
|
573
|
+
*
|
|
574
|
+
* Will result in the "sensitive" property of the widget #GObject instance to be
|
|
575
|
+
* updated with the same value of the "active" property of the action #GObject
|
|
576
|
+
* instance.
|
|
577
|
+
*
|
|
578
|
+
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
|
579
|
+
* if `target_property` on `target` changes then the `source_property` on `source`
|
|
580
|
+
* will be updated as well.
|
|
581
|
+
*
|
|
582
|
+
* The binding will automatically be removed when either the `source` or the
|
|
583
|
+
* `target` instances are finalized. To remove the binding without affecting the
|
|
584
|
+
* `source` and the `target` you can just call g_object_unref() on the returned
|
|
585
|
+
* #GBinding instance.
|
|
586
|
+
*
|
|
587
|
+
* Removing the binding by calling g_object_unref() on it must only be done if
|
|
588
|
+
* the binding, `source` and `target` are only used from a single thread and it
|
|
589
|
+
* is clear that both `source` and `target` outlive the binding. Especially it
|
|
590
|
+
* is not safe to rely on this if the binding, `source` or `target` can be
|
|
591
|
+
* finalized from different threads. Keep another reference to the binding and
|
|
592
|
+
* use g_binding_unbind() instead to be on the safe side.
|
|
593
|
+
*
|
|
594
|
+
* A #GObject can have multiple bindings.
|
|
595
|
+
* @param source_property the property on @source to bind
|
|
596
|
+
* @param target the target #GObject
|
|
597
|
+
* @param target_property the property on @target to bind
|
|
598
|
+
* @param flags flags to pass to #GBinding
|
|
599
|
+
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
600
|
+
*/
|
|
601
|
+
bind_property(
|
|
602
|
+
source_property: string,
|
|
603
|
+
target: GObject.Object,
|
|
604
|
+
target_property: string,
|
|
605
|
+
flags: GObject.BindingFlags,
|
|
606
|
+
): GObject.Binding;
|
|
607
|
+
/**
|
|
608
|
+
* Complete version of g_object_bind_property().
|
|
609
|
+
*
|
|
610
|
+
* Creates a binding between `source_property` on `source` and `target_property`
|
|
611
|
+
* on `target,` allowing you to set the transformation functions to be used by
|
|
612
|
+
* the binding.
|
|
613
|
+
*
|
|
614
|
+
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
|
615
|
+
* if `target_property` on `target` changes then the `source_property` on `source`
|
|
616
|
+
* will be updated as well. The `transform_from` function is only used in case
|
|
617
|
+
* of bidirectional bindings, otherwise it will be ignored
|
|
618
|
+
*
|
|
619
|
+
* The binding will automatically be removed when either the `source` or the
|
|
620
|
+
* `target` instances are finalized. This will release the reference that is
|
|
621
|
+
* being held on the #GBinding instance; if you want to hold on to the
|
|
622
|
+
* #GBinding instance, you will need to hold a reference to it.
|
|
623
|
+
*
|
|
624
|
+
* To remove the binding, call g_binding_unbind().
|
|
625
|
+
*
|
|
626
|
+
* A #GObject can have multiple bindings.
|
|
627
|
+
*
|
|
628
|
+
* The same `user_data` parameter will be used for both `transform_to`
|
|
629
|
+
* and `transform_from` transformation functions; the `notify` function will
|
|
630
|
+
* be called once, when the binding is removed. If you need different data
|
|
631
|
+
* for each transformation function, please use
|
|
632
|
+
* g_object_bind_property_with_closures() instead.
|
|
633
|
+
* @param source_property the property on @source to bind
|
|
634
|
+
* @param target the target #GObject
|
|
635
|
+
* @param target_property the property on @target to bind
|
|
636
|
+
* @param flags flags to pass to #GBinding
|
|
637
|
+
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
|
|
638
|
+
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
|
|
639
|
+
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
|
|
640
|
+
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
641
|
+
*/
|
|
642
|
+
bind_property_full(
|
|
643
|
+
source_property: string,
|
|
644
|
+
target: GObject.Object,
|
|
645
|
+
target_property: string,
|
|
646
|
+
flags: GObject.BindingFlags,
|
|
647
|
+
transform_to?: GObject.BindingTransformFunc | null,
|
|
648
|
+
transform_from?: GObject.BindingTransformFunc | null,
|
|
649
|
+
notify?: GLib.DestroyNotify | null,
|
|
650
|
+
): GObject.Binding;
|
|
651
|
+
// Conflicted with GObject.Object.bind_property_full
|
|
652
|
+
bind_property_full(...args: never[]): any;
|
|
653
|
+
/**
|
|
654
|
+
* This function is intended for #GObject implementations to re-enforce
|
|
655
|
+
* a [floating][floating-ref] object reference. Doing this is seldom
|
|
656
|
+
* required: all #GInitiallyUnowneds are created with a floating reference
|
|
657
|
+
* which usually just needs to be sunken by calling g_object_ref_sink().
|
|
658
|
+
*/
|
|
659
|
+
force_floating(): void;
|
|
660
|
+
/**
|
|
661
|
+
* Increases the freeze count on `object`. If the freeze count is
|
|
662
|
+
* non-zero, the emission of "notify" signals on `object` is
|
|
663
|
+
* stopped. The signals are queued until the freeze count is decreased
|
|
664
|
+
* to zero. Duplicate notifications are squashed so that at most one
|
|
665
|
+
* #GObject::notify signal is emitted for each property modified while the
|
|
666
|
+
* object is frozen.
|
|
667
|
+
*
|
|
668
|
+
* This is necessary for accessors that modify multiple properties to prevent
|
|
669
|
+
* premature notification while the object is still being modified.
|
|
670
|
+
*/
|
|
671
|
+
freeze_notify(): void;
|
|
672
|
+
/**
|
|
673
|
+
* Gets a named field from the objects table of associations (see g_object_set_data()).
|
|
674
|
+
* @param key name of the key for that association
|
|
675
|
+
* @returns the data if found, or %NULL if no such data exists.
|
|
676
|
+
*/
|
|
677
|
+
get_data(key: string): any | null;
|
|
678
|
+
get_property(property_name: string): any;
|
|
679
|
+
/**
|
|
680
|
+
* This function gets back user data pointers stored via
|
|
681
|
+
* g_object_set_qdata().
|
|
682
|
+
* @param quark A #GQuark, naming the user data pointer
|
|
683
|
+
* @returns The user data pointer set, or %NULL
|
|
684
|
+
*/
|
|
685
|
+
get_qdata(quark: GLib.Quark): any | null;
|
|
686
|
+
/**
|
|
687
|
+
* Gets `n_properties` properties for an `object`.
|
|
688
|
+
* Obtained properties will be set to `values`. All properties must be valid.
|
|
689
|
+
* Warnings will be emitted and undefined behaviour may result if invalid
|
|
690
|
+
* properties are passed in.
|
|
691
|
+
* @param names the names of each property to get
|
|
692
|
+
* @param values the values of each property to get
|
|
693
|
+
*/
|
|
694
|
+
getv(names: string[], values: (GObject.Value | any)[]): void;
|
|
695
|
+
/**
|
|
696
|
+
* Checks whether `object` has a [floating][floating-ref] reference.
|
|
697
|
+
* @returns %TRUE if @object has a floating reference
|
|
698
|
+
*/
|
|
699
|
+
is_floating(): boolean;
|
|
700
|
+
/**
|
|
701
|
+
* Emits a "notify" signal for the property `property_name` on `object`.
|
|
702
|
+
*
|
|
703
|
+
* When possible, eg. when signaling a property change from within the class
|
|
704
|
+
* that registered the property, you should use g_object_notify_by_pspec()
|
|
705
|
+
* instead.
|
|
706
|
+
*
|
|
707
|
+
* Note that emission of the notify signal may be blocked with
|
|
708
|
+
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
|
709
|
+
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
|
710
|
+
* called.
|
|
711
|
+
* @param property_name the name of a property installed on the class of @object.
|
|
712
|
+
*/
|
|
713
|
+
notify(property_name: string): void;
|
|
714
|
+
/**
|
|
715
|
+
* Emits a "notify" signal for the property specified by `pspec` on `object`.
|
|
716
|
+
*
|
|
717
|
+
* This function omits the property name lookup, hence it is faster than
|
|
718
|
+
* g_object_notify().
|
|
719
|
+
*
|
|
720
|
+
* One way to avoid using g_object_notify() from within the
|
|
721
|
+
* class that registered the properties, and using g_object_notify_by_pspec()
|
|
722
|
+
* instead, is to store the GParamSpec used with
|
|
723
|
+
* g_object_class_install_property() inside a static array, e.g.:
|
|
724
|
+
*
|
|
725
|
+
*
|
|
726
|
+
* ```c
|
|
727
|
+
* typedef enum
|
|
728
|
+
* {
|
|
729
|
+
* PROP_FOO = 1,
|
|
730
|
+
* PROP_LAST
|
|
731
|
+
* } MyObjectProperty;
|
|
732
|
+
*
|
|
733
|
+
* static GParamSpec *properties[PROP_LAST];
|
|
734
|
+
*
|
|
735
|
+
* static void
|
|
736
|
+
* my_object_class_init (MyObjectClass *klass)
|
|
737
|
+
* {
|
|
738
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
739
|
+
* 0, 100,
|
|
740
|
+
* 50,
|
|
741
|
+
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
742
|
+
* g_object_class_install_property (gobject_class,
|
|
743
|
+
* PROP_FOO,
|
|
744
|
+
* properties[PROP_FOO]);
|
|
745
|
+
* }
|
|
746
|
+
* ```
|
|
747
|
+
*
|
|
748
|
+
*
|
|
749
|
+
* and then notify a change on the "foo" property with:
|
|
750
|
+
*
|
|
751
|
+
*
|
|
752
|
+
* ```c
|
|
753
|
+
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
|
|
754
|
+
* ```
|
|
755
|
+
*
|
|
756
|
+
* @param pspec the #GParamSpec of a property installed on the class of @object.
|
|
757
|
+
*/
|
|
758
|
+
notify_by_pspec(pspec: GObject.ParamSpec): void;
|
|
759
|
+
/**
|
|
760
|
+
* Increases the reference count of `object`.
|
|
761
|
+
*
|
|
762
|
+
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
|
|
763
|
+
* of `object` will be propagated to the return type (using the GCC typeof()
|
|
764
|
+
* extension), so any casting the caller needs to do on the return type must be
|
|
765
|
+
* explicit.
|
|
766
|
+
* @returns the same @object
|
|
767
|
+
*/
|
|
768
|
+
ref(): GObject.Object;
|
|
769
|
+
/**
|
|
770
|
+
* Increase the reference count of `object,` and possibly remove the
|
|
771
|
+
* [floating][floating-ref] reference, if `object` has a floating reference.
|
|
772
|
+
*
|
|
773
|
+
* In other words, if the object is floating, then this call "assumes
|
|
774
|
+
* ownership" of the floating reference, converting it to a normal
|
|
775
|
+
* reference by clearing the floating flag while leaving the reference
|
|
776
|
+
* count unchanged. If the object is not floating, then this call
|
|
777
|
+
* adds a new normal reference increasing the reference count by one.
|
|
778
|
+
*
|
|
779
|
+
* Since GLib 2.56, the type of `object` will be propagated to the return type
|
|
780
|
+
* under the same conditions as for g_object_ref().
|
|
781
|
+
* @returns @object
|
|
782
|
+
*/
|
|
783
|
+
ref_sink(): GObject.Object;
|
|
784
|
+
/**
|
|
785
|
+
* Releases all references to other objects. This can be used to break
|
|
786
|
+
* reference cycles.
|
|
787
|
+
*
|
|
788
|
+
* This function should only be called from object system implementations.
|
|
789
|
+
*/
|
|
790
|
+
run_dispose(): void;
|
|
791
|
+
/**
|
|
792
|
+
* Each object carries around a table of associations from
|
|
793
|
+
* strings to pointers. This function lets you set an association.
|
|
794
|
+
*
|
|
795
|
+
* If the object already had an association with that name,
|
|
796
|
+
* the old association will be destroyed.
|
|
797
|
+
*
|
|
798
|
+
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
|
|
799
|
+
* This means a copy of `key` is kept permanently (even after `object` has been
|
|
800
|
+
* finalized) — so it is recommended to only use a small, bounded set of values
|
|
801
|
+
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
|
|
802
|
+
* @param key name of the key
|
|
803
|
+
* @param data data to associate with that key
|
|
804
|
+
*/
|
|
805
|
+
set_data(key: string, data?: any | null): void;
|
|
806
|
+
set_property(property_name: string, value: any): void;
|
|
807
|
+
/**
|
|
808
|
+
* Remove a specified datum from the object's data associations,
|
|
809
|
+
* without invoking the association's destroy handler.
|
|
810
|
+
* @param key name of the key
|
|
811
|
+
* @returns the data if found, or %NULL if no such data exists.
|
|
812
|
+
*/
|
|
813
|
+
steal_data(key: string): any | null;
|
|
814
|
+
/**
|
|
815
|
+
* This function gets back user data pointers stored via
|
|
816
|
+
* g_object_set_qdata() and removes the `data` from object
|
|
817
|
+
* without invoking its destroy() function (if any was
|
|
818
|
+
* set).
|
|
819
|
+
* Usually, calling this function is only required to update
|
|
820
|
+
* user data pointers with a destroy notifier, for example:
|
|
821
|
+
*
|
|
822
|
+
* ```c
|
|
823
|
+
* void
|
|
824
|
+
* object_add_to_user_list (GObject *object,
|
|
825
|
+
* const gchar *new_string)
|
|
826
|
+
* {
|
|
827
|
+
* // the quark, naming the object data
|
|
828
|
+
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
|
|
829
|
+
* // retrieve the old string list
|
|
830
|
+
* GList *list = g_object_steal_qdata (object, quark_string_list);
|
|
831
|
+
*
|
|
832
|
+
* // prepend new string
|
|
833
|
+
* list = g_list_prepend (list, g_strdup (new_string));
|
|
834
|
+
* // this changed 'list', so we need to set it again
|
|
835
|
+
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
|
|
836
|
+
* }
|
|
837
|
+
* static void
|
|
838
|
+
* free_string_list (gpointer data)
|
|
839
|
+
* {
|
|
840
|
+
* GList *node, *list = data;
|
|
841
|
+
*
|
|
842
|
+
* for (node = list; node; node = node->next)
|
|
843
|
+
* g_free (node->data);
|
|
844
|
+
* g_list_free (list);
|
|
845
|
+
* }
|
|
846
|
+
* ```
|
|
847
|
+
*
|
|
848
|
+
* Using g_object_get_qdata() in the above example, instead of
|
|
849
|
+
* g_object_steal_qdata() would have left the destroy function set,
|
|
850
|
+
* and thus the partial string list would have been freed upon
|
|
851
|
+
* g_object_set_qdata_full().
|
|
852
|
+
* @param quark A #GQuark, naming the user data pointer
|
|
853
|
+
* @returns The user data pointer set, or %NULL
|
|
854
|
+
*/
|
|
855
|
+
steal_qdata(quark: GLib.Quark): any | null;
|
|
856
|
+
/**
|
|
857
|
+
* Reverts the effect of a previous call to
|
|
858
|
+
* g_object_freeze_notify(). The freeze count is decreased on `object`
|
|
859
|
+
* and when it reaches zero, queued "notify" signals are emitted.
|
|
860
|
+
*
|
|
861
|
+
* Duplicate notifications for each property are squashed so that at most one
|
|
862
|
+
* #GObject::notify signal is emitted for each property, in the reverse order
|
|
863
|
+
* in which they have been queued.
|
|
864
|
+
*
|
|
865
|
+
* It is an error to call this function when the freeze count is zero.
|
|
866
|
+
*/
|
|
867
|
+
thaw_notify(): void;
|
|
868
|
+
/**
|
|
869
|
+
* Decreases the reference count of `object`. When its reference count
|
|
870
|
+
* drops to 0, the object is finalized (i.e. its memory is freed).
|
|
871
|
+
*
|
|
872
|
+
* If the pointer to the #GObject may be reused in future (for example, if it is
|
|
873
|
+
* an instance variable of another object), it is recommended to clear the
|
|
874
|
+
* pointer to %NULL rather than retain a dangling pointer to a potentially
|
|
875
|
+
* invalid #GObject instance. Use g_clear_object() for this.
|
|
876
|
+
*/
|
|
877
|
+
unref(): void;
|
|
878
|
+
/**
|
|
879
|
+
* This function essentially limits the life time of the `closure` to
|
|
880
|
+
* the life time of the object. That is, when the object is finalized,
|
|
881
|
+
* the `closure` is invalidated by calling g_closure_invalidate() on
|
|
882
|
+
* it, in order to prevent invocations of the closure with a finalized
|
|
883
|
+
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
|
|
884
|
+
* added as marshal guards to the `closure,` to ensure that an extra
|
|
885
|
+
* reference count is held on `object` during invocation of the
|
|
886
|
+
* `closure`. Usually, this function will be called on closures that
|
|
887
|
+
* use this `object` as closure data.
|
|
888
|
+
* @param closure #GClosure to watch
|
|
889
|
+
*/
|
|
890
|
+
watch_closure(closure: GObject.Closure): void;
|
|
891
|
+
vfunc_constructed(): void;
|
|
892
|
+
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
|
|
893
|
+
vfunc_dispose(): void;
|
|
894
|
+
vfunc_finalize(): void;
|
|
895
|
+
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
|
896
|
+
/**
|
|
897
|
+
* Emits a "notify" signal for the property `property_name` on `object`.
|
|
898
|
+
*
|
|
899
|
+
* When possible, eg. when signaling a property change from within the class
|
|
900
|
+
* that registered the property, you should use g_object_notify_by_pspec()
|
|
901
|
+
* instead.
|
|
902
|
+
*
|
|
903
|
+
* Note that emission of the notify signal may be blocked with
|
|
904
|
+
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
|
905
|
+
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
|
906
|
+
* called.
|
|
907
|
+
* @param pspec
|
|
908
|
+
*/
|
|
909
|
+
vfunc_notify(pspec: GObject.ParamSpec): void;
|
|
910
|
+
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
|
911
|
+
disconnect(id: number): void;
|
|
912
|
+
set(properties: { [key: string]: any }): void;
|
|
913
|
+
block_signal_handler(id: number): any;
|
|
914
|
+
unblock_signal_handler(id: number): any;
|
|
915
|
+
stop_emission_by_name(detailedName: string): any;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
module SettingsUiWidget {
|
|
919
|
+
// Constructor properties interface
|
|
920
|
+
|
|
921
|
+
interface ConstructorProps
|
|
922
|
+
extends Gtk.Grid.ConstructorProps,
|
|
923
|
+
Atk.ImplementorIface.ConstructorProps,
|
|
924
|
+
Gtk.Buildable.ConstructorProps,
|
|
925
|
+
Gtk.Orientable.ConstructorProps {}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
class SettingsUiWidget extends Gtk.Grid implements Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable {
|
|
929
|
+
static $gtype: GObject.GType<SettingsUiWidget>;
|
|
930
|
+
|
|
931
|
+
// Constructors of GPasteGtk.SettingsUiWidget
|
|
932
|
+
|
|
933
|
+
constructor(properties?: Partial<SettingsUiWidget.ConstructorProps>, ...args: any[]);
|
|
934
|
+
|
|
935
|
+
_init(...args: any[]): void;
|
|
936
|
+
|
|
937
|
+
static ['new'](): SettingsUiWidget;
|
|
938
|
+
|
|
939
|
+
// Own methods of GPasteGtk.SettingsUiWidget
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Get the inner GtkStack from the Widget
|
|
943
|
+
* @returns the #GtkStack
|
|
944
|
+
*/
|
|
945
|
+
get_stack(): SettingsUiStack;
|
|
946
|
+
|
|
947
|
+
// Inherited properties
|
|
948
|
+
/**
|
|
949
|
+
* The orientation of the orientable.
|
|
950
|
+
*/
|
|
951
|
+
get orientation(): Gtk.Orientation;
|
|
952
|
+
set orientation(val: Gtk.Orientation);
|
|
953
|
+
|
|
954
|
+
// Inherited methods
|
|
955
|
+
/**
|
|
956
|
+
* Retrieves the orientation of the `orientable`.
|
|
957
|
+
* @returns the orientation of the @orientable.
|
|
958
|
+
*/
|
|
959
|
+
get_orientation(): Gtk.Orientation;
|
|
960
|
+
/**
|
|
961
|
+
* Sets the orientation of the `orientable`.
|
|
962
|
+
* @param orientation the orientable’s new orientation.
|
|
963
|
+
*/
|
|
964
|
+
set_orientation(orientation: Gtk.Orientation): void;
|
|
965
|
+
/**
|
|
966
|
+
* Creates a binding between `source_property` on `source` and `target_property`
|
|
967
|
+
* on `target`.
|
|
968
|
+
*
|
|
969
|
+
* Whenever the `source_property` is changed the `target_property` is
|
|
970
|
+
* updated using the same value. For instance:
|
|
971
|
+
*
|
|
972
|
+
*
|
|
973
|
+
* ```c
|
|
974
|
+
* g_object_bind_property (action, "active", widget, "sensitive", 0);
|
|
975
|
+
* ```
|
|
976
|
+
*
|
|
977
|
+
*
|
|
978
|
+
* Will result in the "sensitive" property of the widget #GObject instance to be
|
|
979
|
+
* updated with the same value of the "active" property of the action #GObject
|
|
980
|
+
* instance.
|
|
981
|
+
*
|
|
982
|
+
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
|
983
|
+
* if `target_property` on `target` changes then the `source_property` on `source`
|
|
984
|
+
* will be updated as well.
|
|
985
|
+
*
|
|
986
|
+
* The binding will automatically be removed when either the `source` or the
|
|
987
|
+
* `target` instances are finalized. To remove the binding without affecting the
|
|
988
|
+
* `source` and the `target` you can just call g_object_unref() on the returned
|
|
989
|
+
* #GBinding instance.
|
|
990
|
+
*
|
|
991
|
+
* Removing the binding by calling g_object_unref() on it must only be done if
|
|
992
|
+
* the binding, `source` and `target` are only used from a single thread and it
|
|
993
|
+
* is clear that both `source` and `target` outlive the binding. Especially it
|
|
994
|
+
* is not safe to rely on this if the binding, `source` or `target` can be
|
|
995
|
+
* finalized from different threads. Keep another reference to the binding and
|
|
996
|
+
* use g_binding_unbind() instead to be on the safe side.
|
|
997
|
+
*
|
|
998
|
+
* A #GObject can have multiple bindings.
|
|
999
|
+
* @param source_property the property on @source to bind
|
|
1000
|
+
* @param target the target #GObject
|
|
1001
|
+
* @param target_property the property on @target to bind
|
|
1002
|
+
* @param flags flags to pass to #GBinding
|
|
1003
|
+
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
1004
|
+
*/
|
|
1005
|
+
bind_property(
|
|
1006
|
+
source_property: string,
|
|
1007
|
+
target: GObject.Object,
|
|
1008
|
+
target_property: string,
|
|
1009
|
+
flags: GObject.BindingFlags,
|
|
1010
|
+
): GObject.Binding;
|
|
1011
|
+
/**
|
|
1012
|
+
* Complete version of g_object_bind_property().
|
|
1013
|
+
*
|
|
1014
|
+
* Creates a binding between `source_property` on `source` and `target_property`
|
|
1015
|
+
* on `target,` allowing you to set the transformation functions to be used by
|
|
1016
|
+
* the binding.
|
|
1017
|
+
*
|
|
1018
|
+
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
|
1019
|
+
* if `target_property` on `target` changes then the `source_property` on `source`
|
|
1020
|
+
* will be updated as well. The `transform_from` function is only used in case
|
|
1021
|
+
* of bidirectional bindings, otherwise it will be ignored
|
|
1022
|
+
*
|
|
1023
|
+
* The binding will automatically be removed when either the `source` or the
|
|
1024
|
+
* `target` instances are finalized. This will release the reference that is
|
|
1025
|
+
* being held on the #GBinding instance; if you want to hold on to the
|
|
1026
|
+
* #GBinding instance, you will need to hold a reference to it.
|
|
1027
|
+
*
|
|
1028
|
+
* To remove the binding, call g_binding_unbind().
|
|
1029
|
+
*
|
|
1030
|
+
* A #GObject can have multiple bindings.
|
|
1031
|
+
*
|
|
1032
|
+
* The same `user_data` parameter will be used for both `transform_to`
|
|
1033
|
+
* and `transform_from` transformation functions; the `notify` function will
|
|
1034
|
+
* be called once, when the binding is removed. If you need different data
|
|
1035
|
+
* for each transformation function, please use
|
|
1036
|
+
* g_object_bind_property_with_closures() instead.
|
|
1037
|
+
* @param source_property the property on @source to bind
|
|
1038
|
+
* @param target the target #GObject
|
|
1039
|
+
* @param target_property the property on @target to bind
|
|
1040
|
+
* @param flags flags to pass to #GBinding
|
|
1041
|
+
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
|
|
1042
|
+
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
|
|
1043
|
+
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
|
|
1044
|
+
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
1045
|
+
*/
|
|
1046
|
+
bind_property_full(
|
|
1047
|
+
source_property: string,
|
|
1048
|
+
target: GObject.Object,
|
|
1049
|
+
target_property: string,
|
|
1050
|
+
flags: GObject.BindingFlags,
|
|
1051
|
+
transform_to?: GObject.BindingTransformFunc | null,
|
|
1052
|
+
transform_from?: GObject.BindingTransformFunc | null,
|
|
1053
|
+
notify?: GLib.DestroyNotify | null,
|
|
1054
|
+
): GObject.Binding;
|
|
1055
|
+
// Conflicted with GObject.Object.bind_property_full
|
|
1056
|
+
bind_property_full(...args: never[]): any;
|
|
1057
|
+
/**
|
|
1058
|
+
* This function is intended for #GObject implementations to re-enforce
|
|
1059
|
+
* a [floating][floating-ref] object reference. Doing this is seldom
|
|
1060
|
+
* required: all #GInitiallyUnowneds are created with a floating reference
|
|
1061
|
+
* which usually just needs to be sunken by calling g_object_ref_sink().
|
|
1062
|
+
*/
|
|
1063
|
+
force_floating(): void;
|
|
1064
|
+
/**
|
|
1065
|
+
* Increases the freeze count on `object`. If the freeze count is
|
|
1066
|
+
* non-zero, the emission of "notify" signals on `object` is
|
|
1067
|
+
* stopped. The signals are queued until the freeze count is decreased
|
|
1068
|
+
* to zero. Duplicate notifications are squashed so that at most one
|
|
1069
|
+
* #GObject::notify signal is emitted for each property modified while the
|
|
1070
|
+
* object is frozen.
|
|
1071
|
+
*
|
|
1072
|
+
* This is necessary for accessors that modify multiple properties to prevent
|
|
1073
|
+
* premature notification while the object is still being modified.
|
|
1074
|
+
*/
|
|
1075
|
+
freeze_notify(): void;
|
|
1076
|
+
/**
|
|
1077
|
+
* Gets a named field from the objects table of associations (see g_object_set_data()).
|
|
1078
|
+
* @param key name of the key for that association
|
|
1079
|
+
* @returns the data if found, or %NULL if no such data exists.
|
|
1080
|
+
*/
|
|
1081
|
+
get_data(key: string): any | null;
|
|
1082
|
+
get_property(property_name: string): any;
|
|
1083
|
+
/**
|
|
1084
|
+
* This function gets back user data pointers stored via
|
|
1085
|
+
* g_object_set_qdata().
|
|
1086
|
+
* @param quark A #GQuark, naming the user data pointer
|
|
1087
|
+
* @returns The user data pointer set, or %NULL
|
|
1088
|
+
*/
|
|
1089
|
+
get_qdata(quark: GLib.Quark): any | null;
|
|
1090
|
+
/**
|
|
1091
|
+
* Gets `n_properties` properties for an `object`.
|
|
1092
|
+
* Obtained properties will be set to `values`. All properties must be valid.
|
|
1093
|
+
* Warnings will be emitted and undefined behaviour may result if invalid
|
|
1094
|
+
* properties are passed in.
|
|
1095
|
+
* @param names the names of each property to get
|
|
1096
|
+
* @param values the values of each property to get
|
|
1097
|
+
*/
|
|
1098
|
+
getv(names: string[], values: (GObject.Value | any)[]): void;
|
|
1099
|
+
/**
|
|
1100
|
+
* Checks whether `object` has a [floating][floating-ref] reference.
|
|
1101
|
+
* @returns %TRUE if @object has a floating reference
|
|
1102
|
+
*/
|
|
1103
|
+
is_floating(): boolean;
|
|
1104
|
+
/**
|
|
1105
|
+
* Emits a "notify" signal for the property `property_name` on `object`.
|
|
1106
|
+
*
|
|
1107
|
+
* When possible, eg. when signaling a property change from within the class
|
|
1108
|
+
* that registered the property, you should use g_object_notify_by_pspec()
|
|
1109
|
+
* instead.
|
|
1110
|
+
*
|
|
1111
|
+
* Note that emission of the notify signal may be blocked with
|
|
1112
|
+
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
|
1113
|
+
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
|
1114
|
+
* called.
|
|
1115
|
+
* @param property_name the name of a property installed on the class of @object.
|
|
1116
|
+
*/
|
|
1117
|
+
notify(property_name: string): void;
|
|
1118
|
+
/**
|
|
1119
|
+
* Emits a "notify" signal for the property specified by `pspec` on `object`.
|
|
1120
|
+
*
|
|
1121
|
+
* This function omits the property name lookup, hence it is faster than
|
|
1122
|
+
* g_object_notify().
|
|
1123
|
+
*
|
|
1124
|
+
* One way to avoid using g_object_notify() from within the
|
|
1125
|
+
* class that registered the properties, and using g_object_notify_by_pspec()
|
|
1126
|
+
* instead, is to store the GParamSpec used with
|
|
1127
|
+
* g_object_class_install_property() inside a static array, e.g.:
|
|
1128
|
+
*
|
|
1129
|
+
*
|
|
1130
|
+
* ```c
|
|
1131
|
+
* typedef enum
|
|
1132
|
+
* {
|
|
1133
|
+
* PROP_FOO = 1,
|
|
1134
|
+
* PROP_LAST
|
|
1135
|
+
* } MyObjectProperty;
|
|
1136
|
+
*
|
|
1137
|
+
* static GParamSpec *properties[PROP_LAST];
|
|
1138
|
+
*
|
|
1139
|
+
* static void
|
|
1140
|
+
* my_object_class_init (MyObjectClass *klass)
|
|
1141
|
+
* {
|
|
1142
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
1143
|
+
* 0, 100,
|
|
1144
|
+
* 50,
|
|
1145
|
+
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
1146
|
+
* g_object_class_install_property (gobject_class,
|
|
1147
|
+
* PROP_FOO,
|
|
1148
|
+
* properties[PROP_FOO]);
|
|
1149
|
+
* }
|
|
1150
|
+
* ```
|
|
1151
|
+
*
|
|
1152
|
+
*
|
|
1153
|
+
* and then notify a change on the "foo" property with:
|
|
1154
|
+
*
|
|
1155
|
+
*
|
|
1156
|
+
* ```c
|
|
1157
|
+
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
|
|
1158
|
+
* ```
|
|
1159
|
+
*
|
|
1160
|
+
* @param pspec the #GParamSpec of a property installed on the class of @object.
|
|
1161
|
+
*/
|
|
1162
|
+
notify_by_pspec(pspec: GObject.ParamSpec): void;
|
|
1163
|
+
/**
|
|
1164
|
+
* Increases the reference count of `object`.
|
|
1165
|
+
*
|
|
1166
|
+
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
|
|
1167
|
+
* of `object` will be propagated to the return type (using the GCC typeof()
|
|
1168
|
+
* extension), so any casting the caller needs to do on the return type must be
|
|
1169
|
+
* explicit.
|
|
1170
|
+
* @returns the same @object
|
|
1171
|
+
*/
|
|
1172
|
+
ref(): GObject.Object;
|
|
1173
|
+
/**
|
|
1174
|
+
* Increase the reference count of `object,` and possibly remove the
|
|
1175
|
+
* [floating][floating-ref] reference, if `object` has a floating reference.
|
|
1176
|
+
*
|
|
1177
|
+
* In other words, if the object is floating, then this call "assumes
|
|
1178
|
+
* ownership" of the floating reference, converting it to a normal
|
|
1179
|
+
* reference by clearing the floating flag while leaving the reference
|
|
1180
|
+
* count unchanged. If the object is not floating, then this call
|
|
1181
|
+
* adds a new normal reference increasing the reference count by one.
|
|
1182
|
+
*
|
|
1183
|
+
* Since GLib 2.56, the type of `object` will be propagated to the return type
|
|
1184
|
+
* under the same conditions as for g_object_ref().
|
|
1185
|
+
* @returns @object
|
|
1186
|
+
*/
|
|
1187
|
+
ref_sink(): GObject.Object;
|
|
1188
|
+
/**
|
|
1189
|
+
* Releases all references to other objects. This can be used to break
|
|
1190
|
+
* reference cycles.
|
|
1191
|
+
*
|
|
1192
|
+
* This function should only be called from object system implementations.
|
|
1193
|
+
*/
|
|
1194
|
+
run_dispose(): void;
|
|
1195
|
+
/**
|
|
1196
|
+
* Each object carries around a table of associations from
|
|
1197
|
+
* strings to pointers. This function lets you set an association.
|
|
1198
|
+
*
|
|
1199
|
+
* If the object already had an association with that name,
|
|
1200
|
+
* the old association will be destroyed.
|
|
1201
|
+
*
|
|
1202
|
+
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
|
|
1203
|
+
* This means a copy of `key` is kept permanently (even after `object` has been
|
|
1204
|
+
* finalized) — so it is recommended to only use a small, bounded set of values
|
|
1205
|
+
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
|
|
1206
|
+
* @param key name of the key
|
|
1207
|
+
* @param data data to associate with that key
|
|
1208
|
+
*/
|
|
1209
|
+
set_data(key: string, data?: any | null): void;
|
|
1210
|
+
set_property(property_name: string, value: any): void;
|
|
1211
|
+
/**
|
|
1212
|
+
* Remove a specified datum from the object's data associations,
|
|
1213
|
+
* without invoking the association's destroy handler.
|
|
1214
|
+
* @param key name of the key
|
|
1215
|
+
* @returns the data if found, or %NULL if no such data exists.
|
|
1216
|
+
*/
|
|
1217
|
+
steal_data(key: string): any | null;
|
|
1218
|
+
/**
|
|
1219
|
+
* This function gets back user data pointers stored via
|
|
1220
|
+
* g_object_set_qdata() and removes the `data` from object
|
|
1221
|
+
* without invoking its destroy() function (if any was
|
|
1222
|
+
* set).
|
|
1223
|
+
* Usually, calling this function is only required to update
|
|
1224
|
+
* user data pointers with a destroy notifier, for example:
|
|
1225
|
+
*
|
|
1226
|
+
* ```c
|
|
1227
|
+
* void
|
|
1228
|
+
* object_add_to_user_list (GObject *object,
|
|
1229
|
+
* const gchar *new_string)
|
|
1230
|
+
* {
|
|
1231
|
+
* // the quark, naming the object data
|
|
1232
|
+
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
|
|
1233
|
+
* // retrieve the old string list
|
|
1234
|
+
* GList *list = g_object_steal_qdata (object, quark_string_list);
|
|
1235
|
+
*
|
|
1236
|
+
* // prepend new string
|
|
1237
|
+
* list = g_list_prepend (list, g_strdup (new_string));
|
|
1238
|
+
* // this changed 'list', so we need to set it again
|
|
1239
|
+
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
|
|
1240
|
+
* }
|
|
1241
|
+
* static void
|
|
1242
|
+
* free_string_list (gpointer data)
|
|
1243
|
+
* {
|
|
1244
|
+
* GList *node, *list = data;
|
|
1245
|
+
*
|
|
1246
|
+
* for (node = list; node; node = node->next)
|
|
1247
|
+
* g_free (node->data);
|
|
1248
|
+
* g_list_free (list);
|
|
1249
|
+
* }
|
|
1250
|
+
* ```
|
|
1251
|
+
*
|
|
1252
|
+
* Using g_object_get_qdata() in the above example, instead of
|
|
1253
|
+
* g_object_steal_qdata() would have left the destroy function set,
|
|
1254
|
+
* and thus the partial string list would have been freed upon
|
|
1255
|
+
* g_object_set_qdata_full().
|
|
1256
|
+
* @param quark A #GQuark, naming the user data pointer
|
|
1257
|
+
* @returns The user data pointer set, or %NULL
|
|
1258
|
+
*/
|
|
1259
|
+
steal_qdata(quark: GLib.Quark): any | null;
|
|
1260
|
+
/**
|
|
1261
|
+
* Reverts the effect of a previous call to
|
|
1262
|
+
* g_object_freeze_notify(). The freeze count is decreased on `object`
|
|
1263
|
+
* and when it reaches zero, queued "notify" signals are emitted.
|
|
1264
|
+
*
|
|
1265
|
+
* Duplicate notifications for each property are squashed so that at most one
|
|
1266
|
+
* #GObject::notify signal is emitted for each property, in the reverse order
|
|
1267
|
+
* in which they have been queued.
|
|
1268
|
+
*
|
|
1269
|
+
* It is an error to call this function when the freeze count is zero.
|
|
1270
|
+
*/
|
|
1271
|
+
thaw_notify(): void;
|
|
1272
|
+
/**
|
|
1273
|
+
* Decreases the reference count of `object`. When its reference count
|
|
1274
|
+
* drops to 0, the object is finalized (i.e. its memory is freed).
|
|
1275
|
+
*
|
|
1276
|
+
* If the pointer to the #GObject may be reused in future (for example, if it is
|
|
1277
|
+
* an instance variable of another object), it is recommended to clear the
|
|
1278
|
+
* pointer to %NULL rather than retain a dangling pointer to a potentially
|
|
1279
|
+
* invalid #GObject instance. Use g_clear_object() for this.
|
|
1280
|
+
*/
|
|
1281
|
+
unref(): void;
|
|
1282
|
+
/**
|
|
1283
|
+
* This function essentially limits the life time of the `closure` to
|
|
1284
|
+
* the life time of the object. That is, when the object is finalized,
|
|
1285
|
+
* the `closure` is invalidated by calling g_closure_invalidate() on
|
|
1286
|
+
* it, in order to prevent invocations of the closure with a finalized
|
|
1287
|
+
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
|
|
1288
|
+
* added as marshal guards to the `closure,` to ensure that an extra
|
|
1289
|
+
* reference count is held on `object` during invocation of the
|
|
1290
|
+
* `closure`. Usually, this function will be called on closures that
|
|
1291
|
+
* use this `object` as closure data.
|
|
1292
|
+
* @param closure #GClosure to watch
|
|
1293
|
+
*/
|
|
1294
|
+
watch_closure(closure: GObject.Closure): void;
|
|
1295
|
+
vfunc_constructed(): void;
|
|
1296
|
+
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
|
|
1297
|
+
vfunc_dispose(): void;
|
|
1298
|
+
vfunc_finalize(): void;
|
|
1299
|
+
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
|
1300
|
+
/**
|
|
1301
|
+
* Emits a "notify" signal for the property `property_name` on `object`.
|
|
1302
|
+
*
|
|
1303
|
+
* When possible, eg. when signaling a property change from within the class
|
|
1304
|
+
* that registered the property, you should use g_object_notify_by_pspec()
|
|
1305
|
+
* instead.
|
|
1306
|
+
*
|
|
1307
|
+
* Note that emission of the notify signal may be blocked with
|
|
1308
|
+
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
|
1309
|
+
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
|
1310
|
+
* called.
|
|
1311
|
+
* @param pspec
|
|
1312
|
+
*/
|
|
1313
|
+
vfunc_notify(pspec: GObject.ParamSpec): void;
|
|
1314
|
+
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
|
1315
|
+
disconnect(id: number): void;
|
|
1316
|
+
set(properties: { [key: string]: any }): void;
|
|
1317
|
+
block_signal_handler(id: number): any;
|
|
1318
|
+
unblock_signal_handler(id: number): any;
|
|
1319
|
+
stop_emission_by_name(detailedName: string): any;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
type SettingsUiPanelClass = typeof SettingsUiPanel;
|
|
1323
|
+
type SettingsUiStackClass = typeof SettingsUiStack;
|
|
1324
|
+
type SettingsUiWidgetClass = typeof SettingsUiWidget;
|
|
1325
|
+
/**
|
|
1326
|
+
* Name of the imported GIR library
|
|
1327
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
1328
|
+
*/
|
|
1329
|
+
const __name__: string;
|
|
1330
|
+
/**
|
|
1331
|
+
* Version of the imported GIR library
|
|
1332
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
1333
|
+
*/
|
|
1334
|
+
const __version__: string;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
export default GPasteGtk;
|
|
1338
|
+
// END
|