import type Gtk from "gi://Gtk"; import type { GjsContext } from "../../../reconciler/gjs-renderer"; import type { HostContext } from "../../../reconciler/host-context"; import { BaseElement, type GjsElement } from "../../gjs-element"; import { ElementLifecycleController } from "../../utils/element-extenders/element-lifecycle-controller"; import type { DiffedProps } from "../../utils/element-extenders/map-properties"; import type { TextNode } from "../text-node"; export interface ICustomWidget
{
/**
* Should return a Gtk Widget that can be attached to a Container
* and displayed.
*
* The root widget should not have any parent set.
*/
getRootWidget(): Gtk.Widget;
/**
* This function ic called whenever any of the props passed to
* ): void;
/**
* This function is called when the CustomWidget is removed from the
* React tree. Any cleanup should be done here, including destroying
* the root widget.
*/
unmount(): void;
}
export type CustomWidgetProps = P & {
widget: new (props: P) => ICustomWidget ;
};
export declare class CustomWidgetElement extends BaseElement implements GjsElement<"CUSTOM_WIDGET", Gtk.Widget> {
static getContext(currentContext: HostContext