@girs/coglpango-15 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
+ # CoglPango-15
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/coglpango-15)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/coglpango-15)
6
+
7
+
8
+ GJS TypeScript type definitions for CoglPango-15, generated from library version 15.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/coglpango-15
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import CoglPango from '@girs/coglpango-15';
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/coglpango-15` or `@girs/coglpango-15/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/coglpango-15'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/coglpango-15"],
41
+ ...
42
+ }
43
+ ```
44
+
45
+ Now you can import the ambient module with TypeScript support:
46
+
47
+ ```ts
48
+ import CoglPango from 'gi://CoglPango?version=15';
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/coglpango-15` or `@girs/coglpango-15/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/coglpango-15'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/coglpango-15"],
68
+ ...
69
+ }
70
+ ```
71
+
72
+ Now you have also type support for this, too:
73
+
74
+ ```ts
75
+ const CoglPango = imports.gi.CoglPango;
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://CoglPango?version=15' {
3
+ import CoglPango15 from '@girs/coglpango-15';
4
+ export default CoglPango15;
5
+ }
6
+
7
+ declare module 'gi://CoglPango' {
8
+ import CoglPango15 from 'gi://CoglPango?version=15';
9
+ export default CoglPango15;
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: "CoglPango"
2
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -0,0 +1,164 @@
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 PangoCairo from '@girs/pangocairo-1.0';
15
+ import type cairo from 'cairo';
16
+ import type GObject from '@girs/gobject-2.0';
17
+ import type GLib from '@girs/glib-2.0';
18
+ import type Pango from '@girs/pango-1.0';
19
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
20
+ import type freetype2 from '@girs/freetype2-2.0';
21
+ import type Gio from '@girs/gio-2.0';
22
+ import type GModule from '@girs/gmodule-2.0';
23
+ import type Mtk from '@girs/mtk-15';
24
+ import type Graphene from '@girs/graphene-1.0';
25
+ import type Cogl from '@girs/cogl-15';
26
+ import type xlib from '@girs/xlib-2.0';
27
+ import type GL from '@girs/gl-1.0';
28
+
29
+ export namespace CoglPango {
30
+
31
+ /**
32
+ * CoglPango-15
33
+ */
34
+
35
+
36
+ /**
37
+ * This updates any internal glyph cache textures as necessary to be
38
+ * able to render the given `layout`.
39
+ *
40
+ * This api should be used to avoid mid-scene modifications of
41
+ * glyph-cache textures which can lead to undefined rendering results.
42
+ * @param layout A {@link Pango.Layout}
43
+ */
44
+ function ensure_glyph_cache_for_layout(layout: Pango.Layout): void;
45
+
46
+ /**
47
+ * Create a {@link Pango.Context} for the given `font_map`.
48
+ * @param font_map a {@link CoglPango.FontMap}
49
+ * @returns the newly created context: free with {@link GObject.Object.unref}.
50
+ */
51
+ function font_map_create_context(font_map: FontMap): Pango.Context;
52
+
53
+ /**
54
+ * Retrieves the {@link CoglPango.Renderer} for the passed `font_map`.
55
+ * @param font_map a {@link CoglPango.FontMap}
56
+ * @returns a {@link Pango.Renderer}
57
+ */
58
+ function font_map_get_renderer(font_map: FontMap): Pango.Renderer;
59
+
60
+ /**
61
+ * Creates a new font map.
62
+ * @param context
63
+ * @returns the newly created {@link Pango.FontMap}
64
+ */
65
+ function font_map_new(context: Cogl.Context): Pango.FontMap;
66
+
67
+ /**
68
+ * Sets the resolution for the `font_map`.
69
+ *
70
+ * This is a scale factor between points specified in a
71
+ * {@link Pango.FontDescription} and Cogl units.
72
+ * The default value is %96, meaning that a 10 point font will be 13
73
+ * units high. (10 * 96. / 72. = 13.3).
74
+ * @param font_map a {@link CoglPango.FontMap}
75
+ * @param dpi The resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.)
76
+ */
77
+ function font_map_set_resolution(font_map: FontMap, dpi: number): void;
78
+
79
+ /**
80
+ * @gir-type Callback
81
+ */
82
+ interface PipelineSetup {
83
+ (pipeline: Cogl.Pipeline): void;
84
+ }
85
+
86
+ namespace Renderer {
87
+ // Signal signatures
88
+ interface SignalSignatures extends Pango.Renderer.SignalSignatures {
89
+ "notify::context": (pspec: GObject.ParamSpec) => void;
90
+ }
91
+
92
+ // Constructor properties interface
93
+ interface ConstructorProps extends Pango.Renderer.ConstructorProps {
94
+ context: Cogl.Context;
95
+ }
96
+ }
97
+
98
+ /**
99
+ * @gir-type Class
100
+ */
101
+ class Renderer extends Pango.Renderer {
102
+ static $gtype: GObject.GType<Renderer>;
103
+
104
+ // Properties
105
+ /**
106
+ * @construct-only
107
+ */
108
+ set context(val: Cogl.Context);
109
+
110
+ /**
111
+ * Compile-time signal type information.
112
+ *
113
+ * This instance property is generated only for TypeScript type checking.
114
+ * It is not defined at runtime and should not be accessed in JS code.
115
+ * @internal
116
+ */
117
+ $signals: Renderer.SignalSignatures;
118
+
119
+ // Constructors
120
+ constructor(properties?: Partial<Renderer.ConstructorProps>, ...args: any[]);
121
+
122
+ _init(...args: any[]): void;
123
+
124
+ // Signals
125
+ /** @signal */
126
+ connect<K extends keyof Renderer.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Renderer.SignalSignatures[K]>): number;
127
+ connect(signal: string, callback: (...args: any[]) => any): number;
128
+
129
+ /** @signal */
130
+ connect_after<K extends keyof Renderer.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Renderer.SignalSignatures[K]>): number;
131
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
132
+
133
+ /** @signal */
134
+ emit<K extends keyof Renderer.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Renderer.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
135
+ emit(signal: string, ...args: any[]): void;
136
+ }
137
+
138
+
139
+ /**
140
+ * @gir-type Alias
141
+ */
142
+ type RendererClass = typeof Renderer;
143
+
144
+ /**
145
+ * @gir-type Alias
146
+ */
147
+ type FontMap = PangoCairo.FontMap;
148
+
149
+ /**
150
+ * Name of the imported GIR library
151
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
152
+ */
153
+ const __name__: string;
154
+
155
+ /**
156
+ * Version of the imported GIR library
157
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
158
+ */
159
+ const __version__: string;
160
+ }
161
+
162
+ export default CoglPango;
163
+
164
+ // END
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import CoglPango from 'gi://CoglPango?version=15';
4
+ export default CoglPango;
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 './coglpango-15-ambient.d.ts';
11
+
12
+
13
+ import CoglPango from './coglpango-15.js';
14
+ export default CoglPango;
15
+
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import CoglPango from './coglpango-15.js';
4
+ export default CoglPango;
5
+
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@girs/coglpango-15",
3
+ "version": "4.0.4",
4
+ "libraryVersion": "15.0.0",
5
+ "description": "GJS TypeScript type definitions for CoglPango-15, generated from library version 15.0.0",
6
+ "type": "module",
7
+ "module": "coglpango-15.js",
8
+ "main": "coglpango-15.js",
9
+ "exports": {
10
+ "./ambient": {
11
+ "types": "./coglpango-15-ambient.d.ts",
12
+ "import": "./coglpango-15-ambient.js",
13
+ "default": "./coglpango-15-ambient.js"
14
+ },
15
+ "./import": {
16
+ "types": "./coglpango-15-import.d.ts",
17
+ "import": "./coglpango-15-import.js",
18
+ "default": "./coglpango-15-import.js"
19
+ },
20
+ "./coglpango-15": {
21
+ "types": "./coglpango-15.d.ts",
22
+ "import": "./coglpango-15.js",
23
+ "default": "./coglpango-15.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/pangocairo-1.0": "^4.0.4",
37
+ "@girs/cairo-1.0": "^4.0.4",
38
+ "@girs/gobject-2.0": "^4.0.4",
39
+ "@girs/glib-2.0": "^4.0.4",
40
+ "@girs/pango-1.0": "^4.0.4",
41
+ "@girs/harfbuzz-0.0": "^4.0.4",
42
+ "@girs/freetype2-2.0": "^4.0.4",
43
+ "@girs/gio-2.0": "^4.0.4",
44
+ "@girs/gmodule-2.0": "^4.0.4",
45
+ "@girs/mtk-15": "^4.0.4",
46
+ "@girs/graphene-1.0": "^4.0.4",
47
+ "@girs/cogl-15": "^4.0.4",
48
+ "@girs/xlib-2.0": "^4.0.4",
49
+ "@girs/gl-1.0": "^4.0.4" },
50
+ "devDependencies": {
51
+ "typescript": "*"
52
+ },
53
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "CoglPango-15"],
54
+ "author": "ts-for-gir",
55
+ "license": "MIT",
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/gjsify/types.git"
59
+ },
60
+ "bugs": {
61
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
62
+ },
63
+ "homepage": "https://github.com/gjsify/types/tree/main/coglpango-15#readme"
64
+ }
65
+
66
+
package/tsconfig.json ADDED
@@ -0,0 +1,71 @@
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/pangocairo-1.0": [
22
+ "../pangocairo-1.0/index.d.ts"
23
+ ],
24
+ "@girs/cairo-1.0": [
25
+ "../cairo-1.0/index.d.ts"
26
+ ],
27
+ "@girs/gobject-2.0": [
28
+ "../gobject-2.0/index.d.ts"
29
+ ],
30
+ "@girs/glib-2.0": [
31
+ "../glib-2.0/index.d.ts"
32
+ ],
33
+ "@girs/pango-1.0": [
34
+ "../pango-1.0/index.d.ts"
35
+ ],
36
+ "@girs/harfbuzz-0.0": [
37
+ "../harfbuzz-0.0/index.d.ts"
38
+ ],
39
+ "@girs/freetype2-2.0": [
40
+ "../freetype2-2.0/index.d.ts"
41
+ ],
42
+ "@girs/gio-2.0": [
43
+ "../gio-2.0/index.d.ts"
44
+ ],
45
+ "@girs/gmodule-2.0": [
46
+ "../gmodule-2.0/index.d.ts"
47
+ ],
48
+ "@girs/mtk-15": [
49
+ "../mtk-15/index.d.ts"
50
+ ],
51
+ "@girs/graphene-1.0": [
52
+ "../graphene-1.0/index.d.ts"
53
+ ],
54
+ "@girs/cogl-15": [
55
+ "../cogl-15/index.d.ts"
56
+ ],
57
+ "@girs/xlib-2.0": [
58
+ "../xlib-2.0/index.d.ts"
59
+ ],
60
+ "@girs/gl-1.0": [
61
+ "../gl-1.0/index.d.ts"
62
+ ],
63
+ "@girs/gjs": [
64
+ "../gjs/index.d.ts"
65
+ ]
66
+ }
67
+ },
68
+ "include": ["./coglpango-15.d.ts"]
69
+ }
70
+
71
+
package/typedoc.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "entryPoints": ["./coglpango-15.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "CoglPango-15",
5
+ "tsconfig": "./tsconfig.json",
6
+ "skipErrorChecking": true,
7
+ "highlightLanguages": ["typescript", "javascript", "c", "cpp", "xml", "bash", "json", "css"]
8
+ }
9
+