forked from Gr3q/types-cjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSt-1.0.d.ts
3176 lines (2932 loc) · 116 KB
/
St-1.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
/** Generated with https://github.com/Gr3q/GIR2TS - If possible do not modify. */
declare namespace imports.gi.St {
/** This construct is only for enabling class multi-inheritance,
* use {@link Adjustment} instead.
*/
interface IAdjustment {
lower: number;
page_increment: number;
page_size: number;
step_increment: number;
upper: number;
value: number;
add_transition(name: string, transition: Clutter.Transition): void;
/**
* Adjusts the adjustment using delta values from a scroll event.
* You should use this instead of using {@link St.Adjustment.set_value}
* as this method will tweak the values directly using the same
* math as GTK+, to ensure that scrolling is consistent across
* the environment.
* @param delta A delta, retrieved directly from {@link Clutter.event.get_scroll_delta}
* or similar.
*/
adjust_for_scroll_event(delta: number): void;
clamp_page(lower: number, upper: number): void;
get_transition(name: string): Clutter.Transition | null;
get_value(): number;
/**
* Gets all of #adjustment's values at once.
* @returns the current value
*
* the lower bound
*
* the upper bound
*
* the step increment
*
* the page increment
*
* the page size
*/
get_values(): [ value: number, lower: number, upper: number, step_increment: number, page_increment: number, page_size: number ];
remove_transition(name: string): void;
set_value(value: number): void;
set_values(value: number, lower: number, upper: number, step_increment: number, page_increment: number, page_size: number): void;
/**
* Emitted when any of the adjustment values have changed
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
*
* @returns Callback ID
*/
connect(signal: "changed", callback: (owner: this) => void): number;
connect(signal: "notify::lower", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::page-increment", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::page-size", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::step-increment", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::upper", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::value", callback: (owner: this, ...args: any) => void): number;
}
type AdjustmentInitOptionsMixin = GObject.ObjectInitOptions & Clutter.AnimatableInitOptions &
Pick<IAdjustment,
"lower" |
"page_increment" |
"page_size" |
"step_increment" |
"upper" |
"value">;
export interface AdjustmentInitOptions extends AdjustmentInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Adjustment} instead.
*/
type AdjustmentMixin = IAdjustment & GObject.Object & Clutter.Animatable;
interface Adjustment extends AdjustmentMixin {}
class Adjustment {
public constructor(options?: Partial<AdjustmentInitOptions>);
public static new(value: number, lower: number, upper: number, step_increment: number, page_increment: number, page_size: number): Adjustment;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link BackgroundBlurEffect} instead.
*/
interface IBackgroundBlurEffect {
readonly actor: Clutter.Actor;
readonly bg_texture: Cogl.Texture;
readonly corner_texture: Cogl.Texture;
readonly pixel_step_uniform: number;
readonly blur_size: number;
readonly border_radius: number[];
readonly bg_posx: number;
readonly bg_posy: number;
readonly bg_width: number;
readonly bg_height: number;
readonly pipeline1: Cogl.Pipeline;
connect(signal: "notify::actor", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_texture", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::corner_texture", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::pixel_step_uniform", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::blur_size", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::border_radius", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_posx", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_posy", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_width", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_height", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::pipeline1", callback: (owner: this, ...args: any) => void): number;
}
type BackgroundBlurEffectInitOptionsMixin = Clutter.OffscreenEffectInitOptions
export interface BackgroundBlurEffectInitOptions extends BackgroundBlurEffectInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link BackgroundBlurEffect} instead.
*/
type BackgroundBlurEffectMixin = IBackgroundBlurEffect & Clutter.OffscreenEffect;
interface BackgroundBlurEffect extends BackgroundBlurEffectMixin {}
class BackgroundBlurEffect {
public constructor(options?: Partial<BackgroundBlurEffectInitOptions>);
public static new(actor: Clutter.Actor): Clutter.Effect;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link BackgroundBumpmapEffect} instead.
*/
interface IBackgroundBumpmapEffect {
readonly actor: Clutter.Actor;
readonly bg_texture: Cogl.Texture;
readonly corner_texture: Cogl.Texture;
readonly bg_bumpmap: Cogl.Handle;
readonly bumpmap_path: string;
readonly pixel_step_uniform0: number;
readonly BumpTex_uniform: number;
readonly bump_step_uniform: number;
readonly border_radius: number[];
readonly bg_posx: number;
readonly bg_posy: number;
readonly bg_width: number;
readonly bg_height: number;
readonly bumptex_width: number;
readonly bumptex_height: number;
readonly pipeline0: Cogl.Pipeline;
connect(signal: "notify::actor", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_texture", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::corner_texture", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_bumpmap", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bumpmap_path", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::pixel_step_uniform0", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::BumpTex_uniform", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bump_step_uniform", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::border_radius", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_posx", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_posy", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_width", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bg_height", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bumptex_width", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::bumptex_height", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::pipeline0", callback: (owner: this, ...args: any) => void): number;
}
type BackgroundBumpmapEffectInitOptionsMixin = Clutter.OffscreenEffectInitOptions
export interface BackgroundBumpmapEffectInitOptions extends BackgroundBumpmapEffectInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link BackgroundBumpmapEffect} instead.
*/
type BackgroundBumpmapEffectMixin = IBackgroundBumpmapEffect & Clutter.OffscreenEffect;
interface BackgroundBumpmapEffect extends BackgroundBumpmapEffectMixin {}
class BackgroundBumpmapEffect {
public constructor(options?: Partial<BackgroundBumpmapEffectInitOptions>);
public static new(actor: Clutter.Actor): Clutter.Effect;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Bin} instead.
*/
interface IBin {
/**
* The child #ClutterActor of the {@link Bin} container.
*/
child: Clutter.Actor | null;
/**
* The horizontal alignment of the {@link Bin} child.
*/
x_align: Align;
/**
* Whether the child should fill the horizontal allocation
*/
x_fill: boolean;
/**
* The vertical alignment of the {@link Bin} child.
*/
y_align: Align;
/**
* Whether the child should fill the vertical allocation
*/
y_fill: boolean;
/**
* Retrieves the horizontal and vertical alignment of the child
* inside a {@link Bin}, as set by {@link St.Bin.set_alignment}.
* @param x_align return location for the horizontal alignment, or %NULL
* @param y_align return location for the vertical alignment, or %NULL
*/
get_alignment(x_align: Align, y_align: Align): void;
/**
* Retrieves a pointer to the child of #bin.
* @returns a #ClutterActor, or %NULL
*/
get_child(): Clutter.Actor;
/**
* Retrieves the horizontal and vertical fill settings
* @returns return location for the horizontal fill, or %NULL
*
* return location for the vertical fill, or %NULL
*/
get_fill(): [ x_fill: boolean, y_fill: boolean ];
/**
* Sets the horizontal and vertical alignment of the child
* inside a {@link Bin}.
* @param x_align horizontal alignment
* @param y_align vertical alignment
*/
set_alignment(x_align: Align, y_align: Align): void;
/**
* Sets #child as the child of #bin.
*
* If #bin already has a child, the previous child is removed.
* @param child a #ClutterActor, or %NULL
*/
set_child(child?: Clutter.Actor | null): void;
/**
* Sets whether the child of #bin should fill out the horizontal
* and/or vertical allocation of the parent
* @param x_fill %TRUE if the child should fill horizontally the #bin
* @param y_fill %TRUE if the child should fill vertically the #bin
*/
set_fill(x_fill: boolean, y_fill: boolean): void;
connect(signal: "notify::child", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::x-align", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::x-fill", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::y-align", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::y-fill", callback: (owner: this, ...args: any) => void): number;
}
type BinInitOptionsMixin = WidgetInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions &
Pick<IBin,
"child" |
"x_align" |
"x_fill" |
"y_align" |
"y_fill">;
export interface BinInitOptions extends BinInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Bin} instead.
*/
type BinMixin = IBin & Widget & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable;
/**
* The {@link Bin} struct contains only private data
*/
interface Bin extends BinMixin {}
class Bin {
public constructor(options?: Partial<BinInitOptions>);
/**
* Creates a new {@link Bin}, a simple container for one child.
* @returns the newly created {@link Bin} actor
*/
public static new(): Widget;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link BorderImage} instead.
*/
interface IBorderImage {
/**
* Check if two border_image objects are identical.
* @param other a different {@link Border_Image}
* @returns %TRUE if the two border image objects are identical
*/
equal(other: BorderImage): boolean;
get_borders(border_top: number, border_right: number, border_bottom: number, border_left: number): void;
get_filename(): string;
}
type BorderImageInitOptionsMixin = GObject.ObjectInitOptions
export interface BorderImageInitOptions extends BorderImageInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link BorderImage} instead.
*/
type BorderImageMixin = IBorderImage & GObject.Object;
interface BorderImage extends BorderImageMixin {}
class BorderImage {
public constructor(options?: Partial<BorderImageInitOptions>);
public static new(filename: string, border_top: number, border_right: number, border_bottom: number, border_left: number): BorderImage;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link BoxLayout} instead.
*/
interface IBoxLayout {
pack_start: boolean;
vertical: boolean;
/**
* Get the value of the {@link BoxLayout.pack_start} property.
* @returns %TRUE if pack-start is enabled
*/
get_pack_start(): boolean;
/**
* Get the value of the {@link BoxLayout.vertical} property.
* @returns %TRUE if the layout is vertical
*/
get_vertical(): boolean;
/**
* Adds #actor to #self at position #pos. If #pos is
* negative or larger than the number of elements in the
* list then #actor is added after all the others previously
* added.
* @param actor A #ClutterActor
* @param pos position to insert actor
*/
insert_actor(actor: Clutter.Actor, pos: number): void;
/**
* Adds #actor to #self at the position before #sibling.
* #sibling cannot be %NULL and must be already a child
* of #self.
* @param actor A #ClutterActor
* @param sibling A previously added #ClutterActor
*/
insert_before(actor: Clutter.Actor, sibling: Clutter.Actor): void;
/**
* Set the value of the {@link BoxLayout.pack_start} property.
* @param pack_start %TRUE if the layout should use pack-start
*/
set_pack_start(pack_start: boolean): void;
/**
* Set the value of the {@link BoxLayout.vertical} property
* @param vertical %TRUE if the layout should be vertical
*/
set_vertical(vertical: boolean): void;
connect(signal: "notify::pack-start", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::vertical", callback: (owner: this, ...args: any) => void): number;
}
type BoxLayoutInitOptionsMixin = ViewportInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions & ScrollableInitOptions &
Pick<IBoxLayout,
"pack_start" |
"vertical">;
export interface BoxLayoutInitOptions extends BoxLayoutInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link BoxLayout} instead.
*/
type BoxLayoutMixin = IBoxLayout & Viewport & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable & Scrollable;
/**
* The contents of this structure are private and should only be accessed
* through the public API.
*/
interface BoxLayout extends BoxLayoutMixin {}
class BoxLayout {
public constructor(options?: Partial<BoxLayoutInitOptions>);
/**
* Create a new {@link BoxLayout}.
* @returns a newly allocated {@link BoxLayout}
*/
public static new(): Widget;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link BoxLayoutChild} instead.
*/
interface IBoxLayoutChild {
expand: boolean;
x_align: Align;
x_fill: boolean;
y_align: Align;
y_fill: boolean;
connect(signal: "notify::expand", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::x-align", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::x-fill", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::y-align", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::y-fill", callback: (owner: this, ...args: any) => void): number;
}
type BoxLayoutChildInitOptionsMixin = Clutter.ChildMetaInitOptions &
Pick<IBoxLayoutChild,
"expand" |
"x_align" |
"x_fill" |
"y_align" |
"y_fill">;
export interface BoxLayoutChildInitOptions extends BoxLayoutChildInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link BoxLayoutChild} instead.
*/
type BoxLayoutChildMixin = IBoxLayoutChild & Clutter.ChildMeta;
/**
* The contents of this structure are private and should only be accessed
* through the public API.
*/
interface BoxLayoutChild extends BoxLayoutChildMixin {}
class BoxLayoutChild {
public constructor(options?: Partial<BoxLayoutChildInitOptions>);
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Button} instead.
*/
interface IButton {
button_mask: ButtonMask;
checked: boolean;
label: string;
readonly pressed: boolean;
toggle_mode: boolean;
/**
* If this widget is holding a pointer grab, this function will
* will ungrab it, and reset the pressed state. The effect is
* similar to if the user had released the mouse button, but without
* emitting the clicked signal.
*
* This function is useful if for example you want to do something
* after the user is holding the mouse button for a given period of
* time, breaking the grab.
*/
fake_release(): void;
/**
* Gets the mask of mouse buttons that #button emits the
* {@link Button.clicked} signal for.
* @returns the mask of mouse buttons that #button emits the
* {@link Button.clicked} signal for.
*/
get_button_mask(): ButtonMask;
/**
* Get the state of the button that is in toggle mode.
* @returns %TRUE if the button is checked, or %FALSE if not
*/
get_checked(): boolean;
/**
* Get the text displayed on the button
* @returns the text for the button. This must not be freed by the application
*/
get_label(): string;
/**
* Get the toggle mode status of the button.
* @returns %TRUE if toggle mode is set, otherwise %FALSE
*/
get_toggle_mode(): boolean;
/**
* Sets which mouse buttons #button emits {@link Button.clicked} for.
* @param mask the mask of mouse buttons that #button responds to
*/
set_button_mask(mask: ButtonMask): void;
/**
* Sets the pressed state of the button. This is only really useful if the
* button has #toggle-mode mode set to %TRUE.
* @param checked %TRUE or %FALSE
*/
set_checked(checked: boolean): void;
/**
* Sets the text displayed on the button
* @param text text to set the label to
*/
set_label(text: string): void;
/**
* Enables or disables toggle mode for the button. In toggle mode, the active
* state will be "toggled" when the user clicks the button.
* @param toggle %TRUE or %FALSE
*/
set_toggle_mode(toggle: boolean): void;
/**
* Emitted when the user activates the button, either with a mouse press and
* release or with the keyboard.
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
* - clicked_button: the mouse button that was used
*
* @returns Callback ID
*/
connect(signal: "clicked", callback: (owner: this, clicked_button: number) => void): number;
connect(signal: "notify::button-mask", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::checked", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::label", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::pressed", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::toggle-mode", callback: (owner: this, ...args: any) => void): number;
}
type ButtonInitOptionsMixin = BinInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions &
Pick<IButton,
"button_mask" |
"checked" |
"label" |
"toggle_mode">;
export interface ButtonInitOptions extends ButtonInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Button} instead.
*/
type ButtonMixin = IButton & Bin & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable;
/**
* The contents of this structure is private and should only be accessed using
* the provided API.
*/
interface Button extends ButtonMixin {}
class Button {
public constructor(options?: Partial<ButtonInitOptions>);
/**
* Create a new button
* @returns a new {@link Button}
*/
public static new(): Widget;
/**
* Create a new {@link Button} with the specified label
* @param text text to set the label to
* @returns a new {@link Button}
*/
public static new_with_label(text: string): Widget;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Clipboard} instead.
*/
interface IClipboard {
/**
* Request the data from the clipboard in text form. #callback is executed
* when the data is retreived.
* @param type The type of clipboard data you want
* @param callback function to be called when the text is retreived
*/
get_text(type: ClipboardType, callback: ClipboardCallbackFunc): void;
/**
* Sets the clipboard content.
* @param type The type of clipboard that you want to set
* @param mimetype content mimetype
* @param bytes content data
*/
set_content(type: ClipboardType, mimetype: string, bytes: GLib.Bytes): void;
/**
* Sets text as the current contents of the clipboard.
* @param type The type of clipboard that you want to set
* @param text text to copy to the clipboard
*/
set_text(type: ClipboardType, text: string): void;
}
type ClipboardInitOptionsMixin = GObject.ObjectInitOptions
export interface ClipboardInitOptions extends ClipboardInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Clipboard} instead.
*/
type ClipboardMixin = IClipboard & GObject.Object;
/**
* The contents of this structure is private and should only be accessed using
* the provided API.
*/
interface Clipboard extends ClipboardMixin {}
class Clipboard {
public constructor(options?: Partial<ClipboardInitOptions>);
/**
* Get the global {@link Clipboard} object that represents the clipboard.
* @returns a {@link Clipboard} owned by St and must not be
* unrefferenced or freed.
*/
public static get_default(): Clipboard;
public static set_selection(selection: Meta.Selection): void;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link DrawingArea} instead.
*/
interface IDrawingArea {
/**
* Gets the Cairo context to paint to. This function must only be called
* from a signal hander for the ::repaint signal.
* @returns the Cairo context for the paint operation
*/
get_context(): cairo.Context;
/**
* Gets the size of the cairo surface being painted to, which is equal
* to the size of the content area of the widget. This function must
* only be called from a signal hander for the ::repaint signal.
* @returns location to store the width of the painted area
*
* location to store the height of the painted area
*/
get_surface_size(): [ width: number, height: number ];
/**
* Will cause the actor to emit a ::repaint signal before it is next
* drawn to the scene. Useful if some parameters for the area being
* drawn other than the size or style have changed. Note that
* {@link Clutter.Actor.queue_redraw} will simply result in the same
* contents being drawn to the scene again.
*/
queue_repaint(): void;
connect(signal: "repaint", callback: (owner: this) => void): number;
}
type DrawingAreaInitOptionsMixin = WidgetInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions
export interface DrawingAreaInitOptions extends DrawingAreaInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link DrawingArea} instead.
*/
type DrawingAreaMixin = IDrawingArea & Widget & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable;
interface DrawingArea extends DrawingAreaMixin {}
class DrawingArea {
public constructor(options?: Partial<DrawingAreaInitOptions>);
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Entry} instead.
*/
interface IEntry {
readonly clutter_text: Clutter.Text;
hint_text: string;
text: string;
/**
* Retrieve the internal #ClutterText so that extra parameters can be set
* @returns the #ClutterText used by {@link Entry}. The entry is
* owned by the #StEntry and should not be unref'ed by the application.
*/
get_clutter_text(): Clutter.Text;
/**
* Gets the text that is displayed when the entry is empty and unfocused
* @returns the current value of the hint property. This string is owned by the
* {@link Entry} and should not be freed or modified.
*/
get_hint_text(): string;
/**
* Get the text displayed on the entry
* @returns the text for the entry. This must not be freed by the application
*/
get_text(): string;
/**
* Sets the text to display when the entry is empty and unfocused. When the
* entry is displaying the hint, it has a pseudo class of "indeterminate".
* A value of NULL unsets the hint.
* @param text text to set as the entry hint
*/
set_hint_text(text?: string | null): void;
/**
* Set the primary icon of the entry to #icon
* @param icon a #ClutterActor
*/
set_primary_icon(icon?: Clutter.Actor | null): void;
/**
* Set the primary icon of the entry to the given filename
* @param filename filename of an icon
*/
set_primary_icon_from_file(filename?: string | null): void;
/**
* Set the secondary icon of the entry to #icon
* @param icon an #ClutterActor
*/
set_secondary_icon(icon?: Clutter.Actor | null): void;
/**
* Set the primary icon of the entry to the given filename
* @param filename filename of an icon
*/
set_secondary_icon_from_file(filename?: string | null): void;
/**
* Sets the text displayed on the entry
* @param text text to set the entry to
*/
set_text(text?: string | null): void;
/**
* Emitted when the primary icon is clicked
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
*
* @returns Callback ID
*/
connect(signal: "primary-icon-clicked", callback: (owner: this) => void): number;
/**
* Emitted when the secondary icon is clicked
* @param signal
* @param callback Callback function
* - owner: owner of the emitted event
*
* @returns Callback ID
*/
connect(signal: "secondary-icon-clicked", callback: (owner: this) => void): number;
connect(signal: "notify::clutter-text", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::hint-text", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::text", callback: (owner: this, ...args: any) => void): number;
}
type EntryInitOptionsMixin = WidgetInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions &
Pick<IEntry,
"hint_text" |
"text">;
export interface EntryInitOptions extends EntryInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Entry} instead.
*/
type EntryMixin = IEntry & Widget & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable;
/**
* The contents of this structure is private and should only be accessed using
* the provided API.
*/
interface Entry extends EntryMixin {}
class Entry {
public constructor(options?: Partial<EntryInitOptions>);
/**
* Create a new {@link Entry} with the specified entry
* @param text text to set the entry to
* @returns a new {@link Entry}
*/
public static new(text: string): Widget;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link FocusManager} instead.
*/
interface IFocusManager {
/**
* Adds a new focus group to #manager. When the focus is in an actor
* that is a descendant of #root, #manager will handle moving focus
* from one actor to another within #root based on keyboard events.
* @param root the root container of the group
*/
add_group(root: Widget): void;
/**
* Checks if #widget is inside a focus group, and if so, returns
* the root of that group.
* @param widget an {@link Widget}
* @returns the focus group root, or %NULL if
* #widget is not in a focus group
*/
get_group(widget: Widget): Widget;
/**
* Removes the group rooted at #root from #manager
* @param root the root container of the group
*/
remove_group(root: Widget): void;
}
type FocusManagerInitOptionsMixin = GObject.ObjectInitOptions
export interface FocusManagerInitOptions extends FocusManagerInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link FocusManager} instead.
*/
type FocusManagerMixin = IFocusManager & GObject.Object;
/**
* The {@link FocusManager} struct contains only private data
*/
interface FocusManager extends FocusManagerMixin {}
class FocusManager {
public constructor(options?: Partial<FocusManagerInitOptions>);
/**
* Gets the {@link FocusManager} for #stage, creating it if necessary.
* @param stage a #ClutterStage
* @returns the focus manager for #stage
*/
public static get_for_stage(stage: Clutter.Stage): FocusManager;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Group} instead.
*/
interface IGroup {
}
type GroupInitOptionsMixin = WidgetInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions
export interface GroupInitOptions extends GroupInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Group} instead.
*/
type GroupMixin = IGroup & Widget & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable;
/**
* The {@link Group} struct contains only private data
*/
interface Group extends GroupMixin {}
class Group {
public constructor(options?: Partial<GroupInitOptions>);
/**
* @deprecated
* Use {@link St.Widget.new} instead.
*
* Create a new {@link Group}.
* @returns the newly created {@link Group} actor
*/
public static new(): Widget;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Icon} instead.
*/
interface IIcon {
gicon: Gio.Icon;
icon_name: string;
icon_size: number;
icon_type: IconType;
get_gicon(): Gio.Icon;
get_icon_name(): string;
/**
* Gets the size explicit size on the icon. This is not necesariily
* the size that the icon will actually be displayed at.
* @returns the size explicitly set, or -1 if no size has been set
*/
get_icon_size(): number;
/**
* Gets the type of icon we'll look up to display in the actor.
* See {@link St.Icon.set_icon_type}.
* @returns the icon type.
*/
get_icon_type(): IconType;
set_gicon(gicon?: Gio.Icon | null): void;
set_icon_name(icon_name: string): void;
/**
* Sets an explicit size for the icon.
* @param size if positive, the new size, otherwise the size will be
* derived from the current style
*/
set_icon_size(size: number): void;
/**
* Sets the type of icon we'll look up to display in the actor.
* The icon type determines whether we use a symbolic icon or
* a full color icon and also is used for specific handling for
* application and document icons.
* @param icon_type the type of icon to use
*/
set_icon_type(icon_type: IconType): void;
connect(signal: "notify::gicon", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::icon-name", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::icon-size", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::icon-type", callback: (owner: this, ...args: any) => void): number;
}
type IconInitOptionsMixin = WidgetInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions &
Pick<IIcon,
"gicon" |
"icon_name" |
"icon_size" |
"icon_type">;
export interface IconInitOptions extends IconInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Icon} instead.
*/
type IconMixin = IIcon & Widget & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable;
/**
* The contents of this structure are private and should only be accessed
* through the public API.
*/
interface Icon extends IconMixin {}
class Icon {
public constructor(options?: Partial<IconInitOptions>);
/**
* Create a newly allocated {@link Icon}
* @returns A newly allocated {@link Icon}
*/
public static new(): Clutter.Actor;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link ImageContent} instead.
*/
interface IImageContent {
preferred_height: number;
preferred_width: number;
connect(signal: "notify::preferred-height", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::preferred-width", callback: (owner: this, ...args: any) => void): number;
}
type ImageContentInitOptionsMixin = Clutter.ImageInitOptions & Clutter.ContentInitOptions &
Pick<IImageContent,
"preferred_height" |
"preferred_width">;
export interface ImageContentInitOptions extends ImageContentInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link ImageContent} instead.
*/
type ImageContentMixin = IImageContent & Clutter.Image & Clutter.Content;
interface ImageContent extends ImageContentMixin {}
class ImageContent {
public constructor(options?: Partial<ImageContentInitOptions>);
/**
* Creates a new {@link ImageContent}, a simple content for sized images.
* @param width The preferred width to be used when drawing the content
* @param height The preferred width to be used when drawing the content
* @returns the newly created {@link ImageContent} content
* Use {@link GObject.unref} when done.
*/
public static new_with_preferred_size(width: number, height: number): Clutter.Content;
}
/** This construct is only for enabling class multi-inheritance,
* use {@link Label} instead.
*/
interface ILabel {
readonly clutter_text: Clutter.Text;
text: string;
/**
* Retrieve the internal #ClutterText so that extra parameters can be set
* @returns ethe #ClutterText used by {@link Label}. The label
* is owned by the #StLabel and should not be unref'ed by the application.
*/
get_clutter_text(): Clutter.Text;
/**
* Get the text displayed on the label
* @returns the text for the label. This must not be freed by the application
*/
get_text(): string;
/**
* Sets the text displayed on the label
* @param text text to set the label to
*/
set_text(text: string): void;
connect(signal: "notify::clutter-text", callback: (owner: this, ...args: any) => void): number;
connect(signal: "notify::text", callback: (owner: this, ...args: any) => void): number;
}
type LabelInitOptionsMixin = WidgetInitOptions & Atk.ImplementorIfaceInitOptions & Clutter.AnimatableInitOptions & Clutter.ContainerInitOptions & Clutter.ScriptableInitOptions &
Pick<ILabel,
"text">;
export interface LabelInitOptions extends LabelInitOptionsMixin {}
/** This construct is only for enabling class multi-inheritance,
* use {@link Label} instead.
*/
type LabelMixin = ILabel & Widget & Atk.ImplementorIface & Clutter.Animatable & Clutter.Container & Clutter.Scriptable;
/**
* The contents of this structure is private and should only be accessed using
* the provided API.
*/
interface Label extends LabelMixin {}
class Label {
public constructor(options?: Partial<LabelInitOptions>);
/**
* Create a new {@link Label} with the specified label
* @param text text to set the label to