define qt types
This commit is contained in:
2
src/extern/global.d.ts
vendored
2
src/extern/global.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
declare const qmlBase;
|
||||
declare const qmlBase: QmlObject;
|
||||
declare const notificationInvalidWindowRules: Notification;
|
||||
|
||||
type Notification = {
|
||||
|
||||
38
src/extern/qt.d.ts
vendored
38
src/extern/qt.d.ts
vendored
@@ -1,6 +1,34 @@
|
||||
declare const console;
|
||||
declare const Qt;
|
||||
declare const console: {
|
||||
log(...args: any[]);
|
||||
assert(boolean);
|
||||
};
|
||||
|
||||
type QRect = any;
|
||||
type QSignal = any;
|
||||
type QQmlTimer = any;
|
||||
declare const Qt: {
|
||||
rect(x: number, y: number, width: number, height: number): QRect;
|
||||
createQmlObject(qml: string, parent: QmlObject);
|
||||
};
|
||||
|
||||
type QmlObject = any;
|
||||
|
||||
type QRect = {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
top: number;
|
||||
bottom: number;
|
||||
left: number;
|
||||
right: number;
|
||||
}
|
||||
|
||||
type QSignal = {
|
||||
connect(handler: (...args: any[]) => void);
|
||||
disconnect(handler: (...args: any[]) => void);
|
||||
}
|
||||
|
||||
type QQmlTimer = {
|
||||
interval: number;
|
||||
triggered: QSignal;
|
||||
restart(): void;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ class Desktop {
|
||||
private readonly config: Desktop.Config;
|
||||
private scrollX: number;
|
||||
private dirty: boolean;
|
||||
public clientArea: QRect;
|
||||
public tilingArea: QRect;
|
||||
public clientArea!: QRect;
|
||||
public tilingArea!: QRect;
|
||||
|
||||
constructor(desktopNumber: number, config: Desktop.Config, layoutConfig: LayoutConfig) {
|
||||
this.config = config;
|
||||
|
||||
Reference in New Issue
Block a user