import 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 { ChildOrderController } from "../../utils/element-extenders/child-order-controller"; import { ElementLifecycleController } from "../../utils/element-extenders/element-lifecycle-controller"; import type { SyntheticEvent } from "../../utils/element-extenders/event-handlers"; import { EventHandlers } from "../../utils/element-extenders/event-handlers"; import type { DiffedProps } from "../../utils/element-extenders/map-properties"; import { PropertyMapper } from "../../utils/element-extenders/map-properties"; import type { MouseButtonPressEvent } from "../../utils/gdk-events/mouse-button-press-event"; import type { PointerData } from "../../utils/gdk-events/pointer-event"; import type { AlignmentProps } from "../../utils/property-maps-factories/create-alignment-prop-mapper"; import type { ChildPropertiesProps } from "../../utils/property-maps-factories/create-child-props-mapper"; import type { ExpandProps } from "../../utils/property-maps-factories/create-expand-prop-mapper"; import type { MarginProps } from "../../utils/property-maps-factories/create-margin-prop-mapper"; import type { SizeRequestProps } from "../../utils/property-maps-factories/create-size-request-prop-mapper"; import type { StyleProps } from "../../utils/property-maps-factories/create-style-prop-mapper"; import type { TooltipProps } from "../../utils/property-maps-factories/create-tooltip-prop-mapper"; import type { TextNode } from "../text-node"; type PressablePropsMixin = ChildPropertiesProps & SizeRequestProps & AlignmentProps & MarginProps & ExpandProps & StyleProps & TooltipProps; export type PressableEvent

= {}> = SyntheticEvent; export interface PressableProps extends PressablePropsMixin { onPress?: (event: PressableEvent) => void; onRelease?: (event: PressableEvent) => void; onMouseEnter?: (event: PressableEvent) => void; onMouseLeave?: (event: PressableEvent) => void; /** * If set to true, the pressable element will intercept mouse events * on it's children. Meaning children will not receive any mouse * events. */ interceptChildEvents?: boolean; /** * Determine if the Pressable should be drawn or not (this does not * include it's children, only the Pressable itself). * * By default this is set to `false` and as a result any styles * applied to the Pressable will not be visible. */ draw?: boolean; } export declare class PressableElement extends BaseElement implements GjsElement<"PRESSABLE", Gtk.EventBox> { static getContext(currentContext: HostContext): HostContext; readonly kind = "PRESSABLE"; protected widget: Gtk.EventBox; protected parent: GjsElement | null; readonly lifecycle: ElementLifecycleController; protected children: ChildOrderController>; protected handlers: EventHandlers; protected readonly propsMapper: PropertyMapper; constructor(props: DiffedProps); updateProps(props: DiffedProps): void; appendChild(child: GjsElement | TextNode): void; insertBefore(child: GjsElement | TextNode, beforeChild: GjsElement): void; remove(parent: GjsElement): void; render(): void; notifyWillMountTo(parent: GjsElement): boolean; notifyMounted(): void; notifyChildWillUnmount(child: GjsElement): void; show(): void; hide(): void; getWidget(): Gtk.EventBox; getParentElement(): GjsElement | null; } export {};