@girs/cdesktopenums-3.0 4.4.0 → 4.6.0

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
@@ -4,82 +4,77 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/cdesktopenums-3.0)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/cdesktopenums-3.0)
6
6
 
7
+ GJS TypeScript type definitions for CDesktopEnums-3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.6.0.
7
8
 
8
- GJS TypeScript type definitions for CDesktopEnums-3.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
9
+ This package contains type declarations only. It ships no runtime code, so it adds
10
+ nothing to your program and works with any bundler or none at all.
9
11
 
10
12
  ## Install
11
13
 
12
- Install the type definitions with npm:
13
14
  ```bash
14
15
  npm install @girs/cdesktopenums-3.0
15
16
  ```
16
17
 
17
- ## Usage
18
+ Any package manager works. The package has no dependencies beyond other `@girs/*`
19
+ type packages.
20
+
21
+ ## What it exports
22
+
23
+ | Import | What you get |
24
+ |---|---|
25
+ | `@girs/cdesktopenums-3.0` | the namespace as a default export, plus the ambient and global declarations |
26
+ | `@girs/cdesktopenums-3.0/ambient` | only the `gi://` module declarations |
27
+ | `@girs/cdesktopenums-3.0/import` | only the `imports.gi` declarations |
28
+ | `@girs/cdesktopenums-3.0/cdesktopenums-3.0` | the namespace, without the side-effecting declarations |
29
+
30
+ ## Three ways to import
31
+
32
+ Which one you use depends on how you write imports elsewhere, not on your toolchain.
33
+
34
+ ### As a module
18
35
 
19
- Import it like any other module:
20
36
  ```ts
21
37
  import CDesktopEnums from '@girs/cdesktopenums-3.0';
22
38
  ```
23
39
 
24
- ### Ambient Modules
40
+ ### As `gi://`
25
41
 
26
- [Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
27
- For this you need to include `@girs/cdesktopenums-3.0` or `@girs/cdesktopenums-3.0/ambient` in your `tsconfig` or entry point Typescript file:
42
+ GJS resolves `gi://` at runtime. To give it types, reference the package once, either
43
+ from your entry point or from `tsconfig.json`:
28
44
 
29
- `index.ts`:
30
45
  ```ts
31
- import '@girs/cdesktopenums-3.0'
46
+ import '@girs/cdesktopenums-3.0';
32
47
  ```
33
48
 
34
- `tsconfig.json`:
35
49
  ```json
36
- {
37
- "compilerOptions": {
38
- ...
39
- },
40
- "include": ["@girs/cdesktopenums-3.0"],
41
- ...
42
- }
50
+ { "include": ["@girs/cdesktopenums-3.0"] }
43
51
  ```
44
52
 
45
- The ambient module now resolves with types:
53
+ Then the runtime spelling type-checks:
46
54
 
47
55
  ```ts
48
56
  import CDesktopEnums from 'gi://CDesktopEnums?version=3.0';
49
57
  ```
50
58
 
51
- ### Global import
52
-
53
- GJS's global `imports.gi` works too, with types.
54
- For this you need to include `@girs/cdesktopenums-3.0` or `@girs/cdesktopenums-3.0/import` in your `tsconfig` or entry point Typescript file:
59
+ Referencing `@girs/cdesktopenums-3.0/ambient` instead pulls in these declarations
60
+ alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
55
61
 
56
- `index.ts`:
57
- ```ts
58
- import '@girs/cdesktopenums-3.0'
59
- ```
60
-
61
- `tsconfig.json`:
62
- ```json
63
- {
64
- "compilerOptions": {
65
- ...
66
- },
67
- "include": ["@girs/cdesktopenums-3.0"],
68
- ...
69
- }
70
- ```
62
+ ### As `imports.gi`
71
63
 
72
- That form carries types as well:
64
+ GJS's global object works the same way, via `@girs/cdesktopenums-3.0/import`:
73
65
 
74
66
  ```ts
75
67
  const CDesktopEnums = imports.gi.CDesktopEnums;
76
68
  ```
77
69
 
78
- ### Bundle
70
+ ## Building
79
71
 
80
- Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
72
+ The declarations need no build step. If you bundle, every bundler works, since there is
73
+ no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
74
+ show working setups for several.
81
75
 
82
76
  ## Other packages
83
77
 
84
- All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
78
+ Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
79
+
85
80
 
@@ -24,9 +24,9 @@ export namespace CDesktopEnums {
24
24
  * @gir-type Enum
25
25
  */
26
26
  enum BackgroundShading {
27
- SOLID,
28
- VERTICAL,
29
- HORIZONTAL,
27
+ SOLID = 0,
28
+ VERTICAL = 1,
29
+ HORIZONTAL = 2,
30
30
  }
31
31
 
32
32
 
@@ -34,13 +34,13 @@ export namespace CDesktopEnums {
34
34
  * @gir-type Enum
35
35
  */
36
36
  enum BackgroundStyle {
37
- NONE,
38
- WALLPAPER,
39
- CENTERED,
40
- SCALED,
41
- STRETCHED,
42
- ZOOM,
43
- SPANNED,
37
+ NONE = 0,
38
+ WALLPAPER = 1,
39
+ CENTERED = 2,
40
+ SCALED = 3,
41
+ STRETCHED = 4,
42
+ ZOOM = 5,
43
+ SPANNED = 6,
44
44
  }
45
45
 
46
46
 
@@ -48,9 +48,9 @@ export namespace CDesktopEnums {
48
48
  * @gir-type Enum
49
49
  */
50
50
  enum DeviceSendEvents {
51
- ENABLED,
52
- DISABLED,
53
- DISABLED_ON_EXTERNAL_MOUSE,
51
+ ENABLED = 0,
52
+ DISABLED = 1,
53
+ DISABLED_ON_EXTERNAL_MOUSE = 2,
54
54
  }
55
55
 
56
56
 
@@ -58,9 +58,9 @@ export namespace CDesktopEnums {
58
58
  * @gir-type Enum
59
59
  */
60
60
  enum FocusMode {
61
- CLICK,
62
- SLOPPY,
63
- MOUSE,
61
+ CLICK = 0,
62
+ SLOPPY = 1,
63
+ MOUSE = 2,
64
64
  }
65
65
 
66
66
 
@@ -68,8 +68,8 @@ export namespace CDesktopEnums {
68
68
  * @gir-type Enum
69
69
  */
70
70
  enum FocusNewWindows {
71
- SMART,
72
- STRICT,
71
+ SMART = 0,
72
+ STRICT = 1,
73
73
  }
74
74
 
75
75
 
@@ -77,10 +77,10 @@ export namespace CDesktopEnums {
77
77
  * @gir-type Enum
78
78
  */
79
79
  enum MagnifierLensShape {
80
- NONE,
81
- SQUARE,
82
- HORIZONTAL,
83
- VERTICAL,
80
+ NONE = 0,
81
+ SQUARE = 1,
82
+ HORIZONTAL = 2,
83
+ VERTICAL = 3,
84
84
  }
85
85
 
86
86
 
@@ -88,10 +88,10 @@ export namespace CDesktopEnums {
88
88
  * @gir-type Enum
89
89
  */
90
90
  enum MagnifierMouseTrackingMode {
91
- NONE,
92
- CENTERED,
93
- PROPORTIONAL,
94
- PUSH,
91
+ NONE = 0,
92
+ CENTERED = 1,
93
+ PROPORTIONAL = 2,
94
+ PUSH = 3,
95
95
  }
96
96
 
97
97
 
@@ -99,12 +99,12 @@ export namespace CDesktopEnums {
99
99
  * @gir-type Enum
100
100
  */
101
101
  enum MagnifierScreenPosition {
102
- NONE,
103
- FULL_SCREEN,
104
- TOP_HALF,
105
- BOTTOM_HALF,
106
- LEFT_HALF,
107
- RIGHT_HALF,
102
+ NONE = 0,
103
+ FULL_SCREEN = 1,
104
+ TOP_HALF = 2,
105
+ BOTTOM_HALF = 3,
106
+ LEFT_HALF = 4,
107
+ RIGHT_HALF = 5,
108
108
  }
109
109
 
110
110
 
@@ -112,61 +112,61 @@ export namespace CDesktopEnums {
112
112
  * @gir-type Enum
113
113
  */
114
114
  enum MediaKeyType {
115
- MUTE,
116
- MUTE_QUIET,
117
- VOLUME_UP,
118
- VOLUME_UP_QUIET,
119
- VOLUME_DOWN,
120
- VOLUME_DOWN_QUIET,
121
- MIC_MUTE,
122
- EJECT,
123
- MEDIA,
124
- PLAY,
125
- PAUSE,
126
- STOP,
127
- PREVIOUS,
128
- NEXT,
129
- REWIND,
130
- FORWARD,
131
- REPEAT,
132
- RANDOM,
133
- SCREENSHOT,
134
- SCREENSHOT_CLIP,
135
- SEPARATOR,
136
- WINDOW_SCREENSHOT,
137
- WINDOW_SCREENSHOT_CLIP,
138
- AREA_SCREENSHOT,
139
- AREA_SCREENSHOT_CLIP,
140
- TOUCHPAD,
141
- TOUCHPAD_ON,
142
- TOUCHPAD_OFF,
143
- LOGOUT,
144
- SHUTDOWN,
145
- HOME,
146
- CALCULATOR,
147
- SEARCH,
148
- EMAIL,
149
- SCREENSAVER,
150
- HELP,
151
- TERMINAL,
152
- WWW,
153
- VIDEO_OUT,
154
- ROTATE_VIDEO,
155
- ROTATE_VIDEO_LOCK,
156
- SCREENREADER,
157
- ON_SCREEN_KEYBOARD,
158
- INCREASE_TEXT,
159
- DECREASE_TEXT,
160
- TOGGLE_CONTRAST,
161
- SUSPEND,
162
- HIBERNATE,
163
- SCREEN_BRIGHTNESS_UP,
164
- SCREEN_BRIGHTNESS_DOWN,
165
- KEYBOARD_BRIGHTNESS_UP,
166
- KEYBOARD_BRIGHTNESS_DOWN,
167
- KEYBOARD_BRIGHTNESS_TOGGLE,
168
- BATTERY,
169
- LAST,
115
+ MUTE = 0,
116
+ MUTE_QUIET = 1,
117
+ VOLUME_UP = 2,
118
+ VOLUME_UP_QUIET = 3,
119
+ VOLUME_DOWN = 4,
120
+ VOLUME_DOWN_QUIET = 5,
121
+ MIC_MUTE = 6,
122
+ EJECT = 7,
123
+ MEDIA = 8,
124
+ PLAY = 9,
125
+ PAUSE = 10,
126
+ STOP = 11,
127
+ PREVIOUS = 12,
128
+ NEXT = 13,
129
+ REWIND = 14,
130
+ FORWARD = 15,
131
+ REPEAT = 16,
132
+ RANDOM = 17,
133
+ SCREENSHOT = 18,
134
+ SCREENSHOT_CLIP = 19,
135
+ SEPARATOR = 20,
136
+ WINDOW_SCREENSHOT = 21,
137
+ WINDOW_SCREENSHOT_CLIP = 22,
138
+ AREA_SCREENSHOT = 23,
139
+ AREA_SCREENSHOT_CLIP = 24,
140
+ TOUCHPAD = 25,
141
+ TOUCHPAD_ON = 26,
142
+ TOUCHPAD_OFF = 27,
143
+ LOGOUT = 28,
144
+ SHUTDOWN = 29,
145
+ HOME = 30,
146
+ CALCULATOR = 31,
147
+ SEARCH = 32,
148
+ EMAIL = 33,
149
+ SCREENSAVER = 34,
150
+ HELP = 35,
151
+ TERMINAL = 36,
152
+ WWW = 37,
153
+ VIDEO_OUT = 38,
154
+ ROTATE_VIDEO = 39,
155
+ ROTATE_VIDEO_LOCK = 40,
156
+ SCREENREADER = 41,
157
+ ON_SCREEN_KEYBOARD = 42,
158
+ INCREASE_TEXT = 43,
159
+ DECREASE_TEXT = 44,
160
+ TOGGLE_CONTRAST = 45,
161
+ SUSPEND = 46,
162
+ HIBERNATE = 47,
163
+ SCREEN_BRIGHTNESS_UP = 48,
164
+ SCREEN_BRIGHTNESS_DOWN = 49,
165
+ KEYBOARD_BRIGHTNESS_UP = 50,
166
+ KEYBOARD_BRIGHTNESS_DOWN = 51,
167
+ KEYBOARD_BRIGHTNESS_TOGGLE = 52,
168
+ BATTERY = 53,
169
+ LAST = 54,
170
170
  }
171
171
 
172
172
 
@@ -174,10 +174,10 @@ export namespace CDesktopEnums {
174
174
  * @gir-type Enum
175
175
  */
176
176
  enum MouseDwellDirection {
177
- LEFT,
178
- RIGHT,
179
- UP,
180
- DOWN,
177
+ LEFT = 0,
178
+ RIGHT = 1,
179
+ UP = 2,
180
+ DOWN = 3,
181
181
  }
182
182
 
183
183
 
@@ -185,8 +185,8 @@ export namespace CDesktopEnums {
185
185
  * @gir-type Enum
186
186
  */
187
187
  enum MouseDwellMode {
188
- WINDOW,
189
- GESTURE,
188
+ WINDOW = 0,
189
+ GESTURE = 1,
190
190
  }
191
191
 
192
192
 
@@ -194,9 +194,9 @@ export namespace CDesktopEnums {
194
194
  * @gir-type Enum
195
195
  */
196
196
  enum NotificationScreenDisplay {
197
- PRIMARY_SCREEN,
198
- ACTIVE_SCREEN,
199
- FIXED_SCREEN,
197
+ PRIMARY_SCREEN = 0,
198
+ ACTIVE_SCREEN = 1,
199
+ FIXED_SCREEN = 2,
200
200
  }
201
201
 
202
202
 
@@ -204,10 +204,10 @@ export namespace CDesktopEnums {
204
204
  * @gir-type Enum
205
205
  */
206
206
  enum PadButtonAction {
207
- NONE,
208
- HELP,
209
- SWITCH_MONITOR,
210
- KEYBINDING,
207
+ NONE = 0,
208
+ HELP = 1,
209
+ SWITCH_MONITOR = 2,
210
+ KEYBINDING = 3,
211
211
  }
212
212
 
213
213
 
@@ -215,9 +215,9 @@ export namespace CDesktopEnums {
215
215
  * @gir-type Enum
216
216
  */
217
217
  enum PointerAccelProfile {
218
- DEFAULT,
219
- FLAT,
220
- ADAPTIVE,
218
+ DEFAULT = 0,
219
+ FLAT = 1,
220
+ ADAPTIVE = 2,
221
221
  }
222
222
 
223
223
 
@@ -225,9 +225,9 @@ export namespace CDesktopEnums {
225
225
  * @gir-type Enum
226
226
  */
227
227
  enum ProxyMode {
228
- NONE,
229
- MANUAL,
230
- AUTO,
228
+ NONE = 0,
229
+ MANUAL = 1,
230
+ AUTO = 2,
231
231
  }
232
232
 
233
233
 
@@ -235,9 +235,9 @@ export namespace CDesktopEnums {
235
235
  * @gir-type Enum
236
236
  */
237
237
  enum ScreensaverMode {
238
- BLANK_ONLY,
239
- RANDOM,
240
- SINGLE,
238
+ BLANK_ONLY = 0,
239
+ RANDOM = 1,
240
+ SINGLE = 2,
241
241
  }
242
242
 
243
243
 
@@ -245,12 +245,12 @@ export namespace CDesktopEnums {
245
245
  * @gir-type Enum
246
246
  */
247
247
  enum StylusButtonAction {
248
- DEFAULT,
249
- MIDDLE,
250
- RIGHT,
251
- BACK,
252
- FORWARD,
253
- DISABLED,
248
+ DEFAULT = 0,
249
+ MIDDLE = 1,
250
+ RIGHT = 2,
251
+ BACK = 3,
252
+ FORWARD = 4,
253
+ DISABLED = 5,
254
254
  }
255
255
 
256
256
 
@@ -258,8 +258,8 @@ export namespace CDesktopEnums {
258
258
  * @gir-type Enum
259
259
  */
260
260
  enum TabletMapping {
261
- ABSOLUTE,
262
- RELATIVE,
261
+ ABSOLUTE = 0,
262
+ RELATIVE = 1,
263
263
  }
264
264
 
265
265
 
@@ -267,16 +267,16 @@ export namespace CDesktopEnums {
267
267
  * @gir-type Enum
268
268
  */
269
269
  enum TitlebarAction {
270
- TOGGLE_SHADE,
271
- TOGGLE_MAXIMIZE,
272
- TOGGLE_MAXIMIZE_HORIZONTALLY,
273
- TOGGLE_MAXIMIZE_VERTICALLY,
274
- TOGGLE_STUCK,
275
- TOGGLE_ABOVE,
276
- MINIMIZE,
277
- NONE,
278
- LOWER,
279
- MENU,
270
+ TOGGLE_SHADE = 0,
271
+ TOGGLE_MAXIMIZE = 1,
272
+ TOGGLE_MAXIMIZE_HORIZONTALLY = 2,
273
+ TOGGLE_MAXIMIZE_VERTICALLY = 3,
274
+ TOGGLE_STUCK = 4,
275
+ TOGGLE_ABOVE = 5,
276
+ MINIMIZE = 6,
277
+ NONE = 7,
278
+ LOWER = 8,
279
+ MENU = 9,
280
280
  }
281
281
 
282
282
 
@@ -284,9 +284,9 @@ export namespace CDesktopEnums {
284
284
  * @gir-type Enum
285
285
  */
286
286
  enum TitlebarScrollAction {
287
- SHADE,
288
- OPACITY,
289
- NONE,
287
+ SHADE = 10,
288
+ OPACITY = 11,
289
+ NONE = 12,
290
290
  }
291
291
 
292
292
 
@@ -294,8 +294,8 @@ export namespace CDesktopEnums {
294
294
  * @gir-type Enum
295
295
  */
296
296
  enum ToolbarIconSize {
297
- SMALL,
298
- LARGE,
297
+ SMALL = 0,
298
+ LARGE = 1,
299
299
  }
300
300
 
301
301
 
@@ -303,10 +303,10 @@ export namespace CDesktopEnums {
303
303
  * @gir-type Enum
304
304
  */
305
305
  enum ToolbarStyle {
306
- BOTH,
307
- BOTH_HORIZ,
308
- ICONS,
309
- TEXT,
306
+ BOTH = 0,
307
+ BOTH_HORIZ = 1,
308
+ ICONS = 2,
309
+ TEXT = 3,
310
310
  }
311
311
 
312
312
 
@@ -314,10 +314,10 @@ export namespace CDesktopEnums {
314
314
  * @gir-type Enum
315
315
  */
316
316
  enum TouchpadClickMethod {
317
- DEFAULT,
318
- NONE,
319
- AREAS,
320
- FINGERS,
317
+ DEFAULT = 0,
318
+ NONE = 1,
319
+ AREAS = 2,
320
+ FINGERS = 3,
321
321
  }
322
322
 
323
323
 
@@ -325,9 +325,9 @@ export namespace CDesktopEnums {
325
325
  * @gir-type Enum
326
326
  */
327
327
  enum TouchpadHandedness {
328
- RIGHT,
329
- LEFT,
330
- MOUSE,
328
+ RIGHT = 0,
329
+ LEFT = 1,
330
+ MOUSE = 2,
331
331
  }
332
332
 
333
333
 
@@ -335,8 +335,8 @@ export namespace CDesktopEnums {
335
335
  * @gir-type Enum
336
336
  */
337
337
  enum VisualBellType {
338
- FULLSCREEN_FLASH,
339
- FRAME_FLASH,
338
+ FULLSCREEN_FLASH = 0,
339
+ FRAME_FLASH = 1,
340
340
  }
341
341
 
342
342
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/cdesktopenums-3.0",
3
- "version": "4.4.0",
3
+ "version": "4.6.0",
4
4
  "description": "GJS TypeScript type definitions for CDesktopEnums-3.0",
5
5
  "type": "module",
6
6
  "module": "cdesktopenums-3.0.js",
@@ -31,8 +31,8 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.4.0",
35
- "@girs/gobject-2.0": "^4.4.0" },
34
+ "@girs/gjs": "^4.6.0",
35
+ "@girs/gobject-2.0": "^4.6.0" },
36
36
  "devDependencies": {
37
37
  "typescript": "*"
38
38
  },