@girs/clutterx11-7 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-7
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/clutterx11-7)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/clutterx11-7)
6
+
7
+
8
+ GJS TypeScript type definitions for ClutterX11-7, generated from library version 7.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-7
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import ClutterX11 from '@girs/clutterx11-7';
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-7` or `@girs/clutterx11-7/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/clutterx11-7'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/clutterx11-7"],
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=7';
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-7` or `@girs/clutterx11-7/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/clutterx11-7'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/clutterx11-7"],
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=7' {
3
+ import ClutterX117 from '@girs/clutterx11-7';
4
+ export default ClutterX117;
5
+ }
6
+
7
+ declare module 'gi://ClutterX11' {
8
+ import ClutterX117 from 'gi://ClutterX11?version=7';
9
+ export default ClutterX117;
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,169 @@
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-7';
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-7';
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-7';
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-7
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 will create stereo
85
+ * stages if possible.
86
+ * @returns `true` if stereo stages are used if possible
87
+ * @since 1.22
88
+ */
89
+ function get_use_stereo_stage(): boolean;
90
+
91
+ /**
92
+ * Sets the display connection Clutter should use; must be called
93
+ * before `clutter_init()`, `clutter_init_with_args()` or other functions
94
+ * pertaining Clutter's initialization process.
95
+ *
96
+ * If you are parsing the command line arguments by retrieving Clutter's
97
+ * {@link GLib.OptionGroup} with `clutter_get_option_group()` and calling
98
+ * `g_option_context_parse()` yourself, you should also call
99
+ * `clutter_x11_set_display()` before `g_option_context_parse()`.
100
+ * @param xdpy pointer to a X display connection.
101
+ * @since 0.8
102
+ */
103
+ function set_display(xdpy: xlib.Display): void;
104
+
105
+ /**
106
+ * Sets whether the backend object for Clutter stages, will,
107
+ * if possible, be created with the ability to support stereo drawing
108
+ * (drawing separate images for the left and right eyes).
109
+ *
110
+ * This function must be called before `clutter_init()` is called.
111
+ * During paint callbacks, `cogl_framebuffer_is_stereo()` can be called
112
+ * on the framebuffer retrieved by `cogl_get_draw_framebuffer()` to
113
+ * determine if stereo support was successfully enabled, and
114
+ * `cogl_framebuffer_set_stereo_mode()` to determine which buffers
115
+ * will be drawn to.
116
+ *
117
+ * Note that this function *does not* cause the stage to be drawn
118
+ * multiple times with different perspective transformations and thus
119
+ * appear in 3D, it simply enables individual ClutterActors to paint
120
+ * different images for the left and and right eye.
121
+ * @param use_stereo `true` if the stereo stages should be used if possible.
122
+ * @since 1.22
123
+ */
124
+ function set_use_stereo_stage(use_stereo: boolean): void;
125
+
126
+ /**
127
+ * Traps every X error until `clutter_x11_untrap_x_errors()` is called.
128
+ * @since 0.6
129
+ */
130
+ function trap_x_errors(): void;
131
+
132
+ /**
133
+ * Removes the X error trap and returns the current status.
134
+ * @returns the trapped error code, or 0 for success
135
+ * @since 0.4
136
+ */
137
+ function untrap_x_errors(): number;
138
+
139
+ /**
140
+ * @gir-type Callback
141
+ */
142
+ interface FilterFunc {
143
+ (xev: xlib.XEvent, cev: Clutter.Event): FilterReturn;
144
+ }
145
+
146
+ /**
147
+ * @gir-type Struct
148
+ */
149
+ abstract class XInputDevice {
150
+ static $gtype: GObject.GType<XInputDevice>;
151
+ }
152
+
153
+
154
+ /**
155
+ * Name of the imported GIR library
156
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
157
+ */
158
+ const __name__: string;
159
+
160
+ /**
161
+ * Version of the imported GIR library
162
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
163
+ */
164
+ const __version__: string;
165
+ }
166
+
167
+ export default ClutterX11;
168
+
169
+ // END
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import ClutterX11 from 'gi://ClutterX11?version=7';
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-7-ambient.d.ts';
11
+
12
+
13
+ import ClutterX11 from './clutterx11-7.js';
14
+ export default ClutterX11;
15
+
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import ClutterX11 from './clutterx11-7.js';
4
+ export default ClutterX11;
5
+
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@girs/clutterx11-7",
3
+ "version": "4.0.4",
4
+ "libraryVersion": "7.0.0",
5
+ "description": "GJS TypeScript type definitions for ClutterX11-7, generated from library version 7.0.0",
6
+ "type": "module",
7
+ "module": "clutterx11-7.js",
8
+ "main": "clutterx11-7.js",
9
+ "exports": {
10
+ "./ambient": {
11
+ "types": "./clutterx11-7-ambient.d.ts",
12
+ "import": "./clutterx11-7-ambient.js",
13
+ "default": "./clutterx11-7-ambient.js"
14
+ },
15
+ "./import": {
16
+ "types": "./clutterx11-7-import.d.ts",
17
+ "import": "./clutterx11-7-import.js",
18
+ "default": "./clutterx11-7-import.js"
19
+ },
20
+ "./clutterx11-7": {
21
+ "types": "./clutterx11-7.d.ts",
22
+ "import": "./clutterx11-7.js",
23
+ "default": "./clutterx11-7.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-7": "^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-7": "^4.0.4",
48
+ "@girs/graphene-1.0": "^4.0.4",
49
+ "@girs/gl-1.0": "^4.0.4",
50
+ "@girs/clutter-7": "^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-7"],
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-7#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-7": [
25
+ "../coglpango-7/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-7": [
55
+ "../cogl-7/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-7": [
64
+ "../clutter-7/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-7.d.ts"]
78
+ }
79
+
80
+
package/typedoc.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "entryPoints": ["./clutterx11-7.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "ClutterX11-7",
5
+ "tsconfig": "./tsconfig.json",
6
+ "skipErrorChecking": true,
7
+ "highlightLanguages": ["typescript", "javascript", "c", "cpp", "xml", "bash", "json", "css"]
8
+ }
9
+