@girs/clutterx11-6 6.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-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.0-beta.38.
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,9 @@
1
+ declare module 'gi://ClutterX11?version=6' {
2
+ import ClutterX116 from '@girs/clutterx11-6';
3
+ export default ClutterX116;
4
+ }
5
+
6
+ declare module 'gi://ClutterX11' {
7
+ import ClutterX116 from 'gi://ClutterX11?version=6';
8
+ export default ClutterX116;
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,171 @@
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-6';
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-6';
25
+ import type Graphene from '@girs/graphene-1.0';
26
+ import type GL from '@girs/gl-1.0';
27
+ import type Clutter from '@girs/clutter-6';
28
+ import type Json from '@girs/json-1.0';
29
+ import type Atk from '@girs/atk-1.0';
30
+
31
+ export namespace ClutterX11 {
32
+ /**
33
+ * ClutterX11-6
34
+ */
35
+
36
+ /**
37
+ * Return values for the #ClutterX11FilterFunc function.
38
+ */
39
+
40
+ /**
41
+ * Return values for the #ClutterX11FilterFunc function.
42
+ */
43
+ export namespace FilterReturn {
44
+ export const $gtype: GObject.GType<FilterReturn>;
45
+ }
46
+
47
+ enum FilterReturn {
48
+ /**
49
+ * The event was not handled, continues the
50
+ * processing
51
+ */
52
+ CONTINUE,
53
+ /**
54
+ * Native event translated into a Clutter
55
+ * event, stops the processing
56
+ */
57
+ TRANSLATE,
58
+ /**
59
+ * Remove the event, stops the processing
60
+ */
61
+ REMOVE,
62
+ }
63
+ /**
64
+ * Retrieves the pointer to the default display.
65
+ * @returns the default display
66
+ */
67
+ function get_default_display(): xlib.Display;
68
+ /**
69
+ * Gets the number of the default X Screen object.
70
+ * @returns the number of the default screen
71
+ */
72
+ function get_default_screen(): number;
73
+ /**
74
+ * Retrieves whether the Clutter X11 backend is using ARGB visuals by default
75
+ * @returns %TRUE if ARGB visuals are queried by default
76
+ */
77
+ function get_use_argb_visual(): boolean;
78
+ /**
79
+ * Retrieves whether the Clutter X11 backend will create stereo
80
+ * stages if possible.
81
+ * @returns %TRUE if stereo stages are used if possible
82
+ */
83
+ function get_use_stereo_stage(): boolean;
84
+ /**
85
+ * Retrieves whether Clutter is running on an X11 server with the
86
+ * XComposite extension
87
+ * @returns %TRUE if the XComposite extension is available
88
+ */
89
+ function has_composite_extension(): boolean;
90
+ /**
91
+ * Sets the display connection Clutter should use; must be called
92
+ * before clutter_init(), clutter_init_with_args() or other functions
93
+ * pertaining Clutter's initialization process.
94
+ *
95
+ * If you are parsing the command line arguments by retrieving Clutter's
96
+ * #GOptionGroup with clutter_get_option_group() and calling
97
+ * g_option_context_parse() yourself, you should also call
98
+ * clutter_x11_set_display() before g_option_context_parse().
99
+ * @param xdpy pointer to a X display connection.
100
+ */
101
+ function set_display(xdpy: xlib.Display): void;
102
+ /**
103
+ * Sets whether the Clutter X11 backend should request ARGB visuals by default
104
+ * or not.
105
+ *
106
+ * By default, Clutter requests RGB visuals.
107
+ *
108
+ * If no ARGB visuals are found, the X11 backend will fall back to
109
+ * requesting a RGB visual instead.
110
+ *
111
+ * ARGB visuals are required for the #ClutterStage:use-alpha property to work.
112
+ *
113
+ * This function can only be called once, and before clutter_init() is
114
+ * called.
115
+ * @param use_argb %TRUE if ARGB visuals should be requested by default
116
+ */
117
+ function set_use_argb_visual(use_argb: boolean): void;
118
+ /**
119
+ * Sets whether the backend object for Clutter stages, will,
120
+ * if possible, be created with the ability to support stereo drawing
121
+ * (drawing separate images for the left and right eyes).
122
+ *
123
+ * This function must be called before clutter_init() is called.
124
+ * During paint callbacks, cogl_framebuffer_is_stereo() can be called
125
+ * on the framebuffer retrieved by cogl_get_draw_framebuffer() to
126
+ * determine if stereo support was successfully enabled, and
127
+ * cogl_framebuffer_set_stereo_mode() to determine which buffers
128
+ * will be drawn to.
129
+ *
130
+ * Note that this function *does not* cause the stage to be drawn
131
+ * multiple times with different perspective transformations and thus
132
+ * appear in 3D, it simply enables individual ClutterActors to paint
133
+ * different images for the left and and right eye.
134
+ * @param use_stereo %TRUE if the stereo stages should be used if possible.
135
+ */
136
+ function set_use_stereo_stage(use_stereo: boolean): void;
137
+ /**
138
+ * Traps every X error until clutter_x11_untrap_x_errors() is called.
139
+ */
140
+ function trap_x_errors(): void;
141
+ /**
142
+ * Removes the X error trap and returns the current status.
143
+ * @returns the trapped error code, or 0 for success
144
+ */
145
+ function untrap_x_errors(): number;
146
+ interface FilterFunc {
147
+ (xev: xlib.XEvent, cev: Clutter.Event): FilterReturn;
148
+ }
149
+ abstract class XInputDevice {
150
+ static $gtype: GObject.GType<XInputDevice>;
151
+
152
+ // Constructors
153
+
154
+ _init(...args: any[]): void;
155
+ }
156
+
157
+ /**
158
+ * Name of the imported GIR library
159
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
160
+ */
161
+ const __name__: string;
162
+ /**
163
+ * Version of the imported GIR library
164
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
165
+ */
166
+ const __version__: string;
167
+ }
168
+
169
+ export default ClutterX11;
170
+
171
+ // 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,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-6-ambient.d.ts';
11
+
12
+ import ClutterX11 from './clutterx11-6.js';
13
+ export default ClutterX11;
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,68 @@
1
+ {
2
+ "name": "@girs/clutterx11-6",
3
+ "version": "6.0.0-4.0.0-beta.38",
4
+ "description": "GJS TypeScript type definitions for ClutterX11-6, generated from library version 6.0.0",
5
+ "type": "module",
6
+ "module": "clutterx11-6.js",
7
+ "main": "clutterx11-6.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./clutterx11-6-ambient.d.ts",
11
+ "import": "./clutterx11-6-ambient.js",
12
+ "default": "./clutterx11-6-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./clutterx11-6-import.d.ts",
16
+ "import": "./clutterx11-6-import.js",
17
+ "default": "./clutterx11-6-import.js"
18
+ },
19
+ "./clutterx11-6": {
20
+ "types": "./clutterx11-6.d.ts",
21
+ "import": "./clutterx11-6.js",
22
+ "default": "./clutterx11-6.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-6": "6.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-6": "6.0.0-4.0.0-beta.38",
47
+ "@girs/graphene-1.0": "1.0.0-4.0.0-beta.38",
48
+ "@girs/gl-1.0": "1.0.0-4.0.0-beta.38",
49
+ "@girs/clutter-6": "6.0.0-4.0.0-beta.38",
50
+ "@girs/json-1.0": "1.10.8-4.0.0-beta.38",
51
+ "@girs/atk-1.0": "2.58.0-4.0.0-beta.38" },
52
+ "devDependencies": {
53
+ "typescript": "*"
54
+ },
55
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "ClutterX11-6"],
56
+ "author": "ts-for-gir",
57
+ "license": "MIT",
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "git+https://github.com/gjsify/types.git"
61
+ },
62
+ "bugs": {
63
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
64
+ },
65
+ "homepage": "https://github.com/gjsify/types/tree/main/clutterx11-6#readme"
66
+ }
67
+
68
+
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-6.d.ts"]
23
+ }
24
+
25
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./clutterx11-6.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "ClutterX11-6",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+