@girs/pqmarble-2 2.0.0-4.0.0-beta.3
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/package.json +66 -0
- package/pqmarble-2-ambient.d.ts +12 -0
- package/pqmarble-2-ambient.js +2 -0
- package/pqmarble-2-import.d.ts +12 -0
- package/pqmarble-2-import.js +3 -0
- package/pqmarble-2.d.ts +83 -0
- package/pqmarble-2.js +6 -0
- package/tsconfig.json +23 -0
- package/typedoc.json +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
# PQMarble-2
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
GJS TypeScript type definitions for PQMarble-2, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
To use this type definitions, install them with NPM:
|
|
14
|
+
```bash
|
|
15
|
+
npm install @girs/pqmarble-2
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
You can import this package into your project like this:
|
|
21
|
+
```ts
|
|
22
|
+
import PQMarble from '@girs/pqmarble-2';
|
|
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/pqmarble-2` or `@girs/pqmarble-2/ambient` in your `tsconfig` or entry point Typescript file:
|
|
29
|
+
|
|
30
|
+
`index.ts`:
|
|
31
|
+
```ts
|
|
32
|
+
import '@girs/pqmarble-2'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`tsconfig.json`:
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"compilerOptions": {
|
|
39
|
+
...
|
|
40
|
+
},
|
|
41
|
+
"include": ["@girs/pqmarble-2"],
|
|
42
|
+
...
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Now you can import the ambient module with TypeScript support:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import PQMarble from 'gi://PQMarble?version=2';
|
|
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/pqmarble-2` or `@girs/pqmarble-2/import` in your `tsconfig` or entry point Typescript file:
|
|
56
|
+
|
|
57
|
+
`index.ts`:
|
|
58
|
+
```ts
|
|
59
|
+
import '@girs/pqmarble-2'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`tsconfig.json`:
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"compilerOptions": {
|
|
66
|
+
...
|
|
67
|
+
},
|
|
68
|
+
"include": ["@girs/pqmarble-2"],
|
|
69
|
+
...
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Now you have also type support for this, too:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
const PQMarble = imports.gi.PQMarble;
|
|
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/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@girs/pqmarble-2",
|
|
3
|
+
"version": "2.0.0-4.0.0-beta.3",
|
|
4
|
+
"description": "GJS TypeScript type definitions for PQMarble-2, generated from library version 2.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "pqmarble-2.js",
|
|
7
|
+
"main": "pqmarble-2.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./ambient": {
|
|
10
|
+
"types": "./pqmarble-2-ambient.d.ts",
|
|
11
|
+
"import": "./pqmarble-2-ambient.js",
|
|
12
|
+
"default": "./pqmarble-2-ambient.js"
|
|
13
|
+
},
|
|
14
|
+
"./import": {
|
|
15
|
+
"types": "./pqmarble-2-import.d.ts",
|
|
16
|
+
"import": "./pqmarble-2-import.js",
|
|
17
|
+
"default": "./pqmarble-2-import.js"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./pqmarble-2.d.ts",
|
|
21
|
+
"import": "./pqmarble-2.js",
|
|
22
|
+
"default": "./pqmarble-2.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit pqmarble-2.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@girs/cairo-1.0": "^1.0.0-4.0.0-beta.3",
|
|
30
|
+
"@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.3",
|
|
31
|
+
"@girs/gdk-4.0": "^4.0.0-4.0.0-beta.3",
|
|
32
|
+
"@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.3",
|
|
33
|
+
"@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
|
|
34
|
+
"@girs/gjs": "^4.0.0-beta.3",
|
|
35
|
+
"@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
|
|
36
|
+
"@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.3",
|
|
37
|
+
"@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3",
|
|
38
|
+
"@girs/graphene-1.0": "^1.0.0-4.0.0-beta.3",
|
|
39
|
+
"@girs/gsk-4.0": "^4.0.0-4.0.0-beta.3",
|
|
40
|
+
"@girs/gtk-4.0": "^4.14.1-4.0.0-beta.3",
|
|
41
|
+
"@girs/harfbuzz-0.0": "^8.3.1-4.0.0-beta.3",
|
|
42
|
+
"@girs/pango-1.0": "^1.51.0-4.0.0-beta.3",
|
|
43
|
+
"@girs/pangocairo-1.0": "^1.0.0-4.0.0-beta.3"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"typescript": "*"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"Gir",
|
|
50
|
+
"TypeScript",
|
|
51
|
+
"types",
|
|
52
|
+
"GObject-Introspection",
|
|
53
|
+
"GJS",
|
|
54
|
+
"PQMarble-2"
|
|
55
|
+
],
|
|
56
|
+
"author": "ts-for-gir",
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "git+https://github.com/gjsify/ts-for-gir.git"
|
|
61
|
+
},
|
|
62
|
+
"bugs": {
|
|
63
|
+
"url": "https://github.com/gjsify/ts-for-gir/issues"
|
|
64
|
+
},
|
|
65
|
+
"homepage": "https://github.com/gjsify/types/tree/main/pqmarble-2#readme"
|
|
66
|
+
}
|
package/pqmarble-2.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
|
|
8
|
+
import './pqmarble-2-ambient.d.ts';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* PQMarble-2
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type Gdk from '@girs/gdk-4.0';
|
|
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 PangoCairo from '@girs/pangocairo-1.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 GdkPixbuf from '@girs/gdkpixbuf-2.0';
|
|
24
|
+
import type GModule from '@girs/gmodule-2.0';
|
|
25
|
+
import type Gtk from '@girs/gtk-4.0';
|
|
26
|
+
import type Gsk from '@girs/gsk-4.0';
|
|
27
|
+
import type Graphene from '@girs/graphene-1.0';
|
|
28
|
+
|
|
29
|
+
export namespace PQMarble {
|
|
30
|
+
function get_css_provider_for_data(data: string): Gtk.CssProvider | null;
|
|
31
|
+
function set_theming_for_data(widget: Gtk.Widget, data: string, class_name: string | null, priority: number): void;
|
|
32
|
+
function add_css_provider_from_resource(resource: string, priority: number, display: Gdk.Display): void;
|
|
33
|
+
module Settings {
|
|
34
|
+
// Constructor properties interface
|
|
35
|
+
|
|
36
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {
|
|
37
|
+
schema: Gio.Settings;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
abstract class Settings extends GObject.Object {
|
|
42
|
+
static $gtype: GObject.GType<Settings>;
|
|
43
|
+
|
|
44
|
+
// Own properties of PQMarble.Settings
|
|
45
|
+
|
|
46
|
+
get schema(): Gio.Settings;
|
|
47
|
+
set schema(val: Gio.Settings);
|
|
48
|
+
|
|
49
|
+
// Constructors of PQMarble.Settings
|
|
50
|
+
|
|
51
|
+
constructor(properties?: Partial<Settings.ConstructorProps>, ...args: any[]);
|
|
52
|
+
|
|
53
|
+
_init(...args: any[]): void;
|
|
54
|
+
|
|
55
|
+
// Own methods of PQMarble.Settings
|
|
56
|
+
|
|
57
|
+
get_schema(): Gio.Settings;
|
|
58
|
+
set_schema(value: Gio.Settings): void;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
type SettingsClass = typeof Settings;
|
|
62
|
+
abstract class SettingsPrivate {
|
|
63
|
+
static $gtype: GObject.GType<SettingsPrivate>;
|
|
64
|
+
|
|
65
|
+
// Constructors of PQMarble.SettingsPrivate
|
|
66
|
+
|
|
67
|
+
_init(...args: any[]): void;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Name of the imported GIR library
|
|
72
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
73
|
+
*/
|
|
74
|
+
const __name__: string;
|
|
75
|
+
/**
|
|
76
|
+
* Version of the imported GIR library
|
|
77
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
78
|
+
*/
|
|
79
|
+
const __version__: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export default PQMarble;
|
|
83
|
+
// END
|
package/pqmarble-2.js
ADDED
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": ["./pqmarble-2.d.ts"]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|