@girs/glibwin32-2.0 2.0.0-4.0.0-rc.1

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
+ # GLibWin32-2.0
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/glibwin32-2.0)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/glibwin32-2.0)
6
+
7
+
8
+ GJS TypeScript type definitions for GLibWin32-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-rc.1.
9
+
10
+ ## Install
11
+
12
+ To use this type definitions, install them with NPM:
13
+ ```bash
14
+ npm install @girs/glibwin32-2.0
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import GLibWin32 from '@girs/glibwin32-2.0';
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/glibwin32-2.0` or `@girs/glibwin32-2.0/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/glibwin32-2.0'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/glibwin32-2.0"],
41
+ ...
42
+ }
43
+ ```
44
+
45
+ Now you can import the ambient module with TypeScript support:
46
+
47
+ ```ts
48
+ import GLibWin32 from 'gi://GLibWin32?version=2.0';
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/glibwin32-2.0` or `@girs/glibwin32-2.0/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/glibwin32-2.0'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/glibwin32-2.0"],
68
+ ...
69
+ }
70
+ ```
71
+
72
+ Now you have also type support for this, too:
73
+
74
+ ```ts
75
+ const GLibWin32 = imports.gi.GLibWin32;
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,9 @@
1
+ declare module 'gi://GLibWin32?version=2.0' {
2
+ import GLibWin3220 from '@girs/glibwin32-2.0';
3
+ export default GLibWin3220;
4
+ }
5
+
6
+ declare module 'gi://GLibWin32' {
7
+ import GLibWin3220 from 'gi://GLibWin32?version=2.0';
8
+ export default GLibWin3220;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,9 @@
1
+ import type GLibWin3220 from '@girs/glibwin32-2.0';
2
+
3
+ declare global {
4
+ export interface GjsGiImports {
5
+ GLibWin32: typeof GLibWin3220;
6
+ }
7
+ }
8
+
9
+ export default GjsGiImports;
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -0,0 +1,94 @@
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
+ import '@girs/gjs';
11
+
12
+ // Module dependencies
13
+ import type GLib from '@girs/glib-2.0';
14
+ import type GObject from '@girs/gobject-2.0';
15
+
16
+ export namespace GLibWin32 {
17
+ /**
18
+ * GLibWin32-2.0
19
+ */
20
+
21
+ /**
22
+ * Type of Windows edition to check for at run-time.
23
+ * @gir-type Enum
24
+ */
25
+ enum OSType {
26
+ /**
27
+ * The running system can be a workstation or a server edition of
28
+ * Windows. The type of the running system is therefore not checked.
29
+ */
30
+ ANY,
31
+ /**
32
+ * The running system is a workstation edition of Windows,
33
+ * such as Windows 7 Professional.
34
+ */
35
+ WORKSTATION,
36
+ /**
37
+ * The running system is a server edition of Windows, such as
38
+ * Windows Server 2008 R2.
39
+ */
40
+ SERVER,
41
+ }
42
+
43
+ /**
44
+ * @param major
45
+ * @param minor
46
+ * @param spver
47
+ * @param os_type
48
+ */
49
+ function check_windows_version(major: number, minor: number, spver: number, os_type: OSType | null): boolean;
50
+ /**
51
+ * @param error
52
+ */
53
+ function error_message(error: number): string;
54
+ /**
55
+ * @param f
56
+ * @param size
57
+ */
58
+ function ftruncate(f: number, size: number): number;
59
+ /**
60
+ * @param _package
61
+ * @param dll_name
62
+ */
63
+ function get_package_installation_directory(_package: string, dll_name: string): string;
64
+ /**
65
+ * @param hmodule
66
+ */
67
+ function get_package_installation_directory_of_module(hmodule?: any | null): string;
68
+ /**
69
+ * @param _package
70
+ * @param dll_name
71
+ * @param subdir
72
+ */
73
+ function get_package_installation_subdirectory(_package: string, dll_name: string, subdir: string): string;
74
+ function get_windows_version(): number;
75
+ function getlocale(): string;
76
+ /**
77
+ * @param utf8filename
78
+ */
79
+ function locale_filename_from_utf8(utf8filename: string): string;
80
+ /**
81
+ * Name of the imported GIR library
82
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
83
+ */
84
+ const __name__: string;
85
+ /**
86
+ * Version of the imported GIR library
87
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
88
+ */
89
+ const __version__: string;
90
+ }
91
+
92
+ export default GLibWin32;
93
+
94
+ // END
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import GLibWin32 from 'gi://GLibWin32?version=2.0';
4
+ export default GLibWin32;
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 './glibwin32-2.0-ambient.d.ts';
11
+
12
+ import './glibwin32-2.0-import.d.ts';
13
+
14
+ import GLibWin32 from './glibwin32-2.0.js';
15
+ export default GLibWin32;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import GLibWin32 from './glibwin32-2.0.js';
4
+ export default GLibWin32;
5
+
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@girs/glibwin32-2.0",
3
+ "version": "2.0.0-4.0.0-rc.1",
4
+ "description": "GJS TypeScript type definitions for GLibWin32-2.0, generated from library version 2.0.0",
5
+ "type": "module",
6
+ "module": "glibwin32-2.0.js",
7
+ "main": "glibwin32-2.0.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./glibwin32-2.0-ambient.d.ts",
11
+ "import": "./glibwin32-2.0-ambient.js",
12
+ "default": "./glibwin32-2.0-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./glibwin32-2.0-import.d.ts",
16
+ "import": "./glibwin32-2.0-import.js",
17
+ "default": "./glibwin32-2.0-import.js"
18
+ },
19
+ "./glibwin32-2.0": {
20
+ "types": "./glibwin32-2.0.d.ts",
21
+ "import": "./glibwin32-2.0.js",
22
+ "default": "./glibwin32-2.0.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/gjs": "4.0.0-rc.1",
35
+ "@girs/glib-2.0": "2.88.0-4.0.0-rc.1",
36
+ "@girs/gobject-2.0": "2.88.0-4.0.0-rc.1" },
37
+ "devDependencies": {
38
+ "typescript": "*"
39
+ },
40
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "GLibWin32-2.0"],
41
+ "author": "ts-for-gir",
42
+ "license": "MIT",
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/gjsify/types.git"
46
+ },
47
+ "bugs": {
48
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
49
+ },
50
+ "homepage": "https://github.com/gjsify/types/tree/main/glibwin32-2.0#readme"
51
+ }
52
+
53
+
package/tsconfig.json ADDED
@@ -0,0 +1,36 @@
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
+ // Show diagnostics
20
+ "diagnostics": true,
21
+ "paths": {
22
+ "@girs/glib-2.0": [
23
+ "../glib-2.0/index.d.ts"
24
+ ],
25
+ "@girs/gobject-2.0": [
26
+ "../gobject-2.0/index.d.ts"
27
+ ],
28
+ "@girs/gjs": [
29
+ "../gjs/index.d.ts"
30
+ ]
31
+ }
32
+ },
33
+ "include": ["./glibwin32-2.0.d.ts"]
34
+ }
35
+
36
+
package/typedoc.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "entryPoints": ["./glibwin32-2.0.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "GLibWin32-2.0",
5
+ "tsconfig": "./tsconfig.json",
6
+ "skipErrorChecking": true,
7
+ "highlightLanguages": ["typescript", "javascript", "c", "cpp", "xml", "bash", "json", "css"]
8
+ }
9
+