nixos-configs/modules/ags/gtk4/widget/subclasses/window.ts

20 lines
548 B
TypeScript
Raw Normal View History

2025-01-01 13:38:44 -05:00
import { register } from 'astal';
import { Astal } from 'astal/gtk4';
2025-01-01 13:38:44 -05:00
import astalify, { type AstalifyProps, type ConstructProps } from '../astalify';
2025-01-01 13:38:44 -05:00
export type WindowProps = ConstructProps<
2025-01-13 10:51:02 -05:00
WindowClass,
Astal.Window.ConstructorProps & AstalifyProps
2025-01-01 13:38:44 -05:00
>;
@register({ GTypeName: 'Window' })
2025-01-13 10:51:02 -05:00
export class WindowClass extends astalify(Astal.Window) {
constructor({ cssName = 'window', ...props }: WindowProps = {}) {
super({ cssName, ...props });
2025-01-13 10:51:02 -05:00
}
2025-01-01 13:38:44 -05:00
}
2025-01-13 10:51:02 -05:00
export const Window = (props?: WindowProps) => new WindowClass(props);