@girs/gjsdbus-1.0 1.0.0-3.0.0-beta.12

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,31 @@
1
+
2
+ # GjsDBus-1.0
3
+
4
+ GJS TypeScript type definitions for GjsDBus-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.12.
5
+
6
+ ## Install
7
+
8
+ To use this type definitions, install them with NPM like this:
9
+ ```bash
10
+ npm install @girs/gjsdbus-1.0
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ You can import this package into your project like this:
16
+ ```ts
17
+ import GjsDBus from '@girs/gjsdbus-1.0';
18
+ ```
19
+
20
+ Or if you prefer CommonJS, you can also use this:
21
+ ```ts
22
+ const GjsDBus = require('@girs/gjsdbus-1.0');
23
+ ```
24
+
25
+ If you use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules), you can also import this module like you would do this in JavaScript:
26
+
27
+ ```ts
28
+ import GjsDBus from 'gi://GjsDBus?version=1.0';
29
+ ```
30
+
31
+ 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).
@@ -0,0 +1,9 @@
1
+
2
+
3
+ imports.gi.versions.GjsDBus = '1.0'
4
+ const GjsDBus = imports.gi.GjsDBus;
5
+
6
+ module.exports = GjsDBus;
7
+
8
+
9
+
@@ -0,0 +1,154 @@
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-gjs
7
+ */
8
+ /**
9
+ * GjsDBus-1.0
10
+ */
11
+
12
+ import type Gio from '@girs/gio-2.0';
13
+ import type GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+
16
+ export module Implementation {
17
+
18
+ // Signal callback interfaces
19
+
20
+ /**
21
+ * Signal callback interface for `handle-method-call`
22
+ */
23
+ export interface HandleMethodCallSignalCallback {
24
+ ($obj: Implementation, object: string, p0: GLib.Variant, p1: Gio.DBusMethodInvocation): void
25
+ }
26
+
27
+ /**
28
+ * Signal callback interface for `handle-property-get`
29
+ */
30
+ export interface HandlePropertyGetSignalCallback {
31
+ ($obj: Implementation, object: string): GLib.Variant
32
+ }
33
+
34
+ /**
35
+ * Signal callback interface for `handle-property-set`
36
+ */
37
+ export interface HandlePropertySetSignalCallback {
38
+ ($obj: Implementation, object: string, p0: GLib.Variant): void
39
+ }
40
+
41
+
42
+ // Constructor properties interface
43
+
44
+ export interface ConstructorProperties extends Gio.DBusInterface.ConstructorProperties, Gio.DBusInterfaceSkeleton.ConstructorProperties {
45
+
46
+ // Own constructor properties of GjsDBus-1.0.GjsDBus.Implementation
47
+
48
+ g_interface_info?: Gio.DBusInterfaceInfo | null
49
+ }
50
+
51
+ }
52
+
53
+ export interface Implementation extends Gio.DBusInterface {
54
+
55
+ // Own properties of GjsDBus-1.0.GjsDBus.Implementation
56
+
57
+ readonly g_interface_info: Gio.DBusInterfaceInfo
58
+
59
+ // Own fields of GjsDBus-1.0.GjsDBus.Implementation
60
+
61
+ parent: Gio.DBusInterfaceSkeleton
62
+ priv: ImplementationPrivate
63
+
64
+ // Owm methods of GjsDBus-1.0.GjsDBus.Implementation
65
+
66
+ /**
67
+ * Queue a PropertyChanged signal for emission, or update the one queued
68
+ * adding `property`
69
+ * @param property the name of the property that changed
70
+ * @param newvalue the new value, or %NULL to just invalidate it
71
+ */
72
+ emit_property_changed(property: string | null, newvalue?: GLib.Variant | null): void
73
+ /**
74
+ * Emits a signal named `signal_name` from the object and interface represented
75
+ * by `self`. This signal has no destination.
76
+ * @param signal_name the name of the signal
77
+ * @param parameters signal parameters, or %NULL for none
78
+ */
79
+ emit_signal(signal_name: string | null, parameters?: GLib.Variant | null): void
80
+
81
+ // Own signals of GjsDBus-1.0.GjsDBus.Implementation
82
+
83
+ connect(sigName: "handle-method-call", callback: Implementation.HandleMethodCallSignalCallback): number
84
+ connect_after(sigName: "handle-method-call", callback: Implementation.HandleMethodCallSignalCallback): number
85
+ emit(sigName: "handle-method-call", object: string, p0: GLib.Variant, p1: Gio.DBusMethodInvocation, ...args: any[]): void
86
+ connect(sigName: "handle-property-get", callback: Implementation.HandlePropertyGetSignalCallback): number
87
+ connect_after(sigName: "handle-property-get", callback: Implementation.HandlePropertyGetSignalCallback): number
88
+ emit(sigName: "handle-property-get", object: string, ...args: any[]): void
89
+ connect(sigName: "handle-property-set", callback: Implementation.HandlePropertySetSignalCallback): number
90
+ connect_after(sigName: "handle-property-set", callback: Implementation.HandlePropertySetSignalCallback): number
91
+ emit(sigName: "handle-property-set", object: string, p0: GLib.Variant, ...args: any[]): void
92
+
93
+ // Class property signals of GjsDBus-1.0.GjsDBus.Implementation
94
+
95
+ connect(sigName: "notify::g-interface-info", callback: (($obj: Implementation, pspec: GObject.ParamSpec) => void)): number
96
+ connect_after(sigName: "notify::g-interface-info", callback: (($obj: Implementation, pspec: GObject.ParamSpec) => void)): number
97
+ emit(sigName: "notify::g-interface-info", ...args: any[]): void
98
+ connect(sigName: "notify::g-flags", callback: (($obj: Implementation, pspec: GObject.ParamSpec) => void)): number
99
+ connect_after(sigName: "notify::g-flags", callback: (($obj: Implementation, pspec: GObject.ParamSpec) => void)): number
100
+ emit(sigName: "notify::g-flags", ...args: any[]): void
101
+ connect(sigName: string, callback: (...args: any[]) => void): number
102
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
103
+ emit(sigName: string, ...args: any[]): void
104
+ disconnect(id: number): void
105
+ }
106
+
107
+ export class Implementation extends Gio.DBusInterfaceSkeleton {
108
+
109
+ // Own properties of GjsDBus-1.0.GjsDBus.Implementation
110
+
111
+ static name: string
112
+ static $gtype: GObject.GType<Implementation>
113
+
114
+ // Constructors of GjsDBus-1.0.GjsDBus.Implementation
115
+
116
+ constructor(config?: Implementation.ConstructorProperties)
117
+ _init(config?: Implementation.ConstructorProperties): void
118
+ }
119
+
120
+ export interface ImplementationClass {
121
+
122
+ // Own fields of GjsDBus-1.0.GjsDBus.ImplementationClass
123
+
124
+ parent_class: Gio.DBusInterfaceSkeletonClass
125
+ }
126
+
127
+ export abstract class ImplementationClass {
128
+
129
+ // Own properties of GjsDBus-1.0.GjsDBus.ImplementationClass
130
+
131
+ static name: string
132
+ }
133
+
134
+ export interface ImplementationPrivate {
135
+ }
136
+
137
+ export class ImplementationPrivate {
138
+
139
+ // Own properties of GjsDBus-1.0.GjsDBus.ImplementationPrivate
140
+
141
+ static name: string
142
+ }
143
+
144
+ /**
145
+ * Name of the imported GIR library
146
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
147
+ */
148
+ export const __name__: string
149
+ /**
150
+ * Version of the imported GIR library
151
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
152
+ */
153
+ export const __version__: string
154
+ // END
@@ -0,0 +1,159 @@
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-gjs
7
+ */
8
+ /**
9
+ * GjsDBus-1.0
10
+ */
11
+
12
+ import type Gio from '@girs/gio-2.0';
13
+ import type GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+
16
+ export namespace GjsDBus {
17
+
18
+ module Implementation {
19
+
20
+ // Signal callback interfaces
21
+
22
+ /**
23
+ * Signal callback interface for `handle-method-call`
24
+ */
25
+ interface HandleMethodCallSignalCallback {
26
+ ($obj: Implementation, object: string, p0: GLib.Variant, p1: Gio.DBusMethodInvocation): void
27
+ }
28
+
29
+ /**
30
+ * Signal callback interface for `handle-property-get`
31
+ */
32
+ interface HandlePropertyGetSignalCallback {
33
+ ($obj: Implementation, object: string): GLib.Variant
34
+ }
35
+
36
+ /**
37
+ * Signal callback interface for `handle-property-set`
38
+ */
39
+ interface HandlePropertySetSignalCallback {
40
+ ($obj: Implementation, object: string, p0: GLib.Variant): void
41
+ }
42
+
43
+
44
+ // Constructor properties interface
45
+
46
+ interface ConstructorProperties extends Gio.DBusInterface.ConstructorProperties, Gio.DBusInterfaceSkeleton.ConstructorProperties {
47
+
48
+ // Own constructor properties of GjsDBus-1.0.GjsDBus.Implementation
49
+
50
+ g_interface_info?: Gio.DBusInterfaceInfo | null
51
+ }
52
+
53
+ }
54
+
55
+ interface Implementation extends Gio.DBusInterface {
56
+
57
+ // Own properties of GjsDBus-1.0.GjsDBus.Implementation
58
+
59
+ readonly g_interface_info: Gio.DBusInterfaceInfo
60
+
61
+ // Own fields of GjsDBus-1.0.GjsDBus.Implementation
62
+
63
+ parent: Gio.DBusInterfaceSkeleton
64
+ priv: ImplementationPrivate
65
+
66
+ // Owm methods of GjsDBus-1.0.GjsDBus.Implementation
67
+
68
+ /**
69
+ * Queue a PropertyChanged signal for emission, or update the one queued
70
+ * adding `property`
71
+ * @param property the name of the property that changed
72
+ * @param newvalue the new value, or %NULL to just invalidate it
73
+ */
74
+ emit_property_changed(property: string | null, newvalue?: GLib.Variant | null): void
75
+ /**
76
+ * Emits a signal named `signal_name` from the object and interface represented
77
+ * by `self`. This signal has no destination.
78
+ * @param signal_name the name of the signal
79
+ * @param parameters signal parameters, or %NULL for none
80
+ */
81
+ emit_signal(signal_name: string | null, parameters?: GLib.Variant | null): void
82
+
83
+ // Own signals of GjsDBus-1.0.GjsDBus.Implementation
84
+
85
+ connect(sigName: "handle-method-call", callback: Implementation.HandleMethodCallSignalCallback): number
86
+ connect_after(sigName: "handle-method-call", callback: Implementation.HandleMethodCallSignalCallback): number
87
+ emit(sigName: "handle-method-call", object: string, p0: GLib.Variant, p1: Gio.DBusMethodInvocation, ...args: any[]): void
88
+ connect(sigName: "handle-property-get", callback: Implementation.HandlePropertyGetSignalCallback): number
89
+ connect_after(sigName: "handle-property-get", callback: Implementation.HandlePropertyGetSignalCallback): number
90
+ emit(sigName: "handle-property-get", object: string, ...args: any[]): void
91
+ connect(sigName: "handle-property-set", callback: Implementation.HandlePropertySetSignalCallback): number
92
+ connect_after(sigName: "handle-property-set", callback: Implementation.HandlePropertySetSignalCallback): number
93
+ emit(sigName: "handle-property-set", object: string, p0: GLib.Variant, ...args: any[]): void
94
+
95
+ // Class property signals of GjsDBus-1.0.GjsDBus.Implementation
96
+
97
+ connect(sigName: "notify::g-interface-info", callback: (($obj: Implementation, pspec: GObject.ParamSpec) => void)): number
98
+ connect_after(sigName: "notify::g-interface-info", callback: (($obj: Implementation, pspec: GObject.ParamSpec) => void)): number
99
+ emit(sigName: "notify::g-interface-info", ...args: any[]): void
100
+ connect(sigName: "notify::g-flags", callback: (($obj: Implementation, pspec: GObject.ParamSpec) => void)): number
101
+ connect_after(sigName: "notify::g-flags", callback: (($obj: Implementation, pspec: GObject.ParamSpec) => void)): number
102
+ emit(sigName: "notify::g-flags", ...args: any[]): void
103
+ connect(sigName: string, callback: (...args: any[]) => void): number
104
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
105
+ emit(sigName: string, ...args: any[]): void
106
+ disconnect(id: number): void
107
+ }
108
+
109
+ class Implementation extends Gio.DBusInterfaceSkeleton {
110
+
111
+ // Own properties of GjsDBus-1.0.GjsDBus.Implementation
112
+
113
+ static name: string
114
+ static $gtype: GObject.GType<Implementation>
115
+
116
+ // Constructors of GjsDBus-1.0.GjsDBus.Implementation
117
+
118
+ constructor(config?: Implementation.ConstructorProperties)
119
+ _init(config?: Implementation.ConstructorProperties): void
120
+ }
121
+
122
+ interface ImplementationClass {
123
+
124
+ // Own fields of GjsDBus-1.0.GjsDBus.ImplementationClass
125
+
126
+ parent_class: Gio.DBusInterfaceSkeletonClass
127
+ }
128
+
129
+ abstract class ImplementationClass {
130
+
131
+ // Own properties of GjsDBus-1.0.GjsDBus.ImplementationClass
132
+
133
+ static name: string
134
+ }
135
+
136
+ interface ImplementationPrivate {
137
+ }
138
+
139
+ class ImplementationPrivate {
140
+
141
+ // Own properties of GjsDBus-1.0.GjsDBus.ImplementationPrivate
142
+
143
+ static name: string
144
+ }
145
+
146
+ /**
147
+ * Name of the imported GIR library
148
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
149
+ */
150
+ const __name__: string
151
+ /**
152
+ * Version of the imported GIR library
153
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
154
+ */
155
+ const __version__: string
156
+ }
157
+
158
+ export default GjsDBus;
159
+ // END
package/gjsdbus-1.0.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+
3
+ // @ts-expect-error
4
+ import GjsDBus from 'gi://GjsDBus?version=1.0';
5
+ export { GjsDBus };
6
+ export default GjsDBus;
7
+
8
+
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@girs/gjsdbus-1.0",
3
+ "version": "1.0.0-3.0.0-beta.12",
4
+ "description": "GJS TypeScript type definitions for GjsDBus-1.0, generated from library version 1.0.0",
5
+ "type": "module",
6
+ "module": "gjsdbus-1.0.js",
7
+ "main": "gjsdbus-1.0.js",
8
+ "typedoc": {
9
+ "entryPoint": "./gjsdbus-1.0.d.ts",
10
+ "readmeFile": "./README.md",
11
+ "displayName": "GjsDBus-1.0",
12
+ "tsconfig": "./tsconfig.doc.json"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./gjsdbus-1.0.d.ts",
18
+ "default": "./gjsdbus-1.0.js"
19
+ },
20
+ "require": {
21
+ "types": "./gjsdbus-1.0.d.cts",
22
+ "default": "./gjsdbus-1.0.cjs"
23
+ }
24
+ }
25
+ },
26
+ "scripts": {
27
+ "test": "yarn test:esm && yarn test:cjs",
28
+ "test:esm": "tsc --noEmit gjsdbus-1.0.d.ts",
29
+ "test:cjs": "tsc --noEmit gjsdbus-1.0.d.cts"
30
+ },
31
+ "dependencies": {
32
+ "@girs/gio-2.0": "^2.75.1-3.0.0-beta.12",
33
+ "@girs/glib-2.0": "^2.75.1-3.0.0-beta.12",
34
+ "@girs/gobject-2.0": "^2.75.1-3.0.0-beta.12"
35
+ },
36
+ "devDependencies": {
37
+ "typescript": "^*"
38
+ },
39
+ "keywords": [
40
+ "Gir",
41
+ "TypeScript",
42
+ "GjsDBus-1.0"
43
+ ],
44
+ "author": "ts-for-gir",
45
+ "license": "Apache-2.0",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
52
+ },
53
+ "homepage": "https://github.com/gjsify/ts-for-gir#readme"
54
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "experimentalDecorators": true,
7
+ "moduleResolution": "node",
8
+ "noEmit": true,
9
+ "noEmitOnError": false,
10
+ "baseUrl": "./",
11
+ "rootDir": ".",
12
+ // General settings for code generation
13
+ "removeComments": false,
14
+ "inlineSourceMap": false,
15
+ "inlineSources": false,
16
+ "newLine": "LF"
17
+ },
18
+ "include": ["./gjsdbus-1.0.d.ts"]
19
+ }