@girs/mtk-13 13.0.0-3.2.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,91 @@
1
+
2
+ # Mtk-13
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/mtk-13)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/mtk-13)
6
+
7
+
8
+ GJS TypeScript type definitions for Mtk-13, generated from library version 13.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
9
+
10
+
11
+ ## Install
12
+
13
+ To use this type definitions, install them with NPM:
14
+ ```bash
15
+ npm install @girs/mtk-13
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ You can import this package into your project like this:
21
+ ```ts
22
+ import Mtk from '@girs/mtk-13';
23
+ ```
24
+
25
+ Or if you prefer CommonJS, you can also use this:
26
+ ```ts
27
+ const Mtk = require('@girs/mtk-13');
28
+ ```
29
+
30
+ ### Ambient Modules
31
+
32
+ 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.
33
+ For this you need to include `@girs/mtk-13` or `@girs/mtk-13/ambient` in your `tsconfig` or entry point Typescript file:
34
+
35
+ `index.ts`:
36
+ ```ts
37
+ import '@girs/mtk-13'
38
+ ```
39
+
40
+ `tsconfig.json`:
41
+ ```json
42
+ {
43
+ "compilerOptions": {
44
+ ...
45
+ },
46
+ "include": ["@girs/mtk-13"],
47
+ ...
48
+ }
49
+ ```
50
+
51
+ Now you can import the ambient module with TypeScript support:
52
+
53
+ ```ts
54
+ import Mtk from 'gi://Mtk?version=13';
55
+ ```
56
+
57
+ ### Global import
58
+
59
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
60
+ For this you need to include `@girs/mtk-13` or `@girs/mtk-13/import` in your `tsconfig` or entry point Typescript file:
61
+
62
+ `index.ts`:
63
+ ```ts
64
+ import '@girs/mtk-13'
65
+ ```
66
+
67
+ `tsconfig.json`:
68
+ ```json
69
+ {
70
+ "compilerOptions": {
71
+ ...
72
+ },
73
+ "include": ["@girs/mtk-13"],
74
+ ...
75
+ }
76
+ ```
77
+
78
+ Now you have also type support for this, too:
79
+
80
+ ```ts
81
+ const Mtk = imports.gi.Mtk;
82
+ ```
83
+
84
+ ### Bundle
85
+
86
+ 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).
87
+
88
+ ## Other packages
89
+
90
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
91
+
@@ -0,0 +1,13 @@
1
+
2
+
3
+ declare module 'gi://Mtk?version=13' {
4
+ import Mtk13 from '@girs/mtk-13';
5
+ export default Mtk13;
6
+ }
7
+
8
+ declare module 'gi://Mtk' {
9
+ import Mtk13 from '@girs/mtk-13';
10
+ export default Mtk13;
11
+ }
12
+
13
+
@@ -0,0 +1,13 @@
1
+
2
+
3
+ import Mtk13 from '@girs/mtk-13';
4
+
5
+ declare global {
6
+ export interface GjsGiImports {
7
+ Mtk: typeof Mtk13;
8
+ }
9
+ }
10
+
11
+ export default GjsGiImports;
12
+
13
+
package/mtk-13.cjs ADDED
@@ -0,0 +1,11 @@
1
+
2
+
3
+ imports.gi.versions.Mtk = '13'
4
+ const Mtk = imports.gi.Mtk;
5
+
6
+ module.exports = Mtk;
7
+
8
+
9
+
10
+
11
+
package/mtk-13.d.cts ADDED
@@ -0,0 +1,137 @@
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
+
9
+ import './mtk-13-ambient.d.ts';
10
+ import './mtk-13-import.d.ts';
11
+ /**
12
+ * Mtk-13
13
+ */
14
+
15
+ import type cairo from '@girs/cairo-1.0';
16
+ import type GObject from '@girs/gobject-2.0';
17
+ import type GLib from '@girs/glib-2.0';
18
+ import type Graphene from '@girs/graphene-1.0';
19
+
20
+ export enum RoundingStrategy {
21
+ SHRINK,
22
+ GROW,
23
+ ROUND,
24
+ }
25
+ export function rectangle_from_graphene_rect(rect: Graphene.Rect, rounding_strategy: RoundingStrategy): /* dest */ Rectangle
26
+ export function x11_errors_deinit(): void
27
+ export interface Rectangle {
28
+
29
+ // Own fields of Mtk-13.Mtk.Rectangle
30
+
31
+ /**
32
+ * X coordinate of the top-left corner
33
+ * @field
34
+ */
35
+ x: number
36
+ /**
37
+ * Y coordinate of the top-left corner
38
+ * @field
39
+ */
40
+ y: number
41
+ /**
42
+ * Width of the rectangle
43
+ * @field
44
+ */
45
+ width: number
46
+ /**
47
+ * Height of the rectangle
48
+ * @field
49
+ */
50
+ height: number
51
+
52
+ // Owm methods of Mtk-13.Mtk.Rectangle
53
+
54
+ area(): number
55
+ contains_rect(inner_rect: Rectangle): boolean
56
+ copy(): Rectangle
57
+ could_fit_rect(inner_rect: Rectangle): boolean
58
+ /**
59
+ * Compares the two rectangles
60
+ * @param src2 The second rectangle
61
+ * @returns Whether the two rectangles are equal
62
+ */
63
+ equal(src2: Rectangle): boolean
64
+ free(): void
65
+ /**
66
+ * Similar to [method`Rectangle`.overlap] but ignores the vertical location.
67
+ * @param rect2 The second rectangle
68
+ * @returns Whether the two rectangles overlap horizontally
69
+ */
70
+ horiz_overlap(rect2: Rectangle): boolean
71
+ /**
72
+ * Find the intersection between the two rectangles
73
+ * @param src2 another #MtkRectangle
74
+ * @returns TRUE is some intersection exists and is not degenerate, FALSE otherwise.
75
+ */
76
+ intersect(src2: Rectangle): [ /* returnType */ boolean, /* dest */ Rectangle ]
77
+ /**
78
+ * Similar to [method`Rectangle`.intersect] but doesn't provide
79
+ * the location of the intersection.
80
+ * @param rect2 The second rectangle
81
+ * @returns Whether the two rectangles overlap
82
+ */
83
+ overlap(rect2: Rectangle): boolean
84
+ to_graphene_rect(): Graphene.Rect
85
+ /**
86
+ * Computes the union of the two rectangles
87
+ * @param rect2 another #MtkRectangle
88
+ */
89
+ union(rect2: Rectangle): /* dest */ Rectangle
90
+ /**
91
+ * Similar to [method`Rectangle`.overlap] but ignores the horizontal location.
92
+ * @param rect2 The second rectangle
93
+ * @returns Whether the two rectangles overlap vertically
94
+ */
95
+ vert_overlap(rect2: Rectangle): boolean
96
+ }
97
+
98
+ export class Rectangle {
99
+
100
+ // Own properties of Mtk-13.Mtk.Rectangle
101
+
102
+ static name: string
103
+
104
+ // Constructors of Mtk-13.Mtk.Rectangle
105
+
106
+ /**
107
+ * Creates a new rectangle
108
+ * @constructor
109
+ * @param x X coordinate of the top left corner
110
+ * @param y Y coordinate of the top left corner
111
+ * @param width Width of the rectangle
112
+ * @param height Height of the rectangle
113
+ */
114
+ constructor(x: number, y: number, width: number, height: number)
115
+ /**
116
+ * Creates a new rectangle
117
+ * @constructor
118
+ * @param x X coordinate of the top left corner
119
+ * @param y Y coordinate of the top left corner
120
+ * @param width Width of the rectangle
121
+ * @param height Height of the rectangle
122
+ */
123
+ static new(x: number, y: number, width: number, height: number): Rectangle
124
+ static from_graphene_rect(rect: Graphene.Rect, rounding_strategy: RoundingStrategy): /* dest */ Rectangle
125
+ }
126
+
127
+ /**
128
+ * Name of the imported GIR library
129
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
130
+ */
131
+ export const __name__: string
132
+ /**
133
+ * Version of the imported GIR library
134
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
135
+ */
136
+ export const __version__: string
137
+ // END
package/mtk-13.d.ts ADDED
@@ -0,0 +1,142 @@
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
+
9
+ import './mtk-13-ambient.d.ts';
10
+ import './mtk-13-import.d.ts';
11
+ /**
12
+ * Mtk-13
13
+ */
14
+
15
+ import type cairo from '@girs/cairo-1.0';
16
+ import type GObject from '@girs/gobject-2.0';
17
+ import type GLib from '@girs/glib-2.0';
18
+ import type Graphene from '@girs/graphene-1.0';
19
+
20
+ export namespace Mtk {
21
+
22
+ enum RoundingStrategy {
23
+ SHRINK,
24
+ GROW,
25
+ ROUND,
26
+ }
27
+ function rectangle_from_graphene_rect(rect: Graphene.Rect, rounding_strategy: RoundingStrategy): /* dest */ Rectangle
28
+ function x11_errors_deinit(): void
29
+ interface Rectangle {
30
+
31
+ // Own fields of Mtk-13.Mtk.Rectangle
32
+
33
+ /**
34
+ * X coordinate of the top-left corner
35
+ * @field
36
+ */
37
+ x: number
38
+ /**
39
+ * Y coordinate of the top-left corner
40
+ * @field
41
+ */
42
+ y: number
43
+ /**
44
+ * Width of the rectangle
45
+ * @field
46
+ */
47
+ width: number
48
+ /**
49
+ * Height of the rectangle
50
+ * @field
51
+ */
52
+ height: number
53
+
54
+ // Owm methods of Mtk-13.Mtk.Rectangle
55
+
56
+ area(): number
57
+ contains_rect(inner_rect: Rectangle): boolean
58
+ copy(): Rectangle
59
+ could_fit_rect(inner_rect: Rectangle): boolean
60
+ /**
61
+ * Compares the two rectangles
62
+ * @param src2 The second rectangle
63
+ * @returns Whether the two rectangles are equal
64
+ */
65
+ equal(src2: Rectangle): boolean
66
+ free(): void
67
+ /**
68
+ * Similar to [method`Rectangle`.overlap] but ignores the vertical location.
69
+ * @param rect2 The second rectangle
70
+ * @returns Whether the two rectangles overlap horizontally
71
+ */
72
+ horiz_overlap(rect2: Rectangle): boolean
73
+ /**
74
+ * Find the intersection between the two rectangles
75
+ * @param src2 another #MtkRectangle
76
+ * @returns TRUE is some intersection exists and is not degenerate, FALSE otherwise.
77
+ */
78
+ intersect(src2: Rectangle): [ /* returnType */ boolean, /* dest */ Rectangle ]
79
+ /**
80
+ * Similar to [method`Rectangle`.intersect] but doesn't provide
81
+ * the location of the intersection.
82
+ * @param rect2 The second rectangle
83
+ * @returns Whether the two rectangles overlap
84
+ */
85
+ overlap(rect2: Rectangle): boolean
86
+ to_graphene_rect(): Graphene.Rect
87
+ /**
88
+ * Computes the union of the two rectangles
89
+ * @param rect2 another #MtkRectangle
90
+ */
91
+ union(rect2: Rectangle): /* dest */ Rectangle
92
+ /**
93
+ * Similar to [method`Rectangle`.overlap] but ignores the horizontal location.
94
+ * @param rect2 The second rectangle
95
+ * @returns Whether the two rectangles overlap vertically
96
+ */
97
+ vert_overlap(rect2: Rectangle): boolean
98
+ }
99
+
100
+ class Rectangle {
101
+
102
+ // Own properties of Mtk-13.Mtk.Rectangle
103
+
104
+ static name: string
105
+
106
+ // Constructors of Mtk-13.Mtk.Rectangle
107
+
108
+ /**
109
+ * Creates a new rectangle
110
+ * @constructor
111
+ * @param x X coordinate of the top left corner
112
+ * @param y Y coordinate of the top left corner
113
+ * @param width Width of the rectangle
114
+ * @param height Height of the rectangle
115
+ */
116
+ constructor(x: number, y: number, width: number, height: number)
117
+ /**
118
+ * Creates a new rectangle
119
+ * @constructor
120
+ * @param x X coordinate of the top left corner
121
+ * @param y Y coordinate of the top left corner
122
+ * @param width Width of the rectangle
123
+ * @param height Height of the rectangle
124
+ */
125
+ static new(x: number, y: number, width: number, height: number): Rectangle
126
+ static from_graphene_rect(rect: Graphene.Rect, rounding_strategy: RoundingStrategy): /* dest */ Rectangle
127
+ }
128
+
129
+ /**
130
+ * Name of the imported GIR library
131
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
132
+ */
133
+ const __name__: string
134
+ /**
135
+ * Version of the imported GIR library
136
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
137
+ */
138
+ const __version__: string
139
+ }
140
+
141
+ export default Mtk;
142
+ // END
package/mtk-13.js ADDED
@@ -0,0 +1,10 @@
1
+
2
+
3
+ // @ts-expect-error
4
+ import Mtk from 'gi://Mtk?version=13';
5
+ export { Mtk };
6
+ export default Mtk;
7
+
8
+
9
+
10
+
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@girs/mtk-13",
3
+ "version": "13.0.0-3.2.4",
4
+ "description": "GJS TypeScript type definitions for Mtk-13, generated from library version 13.0.0",
5
+ "type": "module",
6
+ "module": "mtk-13.js",
7
+ "main": "mtk-13.js",
8
+ "exports": {
9
+ "./ambient": "./mtk-13-ambient.d.ts",
10
+ "./import": "./mtk-13-import.d.ts",
11
+ ".": {
12
+ "import": {
13
+ "types": "./mtk-13.d.ts",
14
+ "default": "./mtk-13.js"
15
+ },
16
+ "require": {
17
+ "types": "./mtk-13.d.cts",
18
+ "default": "./mtk-13.cjs"
19
+ }
20
+ }
21
+ },
22
+ "scripts": {
23
+ "test": "yarn test:esm && yarn test:cjs",
24
+ "test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit mtk-13.d.ts",
25
+ "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit mtk-13.d.cts"
26
+ },
27
+ "dependencies": {
28
+ "@girs/cairo-1.0": "^1.0.0-3.2.4",
29
+ "@girs/gjs": "^3.2.4",
30
+ "@girs/glib-2.0": "^2.78.0-3.2.4",
31
+ "@girs/gobject-2.0": "^2.78.0-3.2.4",
32
+ "@girs/graphene-1.0": "^1.0.0-3.2.4"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "*"
36
+ },
37
+ "keywords": [
38
+ "Gir",
39
+ "TypeScript",
40
+ "types",
41
+ "GObject-Introspection",
42
+ "GJS",
43
+ "Mtk-13"
44
+ ],
45
+ "author": "ts-for-gir",
46
+ "license": "MIT",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/gjsify/types.git"
50
+ },
51
+ "bugs": {
52
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
53
+ },
54
+ "homepage": "https://github.com/gjsify/types/tree/main/mtk-13#readme"
55
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "lib": ["ESNext"],
7
+ "types": [],
8
+ "experimentalDecorators": true,
9
+ "moduleResolution": "node",
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
+ },
20
+ "include": ["./mtk-13.d.ts"]
21
+ }
22
+
23
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./mtk-13.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "Mtk-13",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+