@girs/lightdm-1 4.3.0 → 4.5.0
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 +36 -41
- package/lightdm-1.d.ts +58 -9
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,82 +4,77 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for LightDM-1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
|
+
nothing to your program and works with any bundler or none at all.
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
|
-
Install the type definitions with npm:
|
|
13
14
|
```bash
|
|
14
15
|
npm install @girs/lightdm-1
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Any package manager works. The package has no dependencies beyond other `@girs/*`
|
|
19
|
+
type packages.
|
|
20
|
+
|
|
21
|
+
## What it exports
|
|
22
|
+
|
|
23
|
+
| Import | What you get |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `@girs/lightdm-1` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/lightdm-1/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/lightdm-1/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/lightdm-1/lightdm-1` | the namespace, without the side-effecting declarations |
|
|
29
|
+
|
|
30
|
+
## Three ways to import
|
|
31
|
+
|
|
32
|
+
Which one you use depends on how you write imports elsewhere, not on your toolchain.
|
|
33
|
+
|
|
34
|
+
### As a module
|
|
18
35
|
|
|
19
|
-
Import it like any other module:
|
|
20
36
|
```ts
|
|
21
37
|
import LightDM from '@girs/lightdm-1';
|
|
22
38
|
```
|
|
23
39
|
|
|
24
|
-
###
|
|
40
|
+
### As `gi://`
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
GJS resolves `gi://` at runtime. To give it types, reference the package once, either
|
|
43
|
+
from your entry point or from `tsconfig.json`:
|
|
28
44
|
|
|
29
|
-
`index.ts`:
|
|
30
45
|
```ts
|
|
31
|
-
import '@girs/lightdm-1'
|
|
46
|
+
import '@girs/lightdm-1';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/lightdm-1"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/lightdm-1"] }
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Then the runtime spelling type-checks:
|
|
46
54
|
|
|
47
55
|
```ts
|
|
48
56
|
import LightDM from 'gi://LightDM?version=1';
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
GJS's global `imports.gi` works too, with types.
|
|
54
|
-
For this you need to include `@girs/lightdm-1` or `@girs/lightdm-1/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/lightdm-1/ambient` instead pulls in these declarations
|
|
60
|
+
alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
|
|
55
61
|
|
|
56
|
-
`
|
|
57
|
-
```ts
|
|
58
|
-
import '@girs/lightdm-1'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/lightdm-1"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/lightdm-1/import`:
|
|
73
65
|
|
|
74
66
|
```ts
|
|
75
67
|
const LightDM = imports.gi.LightDM;
|
|
76
68
|
```
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
## Building
|
|
79
71
|
|
|
80
|
-
|
|
72
|
+
The declarations need no build step. If you bundle, every bundler works, since there is
|
|
73
|
+
no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
|
|
74
|
+
show working setups for several.
|
|
81
75
|
|
|
82
76
|
## Other packages
|
|
83
77
|
|
|
84
|
-
|
|
78
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
79
|
+
|
|
85
80
|
|
package/lightdm-1.d.ts
CHANGED
|
@@ -78,11 +78,11 @@ export namespace LightDM {
|
|
|
78
78
|
/**
|
|
79
79
|
* Informational message.
|
|
80
80
|
*/
|
|
81
|
-
INFO,
|
|
81
|
+
INFO = 0,
|
|
82
82
|
/**
|
|
83
83
|
* Error message.
|
|
84
84
|
*/
|
|
85
|
-
ERROR,
|
|
85
|
+
ERROR = 1,
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
|
|
@@ -101,32 +101,62 @@ export namespace LightDM {
|
|
|
101
101
|
/**
|
|
102
102
|
* prompt is a question. The information can be shown as it is entered.
|
|
103
103
|
*/
|
|
104
|
-
QUESTION,
|
|
104
|
+
QUESTION = 0,
|
|
105
105
|
/**
|
|
106
106
|
* prompt is for secret information. The entered information should be obscured so it can't be publicly visible.
|
|
107
107
|
*/
|
|
108
|
-
SECRET,
|
|
108
|
+
SECRET = 1,
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* @default authentication-complete
|
|
114
|
+
*/
|
|
112
115
|
const GREETER_SIGNAL_AUTHENTICATION_COMPLETE: string;
|
|
113
116
|
|
|
117
|
+
/**
|
|
118
|
+
* @default autologin-timer-expired
|
|
119
|
+
*/
|
|
114
120
|
const GREETER_SIGNAL_AUTOLOGIN_TIMER_EXPIRED: string;
|
|
115
121
|
|
|
122
|
+
/**
|
|
123
|
+
* @default idle
|
|
124
|
+
*/
|
|
116
125
|
const GREETER_SIGNAL_IDLE: string;
|
|
117
126
|
|
|
127
|
+
/**
|
|
128
|
+
* @default reset
|
|
129
|
+
*/
|
|
118
130
|
const GREETER_SIGNAL_RESET: string;
|
|
119
131
|
|
|
132
|
+
/**
|
|
133
|
+
* @default show-message
|
|
134
|
+
*/
|
|
120
135
|
const GREETER_SIGNAL_SHOW_MESSAGE: string;
|
|
121
136
|
|
|
137
|
+
/**
|
|
138
|
+
* @default show-prompt
|
|
139
|
+
*/
|
|
122
140
|
const GREETER_SIGNAL_SHOW_PROMPT: string;
|
|
123
141
|
|
|
142
|
+
/**
|
|
143
|
+
* @default changed
|
|
144
|
+
*/
|
|
124
145
|
const SIGNAL_USER_CHANGED: string;
|
|
125
146
|
|
|
147
|
+
/**
|
|
148
|
+
* @default user-added
|
|
149
|
+
*/
|
|
126
150
|
const USER_LIST_SIGNAL_USER_ADDED: string;
|
|
127
151
|
|
|
152
|
+
/**
|
|
153
|
+
* @default user-changed
|
|
154
|
+
*/
|
|
128
155
|
const USER_LIST_SIGNAL_USER_CHANGED: string;
|
|
129
156
|
|
|
157
|
+
/**
|
|
158
|
+
* @default user-removed
|
|
159
|
+
*/
|
|
130
160
|
const USER_LIST_SIGNAL_USER_REMOVED: string;
|
|
131
161
|
|
|
132
162
|
/**
|
|
@@ -241,12 +271,14 @@ export namespace LightDM {
|
|
|
241
271
|
/**
|
|
242
272
|
* Triggers a system hibernate.
|
|
243
273
|
* @returns `TRUE` if hibernate initiated.
|
|
274
|
+
* @throws GLib.Error
|
|
244
275
|
*/
|
|
245
276
|
function hibernate(): boolean;
|
|
246
277
|
|
|
247
278
|
/**
|
|
248
279
|
* Triggers a system restart.
|
|
249
280
|
* @returns `TRUE` if restart initiated.
|
|
281
|
+
* @throws GLib.Error
|
|
250
282
|
*/
|
|
251
283
|
function restart(): boolean;
|
|
252
284
|
|
|
@@ -259,12 +291,14 @@ export namespace LightDM {
|
|
|
259
291
|
/**
|
|
260
292
|
* Triggers a system shutdown.
|
|
261
293
|
* @returns `TRUE` if shutdown initiated.
|
|
294
|
+
* @throws GLib.Error
|
|
262
295
|
*/
|
|
263
296
|
function shutdown(): boolean;
|
|
264
297
|
|
|
265
298
|
/**
|
|
266
299
|
* Triggers a system suspend.
|
|
267
300
|
* @returns `TRUE` if suspend initiated.
|
|
301
|
+
* @throws GLib.Error
|
|
268
302
|
*/
|
|
269
303
|
function suspend(): boolean;
|
|
270
304
|
|
|
@@ -314,7 +348,7 @@ export namespace LightDM {
|
|
|
314
348
|
* @signal
|
|
315
349
|
* @run-last
|
|
316
350
|
*/
|
|
317
|
-
"show-message": (
|
|
351
|
+
"show-message": (text: string, type: MessageType) => void;
|
|
318
352
|
/**
|
|
319
353
|
* The ::show-prompt signal gets emitted when the greeter should show a
|
|
320
354
|
* prompt to the user. The given text should be displayed and an input
|
|
@@ -325,7 +359,7 @@ export namespace LightDM {
|
|
|
325
359
|
* @signal
|
|
326
360
|
* @run-last
|
|
327
361
|
*/
|
|
328
|
-
"show-prompt": (
|
|
362
|
+
"show-prompt": (text: string, type: PromptType) => void;
|
|
329
363
|
"notify::authentication-user": (pspec: GObject.ParamSpec) => void;
|
|
330
364
|
"notify::autologin-guest-hint": (pspec: GObject.ParamSpec) => void;
|
|
331
365
|
"notify::autologin-session-hint": (pspec: GObject.ParamSpec) => void;
|
|
@@ -636,18 +670,21 @@ export namespace LightDM {
|
|
|
636
670
|
* Starts the authentication procedure for a user.
|
|
637
671
|
* @param username A username or `NULL` to prompt for a username.
|
|
638
672
|
* @returns `TRUE` if authentication request sent.
|
|
673
|
+
* @throws GLib.Error
|
|
639
674
|
*/
|
|
640
675
|
authenticate(username: string | null): boolean;
|
|
641
676
|
|
|
642
677
|
/**
|
|
643
678
|
* Starts the authentication procedure for the guest user.
|
|
644
679
|
* @returns `TRUE` if authentication request sent.
|
|
680
|
+
* @throws GLib.Error
|
|
645
681
|
*/
|
|
646
682
|
authenticate_as_guest(): boolean;
|
|
647
683
|
|
|
648
684
|
/**
|
|
649
685
|
* Starts the authentication procedure for the automatic login user.
|
|
650
686
|
* @returns `TRUE` if authentication request sent.
|
|
687
|
+
* @throws GLib.Error
|
|
651
688
|
*/
|
|
652
689
|
authenticate_autologin(): boolean;
|
|
653
690
|
|
|
@@ -656,12 +693,14 @@ export namespace LightDM {
|
|
|
656
693
|
* @param session The name of a remote session
|
|
657
694
|
* @param username A username of `NULL` to prompt for a username.
|
|
658
695
|
* @returns `TRUE` if authentication request sent.
|
|
696
|
+
* @throws GLib.Error
|
|
659
697
|
*/
|
|
660
698
|
authenticate_remote(session: string, username: string | null): boolean;
|
|
661
699
|
|
|
662
700
|
/**
|
|
663
701
|
* Cancel the current user authentication.
|
|
664
702
|
* @returns `TRUE` if cancel request sent.
|
|
703
|
+
* @throws GLib.Error
|
|
665
704
|
*/
|
|
666
705
|
cancel_authentication(): boolean;
|
|
667
706
|
|
|
@@ -673,6 +712,8 @@ export namespace LightDM {
|
|
|
673
712
|
/**
|
|
674
713
|
* Connects the greeter to the display manager. Will block until connected.
|
|
675
714
|
* @returns `TRUE` if successfully connected
|
|
715
|
+
* @deprecated since 1.11.1: Use `lightdm_greeter_connect_to_daemon_sync()` instead
|
|
716
|
+
* @throws GLib.Error
|
|
676
717
|
*/
|
|
677
718
|
connect_sync(): boolean;
|
|
678
719
|
|
|
@@ -712,12 +753,14 @@ export namespace LightDM {
|
|
|
712
753
|
* Finishes an operation started with `lightdm_greeter_connect_to_daemon()`.
|
|
713
754
|
* @param result A {@link Gio.AsyncResult}.
|
|
714
755
|
* @returns `TRUE` if successfully connected
|
|
756
|
+
* @throws GLib.Error
|
|
715
757
|
*/
|
|
716
758
|
connect_to_daemon_finish(result: Gio.AsyncResult): boolean;
|
|
717
759
|
|
|
718
760
|
/**
|
|
719
761
|
* Connects the greeter to the display manager. Will block until connected.
|
|
720
762
|
* @returns `TRUE` if successfully connected
|
|
763
|
+
* @throws GLib.Error
|
|
721
764
|
*/
|
|
722
765
|
connect_to_daemon_sync(): boolean;
|
|
723
766
|
|
|
@@ -775,6 +818,7 @@ export namespace LightDM {
|
|
|
775
818
|
* Function to call from lightdm_greeter_ensure_shared_data_dir callback.
|
|
776
819
|
* @param result A {@link Gio.AsyncResult}.
|
|
777
820
|
* @returns The path to the shared directory, free with g_free.
|
|
821
|
+
* @throws GLib.Error
|
|
778
822
|
*/
|
|
779
823
|
ensure_shared_data_dir_finish(result: Gio.AsyncResult): string;
|
|
780
824
|
|
|
@@ -791,6 +835,7 @@ export namespace LightDM {
|
|
|
791
835
|
* the directory themselves.
|
|
792
836
|
* @param username A username
|
|
793
837
|
* @returns The path to the shared directory, free with g_free.
|
|
838
|
+
* @throws GLib.Error
|
|
794
839
|
*/
|
|
795
840
|
ensure_shared_data_dir_sync(username: string): string;
|
|
796
841
|
|
|
@@ -905,6 +950,7 @@ export namespace LightDM {
|
|
|
905
950
|
* Provide response to a prompt. May be one in a series.
|
|
906
951
|
* @param response Response to a prompt
|
|
907
952
|
* @returns `TRUE` if response sent.
|
|
953
|
+
* @throws GLib.Error
|
|
908
954
|
*/
|
|
909
955
|
respond(response: string): boolean;
|
|
910
956
|
|
|
@@ -912,6 +958,7 @@ export namespace LightDM {
|
|
|
912
958
|
* Set the language for the currently authenticated user.
|
|
913
959
|
* @param language The language to use for this user in the form of a locale specification (e.g. "de_DE.UTF-8").
|
|
914
960
|
* @returns `TRUE` if set language request sent.
|
|
961
|
+
* @throws GLib.Error
|
|
915
962
|
*/
|
|
916
963
|
set_language(language: string): boolean;
|
|
917
964
|
|
|
@@ -961,6 +1008,7 @@ export namespace LightDM {
|
|
|
961
1008
|
* Start a session for the authenticated user.
|
|
962
1009
|
* @param result A {@link Gio.AsyncResult}.
|
|
963
1010
|
* @returns TRUE if the session was started.
|
|
1011
|
+
* @throws GLib.Error
|
|
964
1012
|
*/
|
|
965
1013
|
start_session_finish(result: Gio.AsyncResult): boolean;
|
|
966
1014
|
|
|
@@ -968,6 +1016,7 @@ export namespace LightDM {
|
|
|
968
1016
|
* Start a session for the authenticated user.
|
|
969
1017
|
* @param session The session to log into or `NULL` to use the default.
|
|
970
1018
|
* @returns TRUE if the session was started.
|
|
1019
|
+
* @throws GLib.Error
|
|
971
1020
|
*/
|
|
972
1021
|
start_session_sync(session: string | null): boolean;
|
|
973
1022
|
}
|
|
@@ -1572,19 +1621,19 @@ export namespace LightDM {
|
|
|
1572
1621
|
* @signal
|
|
1573
1622
|
* @run-last
|
|
1574
1623
|
*/
|
|
1575
|
-
"user-added": (
|
|
1624
|
+
"user-added": (user: User) => void;
|
|
1576
1625
|
/**
|
|
1577
1626
|
* The ::user-changed signal gets emitted when a user account is modified.
|
|
1578
1627
|
* @signal
|
|
1579
1628
|
* @run-last
|
|
1580
1629
|
*/
|
|
1581
|
-
"user-changed": (
|
|
1630
|
+
"user-changed": (user: User) => void;
|
|
1582
1631
|
/**
|
|
1583
1632
|
* The ::user-removed signal gets emitted when a user account is removed.
|
|
1584
1633
|
* @signal
|
|
1585
1634
|
* @run-last
|
|
1586
1635
|
*/
|
|
1587
|
-
"user-removed": (
|
|
1636
|
+
"user-removed": (user: User) => void;
|
|
1588
1637
|
"notify::length": (pspec: GObject.ParamSpec) => void;
|
|
1589
1638
|
"notify::num-users": (pspec: GObject.ParamSpec) => void;
|
|
1590
1639
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/lightdm-1",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for LightDM-1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lightdm-1.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/gio-2.0": "^4.
|
|
36
|
-
"@girs/gobject-2.0": "^4.
|
|
37
|
-
"@girs/glib-2.0": "^4.
|
|
38
|
-
"@girs/gmodule-2.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.5.0",
|
|
35
|
+
"@girs/gio-2.0": "^4.5.0",
|
|
36
|
+
"@girs/gobject-2.0": "^4.5.0",
|
|
37
|
+
"@girs/glib-2.0": "^4.5.0",
|
|
38
|
+
"@girs/gmodule-2.0": "^4.5.0" },
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "*"
|
|
41
41
|
},
|