@girs/metatest-15 15.0.0-4.0.0-beta.7
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 +86 -0
- package/index.d.ts +15 -0
- package/index.js +5 -0
- package/metatest-15-ambient.d.ts +9 -0
- package/metatest-15-ambient.js +2 -0
- package/metatest-15-import.d.ts +9 -0
- package/metatest-15-import.js +3 -0
- package/metatest-15.d.ts +139 -0
- package/metatest-15.js +5 -0
- package/package.json +77 -0
- package/tsconfig.json +23 -0
- package/typedoc.json +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
# MetaTest-15
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
GJS TypeScript type definitions for MetaTest-15, generated from library version 15.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.7.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
To use this type definitions, install them with NPM:
|
|
14
|
+
```bash
|
|
15
|
+
npm install @girs/metatest-15
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
You can import this package into your project like this:
|
|
21
|
+
```ts
|
|
22
|
+
import MetaTest from '@girs/metatest-15';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Ambient Modules
|
|
26
|
+
|
|
27
|
+
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.
|
|
28
|
+
For this you need to include `@girs/metatest-15` or `@girs/metatest-15/ambient` in your `tsconfig` or entry point Typescript file:
|
|
29
|
+
|
|
30
|
+
`index.ts`:
|
|
31
|
+
```ts
|
|
32
|
+
import '@girs/metatest-15'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`tsconfig.json`:
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"compilerOptions": {
|
|
39
|
+
...
|
|
40
|
+
},
|
|
41
|
+
"include": ["@girs/metatest-15"],
|
|
42
|
+
...
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Now you can import the ambient module with TypeScript support:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import MetaTest from 'gi://MetaTest?version=15';
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Global import
|
|
53
|
+
|
|
54
|
+
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
|
|
55
|
+
For this you need to include `@girs/metatest-15` or `@girs/metatest-15/import` in your `tsconfig` or entry point Typescript file:
|
|
56
|
+
|
|
57
|
+
`index.ts`:
|
|
58
|
+
```ts
|
|
59
|
+
import '@girs/metatest-15'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`tsconfig.json`:
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"compilerOptions": {
|
|
66
|
+
...
|
|
67
|
+
},
|
|
68
|
+
"include": ["@girs/metatest-15"],
|
|
69
|
+
...
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Now you have also type support for this, too:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
const MetaTest = imports.gi.MetaTest;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Bundle
|
|
80
|
+
|
|
81
|
+
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).
|
|
82
|
+
|
|
83
|
+
## Other packages
|
|
84
|
+
|
|
85
|
+
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
|
|
86
|
+
|
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 './metatest-15-ambient.d.ts';
|
|
11
|
+
|
|
12
|
+
import './metatest-15-import.d.ts';
|
|
13
|
+
|
|
14
|
+
import MetaTest from './metatest-15.js';
|
|
15
|
+
export default MetaTest;
|
package/index.js
ADDED
package/metatest-15.d.ts
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
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
|
+
// Module dependencies
|
|
11
|
+
import type xlib from '@girs/xlib-2.0';
|
|
12
|
+
import type xfixes from '@girs/xfixes-4.0';
|
|
13
|
+
import type Mtk from '@girs/mtk-15';
|
|
14
|
+
import type Graphene from '@girs/graphene-1.0';
|
|
15
|
+
import type GObject from '@girs/gobject-2.0';
|
|
16
|
+
import type GLib from '@girs/glib-2.0';
|
|
17
|
+
import type Meta from '@girs/meta-15';
|
|
18
|
+
import type Gio from '@girs/gio-2.0';
|
|
19
|
+
import type GModule from '@girs/gmodule-2.0';
|
|
20
|
+
import type GDesktopEnums from '@girs/gdesktopenums-3.0';
|
|
21
|
+
import type CoglPango from '@girs/coglpango-15';
|
|
22
|
+
import type PangoCairo from '@girs/pangocairo-1.0';
|
|
23
|
+
import type cairo from '@girs/cairo-1.0';
|
|
24
|
+
import type Pango from '@girs/pango-1.0';
|
|
25
|
+
import type HarfBuzz from '@girs/harfbuzz-0.0';
|
|
26
|
+
import type freetype2 from '@girs/freetype2-2.0';
|
|
27
|
+
import type Cogl from '@girs/cogl-15';
|
|
28
|
+
import type GL from '@girs/gl-1.0';
|
|
29
|
+
import type Clutter from '@girs/clutter-15';
|
|
30
|
+
import type Atk from '@girs/atk-1.0';
|
|
31
|
+
|
|
32
|
+
export namespace MetaTest {
|
|
33
|
+
/**
|
|
34
|
+
* MetaTest-15
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
enum ContextTestType {
|
|
38
|
+
HEADLESS,
|
|
39
|
+
VKMS,
|
|
40
|
+
TEST,
|
|
41
|
+
}
|
|
42
|
+
enum ContextTestFlag {
|
|
43
|
+
NONE,
|
|
44
|
+
TEST_CLIENT,
|
|
45
|
+
NO_X11,
|
|
46
|
+
}
|
|
47
|
+
enum TestRunFlags {
|
|
48
|
+
NONE,
|
|
49
|
+
CAN_SKIP,
|
|
50
|
+
}
|
|
51
|
+
module ContextTest {
|
|
52
|
+
// Signal callback interfaces
|
|
53
|
+
|
|
54
|
+
interface AfterTests {
|
|
55
|
+
(): void;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface BeforeTests {
|
|
59
|
+
(): void;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface RunTests {
|
|
63
|
+
(): number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Constructor properties interface
|
|
67
|
+
|
|
68
|
+
interface ConstructorProps extends Meta.Context.ConstructorProps {}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
class ContextTest extends Meta.Context {
|
|
72
|
+
static $gtype: GObject.GType<ContextTest>;
|
|
73
|
+
|
|
74
|
+
// Constructors of MetaTest.ContextTest
|
|
75
|
+
|
|
76
|
+
constructor(properties?: Partial<ContextTest.ConstructorProps>, ...args: any[]);
|
|
77
|
+
|
|
78
|
+
_init(...args: any[]): void;
|
|
79
|
+
|
|
80
|
+
// Own signals of MetaTest.ContextTest
|
|
81
|
+
|
|
82
|
+
connect(id: string, callback: (...args: any[]) => any): number;
|
|
83
|
+
connect_after(id: string, callback: (...args: any[]) => any): number;
|
|
84
|
+
emit(id: string, ...args: any[]): void;
|
|
85
|
+
connect(signal: 'after-tests', callback: (_source: this) => void): number;
|
|
86
|
+
connect_after(signal: 'after-tests', callback: (_source: this) => void): number;
|
|
87
|
+
emit(signal: 'after-tests'): void;
|
|
88
|
+
connect(signal: 'before-tests', callback: (_source: this) => void): number;
|
|
89
|
+
connect_after(signal: 'before-tests', callback: (_source: this) => void): number;
|
|
90
|
+
emit(signal: 'before-tests'): void;
|
|
91
|
+
connect(signal: 'run-tests', callback: (_source: this) => number): number;
|
|
92
|
+
connect_after(signal: 'run-tests', callback: (_source: this) => number): number;
|
|
93
|
+
emit(signal: 'run-tests'): void;
|
|
94
|
+
|
|
95
|
+
// Own methods of MetaTest.ContextTest
|
|
96
|
+
|
|
97
|
+
run_tests(flags: TestRunFlags): number;
|
|
98
|
+
wait_for_x11_display(): void;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
module TestMonitor {
|
|
102
|
+
// Constructor properties interface
|
|
103
|
+
|
|
104
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
class TestMonitor extends GObject.Object {
|
|
108
|
+
static $gtype: GObject.GType<TestMonitor>;
|
|
109
|
+
|
|
110
|
+
// Constructors of MetaTest.TestMonitor
|
|
111
|
+
|
|
112
|
+
constructor(properties?: Partial<TestMonitor.ConstructorProps>, ...args: any[]);
|
|
113
|
+
|
|
114
|
+
_init(...args: any[]): void;
|
|
115
|
+
|
|
116
|
+
static ['new'](context: Meta.Context, width: number, height: number, refresh_rate: number): TestMonitor;
|
|
117
|
+
|
|
118
|
+
// Own methods of MetaTest.TestMonitor
|
|
119
|
+
|
|
120
|
+
destroy(): void;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
type ContextTestClass = typeof ContextTest;
|
|
124
|
+
type TestMonitorClass = typeof TestMonitor;
|
|
125
|
+
/**
|
|
126
|
+
* Name of the imported GIR library
|
|
127
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
128
|
+
*/
|
|
129
|
+
const __name__: string;
|
|
130
|
+
/**
|
|
131
|
+
* Version of the imported GIR library
|
|
132
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
133
|
+
*/
|
|
134
|
+
const __version__: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export default MetaTest;
|
|
138
|
+
|
|
139
|
+
// END
|
package/metatest-15.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@girs/metatest-15",
|
|
3
|
+
"version": "15.0.0-4.0.0-beta.7",
|
|
4
|
+
"description": "GJS TypeScript type definitions for MetaTest-15, generated from library version 15.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "metatest-15.js",
|
|
7
|
+
"main": "metatest-15.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./ambient": {
|
|
10
|
+
"types": "./metatest-15-ambient.d.ts",
|
|
11
|
+
"import": "./metatest-15-ambient.js",
|
|
12
|
+
"default": "./metatest-15-ambient.js"
|
|
13
|
+
},
|
|
14
|
+
"./import": {
|
|
15
|
+
"types": "./metatest-15-import.d.ts",
|
|
16
|
+
"import": "./metatest-15-import.js",
|
|
17
|
+
"default": "./metatest-15-import.js"
|
|
18
|
+
},
|
|
19
|
+
"./metatest-15": {
|
|
20
|
+
"types": "./metatest-15.d.ts",
|
|
21
|
+
"import": "./metatest-15.js",
|
|
22
|
+
"default": "./metatest-15.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/atk-1.0": "^2.52.0-4.0.0-beta.7",
|
|
35
|
+
"@girs/cairo-1.0": "^1.0.0-4.0.0-beta.7",
|
|
36
|
+
"@girs/clutter-15": "^15.0.0-4.0.0-beta.7",
|
|
37
|
+
"@girs/cogl-15": "^15.0.0-4.0.0-beta.7",
|
|
38
|
+
"@girs/coglpango-15": "^15.0.0-4.0.0-beta.7",
|
|
39
|
+
"@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.7",
|
|
40
|
+
"@girs/gdesktopenums-3.0": "^3.0.0-4.0.0-beta.7",
|
|
41
|
+
"@girs/gio-2.0": "^2.80.2-4.0.0-beta.7",
|
|
42
|
+
"@girs/gjs": "^4.0.0-beta.7",
|
|
43
|
+
"@girs/gl-1.0": "^1.0.0-4.0.0-beta.7",
|
|
44
|
+
"@girs/glib-2.0": "^2.80.2-4.0.0-beta.7",
|
|
45
|
+
"@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.7",
|
|
46
|
+
"@girs/gobject-2.0": "^2.80.2-4.0.0-beta.7",
|
|
47
|
+
"@girs/graphene-1.0": "^1.0.0-4.0.0-beta.7",
|
|
48
|
+
"@girs/harfbuzz-0.0": "^8.1.1-4.0.0-beta.7",
|
|
49
|
+
"@girs/meta-15": "^15.0.0-4.0.0-beta.7",
|
|
50
|
+
"@girs/mtk-15": "^15.0.0-4.0.0-beta.7",
|
|
51
|
+
"@girs/pango-1.0": "^1.52.2-4.0.0-beta.7",
|
|
52
|
+
"@girs/pangocairo-1.0": "^1.0.0-4.0.0-beta.7",
|
|
53
|
+
"@girs/xfixes-4.0": "^4.0.0-4.0.0-beta.7",
|
|
54
|
+
"@girs/xlib-2.0": "^2.0.0-4.0.0-beta.7"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"typescript": "*"
|
|
58
|
+
},
|
|
59
|
+
"keywords": [
|
|
60
|
+
"Gir",
|
|
61
|
+
"TypeScript",
|
|
62
|
+
"types",
|
|
63
|
+
"GObject-Introspection",
|
|
64
|
+
"GJS",
|
|
65
|
+
"MetaTest-15"
|
|
66
|
+
],
|
|
67
|
+
"author": "ts-for-gir",
|
|
68
|
+
"license": "MIT",
|
|
69
|
+
"repository": {
|
|
70
|
+
"type": "git",
|
|
71
|
+
"url": "git+https://github.com/gjsify/ts-for-gir.git"
|
|
72
|
+
},
|
|
73
|
+
"bugs": {
|
|
74
|
+
"url": "https://github.com/gjsify/ts-for-gir/issues"
|
|
75
|
+
},
|
|
76
|
+
"homepage": "https://github.com/gjsify/types/tree/main/metatest-15#readme"
|
|
77
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
},
|
|
20
|
+
"include": ["./metatest-15.d.ts"]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|