@girs/lightdm-1 1.0.0-4.0.0-beta.3

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
+ # LightDM-1
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/lightdm-1)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/lightdm-1)
6
+
7
+
8
+ GJS TypeScript type definitions for LightDM-1, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
9
+
10
+
11
+ ## Install
12
+
13
+ To use this type definitions, install them with NPM:
14
+ ```bash
15
+ npm install @girs/lightdm-1
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ You can import this package into your project like this:
21
+ ```ts
22
+ import LightDM from '@girs/lightdm-1';
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/lightdm-1` or `@girs/lightdm-1/ambient` in your `tsconfig` or entry point Typescript file:
29
+
30
+ `index.ts`:
31
+ ```ts
32
+ import '@girs/lightdm-1'
33
+ ```
34
+
35
+ `tsconfig.json`:
36
+ ```json
37
+ {
38
+ "compilerOptions": {
39
+ ...
40
+ },
41
+ "include": ["@girs/lightdm-1"],
42
+ ...
43
+ }
44
+ ```
45
+
46
+ Now you can import the ambient module with TypeScript support:
47
+
48
+ ```ts
49
+ import LightDM from 'gi://LightDM?version=1';
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/lightdm-1` or `@girs/lightdm-1/import` in your `tsconfig` or entry point Typescript file:
56
+
57
+ `index.ts`:
58
+ ```ts
59
+ import '@girs/lightdm-1'
60
+ ```
61
+
62
+ `tsconfig.json`:
63
+ ```json
64
+ {
65
+ "compilerOptions": {
66
+ ...
67
+ },
68
+ "include": ["@girs/lightdm-1"],
69
+ ...
70
+ }
71
+ ```
72
+
73
+ Now you have also type support for this, too:
74
+
75
+ ```ts
76
+ const LightDM = imports.gi.LightDM;
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,12 @@
1
+
2
+ declare module 'gi://LightDM?version=1' {
3
+ import LightDM from '@girs/lightdm-1';
4
+ export default LightDM;
5
+ }
6
+
7
+ declare module 'gi://LightDM' {
8
+ import LightDM1 from 'gi://LightDM?version=1';
9
+ export default LightDM1;
10
+ }
11
+
12
+
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,12 @@
1
+
2
+ import LightDM1 from '@girs/lightdm-1';
3
+
4
+ declare global {
5
+ export interface GjsGiImports {
6
+ LightDM: typeof LightDM1;
7
+ }
8
+ }
9
+
10
+ export default GjsGiImports;
11
+
12
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
package/lightdm-1.d.ts ADDED
@@ -0,0 +1,1010 @@
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
+
8
+ import './lightdm-1-ambient.d.ts';
9
+
10
+ /**
11
+ * LightDM-1
12
+ */
13
+
14
+ import type Gio from '@girs/gio-2.0';
15
+ import type GObject from '@girs/gobject-2.0';
16
+ import type GLib from '@girs/glib-2.0';
17
+
18
+ export namespace LightDM {
19
+ /**
20
+ * Error codes returned by greeter operations.
21
+ */
22
+ class GreeterError extends GLib.Error {
23
+ static $gtype: GObject.GType<GreeterError>;
24
+
25
+ // Static fields of LightDM.GreeterError
26
+
27
+ /**
28
+ * error communicating with daemon.
29
+ */
30
+ static COMMUNICATION_ERROR: number;
31
+ /**
32
+ * failed to connect to the daemon.
33
+ */
34
+ static CONNECTION_FAILED: number;
35
+ /**
36
+ * requested session failed to start.
37
+ */
38
+ static SESSION_FAILED: number;
39
+ /**
40
+ * autologin not configured.
41
+ */
42
+ static NO_AUTOLOGIN: number;
43
+ /**
44
+ * autologin not configured.
45
+ */
46
+ static INVALID_USER: number;
47
+
48
+ // Constructors of LightDM.GreeterError
49
+
50
+ constructor(options: { message: string; code: number });
51
+ _init(...args: any[]): void;
52
+
53
+ // Own static methods of LightDM.GreeterError
54
+
55
+ static quark(): GLib.Quark;
56
+ }
57
+
58
+ enum MessageType {
59
+ /**
60
+ * Informational message.
61
+ */
62
+ INFO,
63
+ /**
64
+ * Error message.
65
+ */
66
+ ERROR,
67
+ }
68
+ /**
69
+ * Prompt types the client is required to display.
70
+ */
71
+ enum PromptType {
72
+ /**
73
+ * prompt is a question. The information can be shown as it is entered.
74
+ */
75
+ QUESTION,
76
+ /**
77
+ * prompt is for secret information. The entered information should be obscured so it can't be publically visible.
78
+ */
79
+ SECRET,
80
+ }
81
+ const GREETER_SIGNAL_AUTHENTICATION_COMPLETE: string;
82
+ const GREETER_SIGNAL_AUTOLOGIN_TIMER_EXPIRED: string;
83
+ const GREETER_SIGNAL_IDLE: string;
84
+ const GREETER_SIGNAL_RESET: string;
85
+ const GREETER_SIGNAL_SHOW_MESSAGE: string;
86
+ const GREETER_SIGNAL_SHOW_PROMPT: string;
87
+ const SIGNAL_USER_CHANGED: string;
88
+ const USER_LIST_SIGNAL_USER_ADDED: string;
89
+ const USER_LIST_SIGNAL_USER_CHANGED: string;
90
+ const USER_LIST_SIGNAL_USER_REMOVED: string;
91
+ /**
92
+ * Checks if is authorized to do a system hibernate.
93
+ * @returns #TRUE if can hibernate the system
94
+ */
95
+ function get_can_hibernate(): boolean;
96
+ /**
97
+ * Checks if is authorized to do a system restart.
98
+ * @returns #TRUE if can restart the system
99
+ */
100
+ function get_can_restart(): boolean;
101
+ /**
102
+ * Checks if is authorized to do a system shutdown.
103
+ * @returns #TRUE if can shutdown the system
104
+ */
105
+ function get_can_shutdown(): boolean;
106
+ /**
107
+ * Checks if authorized to do a system suspend.
108
+ * @returns #TRUE if can suspend the system
109
+ */
110
+ function get_can_suspend(): boolean;
111
+ function get_hostname(): string;
112
+ /**
113
+ * Get the current language.
114
+ * @returns The current language or #NULL if no language.
115
+ */
116
+ function get_language(): Language;
117
+ /**
118
+ * Get a list of languages to present to the user.
119
+ * @returns A list of #LightDMLanguage that should be presented to the user.
120
+ */
121
+ function get_languages(): Language[];
122
+ /**
123
+ * Get the current keyboard layout.
124
+ * @returns The currently active layout for this user.
125
+ */
126
+ function get_layout(): Layout;
127
+ /**
128
+ * Get a list of keyboard layouts to present to the user.
129
+ * @returns A list of #LightDMLayout that should be presented to the user.
130
+ */
131
+ function get_layouts(): Layout[];
132
+ /**
133
+ * Get a system message that should be presented to the user.
134
+ * e.g. "Welcome to Yoyodyne"
135
+ * @returns a string (the contents of /etc/motd) or %NULL if not set.
136
+ */
137
+ function get_motd(): string | null;
138
+ /**
139
+ * Get a word describing the OS, suitable for checking which OS the greeter is running on.
140
+ * e.g. "ubuntu"
141
+ * @returns a string (ID variable from /etc/os-release) or %NULL if not set.
142
+ */
143
+ function get_os_id(): string | null;
144
+ /**
145
+ * Get a line of text describing the OS without version information, suitable for presentation to the user.
146
+ * e.g. "Ubuntu"
147
+ * @returns a string (NAME variable from /etc/os-release) or %NULL if not set.
148
+ */
149
+ function get_os_name(): string | null;
150
+ /**
151
+ * Get a line of text describing the OS, suitable for presentation to the user.
152
+ * e.g. "Ubuntu 16.04.1 LTS"
153
+ * @returns a string (PRETTY_NAME variable from /etc/os-release) or %NULL if not set.
154
+ */
155
+ function get_os_pretty_name(): string | null;
156
+ /**
157
+ * Get a line of text describing the OS version, suitable for presentation to the user.
158
+ * e.g. "16.04.1 LTS (Xenial Xapus)"
159
+ * @returns a string (VERSION variable from /etc/os-release) or %NULL if not set.
160
+ */
161
+ function get_os_version(): string | null;
162
+ /**
163
+ * Get a word descibing the OS version, suitable for checking which version of the OS this greeter is running on.
164
+ * e.g. "16.04"
165
+ * @returns a string (VERSION_ID variable from /etc/os-release) or %NULL if not set.
166
+ */
167
+ function get_os_version_id(): string | null;
168
+ /**
169
+ * Get the available remote sessions.
170
+ * @returns A list of #LightDMSession
171
+ */
172
+ function get_remote_sessions(): Session[];
173
+ /**
174
+ * Get the available sessions.
175
+ * @returns A list of #LightDMSession
176
+ */
177
+ function get_sessions(): Session[];
178
+ function greeter_error_quark(): GLib.Quark;
179
+ /**
180
+ * Triggers a system hibernate.
181
+ * @returns #TRUE if hibernate initiated.
182
+ */
183
+ function hibernate(): boolean;
184
+ /**
185
+ * Triggers a system restart.
186
+ * @returns #TRUE if restart initiated.
187
+ */
188
+ function restart(): boolean;
189
+ /**
190
+ * Set the layout for this session.
191
+ * @param layout The layout to use
192
+ */
193
+ function set_layout(layout: Layout): void;
194
+ /**
195
+ * Triggers a system shutdown.
196
+ * @returns #TRUE if shutdown initiated.
197
+ */
198
+ function shutdown(): boolean;
199
+ /**
200
+ * Triggers a system suspend.
201
+ * @returns #TRUE if suspend initiated.
202
+ */
203
+ function suspend(): boolean;
204
+ module Greeter {
205
+ // Signal callback interfaces
206
+
207
+ interface AuthenticationComplete {
208
+ (): void;
209
+ }
210
+
211
+ interface AutologinTimerExpired {
212
+ (): void;
213
+ }
214
+
215
+ interface Idle {
216
+ (): void;
217
+ }
218
+
219
+ interface Reset {
220
+ (): void;
221
+ }
222
+
223
+ interface ShowMessage {
224
+ (text: string, type: MessageType): void;
225
+ }
226
+
227
+ interface ShowPrompt {
228
+ (text: string, type: PromptType): void;
229
+ }
230
+
231
+ // Constructor properties interface
232
+
233
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
234
+ authentication_user: string;
235
+ authenticationUser: string;
236
+ autologin_guest_hint: boolean;
237
+ autologinGuestHint: boolean;
238
+ autologin_session_hint: string;
239
+ autologinSessionHint: string;
240
+ autologin_timeout_hint: number;
241
+ autologinTimeoutHint: number;
242
+ autologin_user_hint: string;
243
+ autologinUserHint: string;
244
+ default_session_hint: string;
245
+ defaultSessionHint: string;
246
+ has_guest_account_hint: boolean;
247
+ hasGuestAccountHint: boolean;
248
+ hide_users_hint: boolean;
249
+ hideUsersHint: boolean;
250
+ in_authentication: boolean;
251
+ inAuthentication: boolean;
252
+ is_authenticated: boolean;
253
+ isAuthenticated: boolean;
254
+ lock_hint: boolean;
255
+ lockHint: boolean;
256
+ select_guest_hint: boolean;
257
+ selectGuestHint: boolean;
258
+ select_user_hint: string;
259
+ selectUserHint: string;
260
+ show_manual_login_hint: boolean;
261
+ showManualLoginHint: boolean;
262
+ show_remote_login_hint: boolean;
263
+ showRemoteLoginHint: boolean;
264
+ }
265
+ }
266
+
267
+ /**
268
+ * #LightDMGreeter is an opaque data structure and can only be accessed
269
+ * using the provided functions.
270
+ */
271
+ class Greeter extends GObject.Object {
272
+ static $gtype: GObject.GType<Greeter>;
273
+
274
+ // Own properties of LightDM.Greeter
275
+
276
+ get authentication_user(): string;
277
+ get authenticationUser(): string;
278
+ get autologin_guest_hint(): boolean;
279
+ get autologinGuestHint(): boolean;
280
+ get autologin_session_hint(): string;
281
+ get autologinSessionHint(): string;
282
+ get autologin_timeout_hint(): number;
283
+ get autologinTimeoutHint(): number;
284
+ get autologin_user_hint(): string;
285
+ get autologinUserHint(): string;
286
+ get default_session_hint(): string;
287
+ get defaultSessionHint(): string;
288
+ get has_guest_account_hint(): boolean;
289
+ get hasGuestAccountHint(): boolean;
290
+ get hide_users_hint(): boolean;
291
+ get hideUsersHint(): boolean;
292
+ get in_authentication(): boolean;
293
+ get inAuthentication(): boolean;
294
+ get is_authenticated(): boolean;
295
+ get isAuthenticated(): boolean;
296
+ get lock_hint(): boolean;
297
+ get lockHint(): boolean;
298
+ get select_guest_hint(): boolean;
299
+ get selectGuestHint(): boolean;
300
+ get select_user_hint(): string;
301
+ get selectUserHint(): string;
302
+ get show_manual_login_hint(): boolean;
303
+ get showManualLoginHint(): boolean;
304
+ get show_remote_login_hint(): boolean;
305
+ get showRemoteLoginHint(): boolean;
306
+
307
+ // Constructors of LightDM.Greeter
308
+
309
+ constructor(properties?: Partial<Greeter.ConstructorProps>, ...args: any[]);
310
+
311
+ _init(...args: any[]): void;
312
+
313
+ static ['new'](): Greeter;
314
+
315
+ // Own signals of LightDM.Greeter
316
+
317
+ connect(id: string, callback: (...args: any[]) => any): number;
318
+ connect_after(id: string, callback: (...args: any[]) => any): number;
319
+ emit(id: string, ...args: any[]): void;
320
+ connect(signal: 'authentication-complete', callback: (_source: this) => void): number;
321
+ connect_after(signal: 'authentication-complete', callback: (_source: this) => void): number;
322
+ emit(signal: 'authentication-complete'): void;
323
+ connect(signal: 'autologin-timer-expired', callback: (_source: this) => void): number;
324
+ connect_after(signal: 'autologin-timer-expired', callback: (_source: this) => void): number;
325
+ emit(signal: 'autologin-timer-expired'): void;
326
+ connect(signal: 'idle', callback: (_source: this) => void): number;
327
+ connect_after(signal: 'idle', callback: (_source: this) => void): number;
328
+ emit(signal: 'idle'): void;
329
+ connect(signal: 'reset', callback: (_source: this) => void): number;
330
+ connect_after(signal: 'reset', callback: (_source: this) => void): number;
331
+ emit(signal: 'reset'): void;
332
+ connect(signal: 'show-message', callback: (_source: this, text: string, type: MessageType) => void): number;
333
+ connect_after(
334
+ signal: 'show-message',
335
+ callback: (_source: this, text: string, type: MessageType) => void,
336
+ ): number;
337
+ emit(signal: 'show-message', text: string, type: MessageType): void;
338
+ connect(signal: 'show-prompt', callback: (_source: this, text: string, type: PromptType) => void): number;
339
+ connect_after(signal: 'show-prompt', callback: (_source: this, text: string, type: PromptType) => void): number;
340
+ emit(signal: 'show-prompt', text: string, type: PromptType): void;
341
+
342
+ // Own virtual methods of LightDM.Greeter
343
+
344
+ vfunc_authentication_complete(): void;
345
+ vfunc_autologin_timer_expired(): void;
346
+ vfunc_idle(): void;
347
+ vfunc_reset(): void;
348
+ vfunc_show_message(text: string, type: MessageType): void;
349
+ vfunc_show_prompt(text: string, type: PromptType): void;
350
+
351
+ // Own methods of LightDM.Greeter
352
+
353
+ /**
354
+ * Starts the authentication procedure for a user.
355
+ * @param username A username or #NULL to prompt for a username.
356
+ * @returns #TRUE if authentication request sent.
357
+ */
358
+ authenticate(username?: string | null): boolean;
359
+ /**
360
+ * Starts the authentication procedure for the guest user.
361
+ * @returns #TRUE if authentication request sent.
362
+ */
363
+ authenticate_as_guest(): boolean;
364
+ /**
365
+ * Starts the authentication procedure for the automatic login user.
366
+ * @returns #TRUE if authentication request sent.
367
+ */
368
+ authenticate_autologin(): boolean;
369
+ /**
370
+ * Start authentication for a remote session type.
371
+ * @param session The name of a remote session
372
+ * @param username A username of #NULL to prompt for a username.
373
+ * @returns #TRUE if authentication request sent.
374
+ */
375
+ authenticate_remote(session: string, username?: string | null): boolean;
376
+ /**
377
+ * Cancel the current user authentication.
378
+ * @returns #TRUE if cancel request sent.
379
+ */
380
+ cancel_authentication(): boolean;
381
+ /**
382
+ * Cancel the automatic login.
383
+ */
384
+ cancel_autologin(): void;
385
+ /**
386
+ * Connects the greeter to the display manager. Will block until connected.
387
+ * @returns #TRUE if successfully connected
388
+ */
389
+ connect_sync(): boolean;
390
+ /**
391
+ * Asynchronously connects the greeter to the display manager.
392
+ *
393
+ * When the operation is finished, `callback` will be invoked. You can then call lightdm_greeter_connect_to_daemon_finish() to get the result of the operation.
394
+ *
395
+ * See lightdm_greeter_connect_to_daemon_sync() for the synchronous version.
396
+ * @param cancellable A #GCancellable or %NULL.
397
+ * @param callback A #GAsyncReadyCallback to call when completed or %NULL.
398
+ */
399
+ connect_to_daemon(cancellable?: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): void;
400
+ /**
401
+ * Finishes an operation started with lightdm_greeter_connect_to_daemon().
402
+ * @param result A #GAsyncResult.
403
+ * @returns #TRUE if successfully connected
404
+ */
405
+ connect_to_daemon_finish(result: Gio.AsyncResult): boolean;
406
+ /**
407
+ * Connects the greeter to the display manager. Will block until connected.
408
+ * @returns #TRUE if successfully connected
409
+ */
410
+ connect_to_daemon_sync(): boolean;
411
+ /**
412
+ * Ensure that a shared data dir for the given user is available. Both the
413
+ * greeter user and `username` will have write access to that folder. The
414
+ * intention is that larger pieces of shared data would be stored there (files
415
+ * that the greeter creates but wants to give to a user -- like camera
416
+ * photos -- or files that the user creates but wants the greeter to
417
+ * see -- like contact avatars).
418
+ *
419
+ * LightDM will automatically create these if the user actually logs in, so
420
+ * greeters only need to call this method if they want to store something in
421
+ * the directory themselves.
422
+ * @param username A username
423
+ * @param cancellable A #GCancellable or %NULL.
424
+ * @param callback A #GAsyncReadyCallback to call when completed or %NULL.
425
+ */
426
+ ensure_shared_data_dir(
427
+ username: string,
428
+ cancellable?: Gio.Cancellable | null,
429
+ callback?: Gio.AsyncReadyCallback<this> | null,
430
+ ): void;
431
+ /**
432
+ * Function to call from lightdm_greeter_ensure_shared_data_dir callback.
433
+ * @param result A #GAsyncResult.
434
+ * @returns The path to the shared directory, free with g_free.
435
+ */
436
+ ensure_shared_data_dir_finish(result: Gio.AsyncResult): string;
437
+ /**
438
+ * Ensure that a shared data dir for the given user is available. Both the
439
+ * greeter user and `username` will have write access to that folder. The
440
+ * intention is that larger pieces of shared data would be stored there (files
441
+ * that the greeter creates but wants to give to a user -- like camera
442
+ * photos -- or files that the user creates but wants the greeter to
443
+ * see -- like contact avatars).
444
+ *
445
+ * LightDM will automatically create these if the user actually logs in, so
446
+ * greeters only need to call this method if they want to store something in
447
+ * the directory themselves.
448
+ * @param username A username
449
+ * @returns The path to the shared directory, free with g_free.
450
+ */
451
+ ensure_shared_data_dir_sync(username: string): string;
452
+ /**
453
+ * Get the user that is being authenticated.
454
+ * @returns The username of the authentication user being authenticated or #NULL if no authentication in progress.
455
+ */
456
+ get_authentication_user(): string | null;
457
+ /**
458
+ * Check if the guest account should be automatically logged into when the timer expires.
459
+ * @returns #TRUE if the guest account should be automatically logged into.
460
+ */
461
+ get_autologin_guest_hint(): boolean;
462
+ /**
463
+ * Get the session used to automatically log into when the timer expires.
464
+ * @returns The session name or %NULL if configured to use the default.
465
+ */
466
+ get_autologin_session_hint(): string | null;
467
+ /**
468
+ * Get the number of seconds to wait before automatically logging in.
469
+ * @returns The number of seconds to wait before automatically logging in or 0 for no timeout.
470
+ */
471
+ get_autologin_timeout_hint(): number;
472
+ /**
473
+ * Get the user account to automatically log into when the timer expires.
474
+ * @returns The user account to automatically log into or %NULL if none configured.
475
+ */
476
+ get_autologin_user_hint(): string | null;
477
+ /**
478
+ * Get the default session to use.
479
+ * @returns The session name
480
+ */
481
+ get_default_session_hint(): string;
482
+ /**
483
+ * Check if guest sessions are supported.
484
+ * @returns #TRUE if guest sessions are supported.
485
+ */
486
+ get_has_guest_account_hint(): boolean;
487
+ /**
488
+ * Check if user accounts should be shown. If this is TRUE then the list of
489
+ * accounts should be taken from #LightDMUserList and displayed in the greeter
490
+ * for the user to choose from. Note that this list can be empty and it is
491
+ * recommended you show a method for the user to enter a username manually.
492
+ *
493
+ * If this option is shown the greeter should only allow these users to be
494
+ * chosen for login unless the manual login hint is set.
495
+ * @returns #TRUE if the available users should not be shown.
496
+ */
497
+ get_hide_users_hint(): boolean;
498
+ /**
499
+ * Get a hint.
500
+ * @param name The hint name to query.
501
+ * @returns The value for this hint or #NULL if not set.
502
+ */
503
+ get_hint(name: string): string | null;
504
+ /**
505
+ * Checks if the greeter is in the process of authenticating.
506
+ * @returns #TRUE if the greeter is authenticating a user.
507
+ */
508
+ get_in_authentication(): boolean;
509
+ /**
510
+ * Checks if the greeter has successfully authenticated.
511
+ * @returns #TRUE if the greeter is authenticated for login.
512
+ */
513
+ get_is_authenticated(): boolean;
514
+ /**
515
+ * Check if the greeter is acting as a lock screen.
516
+ * @returns #TRUE if the greeter was triggered by locking the seat.
517
+ */
518
+ get_lock_hint(): boolean;
519
+ /**
520
+ * Check if the guest account should be selected by default.
521
+ * @returns #TRUE if the guest account should be selected by default.
522
+ */
523
+ get_select_guest_hint(): boolean;
524
+ /**
525
+ * Get the user to select by default.
526
+ * @returns A username or %NULL if no particular user should be selected.
527
+ */
528
+ get_select_user_hint(): string | null;
529
+ /**
530
+ * Check if a manual login option should be shown. If set the GUI
531
+ * should provide a way for a username to be entered manually.
532
+ * Without this hint a greeter which is showing a user list can
533
+ * limit logins to only those users.
534
+ * @returns #TRUE if a manual login option should be shown.
535
+ */
536
+ get_show_manual_login_hint(): boolean;
537
+ /**
538
+ * Check if a remote login option should be shown. If set the GUI
539
+ * should provide a way for a user to log into a remote desktop server.
540
+ * @returns #TRUE if a remote login option should be shown.
541
+ */
542
+ get_show_remote_login_hint(): boolean;
543
+ /**
544
+ * Provide response to a prompt. May be one in a series.
545
+ * @param response Response to a prompt
546
+ * @returns #TRUE if response sent.
547
+ */
548
+ respond(response: string): boolean;
549
+ /**
550
+ * Set the language for the currently authenticated user.
551
+ * @param language The language to use for this user in the form of a locale specification (e.g. "de_DE.UTF-8").
552
+ * @returns #TRUE if set language request sent.
553
+ */
554
+ set_language(language: string): boolean;
555
+ /**
556
+ * Set whether the greeter will be reset instead of killed after the user logs in.
557
+ * This must be called before lightdm_greeter_connect is called.
558
+ * @param resettable Whether the greeter wants to be reset instead of killed after the user logs in
559
+ */
560
+ set_resettable(resettable: boolean): void;
561
+ /**
562
+ * Asynchronously start a session for the authenticated user.
563
+ *
564
+ * When the operation is finished, `callback` will be invoked. You can then call lightdm_greeter_start_session_finish() to get the result of the operation.
565
+ *
566
+ * See lightdm_greeter_start_session_sync() for the synchronous version.
567
+ * @param session The session to log into or #NULL to use the default.
568
+ * @param cancellable A #GCancellable or %NULL.
569
+ * @param callback A #GAsyncReadyCallback to call when completed or %NULL.
570
+ */
571
+ start_session(
572
+ session?: string | null,
573
+ cancellable?: Gio.Cancellable | null,
574
+ callback?: Gio.AsyncReadyCallback<this> | null,
575
+ ): void;
576
+ /**
577
+ * Start a session for the authenticated user.
578
+ * @param result A #GAsyncResult.
579
+ * @returns TRUE if the session was started.
580
+ */
581
+ start_session_finish(result: Gio.AsyncResult): boolean;
582
+ /**
583
+ * Start a session for the authenticated user.
584
+ * @param session The session to log into or #NULL to use the default.
585
+ * @returns TRUE if the session was started.
586
+ */
587
+ start_session_sync(session?: string | null): boolean;
588
+ }
589
+
590
+ module Language {
591
+ // Constructor properties interface
592
+
593
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
594
+ code: string;
595
+ name: string;
596
+ territory: string;
597
+ }
598
+ }
599
+
600
+ /**
601
+ * #LightDMLanguage is an opaque data structure and can only be accessed
602
+ * using the provided functions.
603
+ */
604
+ class Language extends GObject.Object {
605
+ static $gtype: GObject.GType<Language>;
606
+
607
+ // Own properties of LightDM.Language
608
+
609
+ get code(): string;
610
+ get name(): string;
611
+ get territory(): string;
612
+
613
+ // Constructors of LightDM.Language
614
+
615
+ constructor(properties?: Partial<Language.ConstructorProps>, ...args: any[]);
616
+
617
+ _init(...args: any[]): void;
618
+
619
+ // Own methods of LightDM.Language
620
+
621
+ /**
622
+ * Get the code of a language (e.g. "de_DE.UTF-8")
623
+ * @returns The code of the language
624
+ */
625
+ get_code(): string;
626
+ /**
627
+ * Get the name of a language.
628
+ * @returns The name of the language
629
+ */
630
+ get_name(): string;
631
+ /**
632
+ * Get the territory the language is used in.
633
+ * @returns The territory the language is used in.
634
+ */
635
+ get_territory(): string;
636
+ /**
637
+ * Check if a language code matches this language.
638
+ * @param code A language code
639
+ * @returns #TRUE if the code matches this language.
640
+ */
641
+ matches(code: string): boolean;
642
+ }
643
+
644
+ module Layout {
645
+ // Constructor properties interface
646
+
647
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
648
+ description: string;
649
+ name: string;
650
+ short_description: string;
651
+ shortDescription: string;
652
+ }
653
+ }
654
+
655
+ /**
656
+ * #LightDMLayout is an opaque data structure and can only be accessed
657
+ * using the provided functions.
658
+ */
659
+ class Layout extends GObject.Object {
660
+ static $gtype: GObject.GType<Layout>;
661
+
662
+ // Own properties of LightDM.Layout
663
+
664
+ get description(): string;
665
+ get name(): string;
666
+ get short_description(): string;
667
+ get shortDescription(): string;
668
+
669
+ // Constructors of LightDM.Layout
670
+
671
+ constructor(properties?: Partial<Layout.ConstructorProps>, ...args: any[]);
672
+
673
+ _init(...args: any[]): void;
674
+
675
+ // Own methods of LightDM.Layout
676
+
677
+ /**
678
+ * Get the long description of a layout.
679
+ * @returns A long description of the layout
680
+ */
681
+ get_description(): string;
682
+ /**
683
+ * Get the name of a layout.
684
+ * @returns The name of the layout
685
+ */
686
+ get_name(): string;
687
+ /**
688
+ * Get the short description of a layout.
689
+ * @returns A short description of the layout
690
+ */
691
+ get_short_description(): string;
692
+ }
693
+
694
+ module Session {
695
+ // Constructor properties interface
696
+
697
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
698
+ comment: string;
699
+ key: string;
700
+ name: string;
701
+ }
702
+ }
703
+
704
+ /**
705
+ * #LightDMSession is an opaque data structure and can only be accessed
706
+ * using the provided functions.
707
+ */
708
+ class Session extends GObject.Object {
709
+ static $gtype: GObject.GType<Session>;
710
+
711
+ // Own properties of LightDM.Session
712
+
713
+ get comment(): string;
714
+ get key(): string;
715
+ get name(): string;
716
+
717
+ // Constructors of LightDM.Session
718
+
719
+ constructor(properties?: Partial<Session.ConstructorProps>, ...args: any[]);
720
+
721
+ _init(...args: any[]): void;
722
+
723
+ // Own methods of LightDM.Session
724
+
725
+ /**
726
+ * Get the comment for a session
727
+ * @returns The session comment
728
+ */
729
+ get_comment(): string;
730
+ /**
731
+ * Get the key for a session
732
+ * @returns The session key
733
+ */
734
+ get_key(): string;
735
+ /**
736
+ * Get the name for a session
737
+ * @returns The session name
738
+ */
739
+ get_name(): string;
740
+ /**
741
+ * Get the type a session
742
+ * @returns The session type, e.g. x or mir
743
+ */
744
+ get_session_type(): string;
745
+ }
746
+
747
+ module User {
748
+ // Signal callback interfaces
749
+
750
+ interface Changed {
751
+ (): void;
752
+ }
753
+
754
+ // Constructor properties interface
755
+
756
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
757
+ background: string;
758
+ display_name: string;
759
+ displayName: string;
760
+ has_messages: boolean;
761
+ hasMessages: boolean;
762
+ home_directory: string;
763
+ homeDirectory: string;
764
+ image: string;
765
+ is_locked: boolean;
766
+ isLocked: boolean;
767
+ language: string;
768
+ layout: string;
769
+ layouts: string[];
770
+ logged_in: boolean;
771
+ loggedIn: boolean;
772
+ name: string;
773
+ real_name: string;
774
+ realName: string;
775
+ session: string;
776
+ uid: number;
777
+ }
778
+ }
779
+
780
+ /**
781
+ * #LightDMUser is an opaque data structure and can only be accessed
782
+ * using the provided functions.
783
+ */
784
+ class User extends GObject.Object {
785
+ static $gtype: GObject.GType<User>;
786
+
787
+ // Own properties of LightDM.User
788
+
789
+ get background(): string;
790
+ get display_name(): string;
791
+ get displayName(): string;
792
+ get has_messages(): boolean;
793
+ get hasMessages(): boolean;
794
+ get home_directory(): string;
795
+ get homeDirectory(): string;
796
+ get image(): string;
797
+ get is_locked(): boolean;
798
+ get isLocked(): boolean;
799
+ get language(): string;
800
+ get layout(): string;
801
+ get layouts(): string[];
802
+ get logged_in(): boolean;
803
+ get loggedIn(): boolean;
804
+ get name(): string;
805
+ get real_name(): string;
806
+ get realName(): string;
807
+ get session(): string;
808
+ get uid(): number;
809
+
810
+ // Constructors of LightDM.User
811
+
812
+ constructor(properties?: Partial<User.ConstructorProps>, ...args: any[]);
813
+
814
+ _init(...args: any[]): void;
815
+
816
+ // Own signals of LightDM.User
817
+
818
+ connect(id: string, callback: (...args: any[]) => any): number;
819
+ connect_after(id: string, callback: (...args: any[]) => any): number;
820
+ emit(id: string, ...args: any[]): void;
821
+ connect(signal: 'changed', callback: (_source: this) => void): number;
822
+ connect_after(signal: 'changed', callback: (_source: this) => void): number;
823
+ emit(signal: 'changed'): void;
824
+
825
+ // Own virtual methods of LightDM.User
826
+
827
+ vfunc_changed(): void;
828
+
829
+ // Own methods of LightDM.User
830
+
831
+ /**
832
+ * Get the background file path for a user.
833
+ * @returns The background file path for the given user or #NULL if no path
834
+ */
835
+ get_background(): string | null;
836
+ /**
837
+ * Get the display name of a user.
838
+ * @returns The display name of the given user
839
+ */
840
+ get_display_name(): string;
841
+ /**
842
+ * Check if a user has waiting messages.
843
+ * @returns #TRUE if the user has waiting messages.
844
+ */
845
+ get_has_messages(): boolean;
846
+ /**
847
+ * Get the home directory for a user.
848
+ * @returns The users home directory
849
+ */
850
+ get_home_directory(): string;
851
+ /**
852
+ * Get the image URI for a user.
853
+ * @returns The image URI for the given user or #NULL if no URI
854
+ */
855
+ get_image(): string | null;
856
+ /**
857
+ * Get if the user is locked.
858
+ * @returns %TRUE if the user is locked
859
+ */
860
+ get_is_locked(): boolean;
861
+ /**
862
+ * Get the language for a user.
863
+ * @returns The language in the form of a local specification (e.g. "de_DE.UTF-8") for the given user or #NULL if using the system default locale.
864
+ */
865
+ get_language(): string | null;
866
+ /**
867
+ * Get the keyboard layout for a user.
868
+ * @returns The keyboard layout for the given user or #NULL if using system defaults. Copy the value if you want to use it long term.
869
+ */
870
+ get_layout(): string | null;
871
+ /**
872
+ * Get the configured keyboard layouts for a user.
873
+ * @returns A NULL-terminated array of keyboard layouts for the given user. Copy the values if you want to use them long term.
874
+ */
875
+ get_layouts(): string[];
876
+ /**
877
+ * Check if a user is logged in.
878
+ * @returns #TRUE if the user is currently logged in.
879
+ */
880
+ get_logged_in(): boolean;
881
+ /**
882
+ * Get the name of a user.
883
+ * @returns The name of the given user
884
+ */
885
+ get_name(): string;
886
+ /**
887
+ * Get the real name of a user.
888
+ * @returns The real name of the given user
889
+ */
890
+ get_real_name(): string;
891
+ /**
892
+ * Get the session for a user.
893
+ * @returns The session for the given user or #NULL if using system defaults.
894
+ */
895
+ get_session(): string | null;
896
+ /**
897
+ * Get the uid of a user.
898
+ * @returns The uid of the given user
899
+ */
900
+ get_uid(): number;
901
+ }
902
+
903
+ module UserList {
904
+ // Signal callback interfaces
905
+
906
+ interface UserAdded {
907
+ (user: User): void;
908
+ }
909
+
910
+ interface UserChanged {
911
+ (user: User): void;
912
+ }
913
+
914
+ interface UserRemoved {
915
+ (user: User): void;
916
+ }
917
+
918
+ // Constructor properties interface
919
+
920
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
921
+ length: number;
922
+ num_users: number;
923
+ numUsers: number;
924
+ }
925
+ }
926
+
927
+ /**
928
+ * #LightDMUserList is an opaque data structure and can only be accessed
929
+ * using the provided functions.
930
+ */
931
+ class UserList extends GObject.Object {
932
+ static $gtype: GObject.GType<UserList>;
933
+
934
+ // Own properties of LightDM.UserList
935
+
936
+ get length(): number;
937
+ get num_users(): number;
938
+ get numUsers(): number;
939
+
940
+ // Constructors of LightDM.UserList
941
+
942
+ constructor(properties?: Partial<UserList.ConstructorProps>, ...args: any[]);
943
+
944
+ _init(...args: any[]): void;
945
+
946
+ // Own signals of LightDM.UserList
947
+
948
+ connect(id: string, callback: (...args: any[]) => any): number;
949
+ connect_after(id: string, callback: (...args: any[]) => any): number;
950
+ emit(id: string, ...args: any[]): void;
951
+ connect(signal: 'user-added', callback: (_source: this, user: User) => void): number;
952
+ connect_after(signal: 'user-added', callback: (_source: this, user: User) => void): number;
953
+ emit(signal: 'user-added', user: User): void;
954
+ connect(signal: 'user-changed', callback: (_source: this, user: User) => void): number;
955
+ connect_after(signal: 'user-changed', callback: (_source: this, user: User) => void): number;
956
+ emit(signal: 'user-changed', user: User): void;
957
+ connect(signal: 'user-removed', callback: (_source: this, user: User) => void): number;
958
+ connect_after(signal: 'user-removed', callback: (_source: this, user: User) => void): number;
959
+ emit(signal: 'user-removed', user: User): void;
960
+
961
+ // Own static methods of LightDM.UserList
962
+
963
+ /**
964
+ * Get the user list.
965
+ */
966
+ static get_instance(): UserList;
967
+
968
+ // Own virtual methods of LightDM.UserList
969
+
970
+ vfunc_user_added(user: User): void;
971
+ vfunc_user_changed(user: User): void;
972
+ vfunc_user_removed(user: User): void;
973
+
974
+ // Own methods of LightDM.UserList
975
+
976
+ get_length(): number;
977
+ /**
978
+ * Get information about a given user or #NULL if this user doesn't exist.
979
+ * @param username Name of user to get.
980
+ * @returns A #LightDMUser entry for the given user.
981
+ */
982
+ get_user_by_name(username: string): User;
983
+ /**
984
+ * Get a list of users to present to the user. This list may be a subset of the
985
+ * available users and may be empty depending on the server configuration.
986
+ * @returns A list of #LightDMUser that should be presented to the user.
987
+ */
988
+ get_users(): User[];
989
+ }
990
+
991
+ type GreeterClass = typeof Greeter;
992
+ type LanguageClass = typeof Language;
993
+ type LayoutClass = typeof Layout;
994
+ type SessionClass = typeof Session;
995
+ type UserClass = typeof User;
996
+ type UserListClass = typeof UserList;
997
+ /**
998
+ * Name of the imported GIR library
999
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
1000
+ */
1001
+ const __name__: string;
1002
+ /**
1003
+ * Version of the imported GIR library
1004
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
1005
+ */
1006
+ const __version__: string;
1007
+ }
1008
+
1009
+ export default LightDM;
1010
+ // END
package/lightdm-1.js ADDED
@@ -0,0 +1,6 @@
1
+
2
+ // @ts-expect-error
3
+ import LightDM from 'gi://LightDM?version=1';
4
+ export { LightDM };
5
+ export default LightDM;
6
+
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@girs/lightdm-1",
3
+ "version": "1.0.0-4.0.0-beta.3",
4
+ "description": "GJS TypeScript type definitions for LightDM-1, generated from library version 1.0.0",
5
+ "type": "module",
6
+ "module": "lightdm-1.js",
7
+ "main": "lightdm-1.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./lightdm-1-ambient.d.ts",
11
+ "import": "./lightdm-1-ambient.js",
12
+ "default": "./lightdm-1-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./lightdm-1-import.d.ts",
16
+ "import": "./lightdm-1-import.js",
17
+ "default": "./lightdm-1-import.js"
18
+ },
19
+ ".": {
20
+ "types": "./lightdm-1.d.ts",
21
+ "import": "./lightdm-1.js",
22
+ "default": "./lightdm-1.js"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit lightdm-1.d.ts"
27
+ },
28
+ "dependencies": {
29
+ "@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
30
+ "@girs/gjs": "^4.0.0-beta.3",
31
+ "@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
32
+ "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "*"
36
+ },
37
+ "keywords": [
38
+ "Gir",
39
+ "TypeScript",
40
+ "types",
41
+ "GObject-Introspection",
42
+ "GJS",
43
+ "LightDM-1"
44
+ ],
45
+ "author": "ts-for-gir",
46
+ "license": "MIT",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
50
+ },
51
+ "bugs": {
52
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
53
+ },
54
+ "homepage": "https://github.com/gjsify/types/tree/main/lightdm-1#readme"
55
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "lib": ["ESNext"],
7
+ "types": [],
8
+ "experimentalDecorators": true,
9
+ "moduleResolution": "node",
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": ["./lightdm-1.d.ts"]
21
+ }
22
+
23
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./lightdm-1.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "LightDM-1",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+