@girs/coglpango-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 ADDED
@@ -0,0 +1,86 @@
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.0-beta.7.
9
+
10
+
11
+ ## Install
12
+
13
+ To use this type definitions, install them with NPM:
14
+ ```bash
15
+ npm install @girs/coglpango-15
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ You can import this package into your project like this:
21
+ ```ts
22
+ import CoglPango from '@girs/coglpango-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/coglpango-15` or `@girs/coglpango-15/ambient` in your `tsconfig` or entry point Typescript file:
29
+
30
+ `index.ts`:
31
+ ```ts
32
+ import '@girs/coglpango-15'
33
+ ```
34
+
35
+ `tsconfig.json`:
36
+ ```json
37
+ {
38
+ "compilerOptions": {
39
+ ...
40
+ },
41
+ "include": ["@girs/coglpango-15"],
42
+ ...
43
+ }
44
+ ```
45
+
46
+ Now you can import the ambient module with TypeScript support:
47
+
48
+ ```ts
49
+ import CoglPango from 'gi://CoglPango?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/coglpango-15` or `@girs/coglpango-15/import` in your `tsconfig` or entry point Typescript file:
56
+
57
+ `index.ts`:
58
+ ```ts
59
+ import '@girs/coglpango-15'
60
+ ```
61
+
62
+ `tsconfig.json`:
63
+ ```json
64
+ {
65
+ "compilerOptions": {
66
+ ...
67
+ },
68
+ "include": ["@girs/coglpango-15"],
69
+ ...
70
+ }
71
+ ```
72
+
73
+ Now you have also type support for this, too:
74
+
75
+ ```ts
76
+ const CoglPango = imports.gi.CoglPango;
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
+
@@ -0,0 +1,9 @@
1
+ declare module 'gi://CoglPango?version=15' {
2
+ import CoglPango15 from '@girs/coglpango-15';
3
+ export default CoglPango15;
4
+ }
5
+
6
+ declare module 'gi://CoglPango' {
7
+ import CoglPango15 from 'gi://CoglPango?version=15';
8
+ export default CoglPango15;
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: "CoglPango"
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -0,0 +1,114 @@
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 PangoCairo from '@girs/pangocairo-1.0';
12
+ import type cairo from '@girs/cairo-1.0';
13
+ import type GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+ import type Pango from '@girs/pango-1.0';
16
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
17
+ import type freetype2 from '@girs/freetype2-2.0';
18
+ import type Gio from '@girs/gio-2.0';
19
+ import type GModule from '@girs/gmodule-2.0';
20
+ import type Mtk from '@girs/mtk-15';
21
+ import type Graphene from '@girs/graphene-1.0';
22
+ import type Cogl from '@girs/cogl-15';
23
+ import type xlib from '@girs/xlib-2.0';
24
+ import type GL from '@girs/gl-1.0';
25
+
26
+ export namespace CoglPango {
27
+ /**
28
+ * CoglPango-15
29
+ */
30
+
31
+ /**
32
+ * This updates any internal glyph cache textures as necessary to be
33
+ * able to render the given `layout`.
34
+ *
35
+ * This api should be used to avoid mid-scene modifications of
36
+ * glyph-cache textures which can lead to undefined rendering results.
37
+ * @param layout A #PangoLayout
38
+ */
39
+ function ensure_glyph_cache_for_layout(layout: Pango.Layout): void;
40
+ /**
41
+ * Create a [class`Pango`.Context] for the given `font_map`.
42
+ * @param font_map a #CoglPangoFontMap
43
+ * @returns the newly created context: free with [method@GObject.Object.unref].
44
+ */
45
+ function font_map_create_context(font_map: FontMap): Pango.Context;
46
+ /**
47
+ * Retrieves the [class`CoglPango`.Renderer] for the passed `font_map`.
48
+ * @param font_map a #CoglPangoFontMap
49
+ * @returns a #PangoRenderer
50
+ */
51
+ function font_map_get_renderer(font_map: FontMap): Pango.Renderer;
52
+ /**
53
+ * Creates a new font map.
54
+ * @param context
55
+ * @returns the newly created #PangoFontMap
56
+ */
57
+ function font_map_new(context: Cogl.Context): Pango.FontMap;
58
+ /**
59
+ * Sets the resolution for the `font_map`.
60
+ *
61
+ * This is a scale factor between points specified in a
62
+ * [struct`Pango`.FontDescription] and Cogl units.
63
+ * The default value is %96, meaning that a 10 point font will be 13
64
+ * units high. (10 * 96. / 72. = 13.3).
65
+ * @param font_map a #CoglPangoFontMap
66
+ * @param dpi The resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.)
67
+ */
68
+ function font_map_set_resolution(font_map: FontMap, dpi: number): void;
69
+ /**
70
+ * Sets whether the renderer for the passed font map should use
71
+ * mipmapping when rendering a [class`Pango`.Layout].
72
+ * @param font_map a #CoglPangoFontMap
73
+ * @param value %TRUE to enable the use of mipmapping
74
+ */
75
+ function font_map_set_use_mipmapping(font_map: FontMap, value: boolean): void;
76
+ module Renderer {
77
+ // Constructor properties interface
78
+
79
+ interface ConstructorProps extends Pango.Renderer.ConstructorProps {
80
+ context: Cogl.Context;
81
+ }
82
+ }
83
+
84
+ class Renderer extends Pango.Renderer {
85
+ static $gtype: GObject.GType<Renderer>;
86
+
87
+ // Own properties of CoglPango.Renderer
88
+
89
+ set context(val: Cogl.Context);
90
+
91
+ // Constructors of CoglPango.Renderer
92
+
93
+ constructor(properties?: Partial<Renderer.ConstructorProps>, ...args: any[]);
94
+
95
+ _init(...args: any[]): void;
96
+ }
97
+
98
+ type RendererClass = typeof Renderer;
99
+ type FontMap = PangoCairo.FontMap;
100
+ /**
101
+ * Name of the imported GIR library
102
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
103
+ */
104
+ const __name__: string;
105
+ /**
106
+ * Version of the imported GIR library
107
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
108
+ */
109
+ const __version__: string;
110
+ }
111
+
112
+ export default CoglPango;
113
+
114
+ // 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,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 './coglpango-15-ambient.d.ts';
11
+
12
+ import CoglPango from './coglpango-15.js';
13
+ export default CoglPango;
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,71 @@
1
+ {
2
+ "name": "@girs/coglpango-15",
3
+ "version": "15.0.0-4.0.0-beta.7",
4
+ "description": "GJS TypeScript type definitions for CoglPango-15, generated from library version 15.0.0",
5
+ "type": "module",
6
+ "module": "coglpango-15.js",
7
+ "main": "coglpango-15.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./coglpango-15-ambient.d.ts",
11
+ "import": "./coglpango-15-ambient.js",
12
+ "default": "./coglpango-15-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./coglpango-15-import.d.ts",
16
+ "import": "./coglpango-15-import.js",
17
+ "default": "./coglpango-15-import.js"
18
+ },
19
+ "./coglpango-15": {
20
+ "types": "./coglpango-15.d.ts",
21
+ "import": "./coglpango-15.js",
22
+ "default": "./coglpango-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/cairo-1.0": "^1.0.0-4.0.0-beta.7",
35
+ "@girs/cogl-15": "^15.0.0-4.0.0-beta.7",
36
+ "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.7",
37
+ "@girs/gio-2.0": "^2.80.2-4.0.0-beta.7",
38
+ "@girs/gjs": "^4.0.0-beta.7",
39
+ "@girs/gl-1.0": "^1.0.0-4.0.0-beta.7",
40
+ "@girs/glib-2.0": "^2.80.2-4.0.0-beta.7",
41
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.7",
42
+ "@girs/gobject-2.0": "^2.80.2-4.0.0-beta.7",
43
+ "@girs/graphene-1.0": "^1.0.0-4.0.0-beta.7",
44
+ "@girs/harfbuzz-0.0": "^8.1.1-4.0.0-beta.7",
45
+ "@girs/mtk-15": "^15.0.0-4.0.0-beta.7",
46
+ "@girs/pango-1.0": "^1.52.2-4.0.0-beta.7",
47
+ "@girs/pangocairo-1.0": "^1.0.0-4.0.0-beta.7",
48
+ "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.7"
49
+ },
50
+ "devDependencies": {
51
+ "typescript": "*"
52
+ },
53
+ "keywords": [
54
+ "Gir",
55
+ "TypeScript",
56
+ "types",
57
+ "GObject-Introspection",
58
+ "GJS",
59
+ "CoglPango-15"
60
+ ],
61
+ "author": "ts-for-gir",
62
+ "license": "MIT",
63
+ "repository": {
64
+ "type": "git",
65
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
66
+ },
67
+ "bugs": {
68
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
69
+ },
70
+ "homepage": "https://github.com/gjsify/types/tree/main/coglpango-15#readme"
71
+ }
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": ["./coglpango-15.d.ts"]
21
+ }
22
+
23
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./coglpango-15.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "CoglPango-15",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+