@girs/dbusmenugtk-0.4 0.4.0-3.0.0-beta.12

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 ADDED
@@ -0,0 +1,31 @@
1
+
2
+ # DbusmenuGtk-0.4
3
+
4
+ GJS TypeScript type definitions for DbusmenuGtk-0.4, generated from library version 0.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.12.
5
+
6
+ ## Install
7
+
8
+ To use this type definitions, install them with NPM like this:
9
+ ```bash
10
+ npm install @girs/dbusmenugtk-0.4
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ You can import this package into your project like this:
16
+ ```ts
17
+ import DbusmenuGtk from '@girs/dbusmenugtk-0.4';
18
+ ```
19
+
20
+ Or if you prefer CommonJS, you can also use this:
21
+ ```ts
22
+ const DbusmenuGtk = require('@girs/dbusmenugtk-0.4');
23
+ ```
24
+
25
+ If you use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules), you can also import this module like you would do this in JavaScript:
26
+
27
+ ```ts
28
+ import DbusmenuGtk from 'gi://DbusmenuGtk?version=0.4';
29
+ ```
30
+
31
+ Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
@@ -0,0 +1,9 @@
1
+
2
+
3
+ imports.gi.versions.DbusmenuGtk = '0.4'
4
+ const DbusmenuGtk = imports.gi.DbusmenuGtk;
5
+
6
+ module.exports = DbusmenuGtk;
7
+
8
+
9
+
@@ -0,0 +1,563 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
7
+ */
8
+ /**
9
+ * DbusmenuGtk-0.4
10
+ */
11
+
12
+ import type Gtk from '@girs/gtk-2.0';
13
+ import type Gdk from '@girs/gdk-2.0';
14
+ import type cairo from '@girs/cairo-1.0';
15
+ import type Pango from '@girs/pango-1.0';
16
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
17
+ import type freetype2 from '@girs/freetype2-2.0';
18
+ import type GObject from '@girs/gobject-2.0';
19
+ import type GLib from '@girs/glib-2.0';
20
+ import type Gio from '@girs/gio-2.0';
21
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
22
+ import type GModule from '@girs/gmodule-2.0';
23
+ import type Atk from '@girs/atk-1.0';
24
+ import type Dbusmenu from '@girs/dbusmenu-0.4';
25
+
26
+ export const GTK_MENUITEM_H__: number
27
+ /**
28
+ * The Dbusmenu GTK parser adds cached items on the various
29
+ * menu items throughout the tree. Sometimes it can be useful
30
+ * to get that cached item to use directly. This function
31
+ * will retrieve it for you.
32
+ * @param widget A #GtkMenuItem that may have a cached #DbusmenuMenuitem from the parser
33
+ * @returns A pointer to the cached item or NULL if it isn't there.
34
+ */
35
+ export function gtk_parse_get_cached_item(widget: Gtk.Widget): Dbusmenu.Menuitem
36
+ /**
37
+ * Goes through the GTK structures and turns them into the appropraite
38
+ * Dbusmenu structures along with setting up all the relationships
39
+ * between the objects. It also stores the dbusmenu items as a cache
40
+ * on the GTK items so that they'll be reused if necissary.
41
+ * @param widget A #GtkMenuItem or #GtkMenuShell to turn into a #DbusmenuMenuitem
42
+ * @returns A dbusmenu item representing the menu structure
43
+ */
44
+ export function gtk_parse_menu_structure(widget: Gtk.Widget): Dbusmenu.Menuitem
45
+ /**
46
+ * This function looks on the menu item for a property by the
47
+ * name of `property`. If one exists it tries to turn it into
48
+ * a #GdkPixbuf. It assumes that the property is a base64 encoded
49
+ * PNG file like the one created by #dbusmenu_menuite_property_set_image.
50
+ * @param menuitem The #DbusmenuMenuitem to look for the property on
51
+ * @param property The name of the property to look for.
52
+ * @returns A pixbuf or #NULL to signal error.
53
+ */
54
+ export function menuitem_property_get_image(menuitem: Dbusmenu.Menuitem, property: string | null): GdkPixbuf.Pixbuf
55
+ /**
56
+ * This function gets a GTK shortcut as a key and a mask
57
+ * for use to set the accelerators.
58
+ * @param menuitem The #DbusmenuMenuitem to get the shortcut off
59
+ */
60
+ export function menuitem_property_get_shortcut(menuitem: Dbusmenu.Menuitem): [ /* key */ number, /* modifier */ Gdk.ModifierType ]
61
+ /**
62
+ * This function takes the pixbuf that is stored in `data` and
63
+ * turns it into a base64 encoded PNG so that it can be placed
64
+ * onto a standard #DbusmenuMenuitem property.
65
+ * @param menuitem The #DbusmenuMenuitem to set the property on.
66
+ * @param property Name of the property to set.
67
+ * @param data The image to place on the property.
68
+ * @returns Whether the function was able to set the property or not.
69
+ */
70
+ export function menuitem_property_set_image(menuitem: Dbusmenu.Menuitem, property: string | null, data: GdkPixbuf.Pixbuf): boolean
71
+ /**
72
+ * Takes the modifer described by `key` and `modifier` and places that into
73
+ * the format sending across Dbus for shortcuts.
74
+ * @param menuitem The #DbusmenuMenuitem to set the shortcut on
75
+ * @param key The keycode of the key to send
76
+ * @param modifier A bitmask of modifiers used to activate the item
77
+ * @returns Whether it was successful at setting the property.
78
+ */
79
+ export function menuitem_property_set_shortcut(menuitem: Dbusmenu.Menuitem, key: number, modifier: Gdk.ModifierType): boolean
80
+ /**
81
+ * Takes the shortcut that is installed on a menu item and calls
82
+ * #dbusmenu_menuitem_property_set_shortcut with it. It also sets
83
+ * up listeners to watch it change.
84
+ * @param menuitem The #DbusmenuMenuitem to set the shortcut on
85
+ * @param gmi A menu item to steal the shortcut off of
86
+ * @returns Whether it was successful at setting the property.
87
+ */
88
+ export function menuitem_property_set_shortcut_menuitem(menuitem: Dbusmenu.Menuitem, gmi: Gtk.MenuItem): boolean
89
+ /**
90
+ * This function takes a GTK shortcut string as defined in
91
+ * #gtk_accelerator_parse and turns that into the information
92
+ * required to send it over DBusmenu.
93
+ * @param menuitem The #DbusmenuMenuitem to set the shortcut on
94
+ * @param shortcut String describing the shortcut
95
+ * @returns Whether it was successful at setting the property.
96
+ */
97
+ export function menuitem_property_set_shortcut_string(menuitem: Dbusmenu.Menuitem, shortcut: string | null): boolean
98
+ export module Client {
99
+
100
+ // Constructor properties interface
101
+
102
+ export interface ConstructorProperties extends Dbusmenu.Client.ConstructorProperties {
103
+ }
104
+
105
+ }
106
+
107
+ export interface Client {
108
+
109
+ // Owm methods of DbusmenuGtk-0.4.DbusmenuGtk.Client
110
+
111
+ /**
112
+ * Gets the accel group for this client.
113
+ * @returns Either a valid group or #NULL on error or none set.
114
+ */
115
+ get_accel_group(): Gtk.AccelGroup
116
+ /**
117
+ * This grabs the #GtkMenuItem that is associated with the
118
+ * #DbusmenuMenuitem.
119
+ * @param item #DbusmenuMenuitem to get associated #GtkMenuItem on.
120
+ * @returns The #GtkMenuItem that can be played with.
121
+ */
122
+ menuitem_get(item: Dbusmenu.Menuitem): Gtk.MenuItem
123
+ /**
124
+ * This grabs the submenu associated with the menuitem.
125
+ * @param item #DbusmenuMenuitem to get associated #GtkMenu on.
126
+ * @returns The #GtkMenu if there is one.
127
+ */
128
+ menuitem_get_submenu(item: Dbusmenu.Menuitem): Gtk.Menu
129
+ /**
130
+ * This function provides some of the basic connectivity for being in
131
+ * the GTK world. Things like visibility and sensitivity of the item are
132
+ * handled here so that the subclasses don't have to. If you're building
133
+ * your on GTK menu item you can use this function to apply those basic
134
+ * attributes so that you don't have to deal with them either.
135
+ *
136
+ * This also handles passing the "activate" signal back to the
137
+ * #DbusmenuMenuitem side of thing.
138
+ * @param item The #DbusmenuMenuitem to attach the GTK-isms to
139
+ * @param gmi A #GtkMenuItem representing the GTK world's view of this menuitem
140
+ * @param parent The parent #DbusmenuMenuitem
141
+ */
142
+ newitem_base(item: Dbusmenu.Menuitem, gmi: Gtk.MenuItem, parent: Dbusmenu.Menuitem): void
143
+ /**
144
+ * Sets the acceleration group for the menu items with accelerators
145
+ * on this client.
146
+ * @param agroup The new acceleration group
147
+ */
148
+ set_accel_group(agroup: Gtk.AccelGroup): void
149
+
150
+ // Class property signals of DbusmenuGtk-0.4.DbusmenuGtk.Client
151
+
152
+ connect(sigName: "notify::dbus-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
153
+ connect_after(sigName: "notify::dbus-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
154
+ emit(sigName: "notify::dbus-name", ...args: any[]): void
155
+ connect(sigName: "notify::dbus-object", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
156
+ connect_after(sigName: "notify::dbus-object", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
157
+ emit(sigName: "notify::dbus-object", ...args: any[]): void
158
+ connect(sigName: "notify::group-events", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
159
+ connect_after(sigName: "notify::group-events", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
160
+ emit(sigName: "notify::group-events", ...args: any[]): void
161
+ connect(sigName: string, callback: (...args: any[]) => void): number
162
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
163
+ emit(sigName: string, ...args: any[]): void
164
+ disconnect(id: number): void
165
+ }
166
+
167
+ /**
168
+ * A subclass of #DbusmenuClient to add functionality with regarding
169
+ * building GTK items out of the abstract tree.
170
+ * @class
171
+ */
172
+ export class Client extends Dbusmenu.Client {
173
+
174
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.Client
175
+
176
+ static name: string
177
+ static $gtype: GObject.GType<Client>
178
+
179
+ // Constructors of DbusmenuGtk-0.4.DbusmenuGtk.Client
180
+
181
+ constructor(config?: Client.ConstructorProperties)
182
+ /**
183
+ * Creates a new #DbusmenuGtkClient object and creates a #DbusmenuClient
184
+ * that connects across DBus to a #DbusmenuServer.
185
+ * @constructor
186
+ * @param dbus_name Name of the #DbusmenuServer on DBus
187
+ * @param dbus_object Name of the object on the #DbusmenuServer
188
+ * @returns A new #DbusmenuGtkClient sync'd with a server
189
+ */
190
+ constructor(dbus_name: string | null, dbus_object: string | null)
191
+ /**
192
+ * Creates a new #DbusmenuGtkClient object and creates a #DbusmenuClient
193
+ * that connects across DBus to a #DbusmenuServer.
194
+ * @constructor
195
+ * @param dbus_name Name of the #DbusmenuServer on DBus
196
+ * @param dbus_object Name of the object on the #DbusmenuServer
197
+ * @returns A new #DbusmenuGtkClient sync'd with a server
198
+ */
199
+ static new(dbus_name: string | null, dbus_object: string | null): Client
200
+
201
+ // Overloads of new
202
+
203
+ /**
204
+ * This function creates a new client that connects to a specific
205
+ * server on DBus. That server is at a specific location sharing
206
+ * a known object. The interface is assumed by the code to be
207
+ * the DBus menu interface. The newly created client will start
208
+ * sending out events as it syncs up with the server.
209
+ * @constructor
210
+ * @param name The DBus name for the server to connect to
211
+ * @param object The object on the server to monitor
212
+ * @returns A brand new #DbusmenuClient
213
+ */
214
+ static new(name: string | null, object: string | null): Dbusmenu.Client
215
+ _init(config?: Client.ConstructorProperties): void
216
+ }
217
+
218
+ export module Menu {
219
+
220
+ // Constructor properties interface
221
+
222
+ export interface ConstructorProperties extends Atk.ImplementorIface.ConstructorProperties, Gtk.Buildable.ConstructorProperties, Gtk.Menu.ConstructorProperties {
223
+
224
+ // Own constructor properties of DbusmenuGtk-0.4.DbusmenuGtk.Menu
225
+
226
+ dbus_name?: string | null
227
+ dbus_object?: string | null
228
+ }
229
+
230
+ }
231
+
232
+ export interface Menu extends Atk.ImplementorIface, Gtk.Buildable {
233
+
234
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.Menu
235
+
236
+ readonly dbus_name: string | null
237
+ readonly dbus_object: string | null
238
+
239
+ // Own fields of DbusmenuGtk-0.4.DbusmenuGtk.Menu
240
+
241
+ parent: Gtk.Menu & Gtk.Widget
242
+ priv: MenuPrivate
243
+
244
+ // Owm methods of DbusmenuGtk-0.4.DbusmenuGtk.Menu
245
+
246
+ /**
247
+ * An accessor for the client that this menu is using to
248
+ * communicate with the server.
249
+ * @returns A valid #DbusmenuGtkClient or NULL on error.
250
+ */
251
+ get_client(): Client
252
+
253
+ // Conflicting methods
254
+
255
+ /**
256
+ * Sets an accelerator path for this menu from which accelerator paths
257
+ * for its immediate children, its menu items, can be constructed.
258
+ * The main purpose of this function is to spare the programmer the
259
+ * inconvenience of having to call gtk_menu_item_set_accel_path() on
260
+ * each menu item that should support runtime user changable accelerators.
261
+ * Instead, by just calling gtk_menu_set_accel_path() on their parent,
262
+ * each menu item of this menu, that contains a label describing its purpose,
263
+ * automatically gets an accel path assigned. For example, a menu containing
264
+ * menu items "New" and "Exit", will, after
265
+ * <literal>gtk_menu_set_accel_path (menu, "&lt;Gnumeric-Sheet&gt;/File");</literal>
266
+ * has been called, assign its items the accel paths:
267
+ * <literal>"&lt;Gnumeric-Sheet&gt;/File/New"</literal> and <literal>"&lt;Gnumeric-Sheet&gt;/File/Exit"</literal>.
268
+ * Assigning accel paths to menu items then enables the user to change
269
+ * their accelerators at runtime. More details about accelerator paths
270
+ * and their default setups can be found at gtk_accel_map_add_entry().
271
+ *
272
+ * Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
273
+ * pass a static string, you can save some memory by interning it first with
274
+ * g_intern_static_string().
275
+ * @param accel_path a valid accelerator path
276
+ */
277
+ set_accel_path(accel_path: string | null): void
278
+
279
+ // Overloads of set_accel_path
280
+
281
+ /**
282
+ * Given an accelerator group, `accel_group,` and an accelerator path,
283
+ * `accel_path,` sets up an accelerator in `accel_group` so whenever the
284
+ * key binding that is defined for `accel_path` is pressed, `widget`
285
+ * will be activated. This removes any accelerators (for any
286
+ * accelerator group) installed by previous calls to
287
+ * gtk_widget_set_accel_path(). Associating accelerators with
288
+ * paths allows them to be modified by the user and the modifications
289
+ * to be saved for future use. (See gtk_accel_map_save().)
290
+ *
291
+ * This function is a low level function that would most likely
292
+ * be used by a menu creation system like #GtkUIManager. If you
293
+ * use #GtkUIManager, setting up accelerator paths will be done
294
+ * automatically.
295
+ *
296
+ * Even when you you aren't using #GtkUIManager, if you only want to
297
+ * set up accelerators on menu items gtk_menu_item_set_accel_path()
298
+ * provides a somewhat more convenient interface.
299
+ *
300
+ * Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
301
+ * pass a static string, you can save some memory by interning it first with
302
+ * g_intern_static_string().
303
+ * @param accel_path path used to look up the accelerator
304
+ * @param accel_group a #GtkAccelGroup.
305
+ */
306
+ set_accel_path(accel_path: string | null, accel_group: Gtk.AccelGroup | null): void
307
+ /**
308
+ * Given an accelerator group, `accel_group,` and an accelerator path,
309
+ * `accel_path,` sets up an accelerator in `accel_group` so whenever the
310
+ * key binding that is defined for `accel_path` is pressed, `widget`
311
+ * will be activated. This removes any accelerators (for any
312
+ * accelerator group) installed by previous calls to
313
+ * gtk_widget_set_accel_path(). Associating accelerators with
314
+ * paths allows them to be modified by the user and the modifications
315
+ * to be saved for future use. (See gtk_accel_map_save().)
316
+ *
317
+ * This function is a low level function that would most likely
318
+ * be used by a menu creation system like #GtkUIManager. If you
319
+ * use #GtkUIManager, setting up accelerator paths will be done
320
+ * automatically.
321
+ *
322
+ * Even when you you aren't using #GtkUIManager, if you only want to
323
+ * set up accelerators on menu items gtk_menu_item_set_accel_path()
324
+ * provides a somewhat more convenient interface.
325
+ *
326
+ * Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
327
+ * pass a static string, you can save some memory by interning it first with
328
+ * g_intern_static_string().
329
+ * @param accel_path path used to look up the accelerator
330
+ * @param accel_group a #GtkAccelGroup.
331
+ */
332
+ set_accel_path(accel_path: string | null, accel_group: Gtk.AccelGroup | null): void
333
+
334
+ // Class property signals of DbusmenuGtk-0.4.DbusmenuGtk.Menu
335
+
336
+ connect(sigName: "notify::dbus-name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
337
+ connect_after(sigName: "notify::dbus-name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
338
+ emit(sigName: "notify::dbus-name", ...args: any[]): void
339
+ connect(sigName: "notify::dbus-object", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
340
+ connect_after(sigName: "notify::dbus-object", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
341
+ emit(sigName: "notify::dbus-object", ...args: any[]): void
342
+ connect(sigName: "notify::active", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
343
+ connect_after(sigName: "notify::active", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
344
+ emit(sigName: "notify::active", ...args: any[]): void
345
+ connect(sigName: "notify::attach-widget", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
346
+ connect_after(sigName: "notify::attach-widget", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
347
+ emit(sigName: "notify::attach-widget", ...args: any[]): void
348
+ connect(sigName: "notify::monitor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
349
+ connect_after(sigName: "notify::monitor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
350
+ emit(sigName: "notify::monitor", ...args: any[]): void
351
+ connect(sigName: "notify::reserve-toggle-size", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
352
+ connect_after(sigName: "notify::reserve-toggle-size", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
353
+ emit(sigName: "notify::reserve-toggle-size", ...args: any[]): void
354
+ connect(sigName: "notify::tearoff-state", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
355
+ connect_after(sigName: "notify::tearoff-state", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
356
+ emit(sigName: "notify::tearoff-state", ...args: any[]): void
357
+ connect(sigName: "notify::tearoff-title", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
358
+ connect_after(sigName: "notify::tearoff-title", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
359
+ emit(sigName: "notify::tearoff-title", ...args: any[]): void
360
+ connect(sigName: "notify::take-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
361
+ connect_after(sigName: "notify::take-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
362
+ emit(sigName: "notify::take-focus", ...args: any[]): void
363
+ connect(sigName: "notify::child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
364
+ connect_after(sigName: "notify::child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
365
+ emit(sigName: "notify::child", ...args: any[]): void
366
+ connect(sigName: "notify::resize-mode", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
367
+ connect_after(sigName: "notify::resize-mode", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
368
+ emit(sigName: "notify::resize-mode", ...args: any[]): void
369
+ connect(sigName: "notify::app-paintable", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
370
+ connect_after(sigName: "notify::app-paintable", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
371
+ emit(sigName: "notify::app-paintable", ...args: any[]): void
372
+ connect(sigName: "notify::can-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
373
+ connect_after(sigName: "notify::can-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
374
+ emit(sigName: "notify::can-default", ...args: any[]): void
375
+ connect(sigName: "notify::can-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
376
+ connect_after(sigName: "notify::can-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
377
+ emit(sigName: "notify::can-focus", ...args: any[]): void
378
+ connect(sigName: "notify::composite-child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
379
+ connect_after(sigName: "notify::composite-child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
380
+ emit(sigName: "notify::composite-child", ...args: any[]): void
381
+ connect(sigName: "notify::double-buffered", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
382
+ connect_after(sigName: "notify::double-buffered", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
383
+ emit(sigName: "notify::double-buffered", ...args: any[]): void
384
+ connect(sigName: "notify::events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
385
+ connect_after(sigName: "notify::events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
386
+ emit(sigName: "notify::events", ...args: any[]): void
387
+ connect(sigName: "notify::extension-events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
388
+ connect_after(sigName: "notify::extension-events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
389
+ emit(sigName: "notify::extension-events", ...args: any[]): void
390
+ connect(sigName: "notify::has-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
391
+ connect_after(sigName: "notify::has-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
392
+ emit(sigName: "notify::has-default", ...args: any[]): void
393
+ connect(sigName: "notify::has-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
394
+ connect_after(sigName: "notify::has-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
395
+ emit(sigName: "notify::has-focus", ...args: any[]): void
396
+ connect(sigName: "notify::has-tooltip", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
397
+ connect_after(sigName: "notify::has-tooltip", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
398
+ emit(sigName: "notify::has-tooltip", ...args: any[]): void
399
+ connect(sigName: "notify::height-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
400
+ connect_after(sigName: "notify::height-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
401
+ emit(sigName: "notify::height-request", ...args: any[]): void
402
+ connect(sigName: "notify::is-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
403
+ connect_after(sigName: "notify::is-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
404
+ emit(sigName: "notify::is-focus", ...args: any[]): void
405
+ connect(sigName: "notify::no-show-all", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
406
+ connect_after(sigName: "notify::no-show-all", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
407
+ emit(sigName: "notify::no-show-all", ...args: any[]): void
408
+ connect(sigName: "notify::receives-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
409
+ connect_after(sigName: "notify::receives-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
410
+ emit(sigName: "notify::receives-default", ...args: any[]): void
411
+ connect(sigName: "notify::sensitive", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
412
+ connect_after(sigName: "notify::sensitive", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
413
+ emit(sigName: "notify::sensitive", ...args: any[]): void
414
+ connect(sigName: "notify::tooltip-markup", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
415
+ connect_after(sigName: "notify::tooltip-markup", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
416
+ emit(sigName: "notify::tooltip-markup", ...args: any[]): void
417
+ connect(sigName: "notify::tooltip-text", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
418
+ connect_after(sigName: "notify::tooltip-text", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
419
+ emit(sigName: "notify::tooltip-text", ...args: any[]): void
420
+ connect(sigName: "notify::visible", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
421
+ connect_after(sigName: "notify::visible", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
422
+ emit(sigName: "notify::visible", ...args: any[]): void
423
+ connect(sigName: "notify::width-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
424
+ connect_after(sigName: "notify::width-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
425
+ emit(sigName: "notify::width-request", ...args: any[]): void
426
+ connect(sigName: "notify::user-data", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
427
+ connect_after(sigName: "notify::user-data", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
428
+ emit(sigName: "notify::user-data", ...args: any[]): void
429
+ connect(sigName: string, callback: (...args: any[]) => void): number
430
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
431
+ emit(sigName: string, ...args: any[]): void
432
+ disconnect(id: number): void
433
+ }
434
+
435
+ /**
436
+ * A #GtkMenu that is built using an abstract tree built from
437
+ * a #DbusmenuGtkClient.
438
+ * @class
439
+ */
440
+ export class Menu extends Gtk.Menu {
441
+
442
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.Menu
443
+
444
+ static name: string
445
+ static $gtype: GObject.GType<Menu>
446
+
447
+ // Constructors of DbusmenuGtk-0.4.DbusmenuGtk.Menu
448
+
449
+ constructor(config?: Menu.ConstructorProperties)
450
+ /**
451
+ * Creates a new #DbusmenuGtkMenu object and creates a #DbusmenuClient
452
+ * that connects across DBus to a #DbusmenuServer.
453
+ * @constructor
454
+ * @param dbus_name Name of the #DbusmenuServer on DBus
455
+ * @param dbus_object Name of the object on the #DbusmenuServer
456
+ * @returns A new #DbusmenuGtkMenu sync'd with a server
457
+ */
458
+ constructor(dbus_name: string | null, dbus_object: string | null)
459
+ /**
460
+ * Creates a new #DbusmenuGtkMenu object and creates a #DbusmenuClient
461
+ * that connects across DBus to a #DbusmenuServer.
462
+ * @constructor
463
+ * @param dbus_name Name of the #DbusmenuServer on DBus
464
+ * @param dbus_object Name of the object on the #DbusmenuServer
465
+ * @returns A new #DbusmenuGtkMenu sync'd with a server
466
+ */
467
+ static new(dbus_name: string | null, dbus_object: string | null): Menu
468
+
469
+ // Overloads of new
470
+
471
+ static new(): Gtk.Menu
472
+ _init(config?: Menu.ConstructorProperties): void
473
+ }
474
+
475
+ export interface ClientClass {
476
+
477
+ // Own fields of DbusmenuGtk-0.4.DbusmenuGtk.ClientClass
478
+
479
+ /**
480
+ * #GtkMenuClass
481
+ * @field
482
+ */
483
+ parent_class: Dbusmenu.ClientClass
484
+ root_changed: (newroot: Dbusmenu.Menuitem) => void
485
+ reserved1: () => void
486
+ reserved2: () => void
487
+ reserved3: () => void
488
+ reserved4: () => void
489
+ reserved5: () => void
490
+ reserved6: () => void
491
+ }
492
+
493
+ /**
494
+ * Functions and signal slots for using a #DbusmenuGtkClient
495
+ * @record
496
+ */
497
+ export abstract class ClientClass {
498
+
499
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.ClientClass
500
+
501
+ static name: string
502
+ }
503
+
504
+ export interface ClientPrivate {
505
+ }
506
+
507
+ export class ClientPrivate {
508
+
509
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.ClientPrivate
510
+
511
+ static name: string
512
+ }
513
+
514
+ export interface MenuClass {
515
+
516
+ // Own fields of DbusmenuGtk-0.4.DbusmenuGtk.MenuClass
517
+
518
+ /**
519
+ * #GtkMenuClass
520
+ * @field
521
+ */
522
+ parent_class: Gtk.MenuClass
523
+ reserved1: () => void
524
+ reserved2: () => void
525
+ reserved3: () => void
526
+ reserved4: () => void
527
+ reserved5: () => void
528
+ reserved6: () => void
529
+ }
530
+
531
+ /**
532
+ * All of the subclassable functions and signal slots for a
533
+ * #DbusmenuGtkMenu.
534
+ * @record
535
+ */
536
+ export abstract class MenuClass {
537
+
538
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.MenuClass
539
+
540
+ static name: string
541
+ }
542
+
543
+ export interface MenuPrivate {
544
+ }
545
+
546
+ export class MenuPrivate {
547
+
548
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.MenuPrivate
549
+
550
+ static name: string
551
+ }
552
+
553
+ /**
554
+ * Name of the imported GIR library
555
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
556
+ */
557
+ export const __name__: string
558
+ /**
559
+ * Version of the imported GIR library
560
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
561
+ */
562
+ export const __version__: string
563
+ // END
@@ -0,0 +1,568 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
7
+ */
8
+ /**
9
+ * DbusmenuGtk-0.4
10
+ */
11
+
12
+ import type Gtk from '@girs/gtk-2.0';
13
+ import type Gdk from '@girs/gdk-2.0';
14
+ import type cairo from '@girs/cairo-1.0';
15
+ import type Pango from '@girs/pango-1.0';
16
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
17
+ import type freetype2 from '@girs/freetype2-2.0';
18
+ import type GObject from '@girs/gobject-2.0';
19
+ import type GLib from '@girs/glib-2.0';
20
+ import type Gio from '@girs/gio-2.0';
21
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
22
+ import type GModule from '@girs/gmodule-2.0';
23
+ import type Atk from '@girs/atk-1.0';
24
+ import type Dbusmenu from '@girs/dbusmenu-0.4';
25
+
26
+ export namespace DbusmenuGtk {
27
+
28
+ const GTK_MENUITEM_H__: number
29
+ /**
30
+ * The Dbusmenu GTK parser adds cached items on the various
31
+ * menu items throughout the tree. Sometimes it can be useful
32
+ * to get that cached item to use directly. This function
33
+ * will retrieve it for you.
34
+ * @param widget A #GtkMenuItem that may have a cached #DbusmenuMenuitem from the parser
35
+ * @returns A pointer to the cached item or NULL if it isn't there.
36
+ */
37
+ function gtk_parse_get_cached_item(widget: Gtk.Widget): Dbusmenu.Menuitem
38
+ /**
39
+ * Goes through the GTK structures and turns them into the appropraite
40
+ * Dbusmenu structures along with setting up all the relationships
41
+ * between the objects. It also stores the dbusmenu items as a cache
42
+ * on the GTK items so that they'll be reused if necissary.
43
+ * @param widget A #GtkMenuItem or #GtkMenuShell to turn into a #DbusmenuMenuitem
44
+ * @returns A dbusmenu item representing the menu structure
45
+ */
46
+ function gtk_parse_menu_structure(widget: Gtk.Widget): Dbusmenu.Menuitem
47
+ /**
48
+ * This function looks on the menu item for a property by the
49
+ * name of `property`. If one exists it tries to turn it into
50
+ * a #GdkPixbuf. It assumes that the property is a base64 encoded
51
+ * PNG file like the one created by #dbusmenu_menuite_property_set_image.
52
+ * @param menuitem The #DbusmenuMenuitem to look for the property on
53
+ * @param property The name of the property to look for.
54
+ * @returns A pixbuf or #NULL to signal error.
55
+ */
56
+ function menuitem_property_get_image(menuitem: Dbusmenu.Menuitem, property: string | null): GdkPixbuf.Pixbuf
57
+ /**
58
+ * This function gets a GTK shortcut as a key and a mask
59
+ * for use to set the accelerators.
60
+ * @param menuitem The #DbusmenuMenuitem to get the shortcut off
61
+ */
62
+ function menuitem_property_get_shortcut(menuitem: Dbusmenu.Menuitem): [ /* key */ number, /* modifier */ Gdk.ModifierType ]
63
+ /**
64
+ * This function takes the pixbuf that is stored in `data` and
65
+ * turns it into a base64 encoded PNG so that it can be placed
66
+ * onto a standard #DbusmenuMenuitem property.
67
+ * @param menuitem The #DbusmenuMenuitem to set the property on.
68
+ * @param property Name of the property to set.
69
+ * @param data The image to place on the property.
70
+ * @returns Whether the function was able to set the property or not.
71
+ */
72
+ function menuitem_property_set_image(menuitem: Dbusmenu.Menuitem, property: string | null, data: GdkPixbuf.Pixbuf): boolean
73
+ /**
74
+ * Takes the modifer described by `key` and `modifier` and places that into
75
+ * the format sending across Dbus for shortcuts.
76
+ * @param menuitem The #DbusmenuMenuitem to set the shortcut on
77
+ * @param key The keycode of the key to send
78
+ * @param modifier A bitmask of modifiers used to activate the item
79
+ * @returns Whether it was successful at setting the property.
80
+ */
81
+ function menuitem_property_set_shortcut(menuitem: Dbusmenu.Menuitem, key: number, modifier: Gdk.ModifierType): boolean
82
+ /**
83
+ * Takes the shortcut that is installed on a menu item and calls
84
+ * #dbusmenu_menuitem_property_set_shortcut with it. It also sets
85
+ * up listeners to watch it change.
86
+ * @param menuitem The #DbusmenuMenuitem to set the shortcut on
87
+ * @param gmi A menu item to steal the shortcut off of
88
+ * @returns Whether it was successful at setting the property.
89
+ */
90
+ function menuitem_property_set_shortcut_menuitem(menuitem: Dbusmenu.Menuitem, gmi: Gtk.MenuItem): boolean
91
+ /**
92
+ * This function takes a GTK shortcut string as defined in
93
+ * #gtk_accelerator_parse and turns that into the information
94
+ * required to send it over DBusmenu.
95
+ * @param menuitem The #DbusmenuMenuitem to set the shortcut on
96
+ * @param shortcut String describing the shortcut
97
+ * @returns Whether it was successful at setting the property.
98
+ */
99
+ function menuitem_property_set_shortcut_string(menuitem: Dbusmenu.Menuitem, shortcut: string | null): boolean
100
+ module Client {
101
+
102
+ // Constructor properties interface
103
+
104
+ interface ConstructorProperties extends Dbusmenu.Client.ConstructorProperties {
105
+ }
106
+
107
+ }
108
+
109
+ interface Client {
110
+
111
+ // Owm methods of DbusmenuGtk-0.4.DbusmenuGtk.Client
112
+
113
+ /**
114
+ * Gets the accel group for this client.
115
+ * @returns Either a valid group or #NULL on error or none set.
116
+ */
117
+ get_accel_group(): Gtk.AccelGroup
118
+ /**
119
+ * This grabs the #GtkMenuItem that is associated with the
120
+ * #DbusmenuMenuitem.
121
+ * @param item #DbusmenuMenuitem to get associated #GtkMenuItem on.
122
+ * @returns The #GtkMenuItem that can be played with.
123
+ */
124
+ menuitem_get(item: Dbusmenu.Menuitem): Gtk.MenuItem
125
+ /**
126
+ * This grabs the submenu associated with the menuitem.
127
+ * @param item #DbusmenuMenuitem to get associated #GtkMenu on.
128
+ * @returns The #GtkMenu if there is one.
129
+ */
130
+ menuitem_get_submenu(item: Dbusmenu.Menuitem): Gtk.Menu
131
+ /**
132
+ * This function provides some of the basic connectivity for being in
133
+ * the GTK world. Things like visibility and sensitivity of the item are
134
+ * handled here so that the subclasses don't have to. If you're building
135
+ * your on GTK menu item you can use this function to apply those basic
136
+ * attributes so that you don't have to deal with them either.
137
+ *
138
+ * This also handles passing the "activate" signal back to the
139
+ * #DbusmenuMenuitem side of thing.
140
+ * @param item The #DbusmenuMenuitem to attach the GTK-isms to
141
+ * @param gmi A #GtkMenuItem representing the GTK world's view of this menuitem
142
+ * @param parent The parent #DbusmenuMenuitem
143
+ */
144
+ newitem_base(item: Dbusmenu.Menuitem, gmi: Gtk.MenuItem, parent: Dbusmenu.Menuitem): void
145
+ /**
146
+ * Sets the acceleration group for the menu items with accelerators
147
+ * on this client.
148
+ * @param agroup The new acceleration group
149
+ */
150
+ set_accel_group(agroup: Gtk.AccelGroup): void
151
+
152
+ // Class property signals of DbusmenuGtk-0.4.DbusmenuGtk.Client
153
+
154
+ connect(sigName: "notify::dbus-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
155
+ connect_after(sigName: "notify::dbus-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
156
+ emit(sigName: "notify::dbus-name", ...args: any[]): void
157
+ connect(sigName: "notify::dbus-object", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
158
+ connect_after(sigName: "notify::dbus-object", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
159
+ emit(sigName: "notify::dbus-object", ...args: any[]): void
160
+ connect(sigName: "notify::group-events", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
161
+ connect_after(sigName: "notify::group-events", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
162
+ emit(sigName: "notify::group-events", ...args: any[]): void
163
+ connect(sigName: string, callback: (...args: any[]) => void): number
164
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
165
+ emit(sigName: string, ...args: any[]): void
166
+ disconnect(id: number): void
167
+ }
168
+
169
+ /**
170
+ * A subclass of #DbusmenuClient to add functionality with regarding
171
+ * building GTK items out of the abstract tree.
172
+ * @class
173
+ */
174
+ class Client extends Dbusmenu.Client {
175
+
176
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.Client
177
+
178
+ static name: string
179
+ static $gtype: GObject.GType<Client>
180
+
181
+ // Constructors of DbusmenuGtk-0.4.DbusmenuGtk.Client
182
+
183
+ constructor(config?: Client.ConstructorProperties)
184
+ /**
185
+ * Creates a new #DbusmenuGtkClient object and creates a #DbusmenuClient
186
+ * that connects across DBus to a #DbusmenuServer.
187
+ * @constructor
188
+ * @param dbus_name Name of the #DbusmenuServer on DBus
189
+ * @param dbus_object Name of the object on the #DbusmenuServer
190
+ * @returns A new #DbusmenuGtkClient sync'd with a server
191
+ */
192
+ constructor(dbus_name: string | null, dbus_object: string | null)
193
+ /**
194
+ * Creates a new #DbusmenuGtkClient object and creates a #DbusmenuClient
195
+ * that connects across DBus to a #DbusmenuServer.
196
+ * @constructor
197
+ * @param dbus_name Name of the #DbusmenuServer on DBus
198
+ * @param dbus_object Name of the object on the #DbusmenuServer
199
+ * @returns A new #DbusmenuGtkClient sync'd with a server
200
+ */
201
+ static new(dbus_name: string | null, dbus_object: string | null): Client
202
+
203
+ // Overloads of new
204
+
205
+ /**
206
+ * This function creates a new client that connects to a specific
207
+ * server on DBus. That server is at a specific location sharing
208
+ * a known object. The interface is assumed by the code to be
209
+ * the DBus menu interface. The newly created client will start
210
+ * sending out events as it syncs up with the server.
211
+ * @constructor
212
+ * @param name The DBus name for the server to connect to
213
+ * @param object The object on the server to monitor
214
+ * @returns A brand new #DbusmenuClient
215
+ */
216
+ static new(name: string | null, object: string | null): Dbusmenu.Client
217
+ _init(config?: Client.ConstructorProperties): void
218
+ }
219
+
220
+ module Menu {
221
+
222
+ // Constructor properties interface
223
+
224
+ interface ConstructorProperties extends Atk.ImplementorIface.ConstructorProperties, Gtk.Buildable.ConstructorProperties, Gtk.Menu.ConstructorProperties {
225
+
226
+ // Own constructor properties of DbusmenuGtk-0.4.DbusmenuGtk.Menu
227
+
228
+ dbus_name?: string | null
229
+ dbus_object?: string | null
230
+ }
231
+
232
+ }
233
+
234
+ interface Menu extends Atk.ImplementorIface, Gtk.Buildable {
235
+
236
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.Menu
237
+
238
+ readonly dbus_name: string | null
239
+ readonly dbus_object: string | null
240
+
241
+ // Own fields of DbusmenuGtk-0.4.DbusmenuGtk.Menu
242
+
243
+ parent: Gtk.Menu & Gtk.Widget
244
+ priv: MenuPrivate
245
+
246
+ // Owm methods of DbusmenuGtk-0.4.DbusmenuGtk.Menu
247
+
248
+ /**
249
+ * An accessor for the client that this menu is using to
250
+ * communicate with the server.
251
+ * @returns A valid #DbusmenuGtkClient or NULL on error.
252
+ */
253
+ get_client(): Client
254
+
255
+ // Conflicting methods
256
+
257
+ /**
258
+ * Sets an accelerator path for this menu from which accelerator paths
259
+ * for its immediate children, its menu items, can be constructed.
260
+ * The main purpose of this function is to spare the programmer the
261
+ * inconvenience of having to call gtk_menu_item_set_accel_path() on
262
+ * each menu item that should support runtime user changable accelerators.
263
+ * Instead, by just calling gtk_menu_set_accel_path() on their parent,
264
+ * each menu item of this menu, that contains a label describing its purpose,
265
+ * automatically gets an accel path assigned. For example, a menu containing
266
+ * menu items "New" and "Exit", will, after
267
+ * <literal>gtk_menu_set_accel_path (menu, "&lt;Gnumeric-Sheet&gt;/File");</literal>
268
+ * has been called, assign its items the accel paths:
269
+ * <literal>"&lt;Gnumeric-Sheet&gt;/File/New"</literal> and <literal>"&lt;Gnumeric-Sheet&gt;/File/Exit"</literal>.
270
+ * Assigning accel paths to menu items then enables the user to change
271
+ * their accelerators at runtime. More details about accelerator paths
272
+ * and their default setups can be found at gtk_accel_map_add_entry().
273
+ *
274
+ * Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
275
+ * pass a static string, you can save some memory by interning it first with
276
+ * g_intern_static_string().
277
+ * @param accel_path a valid accelerator path
278
+ */
279
+ set_accel_path(accel_path: string | null): void
280
+
281
+ // Overloads of set_accel_path
282
+
283
+ /**
284
+ * Given an accelerator group, `accel_group,` and an accelerator path,
285
+ * `accel_path,` sets up an accelerator in `accel_group` so whenever the
286
+ * key binding that is defined for `accel_path` is pressed, `widget`
287
+ * will be activated. This removes any accelerators (for any
288
+ * accelerator group) installed by previous calls to
289
+ * gtk_widget_set_accel_path(). Associating accelerators with
290
+ * paths allows them to be modified by the user and the modifications
291
+ * to be saved for future use. (See gtk_accel_map_save().)
292
+ *
293
+ * This function is a low level function that would most likely
294
+ * be used by a menu creation system like #GtkUIManager. If you
295
+ * use #GtkUIManager, setting up accelerator paths will be done
296
+ * automatically.
297
+ *
298
+ * Even when you you aren't using #GtkUIManager, if you only want to
299
+ * set up accelerators on menu items gtk_menu_item_set_accel_path()
300
+ * provides a somewhat more convenient interface.
301
+ *
302
+ * Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
303
+ * pass a static string, you can save some memory by interning it first with
304
+ * g_intern_static_string().
305
+ * @param accel_path path used to look up the accelerator
306
+ * @param accel_group a #GtkAccelGroup.
307
+ */
308
+ set_accel_path(accel_path: string | null, accel_group: Gtk.AccelGroup | null): void
309
+ /**
310
+ * Given an accelerator group, `accel_group,` and an accelerator path,
311
+ * `accel_path,` sets up an accelerator in `accel_group` so whenever the
312
+ * key binding that is defined for `accel_path` is pressed, `widget`
313
+ * will be activated. This removes any accelerators (for any
314
+ * accelerator group) installed by previous calls to
315
+ * gtk_widget_set_accel_path(). Associating accelerators with
316
+ * paths allows them to be modified by the user and the modifications
317
+ * to be saved for future use. (See gtk_accel_map_save().)
318
+ *
319
+ * This function is a low level function that would most likely
320
+ * be used by a menu creation system like #GtkUIManager. If you
321
+ * use #GtkUIManager, setting up accelerator paths will be done
322
+ * automatically.
323
+ *
324
+ * Even when you you aren't using #GtkUIManager, if you only want to
325
+ * set up accelerators on menu items gtk_menu_item_set_accel_path()
326
+ * provides a somewhat more convenient interface.
327
+ *
328
+ * Note that `accel_path` string will be stored in a #GQuark. Therefore, if you
329
+ * pass a static string, you can save some memory by interning it first with
330
+ * g_intern_static_string().
331
+ * @param accel_path path used to look up the accelerator
332
+ * @param accel_group a #GtkAccelGroup.
333
+ */
334
+ set_accel_path(accel_path: string | null, accel_group: Gtk.AccelGroup | null): void
335
+
336
+ // Class property signals of DbusmenuGtk-0.4.DbusmenuGtk.Menu
337
+
338
+ connect(sigName: "notify::dbus-name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
339
+ connect_after(sigName: "notify::dbus-name", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
340
+ emit(sigName: "notify::dbus-name", ...args: any[]): void
341
+ connect(sigName: "notify::dbus-object", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
342
+ connect_after(sigName: "notify::dbus-object", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
343
+ emit(sigName: "notify::dbus-object", ...args: any[]): void
344
+ connect(sigName: "notify::active", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
345
+ connect_after(sigName: "notify::active", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
346
+ emit(sigName: "notify::active", ...args: any[]): void
347
+ connect(sigName: "notify::attach-widget", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
348
+ connect_after(sigName: "notify::attach-widget", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
349
+ emit(sigName: "notify::attach-widget", ...args: any[]): void
350
+ connect(sigName: "notify::monitor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
351
+ connect_after(sigName: "notify::monitor", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
352
+ emit(sigName: "notify::monitor", ...args: any[]): void
353
+ connect(sigName: "notify::reserve-toggle-size", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
354
+ connect_after(sigName: "notify::reserve-toggle-size", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
355
+ emit(sigName: "notify::reserve-toggle-size", ...args: any[]): void
356
+ connect(sigName: "notify::tearoff-state", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
357
+ connect_after(sigName: "notify::tearoff-state", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
358
+ emit(sigName: "notify::tearoff-state", ...args: any[]): void
359
+ connect(sigName: "notify::tearoff-title", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
360
+ connect_after(sigName: "notify::tearoff-title", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
361
+ emit(sigName: "notify::tearoff-title", ...args: any[]): void
362
+ connect(sigName: "notify::take-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
363
+ connect_after(sigName: "notify::take-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
364
+ emit(sigName: "notify::take-focus", ...args: any[]): void
365
+ connect(sigName: "notify::child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
366
+ connect_after(sigName: "notify::child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
367
+ emit(sigName: "notify::child", ...args: any[]): void
368
+ connect(sigName: "notify::resize-mode", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
369
+ connect_after(sigName: "notify::resize-mode", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
370
+ emit(sigName: "notify::resize-mode", ...args: any[]): void
371
+ connect(sigName: "notify::app-paintable", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
372
+ connect_after(sigName: "notify::app-paintable", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
373
+ emit(sigName: "notify::app-paintable", ...args: any[]): void
374
+ connect(sigName: "notify::can-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
375
+ connect_after(sigName: "notify::can-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
376
+ emit(sigName: "notify::can-default", ...args: any[]): void
377
+ connect(sigName: "notify::can-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
378
+ connect_after(sigName: "notify::can-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
379
+ emit(sigName: "notify::can-focus", ...args: any[]): void
380
+ connect(sigName: "notify::composite-child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
381
+ connect_after(sigName: "notify::composite-child", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
382
+ emit(sigName: "notify::composite-child", ...args: any[]): void
383
+ connect(sigName: "notify::double-buffered", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
384
+ connect_after(sigName: "notify::double-buffered", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
385
+ emit(sigName: "notify::double-buffered", ...args: any[]): void
386
+ connect(sigName: "notify::events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
387
+ connect_after(sigName: "notify::events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
388
+ emit(sigName: "notify::events", ...args: any[]): void
389
+ connect(sigName: "notify::extension-events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
390
+ connect_after(sigName: "notify::extension-events", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
391
+ emit(sigName: "notify::extension-events", ...args: any[]): void
392
+ connect(sigName: "notify::has-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
393
+ connect_after(sigName: "notify::has-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
394
+ emit(sigName: "notify::has-default", ...args: any[]): void
395
+ connect(sigName: "notify::has-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
396
+ connect_after(sigName: "notify::has-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
397
+ emit(sigName: "notify::has-focus", ...args: any[]): void
398
+ connect(sigName: "notify::has-tooltip", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
399
+ connect_after(sigName: "notify::has-tooltip", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
400
+ emit(sigName: "notify::has-tooltip", ...args: any[]): void
401
+ connect(sigName: "notify::height-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
402
+ connect_after(sigName: "notify::height-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
403
+ emit(sigName: "notify::height-request", ...args: any[]): void
404
+ connect(sigName: "notify::is-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
405
+ connect_after(sigName: "notify::is-focus", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
406
+ emit(sigName: "notify::is-focus", ...args: any[]): void
407
+ connect(sigName: "notify::no-show-all", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
408
+ connect_after(sigName: "notify::no-show-all", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
409
+ emit(sigName: "notify::no-show-all", ...args: any[]): void
410
+ connect(sigName: "notify::receives-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
411
+ connect_after(sigName: "notify::receives-default", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
412
+ emit(sigName: "notify::receives-default", ...args: any[]): void
413
+ connect(sigName: "notify::sensitive", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
414
+ connect_after(sigName: "notify::sensitive", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
415
+ emit(sigName: "notify::sensitive", ...args: any[]): void
416
+ connect(sigName: "notify::tooltip-markup", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
417
+ connect_after(sigName: "notify::tooltip-markup", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
418
+ emit(sigName: "notify::tooltip-markup", ...args: any[]): void
419
+ connect(sigName: "notify::tooltip-text", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
420
+ connect_after(sigName: "notify::tooltip-text", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
421
+ emit(sigName: "notify::tooltip-text", ...args: any[]): void
422
+ connect(sigName: "notify::visible", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
423
+ connect_after(sigName: "notify::visible", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
424
+ emit(sigName: "notify::visible", ...args: any[]): void
425
+ connect(sigName: "notify::width-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
426
+ connect_after(sigName: "notify::width-request", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
427
+ emit(sigName: "notify::width-request", ...args: any[]): void
428
+ connect(sigName: "notify::user-data", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
429
+ connect_after(sigName: "notify::user-data", callback: (($obj: Menu, pspec: GObject.ParamSpec) => void)): number
430
+ emit(sigName: "notify::user-data", ...args: any[]): void
431
+ connect(sigName: string, callback: (...args: any[]) => void): number
432
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
433
+ emit(sigName: string, ...args: any[]): void
434
+ disconnect(id: number): void
435
+ }
436
+
437
+ /**
438
+ * A #GtkMenu that is built using an abstract tree built from
439
+ * a #DbusmenuGtkClient.
440
+ * @class
441
+ */
442
+ class Menu extends Gtk.Menu {
443
+
444
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.Menu
445
+
446
+ static name: string
447
+ static $gtype: GObject.GType<Menu>
448
+
449
+ // Constructors of DbusmenuGtk-0.4.DbusmenuGtk.Menu
450
+
451
+ constructor(config?: Menu.ConstructorProperties)
452
+ /**
453
+ * Creates a new #DbusmenuGtkMenu object and creates a #DbusmenuClient
454
+ * that connects across DBus to a #DbusmenuServer.
455
+ * @constructor
456
+ * @param dbus_name Name of the #DbusmenuServer on DBus
457
+ * @param dbus_object Name of the object on the #DbusmenuServer
458
+ * @returns A new #DbusmenuGtkMenu sync'd with a server
459
+ */
460
+ constructor(dbus_name: string | null, dbus_object: string | null)
461
+ /**
462
+ * Creates a new #DbusmenuGtkMenu object and creates a #DbusmenuClient
463
+ * that connects across DBus to a #DbusmenuServer.
464
+ * @constructor
465
+ * @param dbus_name Name of the #DbusmenuServer on DBus
466
+ * @param dbus_object Name of the object on the #DbusmenuServer
467
+ * @returns A new #DbusmenuGtkMenu sync'd with a server
468
+ */
469
+ static new(dbus_name: string | null, dbus_object: string | null): Menu
470
+
471
+ // Overloads of new
472
+
473
+ static new(): Gtk.Menu
474
+ _init(config?: Menu.ConstructorProperties): void
475
+ }
476
+
477
+ interface ClientClass {
478
+
479
+ // Own fields of DbusmenuGtk-0.4.DbusmenuGtk.ClientClass
480
+
481
+ /**
482
+ * #GtkMenuClass
483
+ * @field
484
+ */
485
+ parent_class: Dbusmenu.ClientClass
486
+ root_changed: (newroot: Dbusmenu.Menuitem) => void
487
+ reserved1: () => void
488
+ reserved2: () => void
489
+ reserved3: () => void
490
+ reserved4: () => void
491
+ reserved5: () => void
492
+ reserved6: () => void
493
+ }
494
+
495
+ /**
496
+ * Functions and signal slots for using a #DbusmenuGtkClient
497
+ * @record
498
+ */
499
+ abstract class ClientClass {
500
+
501
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.ClientClass
502
+
503
+ static name: string
504
+ }
505
+
506
+ interface ClientPrivate {
507
+ }
508
+
509
+ class ClientPrivate {
510
+
511
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.ClientPrivate
512
+
513
+ static name: string
514
+ }
515
+
516
+ interface MenuClass {
517
+
518
+ // Own fields of DbusmenuGtk-0.4.DbusmenuGtk.MenuClass
519
+
520
+ /**
521
+ * #GtkMenuClass
522
+ * @field
523
+ */
524
+ parent_class: Gtk.MenuClass
525
+ reserved1: () => void
526
+ reserved2: () => void
527
+ reserved3: () => void
528
+ reserved4: () => void
529
+ reserved5: () => void
530
+ reserved6: () => void
531
+ }
532
+
533
+ /**
534
+ * All of the subclassable functions and signal slots for a
535
+ * #DbusmenuGtkMenu.
536
+ * @record
537
+ */
538
+ abstract class MenuClass {
539
+
540
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.MenuClass
541
+
542
+ static name: string
543
+ }
544
+
545
+ interface MenuPrivate {
546
+ }
547
+
548
+ class MenuPrivate {
549
+
550
+ // Own properties of DbusmenuGtk-0.4.DbusmenuGtk.MenuPrivate
551
+
552
+ static name: string
553
+ }
554
+
555
+ /**
556
+ * Name of the imported GIR library
557
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
558
+ */
559
+ const __name__: string
560
+ /**
561
+ * Version of the imported GIR library
562
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
563
+ */
564
+ const __version__: string
565
+ }
566
+
567
+ export default DbusmenuGtk;
568
+ // END
@@ -0,0 +1,8 @@
1
+
2
+
3
+ // @ts-expect-error
4
+ import DbusmenuGtk from 'gi://DbusmenuGtk?version=0.4';
5
+ export { DbusmenuGtk };
6
+ export default DbusmenuGtk;
7
+
8
+
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@girs/dbusmenugtk-0.4",
3
+ "version": "0.4.0-3.0.0-beta.12",
4
+ "description": "GJS TypeScript type definitions for DbusmenuGtk-0.4, generated from library version 0.4.0",
5
+ "type": "module",
6
+ "module": "dbusmenugtk-0.4.js",
7
+ "main": "dbusmenugtk-0.4.js",
8
+ "typedoc": {
9
+ "entryPoint": "./dbusmenugtk-0.4.d.ts",
10
+ "readmeFile": "./README.md",
11
+ "displayName": "DbusmenuGtk-0.4",
12
+ "tsconfig": "./tsconfig.doc.json"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./dbusmenugtk-0.4.d.ts",
18
+ "default": "./dbusmenugtk-0.4.js"
19
+ },
20
+ "require": {
21
+ "types": "./dbusmenugtk-0.4.d.cts",
22
+ "default": "./dbusmenugtk-0.4.cjs"
23
+ }
24
+ }
25
+ },
26
+ "scripts": {
27
+ "test": "yarn test:esm && yarn test:cjs",
28
+ "test:esm": "tsc --noEmit dbusmenugtk-0.4.d.ts",
29
+ "test:cjs": "tsc --noEmit dbusmenugtk-0.4.d.cts"
30
+ },
31
+ "dependencies": {
32
+ "@girs/atk-1.0": "^2.45.1-3.0.0-beta.12",
33
+ "@girs/cairo-1.0": "^1.0.0-3.0.0-beta.12",
34
+ "@girs/dbusmenu-0.4": "^0.4.0-3.0.0-beta.12",
35
+ "@girs/freetype2-2.0": "^2.0.0-3.0.0-beta.12",
36
+ "@girs/gdk-2.0": "^2.0.0-3.0.0-beta.12",
37
+ "@girs/gdkpixbuf-2.0": "^2.0.0-3.0.0-beta.12",
38
+ "@girs/gio-2.0": "^2.75.1-3.0.0-beta.12",
39
+ "@girs/glib-2.0": "^2.75.1-3.0.0-beta.12",
40
+ "@girs/gmodule-2.0": "^2.0.0-3.0.0-beta.12",
41
+ "@girs/gobject-2.0": "^2.75.1-3.0.0-beta.12",
42
+ "@girs/gtk-2.0": "^2.24.33-3.0.0-beta.12",
43
+ "@girs/harfbuzz-0.0": "^6.0.0-3.0.0-beta.12",
44
+ "@girs/pango-1.0": "^1.50.13-3.0.0-beta.12"
45
+ },
46
+ "devDependencies": {
47
+ "typescript": "^*"
48
+ },
49
+ "keywords": [
50
+ "Gir",
51
+ "TypeScript",
52
+ "DbusmenuGtk-0.4"
53
+ ],
54
+ "author": "ts-for-gir",
55
+ "license": "Apache-2.0",
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
59
+ },
60
+ "bugs": {
61
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
62
+ },
63
+ "homepage": "https://github.com/gjsify/ts-for-gir#readme"
64
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "experimentalDecorators": true,
7
+ "moduleResolution": "node",
8
+ "noEmit": true,
9
+ "noEmitOnError": false,
10
+ "baseUrl": "./",
11
+ "rootDir": ".",
12
+ // General settings for code generation
13
+ "removeComments": false,
14
+ "inlineSourceMap": false,
15
+ "inlineSources": false,
16
+ "newLine": "LF"
17
+ },
18
+ "include": ["./dbusmenugtk-0.4.d.ts"]
19
+ }