@girs/gdk-3.0 3.24.39-3.2.2 → 3.24.41-3.2.9

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gdk-3.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Gdk-3.0, generated from library version 3.24.39 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.2.
8
+ GJS TypeScript type definitions for Gdk-3.0, generated from library version 3.24.41 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.9.
9
9
 
10
10
  An intermediate layer which isolates GTK+ from the details of the windowing system.
11
11
 
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
82
82
  const Gdk = imports.gi.Gdk;
83
83
  ```
84
84
 
85
+
86
+ ### ESM vs. CommonJS
87
+
88
+ GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
89
+
90
+ In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
91
+
92
+ On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
93
+
94
+ This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
95
+
96
+ Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
97
+
85
98
  ### Bundle
86
99
 
87
100
  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).
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  declare module 'gi://Gdk?version=3.0' {
4
3
  import Gdk30 from '@girs/gdk-3.0';
5
4
  export default Gdk30;
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import Gdk30 from '@girs/gdk-3.0';
4
3
 
5
4
  declare global {
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
package/gdk-3.0.d.cts CHANGED
@@ -4620,7 +4620,7 @@ export function add_option_entries_libgtk_only(group: GLib.OptionGroup): void
4620
4620
  * @param only_if_exists if %TRUE, GDK is allowed to not create a new atom, but just return %GDK_NONE if the requested atom doesn’t already exists. Currently, the flag is ignored, since checking the existance of an atom is as expensive as creating it.
4621
4621
  * @returns the atom corresponding to @atom_name.
4622
4622
  */
4623
- export function atom_intern(atom_name: string | null, only_if_exists: boolean): Atom
4623
+ export function atom_intern(atom_name: string, only_if_exists: boolean): Atom
4624
4624
  /**
4625
4625
  * Finds or creates an atom corresponding to a given string.
4626
4626
  *
@@ -4635,7 +4635,7 @@ export function atom_intern(atom_name: string | null, only_if_exists: boolean):
4635
4635
  * @param atom_name a static string
4636
4636
  * @returns the atom corresponding to @atom_name
4637
4637
  */
4638
- export function atom_intern_static_string(atom_name: string | null): Atom
4638
+ export function atom_intern_static_string(atom_name: string): Atom
4639
4639
  /**
4640
4640
  * Emits a short beep on the default display.
4641
4641
  */
@@ -4783,7 +4783,7 @@ export function cairo_surface_create_from_pixbuf(pixbuf: GdkPixbuf.Pixbuf, scale
4783
4783
  * @param spec the string specifying the color
4784
4784
  * @returns %TRUE if the parsing succeeded
4785
4785
  */
4786
- export function color_parse(spec: string | null): [ /* returnType */ boolean, /* color */ Color ]
4786
+ export function color_parse(spec: string): [ /* returnType */ boolean, /* color */ Color ]
4787
4787
  /**
4788
4788
  * Disables multidevice support in GDK. This call must happen prior
4789
4789
  * to gdk_display_open(), gtk_init(), gtk_init_with_args() or
@@ -5104,7 +5104,7 @@ export function get_display_arg_name(): string | null
5104
5104
  * with g_get_prgname()) with the first character converted to uppercase.
5105
5105
  * @returns the program class.
5106
5106
  */
5107
- export function get_program_class(): string | null
5107
+ export function get_program_class(): string
5108
5108
  /**
5109
5109
  * Gets whether event debugging output is enabled.
5110
5110
  * @returns %TRUE if event debugging output is enabled.
@@ -5172,7 +5172,7 @@ export function keyval_convert_case(symbol: number): [ /* lower */ number, /* up
5172
5172
  * @param keyval_name a key name
5173
5173
  * @returns the corresponding key value, or %GDK_KEY_VoidSymbol if the key name is not a valid key
5174
5174
  */
5175
- export function keyval_from_name(keyval_name: string | null): number
5175
+ export function keyval_from_name(keyval_name: string): number
5176
5176
  /**
5177
5177
  * Returns %TRUE if the given key value is in lower case.
5178
5178
  * @param keyval a key value.
@@ -5246,7 +5246,7 @@ export function notify_startup_complete(): void
5246
5246
  * disable that feature.
5247
5247
  * @param startup_id a startup-notification identifier, for which notification process should be completed
5248
5248
  */
5249
- export function notify_startup_complete_with_id(startup_id: string | null): void
5249
+ export function notify_startup_complete_with_id(startup_id: string): void
5250
5250
  /**
5251
5251
  * Gets the window that `window` is embedded in.
5252
5252
  * @param window a #GdkWindow
@@ -5586,7 +5586,7 @@ export function selection_send_notify_for_display(display: Display, requestor: W
5586
5586
  * in order to take effect.
5587
5587
  * @param backends a comma-separated list of backends
5588
5588
  */
5589
- export function set_allowed_backends(backends: string | null): void
5589
+ export function set_allowed_backends(backends: string): void
5590
5590
  /**
5591
5591
  * Set the double click time for the default display. See
5592
5592
  * gdk_display_set_double_click_time().
@@ -5605,7 +5605,7 @@ export function set_double_click_time(msec: number): void
5605
5605
  * line option.
5606
5606
  * @param program_class a string.
5607
5607
  */
5608
- export function set_program_class(program_class: string | null): void
5608
+ export function set_program_class(program_class: string): void
5609
5609
  /**
5610
5610
  * Sets whether a trace of received events is output.
5611
5611
  * Note that GTK+ must be compiled with debugging (that is,
@@ -5621,7 +5621,7 @@ export function set_show_events(show_events: boolean): void
5621
5621
  * @param value location to store the value of the setting.
5622
5622
  * @returns %TRUE if the setting existed and a value was stored in @value, %FALSE otherwise.
5623
5623
  */
5624
- export function setting_get(name: string | null, value: any): boolean
5624
+ export function setting_get(name: string, value: any): boolean
5625
5625
  export function synthesize_window_state(window: Window, unset_flags: WindowState, set_flags: WindowState): void
5626
5626
  /**
5627
5627
  * Retrieves a pixel from `window` to force the windowing
@@ -5834,7 +5834,7 @@ export function unicode_to_keyval(wc: number): number
5834
5834
  * @param str a UTF-8 string
5835
5835
  * @returns the newly-allocated string, or %NULL if the conversion failed. (It should not fail for any properly formed UTF-8 string unless system limits like memory or file descriptors are exceeded.)
5836
5836
  */
5837
- export function utf8_to_string_target(str: string | null): string | null
5837
+ export function utf8_to_string_target(str: string): string | null
5838
5838
  /**
5839
5839
  * Specifies the type of function passed to gdk_event_handler_set() to
5840
5840
  * handle all GDK events.
@@ -6192,7 +6192,7 @@ export module Cursor {
6192
6192
 
6193
6193
  // Own constructor properties of Gdk-3.0.Gdk.Cursor
6194
6194
 
6195
- cursor_type?: CursorType | null
6195
+ cursorType?: CursorType | null
6196
6196
  display?: Display | null
6197
6197
  }
6198
6198
 
@@ -6202,7 +6202,7 @@ export interface Cursor {
6202
6202
 
6203
6203
  // Own properties of Gdk-3.0.Gdk.Cursor
6204
6204
 
6205
- readonly cursor_type: CursorType
6205
+ readonly cursorType: CursorType
6206
6206
  readonly display: Display
6207
6207
 
6208
6208
  // Owm methods of Gdk-3.0.Gdk.Cursor
@@ -6361,7 +6361,7 @@ export class Cursor extends GObject.Object {
6361
6361
  * @param name the name of the cursor
6362
6362
  * @returns a new #GdkCursor, or %NULL if there is no cursor with the given name
6363
6363
  */
6364
- static new_from_name(display: Display, name: string | null): Cursor
6364
+ static new_from_name(display: Display, name: string): Cursor
6365
6365
  /**
6366
6366
  * Creates a new cursor from a pixbuf.
6367
6367
  *
@@ -6442,7 +6442,7 @@ export module Device {
6442
6442
  /**
6443
6443
  * The #GdkDeviceManager the #GdkDevice pertains to.
6444
6444
  */
6445
- device_manager?: DeviceManager | null
6445
+ deviceManager?: DeviceManager | null
6446
6446
  /**
6447
6447
  * The #GdkDisplay the #GdkDevice pertains to.
6448
6448
  */
@@ -6451,12 +6451,12 @@ export module Device {
6451
6451
  * Whether the device is represented by a cursor on the screen. Devices of type
6452
6452
  * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6453
6453
  */
6454
- has_cursor?: boolean | null
6455
- input_mode?: InputMode | null
6454
+ hasCursor?: boolean | null
6455
+ inputMode?: InputMode | null
6456
6456
  /**
6457
6457
  * Source type for the device.
6458
6458
  */
6459
- input_source?: InputSource | null
6459
+ inputSource?: InputSource | null
6460
6460
  /**
6461
6461
  * The device name.
6462
6462
  */
@@ -6466,11 +6466,11 @@ export module Device {
6466
6466
  * Will be 0 if the device is not a touch device or if the number
6467
6467
  * of touches is unknown.
6468
6468
  */
6469
- num_touches?: number | null
6469
+ numTouches?: number | null
6470
6470
  /**
6471
6471
  * Product ID of this device, see gdk_device_get_product_id().
6472
6472
  */
6473
- product_id?: string | null
6473
+ productId?: string | null
6474
6474
  /**
6475
6475
  * #GdkSeat of this device.
6476
6476
  */
@@ -6482,7 +6482,7 @@ export module Device {
6482
6482
  /**
6483
6483
  * Vendor ID of this device, see gdk_device_get_vendor_id().
6484
6484
  */
6485
- vendor_id?: string | null
6485
+ vendorId?: string | null
6486
6486
  }
6487
6487
 
6488
6488
  }
@@ -6495,7 +6495,7 @@ export interface Device {
6495
6495
  * Associated pointer or keyboard with this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER
6496
6496
  * always come in keyboard/pointer pairs. Other device types will have a %NULL associated device.
6497
6497
  */
6498
- readonly associated_device: Device
6498
+ readonly associatedDevice: Device
6499
6499
  /**
6500
6500
  * The axes currently available for this device.
6501
6501
  */
@@ -6503,7 +6503,7 @@ export interface Device {
6503
6503
  /**
6504
6504
  * The #GdkDeviceManager the #GdkDevice pertains to.
6505
6505
  */
6506
- readonly device_manager: DeviceManager
6506
+ readonly deviceManager: DeviceManager
6507
6507
  /**
6508
6508
  * The #GdkDisplay the #GdkDevice pertains to.
6509
6509
  */
@@ -6512,16 +6512,16 @@ export interface Device {
6512
6512
  * Whether the device is represented by a cursor on the screen. Devices of type
6513
6513
  * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6514
6514
  */
6515
- readonly has_cursor: boolean
6516
- input_mode: InputMode
6515
+ readonly hasCursor: boolean
6516
+ inputMode: InputMode
6517
6517
  /**
6518
6518
  * Source type for the device.
6519
6519
  */
6520
- readonly input_source: InputSource
6520
+ readonly inputSource: InputSource
6521
6521
  /**
6522
6522
  * Number of axes in the device.
6523
6523
  */
6524
- readonly n_axes: number
6524
+ readonly nAxes: number
6525
6525
  /**
6526
6526
  * The device name.
6527
6527
  */
@@ -6531,11 +6531,11 @@ export interface Device {
6531
6531
  * Will be 0 if the device is not a touch device or if the number
6532
6532
  * of touches is unknown.
6533
6533
  */
6534
- readonly num_touches: number
6534
+ readonly numTouches: number
6535
6535
  /**
6536
6536
  * Product ID of this device, see gdk_device_get_product_id().
6537
6537
  */
6538
- readonly product_id: string | null
6538
+ readonly productId: string | null
6539
6539
  /**
6540
6540
  * #GdkSeat of this device.
6541
6541
  */
@@ -6548,7 +6548,7 @@ export interface Device {
6548
6548
  /**
6549
6549
  * Vendor ID of this device, see gdk_device_get_vendor_id().
6550
6550
  */
6551
- readonly vendor_id: string | null
6551
+ readonly vendorId: string | null
6552
6552
 
6553
6553
  // Owm methods of Gdk-3.0.Gdk.Device
6554
6554
 
@@ -6626,7 +6626,7 @@ export interface Device {
6626
6626
  * Determines the name of the device.
6627
6627
  * @returns a name
6628
6628
  */
6629
- get_name(): string | null
6629
+ get_name(): string
6630
6630
  /**
6631
6631
  * Gets the current location of `device`. As a slave device
6632
6632
  * coordinates are those of its master pointer, This function
@@ -7128,9 +7128,9 @@ export module DeviceTool {
7128
7128
  // Own constructor properties of Gdk-3.0.Gdk.DeviceTool
7129
7129
 
7130
7130
  axes?: AxisFlags | null
7131
- hardware_id?: number | null
7131
+ hardwareId?: number | null
7132
7132
  serial?: number | null
7133
- tool_type?: DeviceToolType | null
7133
+ toolType?: DeviceToolType | null
7134
7134
  }
7135
7135
 
7136
7136
  }
@@ -7140,9 +7140,9 @@ export interface DeviceTool {
7140
7140
  // Own properties of Gdk-3.0.Gdk.DeviceTool
7141
7141
 
7142
7142
  readonly axes: AxisFlags
7143
- readonly hardware_id: number
7143
+ readonly hardwareId: number
7144
7144
  readonly serial: number
7145
- readonly tool_type: DeviceToolType
7145
+ readonly toolType: DeviceToolType
7146
7146
 
7147
7147
  // Owm methods of Gdk-3.0.Gdk.DeviceTool
7148
7148
 
@@ -7371,7 +7371,7 @@ export interface Display {
7371
7371
  * Gets the name of the display.
7372
7372
  * @returns a string representing the display name. This string is owned by GDK and should not be modified or freed.
7373
7373
  */
7374
- get_name(): string | null
7374
+ get_name(): string
7375
7375
  /**
7376
7376
  * Gets the current location of the pointer and the current modifier
7377
7377
  * mask for a given display.
@@ -7438,7 +7438,7 @@ export interface Display {
7438
7438
  * disable that feature.
7439
7439
  * @param startup_id a startup-notification identifier, for which notification process should be completed
7440
7440
  */
7441
- notify_startup_complete(startup_id: string | null): void
7441
+ notify_startup_complete(startup_id: string): void
7442
7442
  /**
7443
7443
  * Gets a copy of the first #GdkEvent in the `display’`s event queue, without
7444
7444
  * removing the event from the queue. (Note that this function will
@@ -7649,7 +7649,7 @@ export class Display extends GObject.Object {
7649
7649
  * @param display_name the name of the display to open
7650
7650
  * @returns a #GdkDisplay, or %NULL if the display could not be opened
7651
7651
  */
7652
- static open(display_name: string | null): Display | null
7652
+ static open(display_name: string): Display | null
7653
7653
  /**
7654
7654
  * Opens the default display specified by command line arguments or
7655
7655
  * environment variables, sets it as the default display, and returns
@@ -7679,7 +7679,7 @@ export module DisplayManager {
7679
7679
 
7680
7680
  // Own constructor properties of Gdk-3.0.Gdk.DisplayManager
7681
7681
 
7682
- default_display?: Display | null
7682
+ defaultDisplay?: Display | null
7683
7683
  }
7684
7684
 
7685
7685
  }
@@ -7688,7 +7688,7 @@ export interface DisplayManager {
7688
7688
 
7689
7689
  // Own properties of Gdk-3.0.Gdk.DisplayManager
7690
7690
 
7691
- default_display: Display
7691
+ defaultDisplay: Display
7692
7692
 
7693
7693
  // Owm methods of Gdk-3.0.Gdk.DisplayManager
7694
7694
 
@@ -7707,7 +7707,7 @@ export interface DisplayManager {
7707
7707
  * @param name the name of the display to open
7708
7708
  * @returns a #GdkDisplay, or %NULL if the display could not be opened
7709
7709
  */
7710
- open_display(name: string | null): Display | null
7710
+ open_display(name: string): Display | null
7711
7711
  /**
7712
7712
  * Sets `display` as the default display.
7713
7713
  * @param display a #GdkDisplay
@@ -8306,7 +8306,7 @@ export module GLContext {
8306
8306
  /**
8307
8307
  * The #GdkGLContext that this context is sharing data with, or %NULL
8308
8308
  */
8309
- shared_context?: GLContext | null
8309
+ sharedContext?: GLContext | null
8310
8310
  /**
8311
8311
  * The #GdkWindow the gl context is bound to.
8312
8312
  */
@@ -8326,7 +8326,7 @@ export interface GLContext {
8326
8326
  /**
8327
8327
  * The #GdkGLContext that this context is sharing data with, or %NULL
8328
8328
  */
8329
- readonly shared_context: GLContext
8329
+ readonly sharedContext: GLContext
8330
8330
  /**
8331
8331
  * The #GdkWindow the gl context is bound to.
8332
8332
  */
@@ -8840,13 +8840,13 @@ export interface Monitor {
8840
8840
 
8841
8841
  readonly display: Display
8842
8842
  readonly geometry: Rectangle
8843
- readonly height_mm: number
8843
+ readonly heightMm: number
8844
8844
  readonly manufacturer: string | null
8845
8845
  readonly model: string | null
8846
- readonly refresh_rate: number
8847
- readonly scale_factor: number
8848
- readonly subpixel_layout: SubpixelLayout
8849
- readonly width_mm: number
8846
+ readonly refreshRate: number
8847
+ readonly scaleFactor: number
8848
+ readonly subpixelLayout: SubpixelLayout
8849
+ readonly widthMm: number
8850
8850
  readonly workarea: Rectangle
8851
8851
 
8852
8852
  // Owm methods of Gdk-3.0.Gdk.Monitor
@@ -9034,7 +9034,7 @@ export module Screen {
9034
9034
 
9035
9035
  // Own constructor properties of Gdk-3.0.Gdk.Screen
9036
9036
 
9037
- font_options?: any | null
9037
+ fontOptions?: any | null
9038
9038
  resolution?: number | null
9039
9039
  }
9040
9040
 
@@ -9044,7 +9044,7 @@ export interface Screen {
9044
9044
 
9045
9045
  // Own properties of Gdk-3.0.Gdk.Screen
9046
9046
 
9047
- font_options: any
9047
+ fontOptions: any
9048
9048
  resolution: number
9049
9049
 
9050
9050
  // Owm methods of Gdk-3.0.Gdk.Screen
@@ -9233,7 +9233,7 @@ export interface Screen {
9233
9233
  * @param value location to store the value of the setting
9234
9234
  * @returns %TRUE if the setting existed and a value was stored in @value, %FALSE otherwise.
9235
9235
  */
9236
- get_setting(name: string | null, value: any): boolean
9236
+ get_setting(name: string, value: any): boolean
9237
9237
  /**
9238
9238
  * Get the system’s default visual for `screen`.
9239
9239
  * This is the visual for the root window of the display.
@@ -11268,7 +11268,7 @@ export interface Window {
11268
11268
  * non-interchangeable kind of window.
11269
11269
  * @param role a string indicating its role
11270
11270
  */
11271
- set_role(role: string | null): void
11271
+ set_role(role: string): void
11272
11272
  /**
11273
11273
  * Newer GTK+ windows using client-side decorations use extra geometry
11274
11274
  * around their frames for effects like shadows and invisible borders.
@@ -11321,7 +11321,7 @@ export interface Window {
11321
11321
  * instead of this low-level function.
11322
11322
  * @param startup_id a string with startup-notification identifier
11323
11323
  */
11324
- set_startup_id(startup_id: string | null): void
11324
+ set_startup_id(startup_id: string): void
11325
11325
  /**
11326
11326
  * Used to set the bit gravity of the given window to static, and flag
11327
11327
  * it so all children get static subwindow gravity. This is used if you
@@ -11347,7 +11347,7 @@ export interface Window {
11347
11347
  * user-readable strings in GDK/GTK+). `title` may not be %NULL.
11348
11348
  * @param title title of `window`
11349
11349
  */
11350
- set_title(title: string | null): void
11350
+ set_title(title: string): void
11351
11351
  /**
11352
11352
  * Indicates to the window manager that `window` is a transient dialog
11353
11353
  * associated with the application window `parent`. This allows the
@@ -11652,7 +11652,7 @@ export class Atom {
11652
11652
  * @param only_if_exists if %TRUE, GDK is allowed to not create a new atom, but just return %GDK_NONE if the requested atom doesn’t already exists. Currently, the flag is ignored, since checking the existance of an atom is as expensive as creating it.
11653
11653
  * @returns the atom corresponding to @atom_name.
11654
11654
  */
11655
- static intern(atom_name: string | null, only_if_exists: boolean): Atom
11655
+ static intern(atom_name: string, only_if_exists: boolean): Atom
11656
11656
  /**
11657
11657
  * Finds or creates an atom corresponding to a given string.
11658
11658
  *
@@ -11667,7 +11667,7 @@ export class Atom {
11667
11667
  * @param atom_name a static string
11668
11668
  * @returns the atom corresponding to @atom_name
11669
11669
  */
11670
- static intern_static_string(atom_name: string | null): Atom
11670
+ static intern_static_string(atom_name: string): Atom
11671
11671
  }
11672
11672
 
11673
11673
  export interface Color {
@@ -11761,7 +11761,7 @@ export class Color {
11761
11761
  * @param spec the string specifying the color
11762
11762
  * @returns %TRUE if the parsing succeeded
11763
11763
  */
11764
- static parse(spec: string | null): [ /* returnType */ boolean, /* color */ Color ]
11764
+ static parse(spec: string): [ /* returnType */ boolean, /* color */ Color ]
11765
11765
  }
11766
11766
 
11767
11767
  export interface DevicePadInterface {
@@ -13732,7 +13732,7 @@ export interface RGBA {
13732
13732
  * @param spec the string specifying the color
13733
13733
  * @returns %TRUE if the parsing succeeded
13734
13734
  */
13735
- parse(spec: string | null): boolean
13735
+ parse(spec: string): boolean
13736
13736
  /**
13737
13737
  * Returns a textual specification of `rgba` in the form
13738
13738
  * `rgb(r,g,b)` or
package/gdk-3.0.d.ts CHANGED
@@ -4622,7 +4622,7 @@ function add_option_entries_libgtk_only(group: GLib.OptionGroup): void
4622
4622
  * @param only_if_exists if %TRUE, GDK is allowed to not create a new atom, but just return %GDK_NONE if the requested atom doesn’t already exists. Currently, the flag is ignored, since checking the existance of an atom is as expensive as creating it.
4623
4623
  * @returns the atom corresponding to @atom_name.
4624
4624
  */
4625
- function atom_intern(atom_name: string | null, only_if_exists: boolean): Atom
4625
+ function atom_intern(atom_name: string, only_if_exists: boolean): Atom
4626
4626
  /**
4627
4627
  * Finds or creates an atom corresponding to a given string.
4628
4628
  *
@@ -4637,7 +4637,7 @@ function atom_intern(atom_name: string | null, only_if_exists: boolean): Atom
4637
4637
  * @param atom_name a static string
4638
4638
  * @returns the atom corresponding to @atom_name
4639
4639
  */
4640
- function atom_intern_static_string(atom_name: string | null): Atom
4640
+ function atom_intern_static_string(atom_name: string): Atom
4641
4641
  /**
4642
4642
  * Emits a short beep on the default display.
4643
4643
  */
@@ -4785,7 +4785,7 @@ function cairo_surface_create_from_pixbuf(pixbuf: GdkPixbuf.Pixbuf, scale: numbe
4785
4785
  * @param spec the string specifying the color
4786
4786
  * @returns %TRUE if the parsing succeeded
4787
4787
  */
4788
- function color_parse(spec: string | null): [ /* returnType */ boolean, /* color */ Color ]
4788
+ function color_parse(spec: string): [ /* returnType */ boolean, /* color */ Color ]
4789
4789
  /**
4790
4790
  * Disables multidevice support in GDK. This call must happen prior
4791
4791
  * to gdk_display_open(), gtk_init(), gtk_init_with_args() or
@@ -5106,7 +5106,7 @@ function get_display_arg_name(): string | null
5106
5106
  * with g_get_prgname()) with the first character converted to uppercase.
5107
5107
  * @returns the program class.
5108
5108
  */
5109
- function get_program_class(): string | null
5109
+ function get_program_class(): string
5110
5110
  /**
5111
5111
  * Gets whether event debugging output is enabled.
5112
5112
  * @returns %TRUE if event debugging output is enabled.
@@ -5174,7 +5174,7 @@ function keyval_convert_case(symbol: number): [ /* lower */ number, /* upper */
5174
5174
  * @param keyval_name a key name
5175
5175
  * @returns the corresponding key value, or %GDK_KEY_VoidSymbol if the key name is not a valid key
5176
5176
  */
5177
- function keyval_from_name(keyval_name: string | null): number
5177
+ function keyval_from_name(keyval_name: string): number
5178
5178
  /**
5179
5179
  * Returns %TRUE if the given key value is in lower case.
5180
5180
  * @param keyval a key value.
@@ -5248,7 +5248,7 @@ function notify_startup_complete(): void
5248
5248
  * disable that feature.
5249
5249
  * @param startup_id a startup-notification identifier, for which notification process should be completed
5250
5250
  */
5251
- function notify_startup_complete_with_id(startup_id: string | null): void
5251
+ function notify_startup_complete_with_id(startup_id: string): void
5252
5252
  /**
5253
5253
  * Gets the window that `window` is embedded in.
5254
5254
  * @param window a #GdkWindow
@@ -5588,7 +5588,7 @@ function selection_send_notify_for_display(display: Display, requestor: Window,
5588
5588
  * in order to take effect.
5589
5589
  * @param backends a comma-separated list of backends
5590
5590
  */
5591
- function set_allowed_backends(backends: string | null): void
5591
+ function set_allowed_backends(backends: string): void
5592
5592
  /**
5593
5593
  * Set the double click time for the default display. See
5594
5594
  * gdk_display_set_double_click_time().
@@ -5607,7 +5607,7 @@ function set_double_click_time(msec: number): void
5607
5607
  * line option.
5608
5608
  * @param program_class a string.
5609
5609
  */
5610
- function set_program_class(program_class: string | null): void
5610
+ function set_program_class(program_class: string): void
5611
5611
  /**
5612
5612
  * Sets whether a trace of received events is output.
5613
5613
  * Note that GTK+ must be compiled with debugging (that is,
@@ -5623,7 +5623,7 @@ function set_show_events(show_events: boolean): void
5623
5623
  * @param value location to store the value of the setting.
5624
5624
  * @returns %TRUE if the setting existed and a value was stored in @value, %FALSE otherwise.
5625
5625
  */
5626
- function setting_get(name: string | null, value: any): boolean
5626
+ function setting_get(name: string, value: any): boolean
5627
5627
  function synthesize_window_state(window: Window, unset_flags: WindowState, set_flags: WindowState): void
5628
5628
  /**
5629
5629
  * Retrieves a pixel from `window` to force the windowing
@@ -5836,7 +5836,7 @@ function unicode_to_keyval(wc: number): number
5836
5836
  * @param str a UTF-8 string
5837
5837
  * @returns the newly-allocated string, or %NULL if the conversion failed. (It should not fail for any properly formed UTF-8 string unless system limits like memory or file descriptors are exceeded.)
5838
5838
  */
5839
- function utf8_to_string_target(str: string | null): string | null
5839
+ function utf8_to_string_target(str: string): string | null
5840
5840
  /**
5841
5841
  * Specifies the type of function passed to gdk_event_handler_set() to
5842
5842
  * handle all GDK events.
@@ -6194,7 +6194,7 @@ module Cursor {
6194
6194
 
6195
6195
  // Own constructor properties of Gdk-3.0.Gdk.Cursor
6196
6196
 
6197
- cursor_type?: CursorType | null
6197
+ cursorType?: CursorType | null
6198
6198
  display?: Display | null
6199
6199
  }
6200
6200
 
@@ -6204,7 +6204,7 @@ interface Cursor {
6204
6204
 
6205
6205
  // Own properties of Gdk-3.0.Gdk.Cursor
6206
6206
 
6207
- readonly cursor_type: CursorType
6207
+ readonly cursorType: CursorType
6208
6208
  readonly display: Display
6209
6209
 
6210
6210
  // Owm methods of Gdk-3.0.Gdk.Cursor
@@ -6363,7 +6363,7 @@ class Cursor extends GObject.Object {
6363
6363
  * @param name the name of the cursor
6364
6364
  * @returns a new #GdkCursor, or %NULL if there is no cursor with the given name
6365
6365
  */
6366
- static new_from_name(display: Display, name: string | null): Cursor
6366
+ static new_from_name(display: Display, name: string): Cursor
6367
6367
  /**
6368
6368
  * Creates a new cursor from a pixbuf.
6369
6369
  *
@@ -6444,7 +6444,7 @@ module Device {
6444
6444
  /**
6445
6445
  * The #GdkDeviceManager the #GdkDevice pertains to.
6446
6446
  */
6447
- device_manager?: DeviceManager | null
6447
+ deviceManager?: DeviceManager | null
6448
6448
  /**
6449
6449
  * The #GdkDisplay the #GdkDevice pertains to.
6450
6450
  */
@@ -6453,12 +6453,12 @@ module Device {
6453
6453
  * Whether the device is represented by a cursor on the screen. Devices of type
6454
6454
  * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6455
6455
  */
6456
- has_cursor?: boolean | null
6457
- input_mode?: InputMode | null
6456
+ hasCursor?: boolean | null
6457
+ inputMode?: InputMode | null
6458
6458
  /**
6459
6459
  * Source type for the device.
6460
6460
  */
6461
- input_source?: InputSource | null
6461
+ inputSource?: InputSource | null
6462
6462
  /**
6463
6463
  * The device name.
6464
6464
  */
@@ -6468,11 +6468,11 @@ module Device {
6468
6468
  * Will be 0 if the device is not a touch device or if the number
6469
6469
  * of touches is unknown.
6470
6470
  */
6471
- num_touches?: number | null
6471
+ numTouches?: number | null
6472
6472
  /**
6473
6473
  * Product ID of this device, see gdk_device_get_product_id().
6474
6474
  */
6475
- product_id?: string | null
6475
+ productId?: string | null
6476
6476
  /**
6477
6477
  * #GdkSeat of this device.
6478
6478
  */
@@ -6484,7 +6484,7 @@ module Device {
6484
6484
  /**
6485
6485
  * Vendor ID of this device, see gdk_device_get_vendor_id().
6486
6486
  */
6487
- vendor_id?: string | null
6487
+ vendorId?: string | null
6488
6488
  }
6489
6489
 
6490
6490
  }
@@ -6497,7 +6497,7 @@ interface Device {
6497
6497
  * Associated pointer or keyboard with this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER
6498
6498
  * always come in keyboard/pointer pairs. Other device types will have a %NULL associated device.
6499
6499
  */
6500
- readonly associated_device: Device
6500
+ readonly associatedDevice: Device
6501
6501
  /**
6502
6502
  * The axes currently available for this device.
6503
6503
  */
@@ -6505,7 +6505,7 @@ interface Device {
6505
6505
  /**
6506
6506
  * The #GdkDeviceManager the #GdkDevice pertains to.
6507
6507
  */
6508
- readonly device_manager: DeviceManager
6508
+ readonly deviceManager: DeviceManager
6509
6509
  /**
6510
6510
  * The #GdkDisplay the #GdkDevice pertains to.
6511
6511
  */
@@ -6514,16 +6514,16 @@ interface Device {
6514
6514
  * Whether the device is represented by a cursor on the screen. Devices of type
6515
6515
  * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6516
6516
  */
6517
- readonly has_cursor: boolean
6518
- input_mode: InputMode
6517
+ readonly hasCursor: boolean
6518
+ inputMode: InputMode
6519
6519
  /**
6520
6520
  * Source type for the device.
6521
6521
  */
6522
- readonly input_source: InputSource
6522
+ readonly inputSource: InputSource
6523
6523
  /**
6524
6524
  * Number of axes in the device.
6525
6525
  */
6526
- readonly n_axes: number
6526
+ readonly nAxes: number
6527
6527
  /**
6528
6528
  * The device name.
6529
6529
  */
@@ -6533,11 +6533,11 @@ interface Device {
6533
6533
  * Will be 0 if the device is not a touch device or if the number
6534
6534
  * of touches is unknown.
6535
6535
  */
6536
- readonly num_touches: number
6536
+ readonly numTouches: number
6537
6537
  /**
6538
6538
  * Product ID of this device, see gdk_device_get_product_id().
6539
6539
  */
6540
- readonly product_id: string | null
6540
+ readonly productId: string | null
6541
6541
  /**
6542
6542
  * #GdkSeat of this device.
6543
6543
  */
@@ -6550,7 +6550,7 @@ interface Device {
6550
6550
  /**
6551
6551
  * Vendor ID of this device, see gdk_device_get_vendor_id().
6552
6552
  */
6553
- readonly vendor_id: string | null
6553
+ readonly vendorId: string | null
6554
6554
 
6555
6555
  // Owm methods of Gdk-3.0.Gdk.Device
6556
6556
 
@@ -6628,7 +6628,7 @@ interface Device {
6628
6628
  * Determines the name of the device.
6629
6629
  * @returns a name
6630
6630
  */
6631
- get_name(): string | null
6631
+ get_name(): string
6632
6632
  /**
6633
6633
  * Gets the current location of `device`. As a slave device
6634
6634
  * coordinates are those of its master pointer, This function
@@ -7130,9 +7130,9 @@ module DeviceTool {
7130
7130
  // Own constructor properties of Gdk-3.0.Gdk.DeviceTool
7131
7131
 
7132
7132
  axes?: AxisFlags | null
7133
- hardware_id?: number | null
7133
+ hardwareId?: number | null
7134
7134
  serial?: number | null
7135
- tool_type?: DeviceToolType | null
7135
+ toolType?: DeviceToolType | null
7136
7136
  }
7137
7137
 
7138
7138
  }
@@ -7142,9 +7142,9 @@ interface DeviceTool {
7142
7142
  // Own properties of Gdk-3.0.Gdk.DeviceTool
7143
7143
 
7144
7144
  readonly axes: AxisFlags
7145
- readonly hardware_id: number
7145
+ readonly hardwareId: number
7146
7146
  readonly serial: number
7147
- readonly tool_type: DeviceToolType
7147
+ readonly toolType: DeviceToolType
7148
7148
 
7149
7149
  // Owm methods of Gdk-3.0.Gdk.DeviceTool
7150
7150
 
@@ -7373,7 +7373,7 @@ interface Display {
7373
7373
  * Gets the name of the display.
7374
7374
  * @returns a string representing the display name. This string is owned by GDK and should not be modified or freed.
7375
7375
  */
7376
- get_name(): string | null
7376
+ get_name(): string
7377
7377
  /**
7378
7378
  * Gets the current location of the pointer and the current modifier
7379
7379
  * mask for a given display.
@@ -7440,7 +7440,7 @@ interface Display {
7440
7440
  * disable that feature.
7441
7441
  * @param startup_id a startup-notification identifier, for which notification process should be completed
7442
7442
  */
7443
- notify_startup_complete(startup_id: string | null): void
7443
+ notify_startup_complete(startup_id: string): void
7444
7444
  /**
7445
7445
  * Gets a copy of the first #GdkEvent in the `display’`s event queue, without
7446
7446
  * removing the event from the queue. (Note that this function will
@@ -7651,7 +7651,7 @@ class Display extends GObject.Object {
7651
7651
  * @param display_name the name of the display to open
7652
7652
  * @returns a #GdkDisplay, or %NULL if the display could not be opened
7653
7653
  */
7654
- static open(display_name: string | null): Display | null
7654
+ static open(display_name: string): Display | null
7655
7655
  /**
7656
7656
  * Opens the default display specified by command line arguments or
7657
7657
  * environment variables, sets it as the default display, and returns
@@ -7681,7 +7681,7 @@ module DisplayManager {
7681
7681
 
7682
7682
  // Own constructor properties of Gdk-3.0.Gdk.DisplayManager
7683
7683
 
7684
- default_display?: Display | null
7684
+ defaultDisplay?: Display | null
7685
7685
  }
7686
7686
 
7687
7687
  }
@@ -7690,7 +7690,7 @@ interface DisplayManager {
7690
7690
 
7691
7691
  // Own properties of Gdk-3.0.Gdk.DisplayManager
7692
7692
 
7693
- default_display: Display
7693
+ defaultDisplay: Display
7694
7694
 
7695
7695
  // Owm methods of Gdk-3.0.Gdk.DisplayManager
7696
7696
 
@@ -7709,7 +7709,7 @@ interface DisplayManager {
7709
7709
  * @param name the name of the display to open
7710
7710
  * @returns a #GdkDisplay, or %NULL if the display could not be opened
7711
7711
  */
7712
- open_display(name: string | null): Display | null
7712
+ open_display(name: string): Display | null
7713
7713
  /**
7714
7714
  * Sets `display` as the default display.
7715
7715
  * @param display a #GdkDisplay
@@ -8308,7 +8308,7 @@ module GLContext {
8308
8308
  /**
8309
8309
  * The #GdkGLContext that this context is sharing data with, or %NULL
8310
8310
  */
8311
- shared_context?: GLContext | null
8311
+ sharedContext?: GLContext | null
8312
8312
  /**
8313
8313
  * The #GdkWindow the gl context is bound to.
8314
8314
  */
@@ -8328,7 +8328,7 @@ interface GLContext {
8328
8328
  /**
8329
8329
  * The #GdkGLContext that this context is sharing data with, or %NULL
8330
8330
  */
8331
- readonly shared_context: GLContext
8331
+ readonly sharedContext: GLContext
8332
8332
  /**
8333
8333
  * The #GdkWindow the gl context is bound to.
8334
8334
  */
@@ -8842,13 +8842,13 @@ interface Monitor {
8842
8842
 
8843
8843
  readonly display: Display
8844
8844
  readonly geometry: Rectangle
8845
- readonly height_mm: number
8845
+ readonly heightMm: number
8846
8846
  readonly manufacturer: string | null
8847
8847
  readonly model: string | null
8848
- readonly refresh_rate: number
8849
- readonly scale_factor: number
8850
- readonly subpixel_layout: SubpixelLayout
8851
- readonly width_mm: number
8848
+ readonly refreshRate: number
8849
+ readonly scaleFactor: number
8850
+ readonly subpixelLayout: SubpixelLayout
8851
+ readonly widthMm: number
8852
8852
  readonly workarea: Rectangle
8853
8853
 
8854
8854
  // Owm methods of Gdk-3.0.Gdk.Monitor
@@ -9036,7 +9036,7 @@ module Screen {
9036
9036
 
9037
9037
  // Own constructor properties of Gdk-3.0.Gdk.Screen
9038
9038
 
9039
- font_options?: any | null
9039
+ fontOptions?: any | null
9040
9040
  resolution?: number | null
9041
9041
  }
9042
9042
 
@@ -9046,7 +9046,7 @@ interface Screen {
9046
9046
 
9047
9047
  // Own properties of Gdk-3.0.Gdk.Screen
9048
9048
 
9049
- font_options: any
9049
+ fontOptions: any
9050
9050
  resolution: number
9051
9051
 
9052
9052
  // Owm methods of Gdk-3.0.Gdk.Screen
@@ -9235,7 +9235,7 @@ interface Screen {
9235
9235
  * @param value location to store the value of the setting
9236
9236
  * @returns %TRUE if the setting existed and a value was stored in @value, %FALSE otherwise.
9237
9237
  */
9238
- get_setting(name: string | null, value: any): boolean
9238
+ get_setting(name: string, value: any): boolean
9239
9239
  /**
9240
9240
  * Get the system’s default visual for `screen`.
9241
9241
  * This is the visual for the root window of the display.
@@ -11270,7 +11270,7 @@ interface Window {
11270
11270
  * non-interchangeable kind of window.
11271
11271
  * @param role a string indicating its role
11272
11272
  */
11273
- set_role(role: string | null): void
11273
+ set_role(role: string): void
11274
11274
  /**
11275
11275
  * Newer GTK+ windows using client-side decorations use extra geometry
11276
11276
  * around their frames for effects like shadows and invisible borders.
@@ -11323,7 +11323,7 @@ interface Window {
11323
11323
  * instead of this low-level function.
11324
11324
  * @param startup_id a string with startup-notification identifier
11325
11325
  */
11326
- set_startup_id(startup_id: string | null): void
11326
+ set_startup_id(startup_id: string): void
11327
11327
  /**
11328
11328
  * Used to set the bit gravity of the given window to static, and flag
11329
11329
  * it so all children get static subwindow gravity. This is used if you
@@ -11349,7 +11349,7 @@ interface Window {
11349
11349
  * user-readable strings in GDK/GTK+). `title` may not be %NULL.
11350
11350
  * @param title title of `window`
11351
11351
  */
11352
- set_title(title: string | null): void
11352
+ set_title(title: string): void
11353
11353
  /**
11354
11354
  * Indicates to the window manager that `window` is a transient dialog
11355
11355
  * associated with the application window `parent`. This allows the
@@ -11654,7 +11654,7 @@ class Atom {
11654
11654
  * @param only_if_exists if %TRUE, GDK is allowed to not create a new atom, but just return %GDK_NONE if the requested atom doesn’t already exists. Currently, the flag is ignored, since checking the existance of an atom is as expensive as creating it.
11655
11655
  * @returns the atom corresponding to @atom_name.
11656
11656
  */
11657
- static intern(atom_name: string | null, only_if_exists: boolean): Atom
11657
+ static intern(atom_name: string, only_if_exists: boolean): Atom
11658
11658
  /**
11659
11659
  * Finds or creates an atom corresponding to a given string.
11660
11660
  *
@@ -11669,7 +11669,7 @@ class Atom {
11669
11669
  * @param atom_name a static string
11670
11670
  * @returns the atom corresponding to @atom_name
11671
11671
  */
11672
- static intern_static_string(atom_name: string | null): Atom
11672
+ static intern_static_string(atom_name: string): Atom
11673
11673
  }
11674
11674
 
11675
11675
  interface Color {
@@ -11763,7 +11763,7 @@ class Color {
11763
11763
  * @param spec the string specifying the color
11764
11764
  * @returns %TRUE if the parsing succeeded
11765
11765
  */
11766
- static parse(spec: string | null): [ /* returnType */ boolean, /* color */ Color ]
11766
+ static parse(spec: string): [ /* returnType */ boolean, /* color */ Color ]
11767
11767
  }
11768
11768
 
11769
11769
  interface DevicePadInterface {
@@ -13734,7 +13734,7 @@ interface RGBA {
13734
13734
  * @param spec the string specifying the color
13735
13735
  * @returns %TRUE if the parsing succeeded
13736
13736
  */
13737
- parse(spec: string | null): boolean
13737
+ parse(spec: string): boolean
13738
13738
  /**
13739
13739
  * Returns a textual specification of `rgba` in the form
13740
13740
  * `rgb(r,g,b)` or
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "@girs/gdk-3.0",
3
- "version": "3.24.39-3.2.2",
4
- "description": "GJS TypeScript type definitions for Gdk-3.0, generated from library version 3.24.39",
3
+ "version": "3.24.41-3.2.9",
4
+ "description": "GJS TypeScript type definitions for Gdk-3.0, generated from library version 3.24.41",
5
5
  "type": "module",
6
6
  "module": "gdk-3.0.js",
7
7
  "main": "gdk-3.0.js",
8
8
  "exports": {
9
- "./ambient": "./gdk-3.0-ambient.d.ts",
10
- "./import": "./gdk-3.0-import.d.ts",
9
+ "./ambient": {
10
+ "types": "./gdk-3.0-ambient.d.ts",
11
+ "default": "./gdk-3.0-ambient.js"
12
+ },
13
+ "./import": {
14
+ "types": "./gdk-3.0-import.d.ts",
15
+ "default": "./gdk-3.0-import.js"
16
+ },
11
17
  ".": {
12
18
  "import": {
13
19
  "types": "./gdk-3.0.d.ts",
@@ -25,16 +31,16 @@
25
31
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gdk-3.0.d.cts"
26
32
  },
27
33
  "dependencies": {
28
- "@girs/cairo-1.0": "^1.0.0-3.2.2",
29
- "@girs/freetype2-2.0": "^2.0.0-3.2.2",
30
- "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.2",
31
- "@girs/gio-2.0": "^2.77.0-3.2.2",
32
- "@girs/gjs": "^3.2.2",
33
- "@girs/glib-2.0": "^2.77.0-3.2.2",
34
- "@girs/gmodule-2.0": "^2.0.0-3.2.2",
35
- "@girs/gobject-2.0": "^2.77.0-3.2.2",
36
- "@girs/harfbuzz-0.0": "^7.1.0-3.2.2",
37
- "@girs/pango-1.0": "^1.51.0-3.2.2"
34
+ "@girs/cairo-1.0": "^1.0.0-3.2.9",
35
+ "@girs/freetype2-2.0": "^2.0.0-3.2.9",
36
+ "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.9",
37
+ "@girs/gio-2.0": "^2.78.0-3.2.9",
38
+ "@girs/gjs": "^3.2.9",
39
+ "@girs/glib-2.0": "^2.78.0-3.2.9",
40
+ "@girs/gmodule-2.0": "^2.0.0-3.2.9",
41
+ "@girs/gobject-2.0": "^2.78.0-3.2.9",
42
+ "@girs/harfbuzz-0.0": "^8.2.1-3.2.9",
43
+ "@girs/pango-1.0": "^1.51.0-3.2.9"
38
44
  },
39
45
  "devDependencies": {
40
46
  "typescript": "*"
@@ -51,7 +57,7 @@
51
57
  "license": "MIT",
52
58
  "repository": {
53
59
  "type": "git",
54
- "url": "git+https://github.com/gjsify/types.git"
60
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
55
61
  },
56
62
  "bugs": {
57
63
  "url": "https://github.com/gjsify/ts-for-gir/issues"