subclass box

This commit is contained in:
Aylur
2023-08-14 17:09:00 +02:00
parent c776758712
commit b03d7612cf
4 changed files with 44 additions and 27 deletions
+5
View File
@@ -8,6 +8,11 @@
<file>widgets.js</file>
<file>window.js</file>
<file>widgets/shared.js</file>
<file>widgets/box.js</file>
<file>widgets/eventbox.js</file>
<file>widgets/centerbox.js</file>
<file>service/service.js</file>
<file>service/apps.js</file>
<file>service/audio.js</file>
+3
View File
@@ -163,6 +163,9 @@ export function timeout(ms: number, callback: () => void) {
}
export function runCmd(cmd: string | ((...args: any[]) => void), ...args: any[]) {
if (typeof cmd !== 'string' && typeof cmd !== 'function')
return warning('Command has to be string or function');
if (!cmd)
return;
+6
View File
@@ -1,6 +1,9 @@
import Gtk from 'gi://Gtk?version=3.0';
import { typecheck, error, warning, interval } from './utils.js';
import * as Widgets from './widgets.js';
import Box from './widgets/box.js';
import EventBox from './widgets/eventbox.js';
import CenterBox from './widgets/centerbox.js';
interface ServiceAPI {
instance: {
@@ -190,3 +193,6 @@ export default function Widget(params: Widget | string | (() => Gtk.Widget) | Gt
}
Widget.widgets = widgets;
Widget.Box = Box;
Widget.EventBox = EventBox;
Widget.CenterBox = CenterBox;
+30 -27
View File
@@ -1,30 +1,33 @@
{
"compilerOptions": {
"target": "es2022",
"module": "ES2020",
"lib": [ "ES2017" ],
"allowJs": true,
"checkJs": false,
"outDir": "_build/tsc-out",
"strict": true,
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"*": [
"*",
"types/*",
"gi-types/*"
]
"compilerOptions": {
"target": "es2022",
"module": "ES2020",
"lib": [
"ES2017"
],
"allowJs": true,
"checkJs": false,
"outDir": "_build/tsc-out",
"strict": true,
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"*": [
"*",
"types/*",
"gi-types/*"
]
},
"typeRoots": [
"gi-types"
],
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"typeRoots": [
"gi-types"
],
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": [
"gi-types/gi.d.ts",
"types/*",
"src/*"
]
"include": [
"gi-types/gi.d.ts",
"types/*",
"src/*",
"src/*/*"
]
}