-
Notifications
You must be signed in to change notification settings - Fork 0
/
GnomeDesktop-3.0.d.ts
1610 lines (1302 loc) · 54.7 KB
/
GnomeDesktop-3.0.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// @ts-nocheck
/*
* Type Definitions for node-gtk (https://github.com/romgrk/node-gtk)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in ts-for-gir itself or create a bug report on https://github.com/sammydre/ts-for-gjs
*/
/**
* GnomeDesktop-3.0
*/
import type Gtk from './Gtk-3.0';
import type xlib from './xlib-2.0';
import type Gdk from './Gdk-3.0';
import type cairo from './cairo-1.0';
import type Pango from './Pango-1.0';
import type HarfBuzz from './HarfBuzz-0.0';
import type GObject from './GObject-2.0';
import type GLib from './GLib-2.0';
import type Gio from './Gio-2.0';
import type GdkPixbuf from './GdkPixbuf-2.0';
import type GModule from './GModule-2.0';
import type Atk from './Atk-1.0';
import type GDesktopEnums from './GDesktopEnums-3.0';
export namespace GnomeDesktop {
enum DesktopThumbnailSize {
NORMAL,
LARGE,
XLARGE,
XXLARGE,
}
enum RRDpmsMode {
ON,
STANDBY,
SUSPEND,
OFF,
UNKNOWN,
}
enum RRDpmsModeType {
ON,
STANDBY,
SUSPEND,
OFF,
UNKNOWN,
}
enum RRError {
UNKNOWN,
NO_RANDR_EXTENSION,
RANDR_ERROR,
BOUNDS_ERROR,
CRTC_ASSIGNMENT,
NO_MATCHING_CONFIG,
NO_DPMS_EXTENSION,
}
enum RRRotation {
ROTATION_NEXT,
ROTATION_0,
ROTATION_90,
ROTATION_180,
ROTATION_270,
REFLECT_X,
REFLECT_Y,
}
const DESKTOP_PLATFORM_VERSION: number
const RR_CONNECTOR_TYPE_PANEL: string
/**
* Returns whether the thumbnail has the correct uri and mtime embedded in the
* png options. This function is threadsafe and does no blocking I/O.
* @param pixbuf an loaded thumbnail #GdkPixbuf
* @param uri a uri
* @param mtime the mtime
*/
function desktopThumbnailIsValid(pixbuf: GdkPixbuf.Pixbuf, uri: string, mtime: number): boolean
/**
* Returns the filename that a thumbnail of size `size` for `uri` would have.
* This function is threadsafe and does no blocking I/O.
* @param uri an uri
* @param size a thumbnail size
*/
function desktopThumbnailPathForUri(uri: string, size: DesktopThumbnailSize): string
/**
* Gets all locales.
*/
function getAllLocales(): string[]
/**
* Gets the country name for `code`. If `translation` is provided the
* returned string is translated accordingly.
* @param code an ISO 3166 code string
* @param translation a locale string
*/
function getCountryFromCode(code: string, translation: string | null): string
/**
* Gets the country description for `locale`. If `translation` is
* provided the returned string is translated accordingly.
* @param locale a locale string
* @param translation a locale string
*/
function getCountryFromLocale(locale: string, translation: string | null): string
/**
* Gets the default input source's type and identifier for a given
* locale.
* @param locale a locale string
*/
function getInputSourceFromLocale(locale: string): [ /* returnType */ boolean, /* type */ string, /* id */ string ]
/**
* Gets the language name for `code`. If `translation` is provided the
* returned string is translated accordingly.
* @param code an ISO 639 code string
* @param translation a locale string
*/
function getLanguageFromCode(code: string, translation: string | null): string
/**
* Gets the language description for `locale`. If `translation` is
* provided the returned string is translated accordingly.
* @param locale a locale string
* @param translation a locale string
*/
function getLanguageFromLocale(locale: string, translation: string | null): string
/**
* Returns an integer with the major version of GNOME. Useful for
* dynamic languages like Javascript or Python (static languages like
* C should use %GNOME_DESKTOP_PLATFORM_VERSION). If this
* function doesn't exist, it can be presumed that the GNOME platform
* version is 42 or previous.
*/
function getPlatformVersion(): number
/**
* Gets a translation of the raw `modifier` string. If `translation`
* is provided the returned string is translated accordingly.
* @param modifier the modifier part of a locale name
* @param translation a locale string
*/
function getTranslatedModifier(modifier: string, translation: string | null): string
/**
* Returns %TRUE if there are translations for language `code`.
* @param code an ISO 639 code string
*/
function languageHasTranslations(code: string): boolean
/**
* Gets the normalized locale string in the form
* [language[_country][.codeset][`modifier]`] for `name`.
* @param locale a locale string
*/
function normalizeLocale(locale: string): string
/**
* Extracts the various components of a locale string of the form
* [language[_country][.codeset][`modifier]`]. See
* http://en.wikipedia.org/wiki/Locale.
* @param locale a locale string
*/
function parseLocale(locale: string): [ /* returnType */ boolean, /* languageCodep */ string, /* countryCodep */ string | null, /* codesetp */ string | null, /* modifierp */ string | null ]
/**
* Returns the #GQuark that will be used for #GError values returned by the
* GnomeRR API.
*/
function rrErrorQuark(): GLib.Quark
/**
* If the current process is running inside a user systemd instance, then move
* the launched PID into a transient scope. The given `name` will be used to
* create a unit name. It should be the application ID or the executable in all
* other cases. If a desktop-id is passed then the .desktop suffix will be
* stripped.
*
* It is advisable to use this function every time where the started application
* can be considered reasonably independent of the launching application. Placing
* it in a scope creates proper separation between the programs rather than being
* considered a single entity by systemd.
*
* It is always safe to call this function. Note that a successful return code
* does not imply that a unit has been created. It solely means that no error
* condition was hit sending the request.
*
* If `connection` is %NULL then g_dbus_get() will be called internally.
*
* Note that most callers will not need to handle errors. As such, it is normal
* to pass a %NULL `callback`.
* @param name Name for the application
* @param pid The PID of the application
* @param description A description to use for the unit, or %NULL
* @param connection An #GDBusConnection to the session bus, or %NULL
* @param cancellable #GCancellable to use
* @param callback Callback to call when the operation is done
*/
function startSystemdScope(name: string, pid: number, description: string | null, connection: Gio.DBusConnection | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void
/**
* Finish an asynchronous operation to create a transient scope that was
* started with gnome_start_systemd_scope().
*
* Note that a successful return code does not imply that a unit has been
* created. It solely means that no error condition was hit sending the request.
* @param res A #GAsyncResult
*/
function startSystemdScopeFinish(res: Gio.AsyncResult): boolean
interface IdleMonitorWatchFunc {
(monitor: IdleMonitor, id: number): void
}
interface BG_ConstructProps extends GObject.Object_ConstructProps {
}
/**
* Signal callback interface for `changed`
*/
interface BG_ChangedSignalCallback {
(): void
}
/**
* Signal callback interface for `transitioned`
*/
interface BG_TransitionedSignalCallback {
(): void
}
interface BG {
// Owm methods of GnomeDesktop-3.0.GnomeDesktop.BG
changesWithTime(): boolean
/**
* Creates a thumbnail for a certain frame, where 'frame' is somewhat
* vaguely defined as 'suitable point to show while single-stepping
* through the slideshow'.
* @param factory
* @param screen
* @param destWidth
* @param destHeight
* @param frameNum
*/
createFrameThumbnail(factory: DesktopThumbnailFactory, screen: Gdk.Screen, destWidth: number, destHeight: number, frameNum: number): GdkPixbuf.Pixbuf
/**
* Create a surface that can be set as background for `window`.
* @param window
* @param width
* @param height
*/
createSurface(window: Gdk.Window, width: number, height: number): cairo.Surface
createThumbnail(factory: DesktopThumbnailFactory, screen: Gdk.Screen, destWidth: number, destHeight: number): GdkPixbuf.Pixbuf
draw(dest: GdkPixbuf.Pixbuf): void
getFilename(): string
getImageSize(factory: DesktopThumbnailFactory, bestWidth: number, bestHeight: number, width: number, height: number): boolean
getPlacement(): GDesktopEnums.BackgroundStyle
getRgba(type: GDesktopEnums.BackgroundShading, primary: Gdk.RGBA, secondary: Gdk.RGBA): void
hasMultipleSizes(): boolean
isDark(destWidth: number, destHeight: number): boolean
loadFromPreferences(settings: Gio.Settings): void
saveToPreferences(settings: Gio.Settings): void
setFilename(filename: string): void
setPlacement(placement: GDesktopEnums.BackgroundStyle): void
setRgba(type: GDesktopEnums.BackgroundShading, primary: Gdk.RGBA, secondary: Gdk.RGBA): void
// Own signals of GnomeDesktop-3.0.GnomeDesktop.BG
connect(sigName: "changed", callback: BG_ChangedSignalCallback): number
on(sigName: "changed", callback: BG_ChangedSignalCallback, after?: boolean): NodeJS.EventEmitter
once(sigName: "changed", callback: BG_ChangedSignalCallback, after?: boolean): NodeJS.EventEmitter
off(sigName: "changed", callback: BG_ChangedSignalCallback): NodeJS.EventEmitter
emit(sigName: "changed", ...args: any[]): void
connect(sigName: "transitioned", callback: BG_TransitionedSignalCallback): number
on(sigName: "transitioned", callback: BG_TransitionedSignalCallback, after?: boolean): NodeJS.EventEmitter
once(sigName: "transitioned", callback: BG_TransitionedSignalCallback, after?: boolean): NodeJS.EventEmitter
off(sigName: "transitioned", callback: BG_TransitionedSignalCallback): NodeJS.EventEmitter
emit(sigName: "transitioned", ...args: any[]): void
// Class property signals of GnomeDesktop-3.0.GnomeDesktop.BG
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class BG extends GObject.Object {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.BG
static name: string
static $gtype: GObject.GType<BG>
// Constructors of GnomeDesktop-3.0.GnomeDesktop.BG
constructor(config?: BG_ConstructProps)
constructor()
static new(): BG
_init(config?: BG_ConstructProps): void
}
interface BGCrossfade_ConstructProps extends GObject.Object_ConstructProps {
// Own constructor properties of GnomeDesktop-3.0.GnomeDesktop.BGCrossfade
/**
* When a crossfade is running, this is height of the fading
* surface.
*/
height?: number | null
/**
* When a crossfade is running, this is width of the fading
* surface.
*/
width?: number | null
}
/**
* Signal callback interface for `finished`
*/
interface BGCrossfade_FinishedSignalCallback {
(window: GObject.Object): void
}
interface BGCrossfade {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.BGCrossfade
/**
* When a crossfade is running, this is height of the fading
* surface.
*/
readonly height: number
/**
* When a crossfade is running, this is width of the fading
* surface.
*/
readonly width: number
// Own fields of GnomeDesktop-3.0.GnomeDesktop.BGCrossfade
parentObject: GObject.Object
priv: BGCrossfadePrivate
// Owm methods of GnomeDesktop-3.0.GnomeDesktop.BGCrossfade
/**
* This function reveals whether or not `fade` is currently
* running on a window. See gnome_bg_crossfade_start() for
* information on how to initiate a crossfade.
*/
isStarted(): boolean
/**
* Before initiating a crossfade with gnome_bg_crossfade_start()
* a start and end surface have to be set. This function sets
* the surface shown at the end of the crossfade effect.
* @param surface The cairo surface to fade to
*/
setEndSurface(surface: cairo.Surface): boolean
/**
* Before initiating a crossfade with gnome_bg_crossfade_start()
* a start and end surface have to be set. This function sets
* the surface shown at the beginning of the crossfade effect.
* @param surface The cairo surface to fade from
*/
setStartSurface(surface: cairo.Surface): boolean
/**
* This function initiates a quick crossfade between two surfaces on
* the background of `window`. Before initiating the crossfade both
* gnome_bg_crossfade_start() and gnome_bg_crossfade_end() need to
* be called. If animations are disabled, the crossfade is skipped,
* and the window background is set immediately to the end surface.
* @param window The #GdkWindow to draw crossfade on
*/
start(window: Gdk.Window): void
/**
* This function stops any in progress crossfades that may be
* happening. It's harmless to call this function if `fade` is
* already stopped.
*/
stop(): void
// Own signals of GnomeDesktop-3.0.GnomeDesktop.BGCrossfade
connect(sigName: "finished", callback: BGCrossfade_FinishedSignalCallback): number
on(sigName: "finished", callback: BGCrossfade_FinishedSignalCallback, after?: boolean): NodeJS.EventEmitter
once(sigName: "finished", callback: BGCrossfade_FinishedSignalCallback, after?: boolean): NodeJS.EventEmitter
off(sigName: "finished", callback: BGCrossfade_FinishedSignalCallback): NodeJS.EventEmitter
emit(sigName: "finished", ...args: any[]): void
// Class property signals of GnomeDesktop-3.0.GnomeDesktop.BGCrossfade
connect(sigName: "notify::height", callback: (...args: any[]) => void): number
on(sigName: "notify::height", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::height", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::height", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::height", ...args: any[]): void
connect(sigName: "notify::width", callback: (...args: any[]) => void): number
on(sigName: "notify::width", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::width", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::width", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::width", ...args: any[]): void
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class BGCrossfade extends GObject.Object {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.BGCrossfade
static name: string
static $gtype: GObject.GType<BGCrossfade>
// Constructors of GnomeDesktop-3.0.GnomeDesktop.BGCrossfade
constructor(config?: BGCrossfade_ConstructProps)
/**
* Creates a new object to manage crossfading a
* window background between two #cairo_surface_ts.
* @constructor
* @param width The width of the crossfading window
* @param height The height of the crossfading window
*/
constructor(width: number, height: number)
/**
* Creates a new object to manage crossfading a
* window background between two #cairo_surface_ts.
* @constructor
* @param width The width of the crossfading window
* @param height The height of the crossfading window
*/
static new(width: number, height: number): BGCrossfade
_init(config?: BGCrossfade_ConstructProps): void
}
interface BGSlideShow_ConstructProps extends GObject.Object_ConstructProps {
// Own constructor properties of GnomeDesktop-3.0.GnomeDesktop.BGSlideShow
file?: Gio.File | null
}
interface BGSlideShow {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.BGSlideShow
readonly file: Gio.File
readonly hasMultipleSizes: boolean
readonly startTime: number
readonly totalDuration: number
// Own fields of GnomeDesktop-3.0.GnomeDesktop.BGSlideShow
parentObject: GObject.Object
priv: BGSlideShowPrivate
// Owm methods of GnomeDesktop-3.0.GnomeDesktop.BGSlideShow
/**
* Returns the current slides progress.
* @param width monitor width
* @param height monitor height
*/
getCurrentSlide(width: number, height: number): [ /* progress */ number, /* duration */ number, /* isFixed */ boolean, /* file1 */ string, /* file2 */ string ]
/**
* gets whether or not the slide show has multiple sizes for different monitors
*/
getHasMultipleSizes(): boolean
/**
* Returns number of slides in slide show
*/
getNumSlides(): number
/**
* Retrieves slide by frame number
* @param frameNumber frame number
* @param width monitor width
* @param height monitor height
*/
getSlide(frameNumber: number, width: number, height: number): [ /* returnType */ boolean, /* progress */ number, /* duration */ number, /* isFixed */ boolean, /* file1 */ string, /* file2 */ string ]
/**
* gets the start time of the slide show
*/
getStartTime(): number
/**
* gets the total duration of the slide show
*/
getTotalDuration(): number
/**
* Tries to load the slide show.
*/
load(): boolean
/**
* Tries to load the slide show asynchronously.
* @param cancellable a #GCancellable
* @param callback the callback
*/
loadAsync(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void
// Class property signals of GnomeDesktop-3.0.GnomeDesktop.BGSlideShow
connect(sigName: "notify::file", callback: (...args: any[]) => void): number
on(sigName: "notify::file", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::file", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::file", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::file", ...args: any[]): void
connect(sigName: "notify::has-multiple-sizes", callback: (...args: any[]) => void): number
on(sigName: "notify::has-multiple-sizes", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::has-multiple-sizes", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::has-multiple-sizes", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::has-multiple-sizes", ...args: any[]): void
connect(sigName: "notify::start-time", callback: (...args: any[]) => void): number
on(sigName: "notify::start-time", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::start-time", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::start-time", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::start-time", ...args: any[]): void
connect(sigName: "notify::total-duration", callback: (...args: any[]) => void): number
on(sigName: "notify::total-duration", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::total-duration", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::total-duration", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::total-duration", ...args: any[]): void
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class BGSlideShow extends GObject.Object {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.BGSlideShow
static name: string
static $gtype: GObject.GType<BGSlideShow>
// Constructors of GnomeDesktop-3.0.GnomeDesktop.BGSlideShow
constructor(config?: BGSlideShow_ConstructProps)
/**
* Creates a new object to manage a slide show.
* window background between two #cairo_surface_ts.
* @constructor
* @param filename The filename of the slide show
*/
constructor(filename: string)
/**
* Creates a new object to manage a slide show.
* window background between two #cairo_surface_ts.
* @constructor
* @param filename The filename of the slide show
*/
static new(filename: string): BGSlideShow
_init(config?: BGSlideShow_ConstructProps): void
}
interface DesktopThumbnailFactory_ConstructProps extends GObject.Object_ConstructProps {
}
interface DesktopThumbnailFactory {
// Own fields of GnomeDesktop-3.0.GnomeDesktop.DesktopThumbnailFactory
parent: GObject.Object
priv: DesktopThumbnailFactoryPrivate
// Owm methods of GnomeDesktop-3.0.GnomeDesktop.DesktopThumbnailFactory
/**
* Returns TRUE if this GnomeDesktopThumbnailFactory can (at least try) to thumbnail
* this file. Thumbnails or files with failed thumbnails won't be thumbnailed.
*
* Usage of this function is threadsafe and does blocking I/O.
* @param uri the uri of a file
* @param mimeType the mime type of the file
* @param mtime the mtime of the file
*/
canThumbnail(uri: string, mimeType: string, mtime: number): boolean
/**
* Creates a failed thumbnail for the file so that we don't try
* to re-thumbnail the file later.
*
* Usage of this function is threadsafe and does blocking I/O.
* @param uri the uri of a file
* @param mtime the modification time of the file
*/
createFailedThumbnail(uri: string, mtime: number): void
/**
* Asynchronous version of gnome_desktop_thumbnail_factory_create_failed_thumbnail()
*
* Since 42.0
* @param uri the uri of a file
* @param originalMtime the modification time of the original file
* @param cancellable a Cancellable object
* @param callback a function that will be called when the task has ended
*/
createFailedThumbnailAsync(uri: string, originalMtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void
/**
* Since 42.0
* @param result the result of the operation
*/
createFailedThumbnailFinish(result: Gio.AsyncResult): void
/**
* Tries to generate a thumbnail for the specified file. If it succeeds
* it returns a pixbuf that can be used as a thumbnail.
*
* Usage of this function is threadsafe and does blocking I/O.
* @param uri the uri of a file
* @param mimeType the mime type of the file
*/
generateThumbnail(uri: string, mimeType: string): GdkPixbuf.Pixbuf
/**
* Asynchronous version of gnome_desktop_thumbnail_factory_generate_thumbnail()
*
* Since 42.0
* @param uri the URI of a file
* @param mimeType the MIME type of the file
* @param cancellable a Cancellable object
* @param callback a function that will be called when the task has ended
*/
generateThumbnailAsync(uri: string, mimeType: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void
generateThumbnailFinish(result: Gio.AsyncResult): GdkPixbuf.Pixbuf
/**
* Tries to locate an failed thumbnail for the file specified. Writing
* and looking for failed thumbnails is important to avoid to try to
* thumbnail e.g. broken images several times.
*
* Usage of this function is threadsafe and does blocking I/O.
* @param uri the uri of a file
* @param mtime the mtime of the file
*/
hasValidFailedThumbnail(uri: string, mtime: number): boolean
/**
* Tries to locate an existing thumbnail for the file specified.
*
* Usage of this function is threadsafe and does blocking I/O.
* @param uri the uri of a file
* @param mtime the mtime of the file
*/
lookup(uri: string, mtime: number): string
/**
* Saves `thumbnail` at the right place. If the save fails a
* failed thumbnail is written.
*
* Usage of this function is threadsafe and does blocking I/O.
* @param thumbnail the thumbnail as a pixbuf
* @param uri the uri of a file
* @param originalMtime the modification time of the original file
*/
saveThumbnail(thumbnail: GdkPixbuf.Pixbuf, uri: string, originalMtime: number): void
/**
* Asynchronous version of gnome_desktop_thumbnail_factory_save_thumbnail()
*
* Since 42.0
* @param thumbnail the thumbnail as a pixbuf
* @param uri the uri of a file
* @param originalMtime the modification time of the original file
* @param cancellable a Cancellable object
* @param callback a function that will be called when the task has ended
*/
saveThumbnailAsync(thumbnail: GdkPixbuf.Pixbuf, uri: string, originalMtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void
/**
* Since 42.0
* @param result the result of the operation
*/
saveThumbnailFinish(result: Gio.AsyncResult): void
// Class property signals of GnomeDesktop-3.0.GnomeDesktop.DesktopThumbnailFactory
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class DesktopThumbnailFactory extends GObject.Object {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.DesktopThumbnailFactory
static name: string
static $gtype: GObject.GType<DesktopThumbnailFactory>
// Constructors of GnomeDesktop-3.0.GnomeDesktop.DesktopThumbnailFactory
constructor(config?: DesktopThumbnailFactory_ConstructProps)
/**
* Creates a new #GnomeDesktopThumbnailFactory.
*
* This function must be called on the main thread and is non-blocking.
* @constructor
* @param size The thumbnail size to use
*/
constructor(size: DesktopThumbnailSize)
/**
* Creates a new #GnomeDesktopThumbnailFactory.
*
* This function must be called on the main thread and is non-blocking.
* @constructor
* @param size The thumbnail size to use
*/
static new(size: DesktopThumbnailSize): DesktopThumbnailFactory
_init(config?: DesktopThumbnailFactory_ConstructProps): void
}
interface IdleMonitor_ConstructProps extends Gio.Initable_ConstructProps, GObject.Object_ConstructProps {
}
interface IdleMonitor extends Gio.Initable {
// Own fields of GnomeDesktop-3.0.GnomeDesktop.IdleMonitor
parent: GObject.Object
priv: IdleMonitorPrivate
// Owm methods of GnomeDesktop-3.0.GnomeDesktop.IdleMonitor
addIdleWatch(intervalMsec: number, callback: IdleMonitorWatchFunc | null): number
addUserActiveWatch(callback: IdleMonitorWatchFunc | null): number
getIdletime(): number
/**
* Removes an idle time watcher, previously added by
* gnome_idle_monitor_add_idle_watch() or
* gnome_idle_monitor_add_user_active_watch().
* @param id A watch ID
*/
removeWatch(id: number): void
// Class property signals of GnomeDesktop-3.0.GnomeDesktop.IdleMonitor
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class IdleMonitor extends GObject.Object {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.IdleMonitor
static name: string
static $gtype: GObject.GType<IdleMonitor>
// Constructors of GnomeDesktop-3.0.GnomeDesktop.IdleMonitor
constructor(config?: IdleMonitor_ConstructProps)
constructor()
static new(): IdleMonitor
_init(config?: IdleMonitor_ConstructProps): void
}
interface PnpIds_ConstructProps extends GObject.Object_ConstructProps {
}
interface PnpIds {
// Own fields of GnomeDesktop-3.0.GnomeDesktop.PnpIds
parent: GObject.Object
priv: PnpIdsPrivate
// Owm methods of GnomeDesktop-3.0.GnomeDesktop.PnpIds
/**
* Find the full manufacturer name for the given PNP ID.
* @param pnpId the PNP ID to look for
*/
getPnpId(pnpId: string): string
// Class property signals of GnomeDesktop-3.0.GnomeDesktop.PnpIds
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class PnpIds extends GObject.Object {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.PnpIds
static name: string
static $gtype: GObject.GType<PnpIds>
// Constructors of GnomeDesktop-3.0.GnomeDesktop.PnpIds
constructor(config?: PnpIds_ConstructProps)
/**
* Returns a reference to a #GnomePnpIds object, or creates
* a new one if none have been created.
* @constructor
*/
constructor()
/**
* Returns a reference to a #GnomePnpIds object, or creates
* a new one if none have been created.
* @constructor
*/
static new(): PnpIds
_init(config?: PnpIds_ConstructProps): void
}
interface RRConfig_ConstructProps extends GObject.Object_ConstructProps {
// Own constructor properties of GnomeDesktop-3.0.GnomeDesktop.RRConfig
screen?: RRScreen | null
}
interface RRConfig {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.RRConfig
readonly screen: RRScreen
// Own fields of GnomeDesktop-3.0.GnomeDesktop.RRConfig
parent: GObject.Object
// Owm methods of GnomeDesktop-3.0.GnomeDesktop.RRConfig
applicable(screen: RRScreen): boolean
apply(screen: RRScreen): boolean
applyPersistent(screen: RRScreen): boolean
ensurePrimary(): boolean
equal(config2: RRConfig): boolean
getClone(): boolean
getOutputs(): RROutputInfo[]
loadCurrent(): boolean
match(config2: RRConfig): boolean
sanitize(): void
setClone(clone: boolean): void
// Class property signals of GnomeDesktop-3.0.GnomeDesktop.RRConfig
connect(sigName: "notify::screen", callback: (...args: any[]) => void): number
on(sigName: "notify::screen", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: "notify::screen", callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: "notify::screen", callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: "notify::screen", ...args: any[]): void
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class RRConfig extends GObject.Object {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.RRConfig
static name: string
static $gtype: GObject.GType<RRConfig>
// Constructors of GnomeDesktop-3.0.GnomeDesktop.RRConfig
constructor(config?: RRConfig_ConstructProps)
static newCurrent(screen: RRScreen): RRConfig
_init(config?: RRConfig_ConstructProps): void
}
interface RROutputInfo_ConstructProps extends GObject.Object_ConstructProps {
}
interface RROutputInfo {
// Own fields of GnomeDesktop-3.0.GnomeDesktop.RROutputInfo
parent: GObject.Object
// Owm methods of GnomeDesktop-3.0.GnomeDesktop.RROutputInfo
getAspectRatio(): number
getDisplayName(): string
/**
* Get the geometry for the monitor connected to the specified output.
* If the monitor is a tiled monitor, it returns the geometry for the complete monitor.
*/
getGeometry(): [ /* x */ number, /* y */ number, /* width */ number, /* height */ number ]
getName(): string
getPreferredHeight(): number
getPreferredWidth(): number
getPrimary(): boolean
getProduct(): string
getRefreshRate(): number
getRotation(): RRRotation
getSerial(): string
getUnderscanning(): boolean
getVendor(): string
isActive(): boolean
isConnected(): boolean
isPrimaryTile(): boolean
setActive(active: boolean): void
/**
* Set the geometry for the monitor connected to the specified output.
* If the monitor is a tiled monitor, it sets the geometry for the complete monitor.
* @param x x offset for monitor
* @param y y offset for monitor
* @param width monitor width
* @param height monitor height
*/
setGeometry(x: number, y: number, width: number, height: number): void
setPrimary(primary: boolean): void
setRefreshRate(rate: number): void
setRotation(rotation: RRRotation): void
setUnderscanning(underscanning: boolean): void
supportsRotation(rotation: RRRotation): boolean
// Class property signals of GnomeDesktop-3.0.GnomeDesktop.RROutputInfo
connect(sigName: string, callback: (...args: any[]) => void): number
on(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
once(sigName: string, callback: (...args: any[]) => void, after?: boolean): NodeJS.EventEmitter
off(sigName: string, callback: (...args: any[]) => void): NodeJS.EventEmitter
emit(sigName: string, ...args: any[]): void
}
class RROutputInfo extends GObject.Object {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.RROutputInfo
static name: string
static $gtype: GObject.GType<RROutputInfo>
// Constructors of GnomeDesktop-3.0.GnomeDesktop.RROutputInfo
constructor(config?: RROutputInfo_ConstructProps)
_init(config?: RROutputInfo_ConstructProps): void
}
interface RRScreen_ConstructProps extends Gio.AsyncInitable_ConstructProps, Gio.Initable_ConstructProps, GObject.Object_ConstructProps {
// Own constructor properties of GnomeDesktop-3.0.GnomeDesktop.RRScreen
dpmsMode?: RRDpmsModeType | null
gdkScreen?: Gdk.Screen | null
}
/**
* Signal callback interface for `changed`
*/
interface RRScreen_ChangedSignalCallback {
(): void
}
/**
* Signal callback interface for `output-connected`
*/
interface RRScreen_OutputConnectedSignalCallback {
(output: object | null): void
}
/**
* Signal callback interface for `output-disconnected`
*/
interface RRScreen_OutputDisconnectedSignalCallback {
(output: object | null): void
}
interface RRScreen extends Gio.AsyncInitable, Gio.Initable {
// Own properties of GnomeDesktop-3.0.GnomeDesktop.RRScreen
dpmsMode: RRDpmsModeType
readonly gdkScreen: Gdk.Screen
// Own fields of GnomeDesktop-3.0.GnomeDesktop.RRScreen
parent: GObject.Object
priv: RRScreenPrivate
// Owm methods of GnomeDesktop-3.0.GnomeDesktop.RRScreen
getCrtcById(id: number): RRCrtc
getDpmsMode(): [ /* returnType */ boolean, /* mode */ RRDpmsMode ]
getOutputById(id: number): RROutput
getOutputByName(name: string): RROutput
/**
* Get the ranges of the screen
*/
getRanges(): [ /* minWidth */ number, /* maxWidth */ number, /* minHeight */ number, /* maxHeight */ number ]
/**
* List available XRandR clone modes
*/
listCloneModes(): RRMode[]
/**
* List all CRTCs
*/
listCrtcs(): RRCrtc[]
/**
* List available XRandR modes
*/
listModes(): RRMode[]
/**
* List all outputs
*/
listOutputs(): RROutput[]
/**
* Refreshes the screen configuration, and calls the screen's callback if it
* exists and if the screen's configuration changed.
*/
refresh(): boolean
/**
* This method also disables the DPMS timeouts.
* @param mode
*/
setDpmsMode(mode: RRDpmsMode): boolean