@girs/gdk-3.0 3.24.38-3.2.4 → 3.24.38-3.2.6

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.38 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for Gdk-3.0, generated from library version 3.24.38 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
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,9 +1,12 @@
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;
6
5
  }
7
6
 
7
+ declare module 'gi://Gdk' {
8
+ import Gdk30 from '@girs/gdk-3.0';
9
+ export default Gdk30;
10
+ }
8
11
 
9
12
 
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import Gdk30 from '@girs/gdk-3.0';
4
3
 
5
4
  declare global {
package/gdk-3.0.d.cts CHANGED
@@ -6194,6 +6194,7 @@ export module Cursor {
6194
6194
 
6195
6195
  cursor_type?: CursorType | null
6196
6196
  display?: Display | null
6197
+ cursorType?: CursorType | null
6197
6198
  }
6198
6199
 
6199
6200
  }
@@ -6203,6 +6204,7 @@ export interface Cursor {
6203
6204
  // Own properties of Gdk-3.0.Gdk.Cursor
6204
6205
 
6205
6206
  readonly cursor_type: CursorType
6207
+ readonly cursorType: CursorType
6206
6208
  readonly display: Display
6207
6209
 
6208
6210
  // Owm methods of Gdk-3.0.Gdk.Cursor
@@ -6483,6 +6485,34 @@ export module Device {
6483
6485
  * Vendor ID of this device, see gdk_device_get_vendor_id().
6484
6486
  */
6485
6487
  vendor_id?: string | null
6488
+ /**
6489
+ * The #GdkDeviceManager the #GdkDevice pertains to.
6490
+ */
6491
+ deviceManager?: DeviceManager | null
6492
+ /**
6493
+ * Whether the device is represented by a cursor on the screen. Devices of type
6494
+ * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6495
+ */
6496
+ hasCursor?: boolean | null
6497
+ inputMode?: InputMode | null
6498
+ /**
6499
+ * Source type for the device.
6500
+ */
6501
+ inputSource?: InputSource | null
6502
+ /**
6503
+ * The maximal number of concurrent touches on a touch device.
6504
+ * Will be 0 if the device is not a touch device or if the number
6505
+ * of touches is unknown.
6506
+ */
6507
+ numTouches?: number | null
6508
+ /**
6509
+ * Product ID of this device, see gdk_device_get_product_id().
6510
+ */
6511
+ productId?: string | null
6512
+ /**
6513
+ * Vendor ID of this device, see gdk_device_get_vendor_id().
6514
+ */
6515
+ vendorId?: string | null
6486
6516
  }
6487
6517
 
6488
6518
  }
@@ -6496,6 +6526,11 @@ export interface Device {
6496
6526
  * always come in keyboard/pointer pairs. Other device types will have a %NULL associated device.
6497
6527
  */
6498
6528
  readonly associated_device: Device
6529
+ /**
6530
+ * Associated pointer or keyboard with this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER
6531
+ * always come in keyboard/pointer pairs. Other device types will have a %NULL associated device.
6532
+ */
6533
+ readonly associatedDevice: Device
6499
6534
  /**
6500
6535
  * The axes currently available for this device.
6501
6536
  */
@@ -6504,6 +6539,10 @@ export interface Device {
6504
6539
  * The #GdkDeviceManager the #GdkDevice pertains to.
6505
6540
  */
6506
6541
  readonly device_manager: DeviceManager
6542
+ /**
6543
+ * The #GdkDeviceManager the #GdkDevice pertains to.
6544
+ */
6545
+ readonly deviceManager: DeviceManager
6507
6546
  /**
6508
6547
  * The #GdkDisplay the #GdkDevice pertains to.
6509
6548
  */
@@ -6513,15 +6552,29 @@ export interface Device {
6513
6552
  * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6514
6553
  */
6515
6554
  readonly has_cursor: boolean
6555
+ /**
6556
+ * Whether the device is represented by a cursor on the screen. Devices of type
6557
+ * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6558
+ */
6559
+ readonly hasCursor: boolean
6516
6560
  input_mode: InputMode
6561
+ inputMode: InputMode
6517
6562
  /**
6518
6563
  * Source type for the device.
6519
6564
  */
6520
6565
  readonly input_source: InputSource
6566
+ /**
6567
+ * Source type for the device.
6568
+ */
6569
+ readonly inputSource: InputSource
6521
6570
  /**
6522
6571
  * Number of axes in the device.
6523
6572
  */
6524
6573
  readonly n_axes: number
6574
+ /**
6575
+ * Number of axes in the device.
6576
+ */
6577
+ readonly nAxes: number
6525
6578
  /**
6526
6579
  * The device name.
6527
6580
  */
@@ -6532,10 +6585,20 @@ export interface Device {
6532
6585
  * of touches is unknown.
6533
6586
  */
6534
6587
  readonly num_touches: number
6588
+ /**
6589
+ * The maximal number of concurrent touches on a touch device.
6590
+ * Will be 0 if the device is not a touch device or if the number
6591
+ * of touches is unknown.
6592
+ */
6593
+ readonly numTouches: number
6535
6594
  /**
6536
6595
  * Product ID of this device, see gdk_device_get_product_id().
6537
6596
  */
6538
6597
  readonly product_id: string | null
6598
+ /**
6599
+ * Product ID of this device, see gdk_device_get_product_id().
6600
+ */
6601
+ readonly productId: string | null
6539
6602
  /**
6540
6603
  * #GdkSeat of this device.
6541
6604
  */
@@ -6549,6 +6612,10 @@ export interface Device {
6549
6612
  * Vendor ID of this device, see gdk_device_get_vendor_id().
6550
6613
  */
6551
6614
  readonly vendor_id: string | null
6615
+ /**
6616
+ * Vendor ID of this device, see gdk_device_get_vendor_id().
6617
+ */
6618
+ readonly vendorId: string | null
6552
6619
 
6553
6620
  // Owm methods of Gdk-3.0.Gdk.Device
6554
6621
 
@@ -7131,6 +7198,8 @@ export module DeviceTool {
7131
7198
  hardware_id?: number | null
7132
7199
  serial?: number | null
7133
7200
  tool_type?: DeviceToolType | null
7201
+ hardwareId?: number | null
7202
+ toolType?: DeviceToolType | null
7134
7203
  }
7135
7204
 
7136
7205
  }
@@ -7141,8 +7210,10 @@ export interface DeviceTool {
7141
7210
 
7142
7211
  readonly axes: AxisFlags
7143
7212
  readonly hardware_id: number
7213
+ readonly hardwareId: number
7144
7214
  readonly serial: number
7145
7215
  readonly tool_type: DeviceToolType
7216
+ readonly toolType: DeviceToolType
7146
7217
 
7147
7218
  // Owm methods of Gdk-3.0.Gdk.DeviceTool
7148
7219
 
@@ -7680,6 +7751,7 @@ export module DisplayManager {
7680
7751
  // Own constructor properties of Gdk-3.0.Gdk.DisplayManager
7681
7752
 
7682
7753
  default_display?: Display | null
7754
+ defaultDisplay?: Display | null
7683
7755
  }
7684
7756
 
7685
7757
  }
@@ -7689,6 +7761,7 @@ export interface DisplayManager {
7689
7761
  // Own properties of Gdk-3.0.Gdk.DisplayManager
7690
7762
 
7691
7763
  default_display: Display
7764
+ defaultDisplay: Display
7692
7765
 
7693
7766
  // Owm methods of Gdk-3.0.Gdk.DisplayManager
7694
7767
 
@@ -8311,6 +8384,10 @@ export module GLContext {
8311
8384
  * The #GdkWindow the gl context is bound to.
8312
8385
  */
8313
8386
  window?: Window | null
8387
+ /**
8388
+ * The #GdkGLContext that this context is sharing data with, or %NULL
8389
+ */
8390
+ sharedContext?: GLContext | null
8314
8391
  }
8315
8392
 
8316
8393
  }
@@ -8327,6 +8404,10 @@ export interface GLContext {
8327
8404
  * The #GdkGLContext that this context is sharing data with, or %NULL
8328
8405
  */
8329
8406
  readonly shared_context: GLContext
8407
+ /**
8408
+ * The #GdkGLContext that this context is sharing data with, or %NULL
8409
+ */
8410
+ readonly sharedContext: GLContext
8330
8411
  /**
8331
8412
  * The #GdkWindow the gl context is bound to.
8332
8413
  */
@@ -8841,12 +8922,17 @@ export interface Monitor {
8841
8922
  readonly display: Display
8842
8923
  readonly geometry: Rectangle
8843
8924
  readonly height_mm: number
8925
+ readonly heightMm: number
8844
8926
  readonly manufacturer: string | null
8845
8927
  readonly model: string | null
8846
8928
  readonly refresh_rate: number
8929
+ readonly refreshRate: number
8847
8930
  readonly scale_factor: number
8931
+ readonly scaleFactor: number
8848
8932
  readonly subpixel_layout: SubpixelLayout
8933
+ readonly subpixelLayout: SubpixelLayout
8849
8934
  readonly width_mm: number
8935
+ readonly widthMm: number
8850
8936
  readonly workarea: Rectangle
8851
8937
 
8852
8938
  // Owm methods of Gdk-3.0.Gdk.Monitor
@@ -9036,6 +9122,7 @@ export module Screen {
9036
9122
 
9037
9123
  font_options?: any | null
9038
9124
  resolution?: number | null
9125
+ fontOptions?: any | null
9039
9126
  }
9040
9127
 
9041
9128
  }
@@ -9045,6 +9132,7 @@ export interface Screen {
9045
9132
  // Own properties of Gdk-3.0.Gdk.Screen
9046
9133
 
9047
9134
  font_options: any
9135
+ fontOptions: any
9048
9136
  resolution: number
9049
9137
 
9050
9138
  // Owm methods of Gdk-3.0.Gdk.Screen
package/gdk-3.0.d.ts CHANGED
@@ -6196,6 +6196,7 @@ module Cursor {
6196
6196
 
6197
6197
  cursor_type?: CursorType | null
6198
6198
  display?: Display | null
6199
+ cursorType?: CursorType | null
6199
6200
  }
6200
6201
 
6201
6202
  }
@@ -6205,6 +6206,7 @@ interface Cursor {
6205
6206
  // Own properties of Gdk-3.0.Gdk.Cursor
6206
6207
 
6207
6208
  readonly cursor_type: CursorType
6209
+ readonly cursorType: CursorType
6208
6210
  readonly display: Display
6209
6211
 
6210
6212
  // Owm methods of Gdk-3.0.Gdk.Cursor
@@ -6485,6 +6487,34 @@ module Device {
6485
6487
  * Vendor ID of this device, see gdk_device_get_vendor_id().
6486
6488
  */
6487
6489
  vendor_id?: string | null
6490
+ /**
6491
+ * The #GdkDeviceManager the #GdkDevice pertains to.
6492
+ */
6493
+ deviceManager?: DeviceManager | null
6494
+ /**
6495
+ * Whether the device is represented by a cursor on the screen. Devices of type
6496
+ * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6497
+ */
6498
+ hasCursor?: boolean | null
6499
+ inputMode?: InputMode | null
6500
+ /**
6501
+ * Source type for the device.
6502
+ */
6503
+ inputSource?: InputSource | null
6504
+ /**
6505
+ * The maximal number of concurrent touches on a touch device.
6506
+ * Will be 0 if the device is not a touch device or if the number
6507
+ * of touches is unknown.
6508
+ */
6509
+ numTouches?: number | null
6510
+ /**
6511
+ * Product ID of this device, see gdk_device_get_product_id().
6512
+ */
6513
+ productId?: string | null
6514
+ /**
6515
+ * Vendor ID of this device, see gdk_device_get_vendor_id().
6516
+ */
6517
+ vendorId?: string | null
6488
6518
  }
6489
6519
 
6490
6520
  }
@@ -6498,6 +6528,11 @@ interface Device {
6498
6528
  * always come in keyboard/pointer pairs. Other device types will have a %NULL associated device.
6499
6529
  */
6500
6530
  readonly associated_device: Device
6531
+ /**
6532
+ * Associated pointer or keyboard with this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER
6533
+ * always come in keyboard/pointer pairs. Other device types will have a %NULL associated device.
6534
+ */
6535
+ readonly associatedDevice: Device
6501
6536
  /**
6502
6537
  * The axes currently available for this device.
6503
6538
  */
@@ -6506,6 +6541,10 @@ interface Device {
6506
6541
  * The #GdkDeviceManager the #GdkDevice pertains to.
6507
6542
  */
6508
6543
  readonly device_manager: DeviceManager
6544
+ /**
6545
+ * The #GdkDeviceManager the #GdkDevice pertains to.
6546
+ */
6547
+ readonly deviceManager: DeviceManager
6509
6548
  /**
6510
6549
  * The #GdkDisplay the #GdkDevice pertains to.
6511
6550
  */
@@ -6515,15 +6554,29 @@ interface Device {
6515
6554
  * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6516
6555
  */
6517
6556
  readonly has_cursor: boolean
6557
+ /**
6558
+ * Whether the device is represented by a cursor on the screen. Devices of type
6559
+ * %GDK_DEVICE_TYPE_MASTER will have %TRUE here.
6560
+ */
6561
+ readonly hasCursor: boolean
6518
6562
  input_mode: InputMode
6563
+ inputMode: InputMode
6519
6564
  /**
6520
6565
  * Source type for the device.
6521
6566
  */
6522
6567
  readonly input_source: InputSource
6568
+ /**
6569
+ * Source type for the device.
6570
+ */
6571
+ readonly inputSource: InputSource
6523
6572
  /**
6524
6573
  * Number of axes in the device.
6525
6574
  */
6526
6575
  readonly n_axes: number
6576
+ /**
6577
+ * Number of axes in the device.
6578
+ */
6579
+ readonly nAxes: number
6527
6580
  /**
6528
6581
  * The device name.
6529
6582
  */
@@ -6534,10 +6587,20 @@ interface Device {
6534
6587
  * of touches is unknown.
6535
6588
  */
6536
6589
  readonly num_touches: number
6590
+ /**
6591
+ * The maximal number of concurrent touches on a touch device.
6592
+ * Will be 0 if the device is not a touch device or if the number
6593
+ * of touches is unknown.
6594
+ */
6595
+ readonly numTouches: number
6537
6596
  /**
6538
6597
  * Product ID of this device, see gdk_device_get_product_id().
6539
6598
  */
6540
6599
  readonly product_id: string | null
6600
+ /**
6601
+ * Product ID of this device, see gdk_device_get_product_id().
6602
+ */
6603
+ readonly productId: string | null
6541
6604
  /**
6542
6605
  * #GdkSeat of this device.
6543
6606
  */
@@ -6551,6 +6614,10 @@ interface Device {
6551
6614
  * Vendor ID of this device, see gdk_device_get_vendor_id().
6552
6615
  */
6553
6616
  readonly vendor_id: string | null
6617
+ /**
6618
+ * Vendor ID of this device, see gdk_device_get_vendor_id().
6619
+ */
6620
+ readonly vendorId: string | null
6554
6621
 
6555
6622
  // Owm methods of Gdk-3.0.Gdk.Device
6556
6623
 
@@ -7133,6 +7200,8 @@ module DeviceTool {
7133
7200
  hardware_id?: number | null
7134
7201
  serial?: number | null
7135
7202
  tool_type?: DeviceToolType | null
7203
+ hardwareId?: number | null
7204
+ toolType?: DeviceToolType | null
7136
7205
  }
7137
7206
 
7138
7207
  }
@@ -7143,8 +7212,10 @@ interface DeviceTool {
7143
7212
 
7144
7213
  readonly axes: AxisFlags
7145
7214
  readonly hardware_id: number
7215
+ readonly hardwareId: number
7146
7216
  readonly serial: number
7147
7217
  readonly tool_type: DeviceToolType
7218
+ readonly toolType: DeviceToolType
7148
7219
 
7149
7220
  // Owm methods of Gdk-3.0.Gdk.DeviceTool
7150
7221
 
@@ -7682,6 +7753,7 @@ module DisplayManager {
7682
7753
  // Own constructor properties of Gdk-3.0.Gdk.DisplayManager
7683
7754
 
7684
7755
  default_display?: Display | null
7756
+ defaultDisplay?: Display | null
7685
7757
  }
7686
7758
 
7687
7759
  }
@@ -7691,6 +7763,7 @@ interface DisplayManager {
7691
7763
  // Own properties of Gdk-3.0.Gdk.DisplayManager
7692
7764
 
7693
7765
  default_display: Display
7766
+ defaultDisplay: Display
7694
7767
 
7695
7768
  // Owm methods of Gdk-3.0.Gdk.DisplayManager
7696
7769
 
@@ -8313,6 +8386,10 @@ module GLContext {
8313
8386
  * The #GdkWindow the gl context is bound to.
8314
8387
  */
8315
8388
  window?: Window | null
8389
+ /**
8390
+ * The #GdkGLContext that this context is sharing data with, or %NULL
8391
+ */
8392
+ sharedContext?: GLContext | null
8316
8393
  }
8317
8394
 
8318
8395
  }
@@ -8329,6 +8406,10 @@ interface GLContext {
8329
8406
  * The #GdkGLContext that this context is sharing data with, or %NULL
8330
8407
  */
8331
8408
  readonly shared_context: GLContext
8409
+ /**
8410
+ * The #GdkGLContext that this context is sharing data with, or %NULL
8411
+ */
8412
+ readonly sharedContext: GLContext
8332
8413
  /**
8333
8414
  * The #GdkWindow the gl context is bound to.
8334
8415
  */
@@ -8843,12 +8924,17 @@ interface Monitor {
8843
8924
  readonly display: Display
8844
8925
  readonly geometry: Rectangle
8845
8926
  readonly height_mm: number
8927
+ readonly heightMm: number
8846
8928
  readonly manufacturer: string | null
8847
8929
  readonly model: string | null
8848
8930
  readonly refresh_rate: number
8931
+ readonly refreshRate: number
8849
8932
  readonly scale_factor: number
8933
+ readonly scaleFactor: number
8850
8934
  readonly subpixel_layout: SubpixelLayout
8935
+ readonly subpixelLayout: SubpixelLayout
8851
8936
  readonly width_mm: number
8937
+ readonly widthMm: number
8852
8938
  readonly workarea: Rectangle
8853
8939
 
8854
8940
  // Owm methods of Gdk-3.0.Gdk.Monitor
@@ -9038,6 +9124,7 @@ module Screen {
9038
9124
 
9039
9125
  font_options?: any | null
9040
9126
  resolution?: number | null
9127
+ fontOptions?: any | null
9041
9128
  }
9042
9129
 
9043
9130
  }
@@ -9047,6 +9134,7 @@ interface Screen {
9047
9134
  // Own properties of Gdk-3.0.Gdk.Screen
9048
9135
 
9049
9136
  font_options: any
9137
+ fontOptions: any
9050
9138
  resolution: number
9051
9139
 
9052
9140
  // Owm methods of Gdk-3.0.Gdk.Screen
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gdk-3.0",
3
- "version": "3.24.38-3.2.4",
3
+ "version": "3.24.38-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for Gdk-3.0, generated from library version 3.24.38",
5
5
  "type": "module",
6
6
  "module": "gdk-3.0.js",
@@ -25,16 +25,16 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gdk-3.0.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/cairo-1.0": "^1.0.0-3.2.4",
29
- "@girs/freetype2-2.0": "^2.0.0-3.2.4",
30
- "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.4",
31
- "@girs/gio-2.0": "^2.78.0-3.2.4",
32
- "@girs/gjs": "^3.2.4",
33
- "@girs/glib-2.0": "^2.78.0-3.2.4",
34
- "@girs/gmodule-2.0": "^2.0.0-3.2.4",
35
- "@girs/gobject-2.0": "^2.78.0-3.2.4",
36
- "@girs/harfbuzz-0.0": "^8.2.1-3.2.4",
37
- "@girs/pango-1.0": "^1.51.0-3.2.4"
28
+ "@girs/cairo-1.0": "^1.0.0-3.2.6",
29
+ "@girs/freetype2-2.0": "^2.0.0-3.2.6",
30
+ "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.6",
31
+ "@girs/gio-2.0": "^2.78.0-3.2.6",
32
+ "@girs/gjs": "^3.2.6",
33
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
34
+ "@girs/gmodule-2.0": "^2.0.0-3.2.6",
35
+ "@girs/gobject-2.0": "^2.78.0-3.2.6",
36
+ "@girs/harfbuzz-0.0": "^8.2.1-3.2.6",
37
+ "@girs/pango-1.0": "^1.51.0-3.2.6"
38
38
  },
39
39
  "devDependencies": {
40
40
  "typescript": "*"