@ts-for-gir/cli 3.0.0-beta.7 → 3.0.0-beta.9
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 +318 -63
- package/lib/commands/generate.d.ts +5 -5
- package/lib/commands/generate.js +5 -5
- package/lib/commands/generate.js.map +1 -1
- package/lib/config.d.ts +7 -24
- package/lib/config.js +69 -50
- package/lib/config.js.map +1 -1
- package/lib/constants.d.ts +1 -1
- package/lib/constants.js +1 -1
- package/lib/constants.js.map +1 -1
- package/lib/dependency-manager.d.ts +34 -0
- package/lib/dependency-manager.js +78 -0
- package/lib/dependency-manager.js.map +1 -0
- package/lib/generation-handler.js +2 -2
- package/lib/generation-handler.js.map +1 -1
- package/lib/gir-module.d.ts +7 -6
- package/lib/gir-module.js +34 -23
- package/lib/gir-module.js.map +1 -1
- package/lib/messages.d.ts +4 -3
- package/lib/messages.js +4 -3
- package/lib/messages.js.map +1 -1
- package/lib/module-loader.d.ts +11 -8
- package/lib/module-loader.js +53 -50
- package/lib/module-loader.js.map +1 -1
- package/lib/symtable.d.ts +4 -4
- package/lib/symtable.js +1 -1
- package/lib/symtable.js.map +1 -1
- package/lib/template-processor.d.ts +37 -9
- package/lib/template-processor.js +79 -68
- package/lib/template-processor.js.map +1 -1
- package/lib/type-definition-generator.js +34 -26
- package/lib/type-definition-generator.js.map +1 -1
- package/lib/types/class-parent.d.ts +2 -0
- package/lib/types/dependency-map.d.ts +1 -1
- package/lib/types/dependency.d.ts +2 -1
- package/lib/types/file-info.d.ts +14 -0
- package/lib/types/file-info.js +2 -0
- package/lib/types/file-info.js.map +1 -0
- package/lib/types/generate-config.d.ts +6 -6
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/promisify-func.d.ts +5 -0
- package/lib/types/promisify-func.js +2 -0
- package/lib/types/promisify-func.js.map +1 -0
- package/lib/types/user-config.d.ts +6 -6
- package/lib/utils.d.ts +196 -7
- package/lib/utils.js +201 -19
- package/lib/utils.js.map +1 -1
- package/package.json +28 -14
- package/src/commands/generate.ts +5 -5
- package/src/config.ts +95 -68
- package/src/constants.ts +1 -1
- package/src/dependency-manager.ts +91 -0
- package/src/generation-handler.ts +2 -2
- package/src/gir-module.ts +43 -32
- package/src/messages.ts +4 -3
- package/src/module-loader.ts +59 -54
- package/src/symtable.ts +8 -6
- package/src/template-processor.ts +101 -72
- package/src/type-definition-generator.ts +36 -28
- package/src/types/class-parent.ts +2 -0
- package/src/types/dependency-map.ts +1 -1
- package/src/types/dependency.ts +3 -1
- package/src/types/file-info.ts +14 -0
- package/src/types/generate-config.ts +6 -6
- package/src/types/index.ts +1 -0
- package/src/types/user-config.ts +6 -6
- package/src/utils.ts +203 -20
- package/templates/Gjs/Gjs.d.ts +75 -8
- package/templates/Gjs/GnomeShell.d.ts +70 -36
- package/templates/Gjs/index.d.ts +9 -5
- package/templates/Gjs/misc/dbusUtils.d.ts +15 -0
- package/templates/Gjs/misc/dbusUtils.js +6 -0
- package/templates/Gjs/misc/fileUtils.d.ts +51 -0
- package/templates/Gjs/misc/fileUtils.js +6 -0
- package/templates/Gjs/misc/gnomeSession.d.ts +74 -0
- package/templates/Gjs/misc/gnomeSession.js +6 -0
- package/templates/Gjs/misc/parentalControlsManager.d.ts +42 -0
- package/templates/Gjs/misc/parentalControlsManager.js +6 -0
- package/templates/Gjs/misc/signals.d.ts +15 -0
- package/templates/Gjs/misc/signals.js +6 -0
- package/templates/Gjs/module.d.ts +0 -4
- package/templates/Gjs/module.js +1 -1
- package/templates/Gjs/tsconfig.alias.json +10 -0
- package/templates/Gjs/ui/accessDialog.d.ts +19 -0
- package/templates/Gjs/ui/accessDialog.js +6 -0
- package/templates/Gjs/ui/altTab.d.ts +124 -0
- package/templates/Gjs/ui/altTab.js +6 -0
- package/templates/Gjs/ui/animation.d.ts +58 -0
- package/templates/Gjs/ui/animation.js +6 -0
- package/templates/Gjs/ui/appDisplay.d.ts +204 -0
- package/templates/Gjs/ui/appDisplay.js +6 -0
- package/templates/Gjs/ui/appFavorites.d.ts +34 -0
- package/templates/Gjs/ui/appFavorites.js +6 -0
- package/templates/Gjs/ui/appMenu.d.ts +74 -0
- package/templates/Gjs/ui/appMenu.js +6 -0
- package/templates/Gjs/ui/audioDeviceSelection.d.ts +51 -0
- package/templates/Gjs/ui/audioDeviceSelection.js +6 -0
- package/templates/Gjs/ui/background.d.ts +255 -0
- package/templates/Gjs/ui/background.js +5 -0
- package/templates/Gjs/ui/backgroundMenu.d.ts +19 -0
- package/templates/Gjs/ui/backgroundMenu.js +5 -0
- package/templates/Gjs/ui/barLevel.d.ts +42 -0
- package/templates/Gjs/ui/barLevel.js +5 -0
- package/templates/Gjs/ui/boxpointer.d.ts +103 -0
- package/templates/Gjs/ui/boxpointer.js +5 -0
- package/templates/Gjs/ui/calendar.d.ts +261 -0
- package/templates/Gjs/ui/calendar.js +5 -0
- package/templates/Gjs/ui/components/__init__.d.ts +9 -0
- package/templates/Gjs/ui/components/__init__.js +6 -0
- package/templates/Gjs/ui/components/automountManager.d.ts +8 -0
- package/templates/Gjs/ui/components/automountManager.js +6 -0
- package/templates/Gjs/ui/components/autorunManager.d.ts +8 -0
- package/templates/Gjs/ui/components/autorunManager.js +6 -0
- package/templates/Gjs/ui/components/index.d.ts +6 -0
- package/templates/Gjs/ui/components/index.js +6 -0
- package/templates/Gjs/ui/components/keyring.d.ts +19 -0
- package/templates/Gjs/ui/components/keyring.js +6 -0
- package/templates/Gjs/ui/components/networkAgent.d.ts +10 -0
- package/templates/Gjs/ui/components/networkAgent.js +6 -0
- package/templates/Gjs/ui/components/polkitAgent.d.ts +19 -0
- package/templates/Gjs/ui/components/polkitAgent.js +6 -0
- package/templates/Gjs/ui/components/telepathyClient.d.ts +10 -0
- package/templates/Gjs/ui/components/telepathyClient.js +6 -0
- package/templates/Gjs/ui/dialog.d.ts +78 -0
- package/templates/Gjs/ui/dialog.js +0 -0
- package/templates/Gjs/ui/dnd.d.ts +127 -0
- package/templates/Gjs/ui/dnd.js +6 -0
- package/templates/Gjs/ui/iconGrid.d.ts +172 -0
- package/templates/Gjs/ui/iconGrid.js +6 -0
- package/templates/Gjs/ui/layout.d.ts +311 -0
- package/templates/Gjs/ui/layout.js +6 -0
- package/templates/Gjs/ui/main.d.ts +215 -0
- package/templates/Gjs/ui/main.js +6 -0
- package/templates/Gjs/ui/messageList.d.ts +113 -0
- package/templates/Gjs/ui/messageList.js +6 -0
- package/templates/Gjs/ui/messageTray.d.ts +423 -0
- package/templates/Gjs/ui/messageTray.js +6 -0
- package/templates/Gjs/ui/modalDialog.d.ts +96 -0
- package/templates/Gjs/ui/modalDialog.js +6 -0
- package/templates/Gjs/ui/mpris.d.ts +78 -0
- package/templates/Gjs/ui/mpris.js +6 -0
- package/templates/Gjs/ui/notificationDaemon.d.ts +5 -0
- package/templates/Gjs/ui/notificationDaemon.js +6 -0
- package/templates/Gjs/ui/panel.d.ts +65 -0
- package/templates/Gjs/ui/panel.js +6 -0
- package/templates/Gjs/ui/panelMenu.d.ts +51 -0
- package/templates/Gjs/ui/panelMenu.js +6 -0
- package/templates/Gjs/ui/popupMenu.d.ts +228 -0
- package/templates/Gjs/ui/popupMenu.js +6 -0
- package/templates/Gjs/ui/ripples.d.ts +44 -0
- package/templates/Gjs/ui/ripples.js +6 -0
- package/templates/Gjs/ui/search.d.ts +158 -0
- package/templates/Gjs/ui/search.js +6 -0
- package/templates/Gjs/ui/switcherPopup.d.ts +107 -0
- package/templates/Gjs/ui/switcherPopup.js +6 -0
- package/templates/Gjs/ui/userWidget.d.ts +13 -0
- package/templates/Gjs/ui/userWidget.js +6 -0
- package/templates/node-gtk/index.d.ts +3 -3
- package/templates/node-gtk/module.d.ts +0 -4
- package/templates/node-gtk/module.js +1 -1
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/calendar.js
|
|
2
|
+
|
|
3
|
+
<% const GObject = dep.find('GObject') %>
|
|
4
|
+
<% const Gio = dep.find('Gio') %>
|
|
5
|
+
<% const St = dep.find('St') %>
|
|
6
|
+
<% const Clutter = dep.find('Clutter') %>
|
|
7
|
+
|
|
8
|
+
<%_ if(noNamespace){ _%>
|
|
9
|
+
import type * as GObject from '../<%= GObject.packageName %>.js';
|
|
10
|
+
import type * as Gio from '../<%= Gio.packageName %>.js';
|
|
11
|
+
import type * as St from '../<%= St.packageName %>.js';
|
|
12
|
+
import type * as Clutter from '../<%= Clutter.packageName %>.js';
|
|
13
|
+
<%_ } else { _%>
|
|
14
|
+
import type GObject from '../<%= GObject.packageName %>.js';
|
|
15
|
+
import type Gio from '../<%= Gio.packageName %>.js';
|
|
16
|
+
import type St from '../<%= St.packageName %>.js';
|
|
17
|
+
import type Clutter from '../<%= Clutter.packageName %>.js';
|
|
18
|
+
<%_ } _%>
|
|
19
|
+
|
|
20
|
+
import type { Message, MessageListSection } from './messageList.js';
|
|
21
|
+
import type { Notification, MessageTray, Source } from './messageTray.js';
|
|
22
|
+
import type { Switch } from './popupMenu.js';
|
|
23
|
+
import type { MediaSection } from './mpris.js';
|
|
24
|
+
|
|
25
|
+
declare function sameYear(dateA: Date, dateB: Date): boolean;
|
|
26
|
+
|
|
27
|
+
declare function sameMonth(dateA: Date, dateB: Date): boolean;
|
|
28
|
+
|
|
29
|
+
declare function sameDay(dateA: Date, dateB: Date): boolean;
|
|
30
|
+
|
|
31
|
+
declare function _isWorkDay(date: Date): boolean;
|
|
32
|
+
|
|
33
|
+
declare function _getBeginningOfDay(date: Date): Date;
|
|
34
|
+
|
|
35
|
+
declare function _getEndOfDay(date: Date): Date;
|
|
36
|
+
|
|
37
|
+
declare function _getCalendarDayAbbreviation(dayNumber: number): string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Abstraction for an appointment/event in a calendar
|
|
41
|
+
*/
|
|
42
|
+
declare class CalendarEvent {
|
|
43
|
+
public id: string;
|
|
44
|
+
public date: Date;
|
|
45
|
+
public end: Date;
|
|
46
|
+
public summary: string;
|
|
47
|
+
|
|
48
|
+
constructor(id: string, date: Date, end: Date, summary: string);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Interface for appointments/events - e.g. the contents of a calendar
|
|
53
|
+
*/
|
|
54
|
+
declare abstract class EventSourceBase extends GObject.Object {
|
|
55
|
+
|
|
56
|
+
public abstract readonly isLoading: boolean;
|
|
57
|
+
public abstract readonly hasCalendars: boolean;
|
|
58
|
+
|
|
59
|
+
public destroy(): void;
|
|
60
|
+
public abstract requestRange(begin: Date, end: Date): void;
|
|
61
|
+
public abstract getEvents(begin: Date, end: Date): CalendarEvent[];
|
|
62
|
+
public abstract hasEvents(day: Date): boolean;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare class EmptyEventSource extends EventSourceBase {
|
|
66
|
+
public readonly isLoading: boolean;
|
|
67
|
+
public readonly hasCalendars: boolean;
|
|
68
|
+
|
|
69
|
+
public requestRange(begin: Date, end: Date): void;
|
|
70
|
+
public getEvents(begin: Date, end: Date): CalendarEvent[];
|
|
71
|
+
public hasEvents(day: Date): boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare const CalendarServerIface: GObject.Interface;
|
|
75
|
+
|
|
76
|
+
declare const CalendarServerInfo: Gio.DBusNodeInfo;
|
|
77
|
+
|
|
78
|
+
declare function CalendarServer(): Gio.DBusProxy;
|
|
79
|
+
|
|
80
|
+
declare function _datesEqual(dateA: Date, dateB: Date): boolean;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Checks whether an event overlaps a given interval
|
|
84
|
+
*
|
|
85
|
+
* @param e0 Beginning of the event
|
|
86
|
+
* @param e1 End of the event
|
|
87
|
+
* @param i0 Beginning of the interval
|
|
88
|
+
* @param i1 End of the interval
|
|
89
|
+
* @returns Whether there was an overlap
|
|
90
|
+
*/
|
|
91
|
+
declare function _eventOverlapsInterval(e0: Date, e1: Date, i0: Date, i1: Date): boolean;
|
|
92
|
+
|
|
93
|
+
declare class DBusEventSource extends EventSourceBase {
|
|
94
|
+
|
|
95
|
+
protected _events: Map<string, CalendarEvent>
|
|
96
|
+
protected _isLoading: boolean;
|
|
97
|
+
protected _initialized: boolean;
|
|
98
|
+
protected _dbusProxy: Gio.DBusProxy;
|
|
99
|
+
|
|
100
|
+
public readonly isLoading: boolean;
|
|
101
|
+
public readonly hasCalendars: boolean;
|
|
102
|
+
|
|
103
|
+
constructor();
|
|
104
|
+
public _init(): void;
|
|
105
|
+
|
|
106
|
+
public requestRange(begin: Date, end: Date): void;
|
|
107
|
+
public getEvents(begin: Date, end: Date): CalendarEvent[];
|
|
108
|
+
public hasEvents(day: Date): boolean;
|
|
109
|
+
public destroy(): void;
|
|
110
|
+
public requestRange(begin: Date, end: Date): void;
|
|
111
|
+
public getEvents(begin: Date, end: Date): CalendarEvent[];
|
|
112
|
+
public hasEvents(day: Date): boolean;
|
|
113
|
+
|
|
114
|
+
protected _initProxy(): Promise<void>;
|
|
115
|
+
protected _resetCache(): void;
|
|
116
|
+
protected _removeMatching(uidPrefix: string): boolean;
|
|
117
|
+
protected _onNameAppeared(): void;
|
|
118
|
+
protected _onNameVanished(): void;
|
|
119
|
+
protected _onEventsAddedOrUpdated(dbusProxy: Gio.DBusProxy, nameOwner: string, argArray: any[][]): void;
|
|
120
|
+
protected _onEventsRemoved(dbusProxy: Gio.DBusProxy, nameOwner: string, argArray: any[][]): void;
|
|
121
|
+
protected _onClientDisappeared(dbusProxy: Gio.DBusProxy, nameOwner: string, argArray: string[]): void;
|
|
122
|
+
protected _loadEvents(forceReload: boolean): void;
|
|
123
|
+
protected _getFilteredEvents(begin: Date, end: Date): Generator<CalendarEvent, void, unknown>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export class Calendar extends St.Widget {
|
|
127
|
+
|
|
128
|
+
protected _weekStart: number;
|
|
129
|
+
protected _settings: Gio.Settings;
|
|
130
|
+
protected _useWeekdate: boolean;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Translators: The header displaying just the month name
|
|
134
|
+
* standalone, when this is a month of the current year.
|
|
135
|
+
* "%OB" is the new format specifier introduced in glibc 2.27,
|
|
136
|
+
* in most cases you should not change it.
|
|
137
|
+
*/
|
|
138
|
+
protected _headerFormatWithoutYear: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Translators: The header displaying the month name and the year
|
|
142
|
+
* number, when this is a month of a different year. You can
|
|
143
|
+
* reorder the format specifiers or add other modifications
|
|
144
|
+
* according to the requirements of your language.
|
|
145
|
+
* "%OB" is the new format specifier introduced in glibc 2.27,
|
|
146
|
+
* in most cases you should not use the old "%B" here unless you
|
|
147
|
+
* absolutely know what you are doing.
|
|
148
|
+
*/
|
|
149
|
+
protected _headerFormat: string;
|
|
150
|
+
|
|
151
|
+
protected _selectedDate: Date;
|
|
152
|
+
|
|
153
|
+
protected _shouldDateGrabFocus: boolean;
|
|
154
|
+
|
|
155
|
+
constructor();
|
|
156
|
+
/** @hidden */
|
|
157
|
+
public _init(params?: St.Widget.ConstructorProperties): void;
|
|
158
|
+
public _init(): void;
|
|
159
|
+
|
|
160
|
+
public setEventSource(eventSource: EventSourceBase): void;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Sets the calendar to show a specific date
|
|
164
|
+
* @param date The date to show
|
|
165
|
+
*/
|
|
166
|
+
public setDate(date: Date): void;
|
|
167
|
+
|
|
168
|
+
public updateTimeZone(): void;
|
|
169
|
+
|
|
170
|
+
public vfunc_scroll_event(event: Clutter.ScrollEvent): boolean;
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
protected _buildHeader(): void;
|
|
174
|
+
protected _onPrevMonthButtonClicked(): void;
|
|
175
|
+
protected _onNextMonthButtonClicked(): void;
|
|
176
|
+
protected _onSettingsChange(): void;
|
|
177
|
+
protected _rebuildCalendar(): void;
|
|
178
|
+
protected _update(): void;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export class NotificationMessage extends Message {
|
|
182
|
+
/** @hidden */
|
|
183
|
+
override _init(params?: St.Button.ConstructorProperties): void;
|
|
184
|
+
/** @hidden */
|
|
185
|
+
override _init(title: string, body: string): void;
|
|
186
|
+
public _init(notification: Notification): void;
|
|
187
|
+
|
|
188
|
+
public vfunc_clicked(): void;
|
|
189
|
+
public canClose(): boolean;
|
|
190
|
+
|
|
191
|
+
protected _getIcon(): St.Icon;
|
|
192
|
+
protected _onUpdated(n: Notification, _clear?: boolean): void;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
declare class TimeLabel extends St.Label {
|
|
196
|
+
|
|
197
|
+
_datetime: Date;
|
|
198
|
+
|
|
199
|
+
/** @hidden */
|
|
200
|
+
public _init(params?: St.Label.ConstructorProperties): void;
|
|
201
|
+
public _init(datetime: Date): void;
|
|
202
|
+
|
|
203
|
+
public vfunc_map(): void;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
declare class NotificationSection extends MessageListSection {
|
|
207
|
+
|
|
208
|
+
public readonly allowed: boolean;
|
|
209
|
+
|
|
210
|
+
/** @hidden */
|
|
211
|
+
public _init(params?: St.BoxLayout.ConstructorProperties): void;
|
|
212
|
+
public _init(): void;
|
|
213
|
+
|
|
214
|
+
public vfunc_map(): void;
|
|
215
|
+
|
|
216
|
+
protected _sourceAdded(tray: MessageTray, source: Source): void;
|
|
217
|
+
protected _onNotificationAdded(source: Source, notification: Notification): void;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare class Placeholder extends St.BoxLayout {
|
|
221
|
+
protected _date: Date;
|
|
222
|
+
protected _icon: St.Icon;
|
|
223
|
+
protected _label: St.Label;
|
|
224
|
+
|
|
225
|
+
/** @hidden */
|
|
226
|
+
override _init(params?: St.BoxLayout.ConstructorProperties): void;
|
|
227
|
+
public _init(): void;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
declare class DoNotDisturbSwitch extends Switch {
|
|
231
|
+
|
|
232
|
+
protected _settings: Gio.Settings;
|
|
233
|
+
|
|
234
|
+
constructor();
|
|
235
|
+
/** @hidden */
|
|
236
|
+
override _init(config?: St.Bin.ConstructorProperties): void
|
|
237
|
+
/** @hidden */
|
|
238
|
+
override _init(state: boolean): void;
|
|
239
|
+
public _init(): void;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export class CalendarMessageList extends St.Widget {
|
|
243
|
+
|
|
244
|
+
_placeholder: Placeholder;
|
|
245
|
+
_scrollView: St.ScrollView;
|
|
246
|
+
_dndSwitch: DoNotDisturbSwitch;
|
|
247
|
+
_dndButton: St.Button;
|
|
248
|
+
_clearButton: St.Button;
|
|
249
|
+
_sectionList: St.BoxLayout;
|
|
250
|
+
_mediaSection: MediaSection;
|
|
251
|
+
_notificationSection: NotificationSection;
|
|
252
|
+
|
|
253
|
+
visible: boolean;
|
|
254
|
+
|
|
255
|
+
/** @hidden */
|
|
256
|
+
override _init(config?: St.Widget.ConstructorProperties): void
|
|
257
|
+
public _init(): void;
|
|
258
|
+
|
|
259
|
+
protected _addSection(section: MessageListSection): void;
|
|
260
|
+
protected _sync(): void;
|
|
261
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/components/__init__.js
|
|
2
|
+
export class ComponentManager {
|
|
3
|
+
constructor();
|
|
4
|
+
_sessionUpdated(): void;
|
|
5
|
+
_importComponent<T>(name: string): T;
|
|
6
|
+
_ensureComponent<T>(name: string): T;
|
|
7
|
+
_enableComponent(name: string): void;
|
|
8
|
+
_disableComponent(name: string): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * as autorunManager from './autorunManager.js';
|
|
2
|
+
export * as automountManager from './automountManager.js';
|
|
3
|
+
export * as keyring from './keyring.js';
|
|
4
|
+
export * as networkAgent from './networkAgent.js';
|
|
5
|
+
export * as polkitAgent from './polkitAgent.js';
|
|
6
|
+
export * as telepathyClient from './telepathyClient.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/components/keyring.js
|
|
2
|
+
|
|
3
|
+
<% const gcr = dep.find('Gcr') %>
|
|
4
|
+
|
|
5
|
+
<%_ if(noNamespace){ _%>
|
|
6
|
+
import type * as Gcr from '../../<%= gcr.packageName %>.js';
|
|
7
|
+
<%_ } else { _%>
|
|
8
|
+
import type Gcr from '../../<%= gcr.packageName %>.js';
|
|
9
|
+
<%_ } _%>
|
|
10
|
+
|
|
11
|
+
declare class KeyringPrompter extends Gcr.SystemPrompter {
|
|
12
|
+
constructor();
|
|
13
|
+
_init(): void
|
|
14
|
+
|
|
15
|
+
enable(): void
|
|
16
|
+
disable(): void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare const Component: typeof KeyringPrompter
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/components/polkitAgent.js
|
|
2
|
+
|
|
3
|
+
<% const shell = dep.find('Shell') %>
|
|
4
|
+
|
|
5
|
+
<%_ if(noNamespace){ _%>
|
|
6
|
+
import type * as Shell from '../../<%= shell.packageName %>.js';
|
|
7
|
+
<%_ } else { _%>
|
|
8
|
+
import type Shell from '../../<%= shell.packageName %>.js';
|
|
9
|
+
<%_ } _%>
|
|
10
|
+
|
|
11
|
+
declare class AuthenticationAgent extends Shell.PolkitAuthenticationAgent {
|
|
12
|
+
constructor()
|
|
13
|
+
_init(): void
|
|
14
|
+
|
|
15
|
+
enable(): void
|
|
16
|
+
disable(): void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare const Component: typeof AuthenticationAgent
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/dialog.js
|
|
2
|
+
|
|
3
|
+
<% const Clutter = dep.find('Clutter') %>
|
|
4
|
+
<% const St = dep.find('St') %>
|
|
5
|
+
|
|
6
|
+
<%_ if(noNamespace){ _%>
|
|
7
|
+
import type * as Clutter from '../<%= Clutter.packageName %>.js';
|
|
8
|
+
import type * as St from '../<%= St.packageName %>.js';
|
|
9
|
+
<%_ } else { _%>
|
|
10
|
+
import type Clutter from '../<%= Clutter.packageName %>.js';
|
|
11
|
+
import type St from '../<%= St.packageName %>.js';
|
|
12
|
+
<%_ } _%>
|
|
13
|
+
|
|
14
|
+
export interface ButtonInfo {
|
|
15
|
+
action: () => void;
|
|
16
|
+
label: string;
|
|
17
|
+
key?: number;
|
|
18
|
+
modifiers?: Clutter.ModifierType;
|
|
19
|
+
default?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class Dialog extends St.Widget {
|
|
23
|
+
|
|
24
|
+
protected _parentActor: St.Widget;
|
|
25
|
+
protected _dialog: St.BoxLayout;
|
|
26
|
+
protected _initialKeyFocus: St.Widget;
|
|
27
|
+
|
|
28
|
+
public contentLayout: St.BoxLayout;
|
|
29
|
+
public buttonLayout: St.Widget;
|
|
30
|
+
public readonly initialKeyFocus: St.Widget;
|
|
31
|
+
|
|
32
|
+
public _init(parentActor: St.Widget, styleClass?: string | null): void;
|
|
33
|
+
public makeInactive(): void;
|
|
34
|
+
public vfunc_event(event: Clutter.Event): boolean;
|
|
35
|
+
public addButton(buttonInfo: ButtonInfo): void;
|
|
36
|
+
public clearButtons(): void;
|
|
37
|
+
|
|
38
|
+
protected _createDialog(): void;
|
|
39
|
+
protected _onDestroy(): void;
|
|
40
|
+
protected _setInitialKeyFocus(actor: St.Widget): void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class MessageDialogContent extends St.BoxLayout {
|
|
44
|
+
public title: string;
|
|
45
|
+
public description: string;
|
|
46
|
+
|
|
47
|
+
constructor(params: St.BoxLayout.ConstructorProperties);
|
|
48
|
+
public _init(params: St.BoxLayout.ConstructorProperties): void;
|
|
49
|
+
|
|
50
|
+
protected _onDestroy(): void;
|
|
51
|
+
protected _updateTitleStyle(): void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export class ListSection extends St.BoxLayout {
|
|
55
|
+
|
|
56
|
+
protected _listScrollView: St.ScrollView;
|
|
57
|
+
protected _title: St.Label;
|
|
58
|
+
|
|
59
|
+
public list: St.BoxLayout;
|
|
60
|
+
public title: string;
|
|
61
|
+
public label_actor: St.Label;
|
|
62
|
+
|
|
63
|
+
constructor(params: St.BoxLayout.ConstructorProperties);
|
|
64
|
+
public _init(params: St.BoxLayout.ConstructorProperties): void;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class ListSectionItem extends St.BoxLayout {
|
|
68
|
+
|
|
69
|
+
protected _iconActorBin: St.Bin;
|
|
70
|
+
protected _title: St.Label;
|
|
71
|
+
|
|
72
|
+
public title: string;
|
|
73
|
+
public description: string;
|
|
74
|
+
public iconActor: St.Widget;
|
|
75
|
+
|
|
76
|
+
constructor(params: { style_class?: string | null });
|
|
77
|
+
public _init(params: { style_class?: string | null }): void;
|
|
78
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/dnd.js
|
|
2
|
+
|
|
3
|
+
<% const Meta = dep.find('Meta') %>
|
|
4
|
+
<% const Clutter = dep.find('Clutter') %>
|
|
5
|
+
|
|
6
|
+
<%_ if(noNamespace){ _%>
|
|
7
|
+
import type * as Meta from '../<%= Meta.packageName %>.js';
|
|
8
|
+
import type * as Clutter from '../<%= Clutter.packageName %>.js';
|
|
9
|
+
<%_ } else { _%>
|
|
10
|
+
import type Meta from '../<%= Meta.packageName %>.js';
|
|
11
|
+
import type Clutter from '../<%= Clutter.packageName %>.js';
|
|
12
|
+
<%_ } _%>
|
|
13
|
+
|
|
14
|
+
import { EventEmitter } from '../misc/signals.js';
|
|
15
|
+
|
|
16
|
+
export enum DragMotionResult {
|
|
17
|
+
NO_DROP = 0,
|
|
18
|
+
COPY_DROP = 1,
|
|
19
|
+
MOVE_DROP = 2,
|
|
20
|
+
CONTINUE = 3,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export enum DragState {
|
|
24
|
+
INIT = 0,
|
|
25
|
+
DRAGGING = 1,
|
|
26
|
+
CANCELLED = 2,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export enum DragDropResult {
|
|
30
|
+
FAILURE = 0,
|
|
31
|
+
SUCCESS = 1,
|
|
32
|
+
CONTINUE = 2,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function addDragMonitor(monitor: _Draggable): void;
|
|
36
|
+
|
|
37
|
+
export function removeDragMonitor(monitor: _Draggable): void;
|
|
38
|
+
|
|
39
|
+
declare namespace _Draggable {
|
|
40
|
+
export interface ConstructorProperties {
|
|
41
|
+
manualMode?: boolean;
|
|
42
|
+
timeoutThreshold?: number;
|
|
43
|
+
restoreOnSuccess?: boolean;
|
|
44
|
+
dragActorMaxSize?: number;
|
|
45
|
+
dragActorOpacity?: number;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare class _Draggable extends EventEmitter {
|
|
50
|
+
|
|
51
|
+
public actor: Clutter.Actor;
|
|
52
|
+
|
|
53
|
+
constructor(actor: Clutter.Actor, params: _Draggable.ConstructorProperties);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* fakeRelease:
|
|
57
|
+
*
|
|
58
|
+
* Fake a release event.
|
|
59
|
+
* Must be called if you want to intercept release events on draggable
|
|
60
|
+
* actors for other purposes (for example if you're using
|
|
61
|
+
* PopupMenu.ignoreRelease())
|
|
62
|
+
*/
|
|
63
|
+
public fakeRelease(): void;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* startDrag:
|
|
67
|
+
* @param stageX: X coordinate of event
|
|
68
|
+
* @param stageY: Y coordinate of event
|
|
69
|
+
* @param time: Event timestamp
|
|
70
|
+
* @param sequence: Event sequence
|
|
71
|
+
* @param device: device that originated the event
|
|
72
|
+
*
|
|
73
|
+
* Directly initiate a drag and drop operation from the given actor.
|
|
74
|
+
* This function is useful to call if you've specified manualMode
|
|
75
|
+
* for the draggable.
|
|
76
|
+
*/
|
|
77
|
+
public startDrag(stageX: number, stageY: number, time: number, sequence?: Clutter.EventSequence, device?: Clutter.InputDevice): void;
|
|
78
|
+
|
|
79
|
+
protected _onButtonPress(actor: Clutter.Actor, event: Clutter.Event): boolean;
|
|
80
|
+
protected _onTouchEvent(actor: Clutter.Actor, event: Clutter.Event): boolean;
|
|
81
|
+
protected _grabDevice(actor: Clutter.Actor, pointer: Clutter.InputDevice, touchSequence: Clutter.EventSequence): boolean;
|
|
82
|
+
protected _ungrabDevice(): void;
|
|
83
|
+
protected _grabActor(device: Clutter.InputDevice, touchSequence: Clutter.EventSequence): void;
|
|
84
|
+
protected _ungrabActor(): void;
|
|
85
|
+
protected _grabEvents(device: Clutter.InputDevice, touchSequence: Clutter.EventSequence): void;
|
|
86
|
+
protected _ungrabEvents(): void;
|
|
87
|
+
protected _eventIsRelease(event: Clutter.Event): boolean;
|
|
88
|
+
protected _onEvent(actor: Clutter.Actor, event: Clutter.Event): boolean;
|
|
89
|
+
protected _updateActorPosition(origScale: number, origDragOffsetX: number, origDragOffsetY: number, transX: number, transY: number): void;
|
|
90
|
+
protected _maybeStartDrag(event: Clutter.Event): void;
|
|
91
|
+
protected _pickTargetActor(): Clutter.Actor;
|
|
92
|
+
protected _updateDragHover(): void;
|
|
93
|
+
protected _queueUpdateDragHover(): void;
|
|
94
|
+
protected _updateDragPosition(event: Clutter.Event): void;
|
|
95
|
+
protected _dragActorDropped(event: Clutter.Event): void;
|
|
96
|
+
protected _getRestoreLocation(): [number, number, number];
|
|
97
|
+
protected _cancelDrag(eventTime: number): void;
|
|
98
|
+
protected _restoreDragActor(eventTime: number): void;
|
|
99
|
+
protected _animateDragEnd(eventTime: number, params: { opacity: number; mode: Clutter.AnimationMode; onComplete: () => void; }): void;
|
|
100
|
+
protected _finishAnimation(): void;
|
|
101
|
+
protected _onAnimationComplete(dragActor: Clutter.Actor, eventTime: number): void;
|
|
102
|
+
protected _dragComplete(): void;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* makeDraggable:
|
|
107
|
+
* @param actor: Source actor
|
|
108
|
+
* @param params: Additional parameters
|
|
109
|
+
* @returns a new Draggable
|
|
110
|
+
*
|
|
111
|
+
* Create an object which controls drag and drop for the given actor.
|
|
112
|
+
*
|
|
113
|
+
* If %manualMode is %true in @params, do not automatically start
|
|
114
|
+
* drag and drop on click
|
|
115
|
+
*
|
|
116
|
+
* If %dragActorMaxSize is present in @params, the drag actor will
|
|
117
|
+
* be scaled down to be no larger than that size in pixels.
|
|
118
|
+
*
|
|
119
|
+
* If %dragActorOpacity is present in @params, the drag actor will
|
|
120
|
+
* will be set to have that opacity during the drag.
|
|
121
|
+
*
|
|
122
|
+
* Note that when the drag actor is the source actor and the drop
|
|
123
|
+
* succeeds, the actor scale and opacity aren't reset; if the drop
|
|
124
|
+
* target wants to reuse the actor, it's up to the drop target to
|
|
125
|
+
* reset these values.
|
|
126
|
+
*/
|
|
127
|
+
export function makeDraggable(actor: Clutter.Actor, params: any): _Draggable;
|