@girs/clutterx11-6 4.0.4

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-6
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/clutterx11-6)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/clutterx11-6)
6
+
7
+
8
+ GJS TypeScript type definitions for ClutterX11-6, generated from library version 6.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.4.
9
+
10
+ ## Install
11
+
12
+ To use this type definitions, install them with NPM:
13
+ ```bash
14
+ npm install @girs/clutterx11-6
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import ClutterX11 from '@girs/clutterx11-6';
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-6` or `@girs/clutterx11-6/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/clutterx11-6'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/clutterx11-6"],
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=6';
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-6` or `@girs/clutterx11-6/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/clutterx11-6'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/clutterx11-6"],
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,12 @@
1
+
2
+ declare module 'gi://ClutterX11?version=6' {
3
+ import ClutterX116 from '@girs/clutterx11-6';
4
+ export default ClutterX116;
5
+ }
6
+
7
+ declare module 'gi://ClutterX11' {
8
+ import ClutterX116 from 'gi://ClutterX11?version=6';
9
+ export default ClutterX116;
10
+ }
11
+
12
+
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,2 @@
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"
2
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -0,0 +1,201 @@
1
+
2
+ /**
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
+ *
8
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
9
+ */
10
+
11
+ import '@girs/gjs';
12
+
13
+ // Module dependencies
14
+ import type xlib from '@girs/xlib-2.0';
15
+ import type CoglPango from '@girs/coglpango-6';
16
+ import type PangoCairo from '@girs/pangocairo-1.0';
17
+ import type cairo from 'cairo';
18
+ import type GObject from '@girs/gobject-2.0';
19
+ import type GLib from '@girs/glib-2.0';
20
+ import type Pango from '@girs/pango-1.0';
21
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
22
+ import type freetype2 from '@girs/freetype2-2.0';
23
+ import type Gio from '@girs/gio-2.0';
24
+ import type GModule from '@girs/gmodule-2.0';
25
+ import type Cogl from '@girs/cogl-6';
26
+ import type Graphene from '@girs/graphene-1.0';
27
+ import type GL from '@girs/gl-1.0';
28
+ import type Clutter from '@girs/clutter-6';
29
+ import type Json from '@girs/json-1.0';
30
+ import type Atk from '@girs/atk-1.0';
31
+
32
+ export namespace ClutterX11 {
33
+
34
+ /**
35
+ * ClutterX11-6
36
+ */
37
+
38
+
39
+ /**
40
+ * @gir-type Enum
41
+ */
42
+ export namespace FilterReturn {
43
+ export const $gtype: GObject.GType<FilterReturn>;
44
+ }
45
+
46
+ /**
47
+ * Return values for the {@link ClutterX11.FilterFunc} function.
48
+ * @gir-type Enum
49
+ * @since 0.6
50
+ */
51
+ enum FilterReturn {
52
+ /**
53
+ * The event was not handled, continues the
54
+ * processing
55
+ */
56
+ CONTINUE,
57
+ /**
58
+ * Native event translated into a Clutter
59
+ * event, stops the processing
60
+ */
61
+ TRANSLATE,
62
+ /**
63
+ * Remove the event, stops the processing
64
+ */
65
+ REMOVE,
66
+ }
67
+
68
+
69
+ /**
70
+ * Retrieves the pointer to the default display.
71
+ * @returns the default display
72
+ * @since 0.6
73
+ */
74
+ function get_default_display(): xlib.Display;
75
+
76
+ /**
77
+ * Gets the number of the default X Screen object.
78
+ * @returns the number of the default screen
79
+ * @since 0.6
80
+ */
81
+ function get_default_screen(): number;
82
+
83
+ /**
84
+ * Retrieves whether the Clutter X11 backend is using ARGB visuals by default
85
+ * @returns `true` if ARGB visuals are queried by default
86
+ * @since 1.2
87
+ */
88
+ function get_use_argb_visual(): boolean;
89
+
90
+ /**
91
+ * Retrieves whether the Clutter X11 backend will create stereo
92
+ * stages if possible.
93
+ * @returns `true` if stereo stages are used if possible
94
+ * @since 1.22
95
+ */
96
+ function get_use_stereo_stage(): boolean;
97
+
98
+ /**
99
+ * Retrieves whether Clutter is running on an X11 server with the
100
+ * XComposite extension
101
+ * @returns `true` if the XComposite extension is available
102
+ */
103
+ function has_composite_extension(): boolean;
104
+
105
+ /**
106
+ * Sets the display connection Clutter should use; must be called
107
+ * before `clutter_init()`, `clutter_init_with_args()` or other functions
108
+ * pertaining Clutter's initialization process.
109
+ *
110
+ * If you are parsing the command line arguments by retrieving Clutter's
111
+ * {@link GLib.OptionGroup} with `clutter_get_option_group()` and calling
112
+ * `g_option_context_parse()` yourself, you should also call
113
+ * `clutter_x11_set_display()` before `g_option_context_parse()`.
114
+ * @param xdpy pointer to a X display connection.
115
+ * @since 0.8
116
+ */
117
+ function set_display(xdpy: xlib.Display): void;
118
+
119
+ /**
120
+ * Sets whether the Clutter X11 backend should request ARGB visuals by default
121
+ * or not.
122
+ *
123
+ * By default, Clutter requests RGB visuals.
124
+ *
125
+ * If no ARGB visuals are found, the X11 backend will fall back to
126
+ * requesting a RGB visual instead.
127
+ *
128
+ * ARGB visuals are required for the {@link Clutter.Stage.use_alpha} property to work.
129
+ *
130
+ * This function can only be called once, and before `clutter_init()` is
131
+ * called.
132
+ * @param use_argb `true` if ARGB visuals should be requested by default
133
+ * @since 1.2
134
+ */
135
+ function set_use_argb_visual(use_argb: boolean): void;
136
+
137
+ /**
138
+ * Sets whether the backend object for Clutter stages, will,
139
+ * if possible, be created with the ability to support stereo drawing
140
+ * (drawing separate images for the left and right eyes).
141
+ *
142
+ * This function must be called before `clutter_init()` is called.
143
+ * During paint callbacks, `cogl_framebuffer_is_stereo()` can be called
144
+ * on the framebuffer retrieved by `cogl_get_draw_framebuffer()` to
145
+ * determine if stereo support was successfully enabled, and
146
+ * `cogl_framebuffer_set_stereo_mode()` to determine which buffers
147
+ * will be drawn to.
148
+ *
149
+ * Note that this function *does not* cause the stage to be drawn
150
+ * multiple times with different perspective transformations and thus
151
+ * appear in 3D, it simply enables individual ClutterActors to paint
152
+ * different images for the left and and right eye.
153
+ * @param use_stereo `true` if the stereo stages should be used if possible.
154
+ * @since 1.22
155
+ */
156
+ function set_use_stereo_stage(use_stereo: boolean): void;
157
+
158
+ /**
159
+ * Traps every X error until `clutter_x11_untrap_x_errors()` is called.
160
+ * @since 0.6
161
+ */
162
+ function trap_x_errors(): void;
163
+
164
+ /**
165
+ * Removes the X error trap and returns the current status.
166
+ * @returns the trapped error code, or 0 for success
167
+ * @since 0.4
168
+ */
169
+ function untrap_x_errors(): number;
170
+
171
+ /**
172
+ * @gir-type Callback
173
+ */
174
+ interface FilterFunc {
175
+ (xev: xlib.XEvent, cev: Clutter.Event): FilterReturn;
176
+ }
177
+
178
+ /**
179
+ * @gir-type Struct
180
+ */
181
+ abstract class XInputDevice {
182
+ static $gtype: GObject.GType<XInputDevice>;
183
+ }
184
+
185
+
186
+ /**
187
+ * Name of the imported GIR library
188
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
189
+ */
190
+ const __name__: string;
191
+
192
+ /**
193
+ * Version of the imported GIR library
194
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
195
+ */
196
+ const __version__: string;
197
+ }
198
+
199
+ export default ClutterX11;
200
+
201
+ // END
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import ClutterX11 from 'gi://ClutterX11?version=6';
4
+ export default ClutterX11;
5
+
package/index.d.ts ADDED
@@ -0,0 +1,15 @@
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-6-ambient.d.ts';
11
+
12
+
13
+ import ClutterX11 from './clutterx11-6.js';
14
+ export default ClutterX11;
15
+
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import ClutterX11 from './clutterx11-6.js';
4
+ export default ClutterX11;
5
+
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@girs/clutterx11-6",
3
+ "version": "4.0.4",
4
+ "libraryVersion": "6.0.0",
5
+ "description": "GJS TypeScript type definitions for ClutterX11-6, generated from library version 6.0.0",
6
+ "type": "module",
7
+ "module": "clutterx11-6.js",
8
+ "main": "clutterx11-6.js",
9
+ "exports": {
10
+ "./ambient": {
11
+ "types": "./clutterx11-6-ambient.d.ts",
12
+ "import": "./clutterx11-6-ambient.js",
13
+ "default": "./clutterx11-6-ambient.js"
14
+ },
15
+ "./import": {
16
+ "types": "./clutterx11-6-import.d.ts",
17
+ "import": "./clutterx11-6-import.js",
18
+ "default": "./clutterx11-6-import.js"
19
+ },
20
+ "./clutterx11-6": {
21
+ "types": "./clutterx11-6.d.ts",
22
+ "import": "./clutterx11-6.js",
23
+ "default": "./clutterx11-6.js"
24
+ },
25
+ ".": {
26
+ "types": "./index.d.ts",
27
+ "import": "./index.js",
28
+ "default": "./index.js"
29
+ }
30
+ },
31
+ "scripts": {
32
+ "test": "tsc --project tsconfig.json"
33
+ },
34
+ "dependencies": {
35
+ "@girs/gjs": "^4.0.4",
36
+ "@girs/xlib-2.0": "^4.0.4",
37
+ "@girs/coglpango-6": "^4.0.4",
38
+ "@girs/pangocairo-1.0": "^4.0.4",
39
+ "@girs/cairo-1.0": "^4.0.4",
40
+ "@girs/gobject-2.0": "^4.0.4",
41
+ "@girs/glib-2.0": "^4.0.4",
42
+ "@girs/pango-1.0": "^4.0.4",
43
+ "@girs/harfbuzz-0.0": "^4.0.4",
44
+ "@girs/freetype2-2.0": "^4.0.4",
45
+ "@girs/gio-2.0": "^4.0.4",
46
+ "@girs/gmodule-2.0": "^4.0.4",
47
+ "@girs/cogl-6": "^4.0.4",
48
+ "@girs/graphene-1.0": "^4.0.4",
49
+ "@girs/gl-1.0": "^4.0.4",
50
+ "@girs/clutter-6": "^4.0.4",
51
+ "@girs/json-1.0": "^4.0.4",
52
+ "@girs/atk-1.0": "^4.0.4" },
53
+ "devDependencies": {
54
+ "typescript": "*"
55
+ },
56
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "ClutterX11-6"],
57
+ "author": "ts-for-gir",
58
+ "license": "MIT",
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "git+https://github.com/gjsify/types.git"
62
+ },
63
+ "bugs": {
64
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
65
+ },
66
+ "homepage": "https://github.com/gjsify/types/tree/main/clutterx11-6#readme"
67
+ }
68
+
69
+
package/tsconfig.json ADDED
@@ -0,0 +1,80 @@
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
+ "rootDir": ".",
13
+ // General settings for code generation
14
+ "removeComments": false,
15
+ "inlineSourceMap": false,
16
+ "inlineSources": false,
17
+ "newLine": "LF",
18
+ // Show diagnostics
19
+ "diagnostics": true,
20
+ "paths": {
21
+ "@girs/xlib-2.0": [
22
+ "../xlib-2.0/index.d.ts"
23
+ ],
24
+ "@girs/coglpango-6": [
25
+ "../coglpango-6/index.d.ts"
26
+ ],
27
+ "@girs/pangocairo-1.0": [
28
+ "../pangocairo-1.0/index.d.ts"
29
+ ],
30
+ "@girs/cairo-1.0": [
31
+ "../cairo-1.0/index.d.ts"
32
+ ],
33
+ "@girs/gobject-2.0": [
34
+ "../gobject-2.0/index.d.ts"
35
+ ],
36
+ "@girs/glib-2.0": [
37
+ "../glib-2.0/index.d.ts"
38
+ ],
39
+ "@girs/pango-1.0": [
40
+ "../pango-1.0/index.d.ts"
41
+ ],
42
+ "@girs/harfbuzz-0.0": [
43
+ "../harfbuzz-0.0/index.d.ts"
44
+ ],
45
+ "@girs/freetype2-2.0": [
46
+ "../freetype2-2.0/index.d.ts"
47
+ ],
48
+ "@girs/gio-2.0": [
49
+ "../gio-2.0/index.d.ts"
50
+ ],
51
+ "@girs/gmodule-2.0": [
52
+ "../gmodule-2.0/index.d.ts"
53
+ ],
54
+ "@girs/cogl-6": [
55
+ "../cogl-6/index.d.ts"
56
+ ],
57
+ "@girs/graphene-1.0": [
58
+ "../graphene-1.0/index.d.ts"
59
+ ],
60
+ "@girs/gl-1.0": [
61
+ "../gl-1.0/index.d.ts"
62
+ ],
63
+ "@girs/clutter-6": [
64
+ "../clutter-6/index.d.ts"
65
+ ],
66
+ "@girs/json-1.0": [
67
+ "../json-1.0/index.d.ts"
68
+ ],
69
+ "@girs/atk-1.0": [
70
+ "../atk-1.0/index.d.ts"
71
+ ],
72
+ "@girs/gjs": [
73
+ "../gjs/index.d.ts"
74
+ ]
75
+ }
76
+ },
77
+ "include": ["./clutterx11-6.d.ts"]
78
+ }
79
+
80
+
package/typedoc.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "entryPoints": ["./clutterx11-6.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "ClutterX11-6",
5
+ "tsconfig": "./tsconfig.json",
6
+ "skipErrorChecking": true,
7
+ "highlightLanguages": ["typescript", "javascript", "c", "cpp", "xml", "bash", "json", "css"]
8
+ }
9
+