@girs/clutterx11-4 4.0.0-4.0.0-beta.38

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,85 @@
1
+
2
+ # ClutterX11-4
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/clutterx11-4)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/clutterx11-4)
6
+
7
+
8
+ GJS TypeScript type definitions for ClutterX11-4, generated from library version 4.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.38.
9
+
10
+ ## Install
11
+
12
+ To use this type definitions, install them with NPM:
13
+ ```bash
14
+ npm install @girs/clutterx11-4
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import ClutterX11 from '@girs/clutterx11-4';
22
+ ```
23
+
24
+ ### Ambient Modules
25
+
26
+ You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
27
+ For this you need to include `@girs/clutterx11-4` or `@girs/clutterx11-4/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/clutterx11-4'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/clutterx11-4"],
41
+ ...
42
+ }
43
+ ```
44
+
45
+ Now you can import the ambient module with TypeScript support:
46
+
47
+ ```ts
48
+ import ClutterX11 from 'gi://ClutterX11?version=4';
49
+ ```
50
+
51
+ ### Global import
52
+
53
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
54
+ For this you need to include `@girs/clutterx11-4` or `@girs/clutterx11-4/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/clutterx11-4'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/clutterx11-4"],
68
+ ...
69
+ }
70
+ ```
71
+
72
+ Now you have also type support for this, too:
73
+
74
+ ```ts
75
+ const ClutterX11 = imports.gi.ClutterX11;
76
+ ```
77
+
78
+ ### Bundle
79
+
80
+ 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).
81
+
82
+ ## Other packages
83
+
84
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
85
+
@@ -0,0 +1,9 @@
1
+ declare module 'gi://ClutterX11?version=4' {
2
+ import ClutterX114 from '@girs/clutterx11-4';
3
+ export default ClutterX114;
4
+ }
5
+
6
+ declare module 'gi://ClutterX11' {
7
+ import ClutterX114 from 'gi://ClutterX11?version=4';
8
+ export default ClutterX114;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1 @@
1
+ // Module import type definition not generated, otherwise this would cause a type conflict, this is because several GIR modules were generated with the same namespace: "ClutterX11"
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -0,0 +1,237 @@
1
+ /**
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ *
7
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import '@girs/gjs';
11
+
12
+ // Module dependencies
13
+ import type xlib from '@girs/xlib-2.0';
14
+ import type CoglPango from '@girs/coglpango-4';
15
+ import type PangoCairo from '@girs/pangocairo-1.0';
16
+ import type cairo from 'cairo';
17
+ import type GObject from '@girs/gobject-2.0';
18
+ import type GLib from '@girs/glib-2.0';
19
+ import type Pango from '@girs/pango-1.0';
20
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
21
+ import type freetype2 from '@girs/freetype2-2.0';
22
+ import type Gio from '@girs/gio-2.0';
23
+ import type GModule from '@girs/gmodule-2.0';
24
+ import type Cogl from '@girs/cogl-4';
25
+ import type GL from '@girs/gl-1.0';
26
+ import type Clutter from '@girs/clutter-4';
27
+ import type Json from '@girs/json-1.0';
28
+ import type Atk from '@girs/atk-1.0';
29
+
30
+ export namespace ClutterX11 {
31
+ /**
32
+ * ClutterX11-4
33
+ */
34
+
35
+ /**
36
+ * Return values for the #ClutterX11FilterFunc function.
37
+ */
38
+
39
+ /**
40
+ * Return values for the #ClutterX11FilterFunc function.
41
+ */
42
+ export namespace FilterReturn {
43
+ export const $gtype: GObject.GType<FilterReturn>;
44
+ }
45
+
46
+ enum FilterReturn {
47
+ /**
48
+ * The event was not handled, continues the
49
+ * processing
50
+ */
51
+ CONTINUE,
52
+ /**
53
+ * Native event translated into a Clutter
54
+ * event, stops the processing
55
+ */
56
+ TRANSLATE,
57
+ /**
58
+ * Remove the event, stops the processing
59
+ */
60
+ REMOVE,
61
+ }
62
+ /**
63
+ * Disables the internal polling of X11 events in the main loop.
64
+ *
65
+ * Libraries or applications calling this function will be responsible of
66
+ * polling all X11 events.
67
+ *
68
+ * You also must call clutter_x11_handle_event() to let Clutter process
69
+ * events and maintain its internal state.
70
+ *
71
+ * This function can only be called before calling clutter_init().
72
+ *
73
+ * Even with event handling disabled, Clutter will still select
74
+ * all the events required to maintain its internal state on the stage
75
+ * Window; compositors using Clutter and input regions to pass events
76
+ * through to application windows should not rely on an empty input
77
+ * region, and should instead clear it themselves explicitly using the
78
+ * XFixes extension.
79
+ *
80
+ * This function should not be normally used by applications.
81
+ */
82
+ function disable_event_retrieval(): void;
83
+ /**
84
+ * Retrieves the group for the modifiers set in `event`
85
+ * @param event a #ClutterEvent of type %CLUTTER_KEY_PRESS or %CLUTTER_KEY_RELEASE
86
+ * @returns the group id
87
+ */
88
+ function event_get_key_group(event: Clutter.Event): number;
89
+ /**
90
+ * Retrieves the touch detail froma #ClutterEventSequence.
91
+ * @param sequence a #ClutterEventSequence
92
+ * @returns the touch detail
93
+ */
94
+ function event_sequence_get_touch_detail(sequence: Clutter.EventSequence): number;
95
+ /**
96
+ * Retrieves the pointer to the default display.
97
+ * @returns the default display
98
+ */
99
+ function get_default_display(): xlib.Display;
100
+ /**
101
+ * Gets the number of the default X Screen object.
102
+ * @returns the number of the default screen
103
+ */
104
+ function get_default_screen(): number;
105
+ /**
106
+ * Gets the stage for a particular X window.
107
+ * @param win an X Window ID
108
+ * @returns A #ClutterStage, or% NULL if a stage does not exist for the window
109
+ */
110
+ function get_stage_from_window(win: xlib.Window): Clutter.Stage;
111
+ /**
112
+ * Retrieves whether the Clutter X11 backend is using ARGB visuals by default
113
+ * @returns %TRUE if ARGB visuals are queried by default
114
+ */
115
+ function get_use_argb_visual(): boolean;
116
+ /**
117
+ * Retrieves whether the Clutter X11 backend will create stereo
118
+ * stages if possible.
119
+ * @returns %TRUE if stereo stages are used if possible
120
+ */
121
+ function get_use_stereo_stage(): boolean;
122
+ /**
123
+ * This function processes a single X event; it can be used to hook
124
+ * into external X11 event processing (for example, a GDK filter
125
+ * function).
126
+ *
127
+ * If clutter_x11_disable_event_retrieval() has been called, you must
128
+ * let this function process events to update Clutter's internal state.
129
+ * @param xevent pointer to XEvent structure
130
+ * @returns #ClutterX11FilterReturn. %CLUTTER_X11_FILTER_REMOVE indicates that Clutter has internally handled the event and the caller should do no further processing. %CLUTTER_X11_FILTER_CONTINUE indicates that Clutter is either not interested in the event, or has used the event to update internal state without taking any exclusive action. %CLUTTER_X11_FILTER_TRANSLATE will not occur.
131
+ */
132
+ function handle_event(xevent: xlib.XEvent): FilterReturn;
133
+ /**
134
+ * Retrieves whether Clutter is running on an X11 server with the
135
+ * XComposite extension
136
+ * @returns %TRUE if the XComposite extension is available
137
+ */
138
+ function has_composite_extension(): boolean;
139
+ /**
140
+ * Queries the X11 backend to check if event collection has been disabled.
141
+ * @returns TRUE if event retrival has been disabled. FALSE otherwise.
142
+ */
143
+ function has_event_retrieval(): boolean;
144
+ /**
145
+ * Gets whether Clutter has XInput support.
146
+ * @returns %TRUE if Clutter was compiled with XInput support and XInput support is available at run time.
147
+ */
148
+ function has_xinput(): boolean;
149
+ /**
150
+ * Sets the display connection Clutter should use; must be called
151
+ * before clutter_init(), clutter_init_with_args() or other functions
152
+ * pertaining Clutter's initialization process.
153
+ *
154
+ * If you are parsing the command line arguments by retrieving Clutter's
155
+ * #GOptionGroup with clutter_get_option_group() and calling
156
+ * g_option_context_parse() yourself, you should also call
157
+ * clutter_x11_set_display() before g_option_context_parse().
158
+ * @param xdpy pointer to a X display connection.
159
+ */
160
+ function set_display(xdpy: xlib.Display): void;
161
+ /**
162
+ * Target the #ClutterStage to use an existing external X Window
163
+ * @param stage a #ClutterStage
164
+ * @param xwindow an existing X Window id
165
+ * @returns %TRUE if foreign window is valid
166
+ */
167
+ function set_stage_foreign(stage: Clutter.Stage, xwindow: xlib.Window): boolean;
168
+ /**
169
+ * Sets whether the Clutter X11 backend should request ARGB visuals by default
170
+ * or not.
171
+ *
172
+ * By default, Clutter requests RGB visuals.
173
+ *
174
+ * If no ARGB visuals are found, the X11 backend will fall back to
175
+ * requesting a RGB visual instead.
176
+ *
177
+ * ARGB visuals are required for the #ClutterStage:use-alpha property to work.
178
+ *
179
+ * This function can only be called once, and before clutter_init() is
180
+ * called.
181
+ * @param use_argb %TRUE if ARGB visuals should be requested by default
182
+ */
183
+ function set_use_argb_visual(use_argb: boolean): void;
184
+ /**
185
+ * Sets whether the backend object for Clutter stages, will,
186
+ * if possible, be created with the ability to support stereo drawing
187
+ * (drawing separate images for the left and right eyes).
188
+ *
189
+ * This function must be called before clutter_init() is called.
190
+ * During paint callbacks, cogl_framebuffer_is_stereo() can be called
191
+ * on the framebuffer retrieved by cogl_get_draw_framebuffer() to
192
+ * determine if stereo support was successfully enabled, and
193
+ * cogl_framebuffer_set_stereo_mode() to determine which buffers
194
+ * will be drawn to.
195
+ *
196
+ * Note that this function *does not* cause the stage to be drawn
197
+ * multiple times with different perspective transformations and thus
198
+ * appear in 3D, it simply enables individual ClutterActors to paint
199
+ * different images for the left and and right eye.
200
+ * @param use_stereo %TRUE if the stereo stages should be used if possible.
201
+ */
202
+ function set_use_stereo_stage(use_stereo: boolean): void;
203
+ /**
204
+ * Traps every X error until clutter_x11_untrap_x_errors() is called.
205
+ */
206
+ function trap_x_errors(): void;
207
+ /**
208
+ * Removes the X error trap and returns the current status.
209
+ * @returns the trapped error code, or 0 for success
210
+ */
211
+ function untrap_x_errors(): number;
212
+ interface FilterFunc {
213
+ (xev: xlib.XEvent, cev: Clutter.Event): FilterReturn;
214
+ }
215
+ abstract class XInputDevice {
216
+ static $gtype: GObject.GType<XInputDevice>;
217
+
218
+ // Constructors
219
+
220
+ _init(...args: any[]): void;
221
+ }
222
+
223
+ /**
224
+ * Name of the imported GIR library
225
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
226
+ */
227
+ const __name__: string;
228
+ /**
229
+ * Version of the imported GIR library
230
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
231
+ */
232
+ const __version__: string;
233
+ }
234
+
235
+ export default ClutterX11;
236
+
237
+ // END
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import ClutterX11 from 'gi://ClutterX11?version=4';
4
+ export default ClutterX11;
5
+
package/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ *
7
+ * This template is used to generate the index.d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import './clutterx11-4-ambient.d.ts';
11
+
12
+ import ClutterX11 from './clutterx11-4.js';
13
+ export default ClutterX11;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import ClutterX11 from './clutterx11-4.js';
4
+ export default ClutterX11;
5
+
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@girs/clutterx11-4",
3
+ "version": "4.0.0-4.0.0-beta.38",
4
+ "description": "GJS TypeScript type definitions for ClutterX11-4, generated from library version 4.0.0",
5
+ "type": "module",
6
+ "module": "clutterx11-4.js",
7
+ "main": "clutterx11-4.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./clutterx11-4-ambient.d.ts",
11
+ "import": "./clutterx11-4-ambient.js",
12
+ "default": "./clutterx11-4-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./clutterx11-4-import.d.ts",
16
+ "import": "./clutterx11-4-import.js",
17
+ "default": "./clutterx11-4-import.js"
18
+ },
19
+ "./clutterx11-4": {
20
+ "types": "./clutterx11-4.d.ts",
21
+ "import": "./clutterx11-4.js",
22
+ "default": "./clutterx11-4.js"
23
+ },
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "import": "./index.js",
27
+ "default": "./index.js"
28
+ }
29
+ },
30
+ "scripts": {
31
+ "test": "tsc --project tsconfig.json"
32
+ },
33
+ "dependencies": {
34
+ "@girs/gjs": "4.0.0-beta.38",
35
+ "@girs/xlib-2.0": "2.0.0-4.0.0-beta.38",
36
+ "@girs/coglpango-4": "4.0.0-4.0.0-beta.38",
37
+ "@girs/pangocairo-1.0": "1.0.0-4.0.0-beta.38",
38
+ "@girs/cairo-1.0": "1.0.0-4.0.0-beta.38",
39
+ "@girs/gobject-2.0": "2.86.0-4.0.0-beta.38",
40
+ "@girs/glib-2.0": "2.86.0-4.0.0-beta.38",
41
+ "@girs/pango-1.0": "1.57.0-4.0.0-beta.38",
42
+ "@girs/harfbuzz-0.0": "11.5.0-4.0.0-beta.38",
43
+ "@girs/freetype2-2.0": "2.0.0-4.0.0-beta.38",
44
+ "@girs/gio-2.0": "2.86.0-4.0.0-beta.38",
45
+ "@girs/gmodule-2.0": "2.0.0-4.0.0-beta.38",
46
+ "@girs/cogl-4": "4.0.0-4.0.0-beta.38",
47
+ "@girs/gl-1.0": "1.0.0-4.0.0-beta.38",
48
+ "@girs/clutter-4": "4.0.0-4.0.0-beta.38",
49
+ "@girs/json-1.0": "1.10.8-4.0.0-beta.38",
50
+ "@girs/atk-1.0": "2.58.0-4.0.0-beta.38" },
51
+ "devDependencies": {
52
+ "typescript": "*"
53
+ },
54
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "ClutterX11-4"],
55
+ "author": "ts-for-gir",
56
+ "license": "MIT",
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+https://github.com/gjsify/types.git"
60
+ },
61
+ "bugs": {
62
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
63
+ },
64
+ "homepage": "https://github.com/gjsify/types/tree/main/clutterx11-4#readme"
65
+ }
66
+
67
+
package/tsconfig.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "NodeNext",
6
+ "lib": ["ESNext"],
7
+ "types": [],
8
+ "experimentalDecorators": true,
9
+ "moduleResolution": "NodeNext",
10
+ "noEmit": true,
11
+ "noEmitOnError": false,
12
+ "baseUrl": "./",
13
+ "rootDir": ".",
14
+ // General settings for code generation
15
+ "removeComments": false,
16
+ "inlineSourceMap": false,
17
+ "inlineSources": false,
18
+ "newLine": "LF",
19
+ // Show diagnostics
20
+ "diagnostics": true
21
+ },
22
+ "include": ["./clutterx11-4.d.ts"]
23
+ }
24
+
25
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./clutterx11-4.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "ClutterX11-4",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+