@@ -10,7 +10,7 @@ import * as BoxPointer from './boxpointer.js';
10
10
11
11
/**
12
12
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L16
13
- * @version 46
13
+ * @version 47
14
14
*/
15
15
export enum Ornament {
16
16
NONE = 0 ,
@@ -22,20 +22,20 @@ export enum Ornament {
22
22
23
23
/**
24
24
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L39
25
- * @version 46
25
+ * @version 47
26
26
*/
27
27
export function arrowIcon ( side : St . Side ) : St . Icon ;
28
28
29
29
/**
30
30
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L67
31
- * @version 46
31
+ * @version 47
32
32
*/
33
33
declare namespace PopupBaseMenuItem {
34
34
export interface ConstructorProps {
35
35
reactive : boolean ;
36
36
activate : boolean ;
37
37
hover : boolean ;
38
- style_class : string ;
38
+ style_class : string | null ;
39
39
can_focus : boolean ;
40
40
}
41
41
}
@@ -50,7 +50,7 @@ declare class PopupBaseMenuItem extends St.BoxLayout {
50
50
sensitive : boolean ;
51
51
52
52
constructor ( params ?: Partial < PopupBaseMenuItem . ConstructorProps > ) ;
53
- override _init ( ... args : any [ ] ) : void ;
53
+ override _init ( params ?: Partial < PopupBaseMenuItem . ConstructorProps > ) : void ;
54
54
55
55
activate ( event : Clutter . Event ) : void ;
56
56
@@ -72,37 +72,41 @@ declare class PopupBaseMenuItem extends St.BoxLayout {
72
72
73
73
/**
74
74
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L285
75
- * @version 46
75
+ * @version 47
76
76
*/
77
77
export namespace PopupMenuItem {
78
78
export interface ConstructorProps extends PopupBaseMenuItem . ConstructorProps { }
79
79
}
80
80
81
81
/**
82
82
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L286
83
- * @version 46
83
+ * @version 47
84
84
*/
85
85
export class PopupMenuItem extends PopupBaseMenuItem {
86
86
constructor ( text : string , params ?: Partial < PopupMenuItem . ConstructorProps > ) ;
87
+ /** @hidden Defined only to resolve type conflicts */
88
+ override _init ( config ?: PopupMenuItem . ConstructorProps ) : void ;
87
89
override _init ( text : string , params ?: Partial < PopupMenuItem . ConstructorProps > ) : void ;
88
90
89
91
readonly label : St . Label ;
90
92
}
91
93
92
94
/**
93
95
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L302
94
- * @version 46
96
+ * @version 47
95
97
*/
96
98
export class PopupSeparatorMenuItem extends PopupBaseMenuItem {
97
99
constructor ( text ?: string ) ;
100
+ /** @hidden Defined only to resolve type conflicts */
101
+ override _init ( config ?: PopupBaseMenuItem . ConstructorProps ) : void ;
98
102
override _init ( text ?: string ) : void ;
99
103
100
104
readonly label : St . Label ;
101
105
}
102
106
103
107
/**
104
108
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L332
105
- * @version 46
109
+ * @version 47
106
110
*/
107
111
export namespace Switch {
108
112
export interface ConstructorProps extends St . Bin . ConstructorProps {
@@ -112,7 +116,7 @@ export namespace Switch {
112
116
113
117
/**
114
118
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L339
115
- * @version 46
119
+ * @version 47
116
120
*/
117
121
export class Switch extends St . Bin {
118
122
state : boolean ;
@@ -121,7 +125,6 @@ export class Switch extends St.Bin {
121
125
override _init ( config ?: Switch . ConstructorProps ) : void ;
122
126
override _init ( state : boolean ) : void ;
123
127
124
- setToggleState ( state : boolean ) : void ;
125
128
toggle ( ) : void ;
126
129
127
130
// General signal handler methods
@@ -137,20 +140,22 @@ export class Switch extends St.Bin {
137
140
138
141
/**
139
142
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L415
140
- * @version 46
143
+ * @version 47
141
144
*/
142
145
export namespace PopupSwitchMenuItem {
143
146
export interface ConstructorProps extends PopupBaseMenuItem . ConstructorProps { }
144
147
}
145
148
146
149
/**
147
150
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L417
148
- * @version 46
151
+ * @version 47
149
152
*/
150
153
export class PopupSwitchMenuItem extends PopupBaseMenuItem {
151
154
readonly state : boolean ;
152
155
153
156
constructor ( text : string , active : boolean , params ?: PopupSwitchMenuItem . ConstructorProps ) ;
157
+ /** @hidden Defined only to resolve type conflicts */
158
+ override _init ( config ?: PopupSwitchMenuItem . ConstructorProps ) : void ;
154
159
override _init ( text : string , active : boolean , params ?: PopupSwitchMenuItem . ConstructorProps ) : void ;
155
160
156
161
setStatus ( text : string ) : void ;
@@ -180,18 +185,20 @@ export namespace PopupImageMenuItem {
180
185
181
186
/**
182
187
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L506
183
- * @version 46
188
+ * @version 47
184
189
*/
185
190
export class PopupImageMenuItem extends PopupBaseMenuItem {
186
191
constructor ( text : string , icon : Gio . Icon | string , params ?: PopupImageMenuItem . ConstructorProps ) ;
187
- override _init ( text : string , icon : Gio . Icon | string , params ?: PopupImageMenuItem . ConstructorProps ) : void ;
192
+ /** @hidden Defined only to resolve type conflicts */
193
+ override _init ( config ?: PopupImageMenuItem . ConstructorProps ) : void ;
194
+ override _init ( text : string , icon : Gio . Icon | string , params ?: PopupImageMenuItem . ConstructorProps ) : void ;
188
195
189
196
setIcon ( icon : Gio . Icon | string ) : void ;
190
197
}
191
198
192
199
/**
193
200
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L542
194
- * @version 46
201
+ * @version 47
195
202
*/
196
203
export namespace PopupMenuBase {
197
204
interface SignalMap { }
@@ -203,7 +210,7 @@ export namespace PopupMenuBase {
203
210
204
211
/**
205
212
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L542
206
- * @version 46
213
+ * @version 47
207
214
*/
208
215
export class PopupMenuBase < S extends Signals . SignalMap < S > = PopupMenuBase . SignalMap > extends Signals . EventEmitter < S > {
209
216
protected constructor ( sourceActor : St . Widget , styleClass ?: string ) ;
@@ -217,7 +224,6 @@ export class PopupMenuBase<S extends Signals.SignalMap<S> = PopupMenuBase.Signal
217
224
readonly firstMenuItem : PopupBaseMenuItem | PopupMenuSection ;
218
225
readonly numMenuItems : number ;
219
226
220
- _getMenuItems ( ) : ( PopupBaseMenuItem | PopupMenuSection ) [ ] ;
221
227
getSensitive ( ) : boolean ;
222
228
setSensitive ( sensitive : boolean ) : void ;
223
229
addAction ( title : string , callback : ( ) => void , icon ?: Gio . Icon ) : void ;
@@ -226,22 +232,23 @@ export class PopupMenuBase<S extends Signals.SignalMap<S> = PopupMenuBase.Signal
226
232
itemActivated ( animate : boolean ) : void ;
227
233
moveMenuItem ( item : PopupMenuBase . MenuItemType , position : number ) : void ;
228
234
addMenuItem ( item : PopupMenuBase . MenuItemType , position ?: number ) : void ;
235
+ _getMenuItems ( ) : ( PopupBaseMenuItem | PopupMenuSection ) [ ] ;
229
236
removeAll ( ) : void ;
230
237
toggle ( ) : void ;
231
238
destroy ( ) : void ;
232
239
}
233
240
234
241
/**
235
242
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L871
236
- * @version 46
243
+ * @version 47
237
244
*/
238
245
export namespace PopupMenu {
239
246
interface SignalMap extends PopupMenuBase . SignalMap { }
240
247
}
241
248
242
249
/**
243
250
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L871
244
- * @version 46
251
+ * @version 47
245
252
*/
246
253
export class PopupMenu < S extends Signals . SignalMap < S > = PopupMenu . SignalMap > extends PopupMenuBase < S > {
247
254
constructor ( sourceActor : St . Widget , arrowAlignment : number , arrowSide : St . Side ) ;
@@ -256,7 +263,7 @@ export class PopupMenu<S extends Signals.SignalMap<S> = PopupMenu.SignalMap> ext
256
263
257
264
/**
258
265
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L1015
259
- * @version 46
266
+ * @version 47
260
267
*/
261
268
export class PopupDummyMenu extends Signals . EventEmitter {
262
269
constructor ( sourceActor : St . Widget ) ;
@@ -273,15 +280,15 @@ export class PopupDummyMenu extends Signals.EventEmitter {
273
280
274
281
/**
275
282
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L1053
276
- * @version 46
283
+ * @version 47
277
284
*/
278
285
export namespace PopupSubMenu {
279
286
interface SignalMap extends PopupMenuBase . SignalMap { }
280
287
}
281
288
282
289
/**
283
290
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L1053
284
- * @version 46
291
+ * @version 47
285
292
*/
286
293
export class PopupSubMenu < S extends Signals . SignalMap < S > = PopupSubMenu . SignalMap > extends PopupMenuBase < S > {
287
294
actor : St . ScrollView ;
@@ -297,7 +304,7 @@ export class PopupSubMenu<S extends Signals.SignalMap<S> = PopupSubMenu.SignalMa
297
304
298
305
/**
299
306
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L1192
300
- * @version 46
307
+ * @version 47
301
308
*/
302
309
export namespace PopupMenuSection {
303
310
interface SignalMap extends PopupMenuBase . SignalMap { }
@@ -312,7 +319,7 @@ export namespace PopupMenuSection {
312
319
* to the user
313
320
*
314
321
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L1192
315
- * @version 46
322
+ * @version 47
316
323
*/
317
324
export class PopupMenuSection < S extends Signals . SignalMap < S > = PopupMenuSection . SignalMap > extends PopupMenuBase < S > {
318
325
constructor ( ) ;
@@ -325,14 +332,16 @@ export class PopupMenuSection<S extends Signals.SignalMap<S> = PopupMenuSection.
325
332
326
333
/**
327
334
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L1215
328
- * @version 46
335
+ * @version 47
329
336
*/
330
337
export class PopupSubMenuMenuItem extends PopupBaseMenuItem {
331
338
readonly menu : PopupSubMenu ;
332
339
333
340
readonly label : St . Label ;
334
341
335
342
constructor ( text : string , wantIcon ?: boolean ) ;
343
+ /** @hidden Defined only to resolve type conflicts */
344
+ override _init ( config ?: PopupBaseMenuItem . ConstructorProps ) : void ;
336
345
override _init ( text : string , wantIcon ?: boolean ) : void ;
337
346
338
347
syncSensitive ( ) : boolean ;
@@ -342,7 +351,7 @@ export class PopupSubMenuMenuItem extends PopupBaseMenuItem {
342
351
343
352
/**
344
353
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/popupMenu.js#L1321
345
- * @version 46
354
+ * @version 47
346
355
*/
347
356
export namespace PopupMenuManager {
348
357
export interface ConstructorProps {
0 commit comments