@girs/clutterx11-7 7.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-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.0-beta.38.
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,9 @@
1
+ declare module 'gi://ClutterX11?version=7' {
2
+ import ClutterX117 from '@girs/clutterx11-7';
3
+ export default ClutterX117;
4
+ }
5
+
6
+ declare module 'gi://ClutterX11' {
7
+ import ClutterX117 from 'gi://ClutterX11?version=7';
8
+ export default ClutterX117;
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,144 @@
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-7';
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-7';
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-7';
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-7
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 will create stereo
75
+ * stages if possible.
76
+ * @returns %TRUE if stereo stages are used if possible
77
+ */
78
+ function get_use_stereo_stage(): boolean;
79
+ /**
80
+ * Sets the display connection Clutter should use; must be called
81
+ * before clutter_init(), clutter_init_with_args() or other functions
82
+ * pertaining Clutter's initialization process.
83
+ *
84
+ * If you are parsing the command line arguments by retrieving Clutter's
85
+ * #GOptionGroup with clutter_get_option_group() and calling
86
+ * g_option_context_parse() yourself, you should also call
87
+ * clutter_x11_set_display() before g_option_context_parse().
88
+ * @param xdpy pointer to a X display connection.
89
+ */
90
+ function set_display(xdpy: xlib.Display): void;
91
+ /**
92
+ * Sets whether the backend object for Clutter stages, will,
93
+ * if possible, be created with the ability to support stereo drawing
94
+ * (drawing separate images for the left and right eyes).
95
+ *
96
+ * This function must be called before clutter_init() is called.
97
+ * During paint callbacks, cogl_framebuffer_is_stereo() can be called
98
+ * on the framebuffer retrieved by cogl_get_draw_framebuffer() to
99
+ * determine if stereo support was successfully enabled, and
100
+ * cogl_framebuffer_set_stereo_mode() to determine which buffers
101
+ * will be drawn to.
102
+ *
103
+ * Note that this function *does not* cause the stage to be drawn
104
+ * multiple times with different perspective transformations and thus
105
+ * appear in 3D, it simply enables individual ClutterActors to paint
106
+ * different images for the left and and right eye.
107
+ * @param use_stereo %TRUE if the stereo stages should be used if possible.
108
+ */
109
+ function set_use_stereo_stage(use_stereo: boolean): void;
110
+ /**
111
+ * Traps every X error until clutter_x11_untrap_x_errors() is called.
112
+ */
113
+ function trap_x_errors(): void;
114
+ /**
115
+ * Removes the X error trap and returns the current status.
116
+ * @returns the trapped error code, or 0 for success
117
+ */
118
+ function untrap_x_errors(): number;
119
+ interface FilterFunc {
120
+ (xev: xlib.XEvent, cev: Clutter.Event): FilterReturn;
121
+ }
122
+ abstract class XInputDevice {
123
+ static $gtype: GObject.GType<XInputDevice>;
124
+
125
+ // Constructors
126
+
127
+ _init(...args: any[]): void;
128
+ }
129
+
130
+ /**
131
+ * Name of the imported GIR library
132
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
133
+ */
134
+ const __name__: string;
135
+ /**
136
+ * Version of the imported GIR library
137
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
138
+ */
139
+ const __version__: string;
140
+ }
141
+
142
+ export default ClutterX11;
143
+
144
+ // 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,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-7-ambient.d.ts';
11
+
12
+ import ClutterX11 from './clutterx11-7.js';
13
+ export default ClutterX11;
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,68 @@
1
+ {
2
+ "name": "@girs/clutterx11-7",
3
+ "version": "7.0.0-4.0.0-beta.38",
4
+ "description": "GJS TypeScript type definitions for ClutterX11-7, generated from library version 7.0.0",
5
+ "type": "module",
6
+ "module": "clutterx11-7.js",
7
+ "main": "clutterx11-7.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./clutterx11-7-ambient.d.ts",
11
+ "import": "./clutterx11-7-ambient.js",
12
+ "default": "./clutterx11-7-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./clutterx11-7-import.d.ts",
16
+ "import": "./clutterx11-7-import.js",
17
+ "default": "./clutterx11-7-import.js"
18
+ },
19
+ "./clutterx11-7": {
20
+ "types": "./clutterx11-7.d.ts",
21
+ "import": "./clutterx11-7.js",
22
+ "default": "./clutterx11-7.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-7": "7.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-7": "7.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-7": "7.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-7"],
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-7#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-7.d.ts"]
23
+ }
24
+
25
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./clutterx11-7.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "ClutterX11-7",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+