@react-gnome/gjs-esm-types
Version:
TypeScript module declarations for GJS ESM modules.
2,203 lines (2,158 loc) • 525 kB
TypeScript
/*
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in ts-for-gir itself or create a bug report on https://github.com/gjsify/ts-for-gjs
*/
import type cairo from "gi://cairo?version=1.0";
import type Pango from "gi://Pango?version=1.0";
import type HarfBuzz from "gi://HarfBuzz?version=0.0";
import type freetype2 from "gi://freetype2?version=2.0";
import type GObject from "gi://GObject?version=2.0";
import type GLib from "gi://GLib?version=2.0";
import type Gio from "gi://Gio?version=2.0";
import type GdkPixbuf from "gi://GdkPixbuf?version=2.0";
import type GModule from "gi://GModule?version=2.0";
declare module "gi://Gdk?version=3.0" {
/**
* An enumeration describing the way in which a device
* axis (valuator) maps onto the predefined valuator
* types that GTK+ understands.
*
* Note that the X and Y axes are not really needed; pointer devices
* report their location via the x/y members of events regardless. Whether
* X and Y are present as axes depends on the GDK backend.
*/
enum AxisUse {
/**
* the axis is ignored.
*/
IGNORE,
/**
* the axis is used as the x axis.
*/
X,
/**
* the axis is used as the y axis.
*/
Y,
/**
* the axis is used for pressure information.
*/
PRESSURE,
/**
* the axis is used for x tilt information.
*/
XTILT,
/**
* the axis is used for y tilt information.
*/
YTILT,
/**
* the axis is used for wheel information.
*/
WHEEL,
/**
* the axis is used for pen/tablet distance information. (Since: 3.22)
*/
DISTANCE,
/**
* the axis is used for pen rotation information. (Since: 3.22)
*/
ROTATION,
/**
* the axis is used for pen slider information. (Since: 3.22)
*/
SLIDER,
/**
* a constant equal to the numerically highest axis value.
*/
LAST,
}
/**
* A set of values describing the possible byte-orders
* for storing pixel values in memory.
*/
enum ByteOrder {
/**
* The values are stored with the least-significant byte
* first. For instance, the 32-bit value 0xffeecc would be stored
* in memory as 0xcc, 0xee, 0xff, 0x00.
*/
LSB_FIRST,
/**
* The values are stored with the most-significant byte
* first. For instance, the 32-bit value 0xffeecc would be stored
* in memory as 0x00, 0xff, 0xee, 0xcc.
*/
MSB_FIRST,
}
/**
* Specifies the crossing mode for #GdkEventCrossing.
*/
enum CrossingMode {
/**
* crossing because of pointer motion.
*/
NORMAL,
/**
* crossing because a grab is activated.
*/
GRAB,
/**
* crossing because a grab is deactivated.
*/
UNGRAB,
/**
* crossing because a GTK+ grab is activated.
*/
GTK_GRAB,
/**
* crossing because a GTK+ grab is deactivated.
*/
GTK_UNGRAB,
/**
* crossing because a GTK+ widget changed
* state (e.g. sensitivity).
*/
STATE_CHANGED,
/**
* crossing because a touch sequence has begun,
* this event is synthetic as the pointer might have not left the window.
*/
TOUCH_BEGIN,
/**
* crossing because a touch sequence has ended,
* this event is synthetic as the pointer might have not left the window.
*/
TOUCH_END,
/**
* crossing because of a device switch (i.e.
* a mouse taking control of the pointer after a touch device), this event
* is synthetic as the pointer didn’t leave the window.
*/
DEVICE_SWITCH,
}
/**
* Predefined cursors.
*
* Note that these IDs are directly taken from the X cursor font, and many
* of these cursors are either not useful, or are not available on other platforms.
*
* The recommended way to create cursors is to use gdk_cursor_new_from_name().
*/
enum CursorType {
/**
* 
*/
X_CURSOR,
/**
* 
*/
ARROW,
/**
* 
*/
BASED_ARROW_DOWN,
/**
* 
*/
BASED_ARROW_UP,
/**
* 
*/
BOAT,
/**
* 
*/
BOGOSITY,
/**
* 
*/
BOTTOM_LEFT_CORNER,
/**
* 
*/
BOTTOM_RIGHT_CORNER,
/**
* 
*/
BOTTOM_SIDE,
/**
* 
*/
BOTTOM_TEE,
/**
* 
*/
BOX_SPIRAL,
/**
* 
*/
CENTER_PTR,
/**
* 
*/
CIRCLE,
/**
* 
*/
CLOCK,
/**
* 
*/
COFFEE_MUG,
/**
* 
*/
CROSS,
/**
* 
*/
CROSS_REVERSE,
/**
* 
*/
CROSSHAIR,
/**
* 
*/
DIAMOND_CROSS,
/**
* 
*/
DOT,
/**
* 
*/
DOTBOX,
/**
* 
*/
DOUBLE_ARROW,
/**
* 
*/
DRAFT_LARGE,
/**
* 
*/
DRAFT_SMALL,
/**
* 
*/
DRAPED_BOX,
/**
* 
*/
EXCHANGE,
/**
* 
*/
FLEUR,
/**
* 
*/
GOBBLER,
/**
* 
*/
GUMBY,
/**
* 
*/
HAND1,
/**
* 
*/
HAND2,
/**
* 
*/
HEART,
/**
* 
*/
ICON,
/**
* 
*/
IRON_CROSS,
/**
* 
*/
LEFT_PTR,
/**
* 
*/
LEFT_SIDE,
/**
* 
*/
LEFT_TEE,
/**
* 
*/
LEFTBUTTON,
/**
* 
*/
LL_ANGLE,
/**
* 
*/
LR_ANGLE,
/**
* 
*/
MAN,
/**
* 
*/
MIDDLEBUTTON,
/**
* 
*/
MOUSE,
/**
* 
*/
PENCIL,
/**
* 
*/
PIRATE,
/**
* 
*/
PLUS,
/**
* 
*/
QUESTION_ARROW,
/**
* 
*/
RIGHT_PTR,
/**
* 
*/
RIGHT_SIDE,
/**
* 
*/
RIGHT_TEE,
/**
* 
*/
RIGHTBUTTON,
/**
* 
*/
RTL_LOGO,
/**
* 
*/
SAILBOAT,
/**
* 
*/
SB_DOWN_ARROW,
/**
* 
*/
SB_H_DOUBLE_ARROW,
/**
* 
*/
SB_LEFT_ARROW,
/**
* 
*/
SB_RIGHT_ARROW,
/**
* 
*/
SB_UP_ARROW,
/**
* 
*/
SB_V_DOUBLE_ARROW,
/**
* 
*/
SHUTTLE,
/**
* 
*/
SIZING,
/**
* 
*/
SPIDER,
/**
* 
*/
SPRAYCAN,
/**
* 
*/
STAR,
/**
* 
*/
TARGET,
/**
* 
*/
TCROSS,
/**
* 
*/
TOP_LEFT_ARROW,
/**
* 
*/
TOP_LEFT_CORNER,
/**
* 
*/
TOP_RIGHT_CORNER,
/**
* 
*/
TOP_SIDE,
/**
* 
*/
TOP_TEE,
/**
* 
*/
TREK,
/**
* 
*/
UL_ANGLE,
/**
* 
*/
UMBRELLA,
/**
* 
*/
UR_ANGLE,
/**
* 
*/
WATCH,
/**
* 
*/
XTERM,
/**
* last cursor type
*/
LAST_CURSOR,
/**
* Blank cursor. Since 2.16
*/
BLANK_CURSOR,
/**
* type of cursors constructed with
* gdk_cursor_new_from_pixbuf()
*/
CURSOR_IS_PIXMAP,
}
/**
* A pad feature.
*/
enum DevicePadFeature {
/**
* a button
*/
BUTTON,
/**
* a ring-shaped interactive area
*/
RING,
/**
* a straight interactive area
*/
STRIP,
}
/**
* Indicates the specific type of tool being used being a tablet. Such as an
* airbrush, pencil, etc.
*/
enum DeviceToolType {
/**
* Tool is of an unknown type.
*/
UNKNOWN,
/**
* Tool is a standard tablet stylus.
*/
PEN,
/**
* Tool is standard tablet eraser.
*/
ERASER,
/**
* Tool is a brush stylus.
*/
BRUSH,
/**
* Tool is a pencil stylus.
*/
PENCIL,
/**
* Tool is an airbrush stylus.
*/
AIRBRUSH,
/**
* Tool is a mouse.
*/
MOUSE,
/**
* Tool is a lens cursor.
*/
LENS,
}
/**
* Indicates the device type. See [above][GdkDeviceManager.description]
* for more information about the meaning of these device types.
*/
enum DeviceType {
/**
* Device is a master (or virtual) device. There will
* be an associated focus indicator on the screen.
*/
MASTER,
/**
* Device is a slave (or physical) device.
*/
SLAVE,
/**
* Device is a physical device, currently not attached to
* any virtual device.
*/
FLOATING,
}
/**
* Used in #GdkDragContext to the reason of a cancelled DND operation.
*/
enum DragCancelReason {
/**
* There is no suitable drop target.
*/
NO_TARGET,
/**
* Drag cancelled by the user
*/
USER_CANCELLED,
/**
* Unspecified error.
*/
ERROR,
}
/**
* Used in #GdkDragContext to indicate the protocol according to
* which DND is done.
*/
enum DragProtocol {
/**
* no protocol.
*/
NONE,
/**
* The Motif DND protocol. No longer supported
*/
MOTIF,
/**
* The Xdnd protocol.
*/
XDND,
/**
* An extension to the Xdnd protocol for
* unclaimed root window drops.
*/
ROOTWIN,
/**
* The simple WM_DROPFILES protocol.
*/
WIN32_DROPFILES,
/**
* The complex OLE2 DND protocol (not implemented).
*/
OLE2,
/**
* Intra-application DND.
*/
LOCAL,
/**
* Wayland DND protocol.
*/
WAYLAND,
}
/**
* Specifies the type of the event.
*
* Do not confuse these events with the signals that GTK+ widgets emit.
* Although many of these events result in corresponding signals being emitted,
* the events are often transformed or filtered along the way.
*
* In some language bindings, the values %GDK_2BUTTON_PRESS and
* %GDK_3BUTTON_PRESS would translate into something syntactically
* invalid (eg `Gdk.EventType.2ButtonPress`, where a
* symbol is not allowed to start with a number). In that case, the
* aliases %GDK_DOUBLE_BUTTON_PRESS and %GDK_TRIPLE_BUTTON_PRESS can
* be used instead.
*/
enum EventType {
/**
* a special code to indicate a null event.
*/
NOTHING,
/**
* the window manager has requested that the toplevel window be
* hidden or destroyed, usually when the user clicks on a special icon in the
* title bar.
*/
DELETE,
/**
* the window has been destroyed.
*/
DESTROY,
/**
* all or part of the window has become visible and needs to be
* redrawn.
*/
EXPOSE,
/**
* the pointer (usually a mouse) has moved.
*/
MOTION_NOTIFY,
/**
* a mouse button has been pressed.
*/
BUTTON_PRESS,
/**
* a mouse button has been double-clicked (clicked twice
* within a short period of time). Note that each click also generates a
* %GDK_BUTTON_PRESS event.
*/
TODO_2BUTTON_PRESS,
/**
* alias for %GDK_2BUTTON_PRESS, added in 3.6.
*/
DOUBLE_BUTTON_PRESS,
/**
* a mouse button has been clicked 3 times in a short period
* of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
*/
TODO_3BUTTON_PRESS,
/**
* alias for %GDK_3BUTTON_PRESS, added in 3.6.
*/
TRIPLE_BUTTON_PRESS,
/**
* a mouse button has been released.
*/
BUTTON_RELEASE,
/**
* a key has been pressed.
*/
KEY_PRESS,
/**
* a key has been released.
*/
KEY_RELEASE,
/**
* the pointer has entered the window.
*/
ENTER_NOTIFY,
/**
* the pointer has left the window.
*/
LEAVE_NOTIFY,
/**
* the keyboard focus has entered or left the window.
*/
FOCUS_CHANGE,
/**
* the size, position or stacking order of the window has changed.
* Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
*/
CONFIGURE,
/**
* the window has been mapped.
*/
MAP,
/**
* the window has been unmapped.
*/
UNMAP,
/**
* a property on the window has been changed or deleted.
*/
PROPERTY_NOTIFY,
/**
* the application has lost ownership of a selection.
*/
SELECTION_CLEAR,
/**
* another application has requested a selection.
*/
SELECTION_REQUEST,
/**
* a selection has been received.
*/
SELECTION_NOTIFY,
/**
* an input device has moved into contact with a sensing
* surface (e.g. a touchscreen or graphics tablet).
*/
PROXIMITY_IN,
/**
* an input device has moved out of contact with a sensing
* surface.
*/
PROXIMITY_OUT,
/**
* the mouse has entered the window while a drag is in progress.
*/
DRAG_ENTER,
/**
* the mouse has left the window while a drag is in progress.
*/
DRAG_LEAVE,
/**
* the mouse has moved in the window while a drag is in
* progress.
*/
DRAG_MOTION,
/**
* the status of the drag operation initiated by the window
* has changed.
*/
DRAG_STATUS,
/**
* a drop operation onto the window has started.
*/
DROP_START,
/**
* the drop operation initiated by the window has completed.
*/
DROP_FINISHED,
/**
* a message has been received from another application.
*/
CLIENT_EVENT,
/**
* the window visibility status has changed.
*/
VISIBILITY_NOTIFY,
/**
* the scroll wheel was turned
*/
SCROLL,
/**
* the state of a window has changed. See #GdkWindowState
* for the possible window states
*/
WINDOW_STATE,
/**
* a setting has been modified.
*/
SETTING,
/**
* the owner of a selection has changed. This event type
* was added in 2.6
*/
OWNER_CHANGE,
/**
* a pointer or keyboard grab was broken. This event type
* was added in 2.8.
*/
GRAB_BROKEN,
/**
* the content of the window has been changed. This event type
* was added in 2.14.
*/
DAMAGE,
/**
* A new touch event sequence has just started. This event
* type was added in 3.4.
*/
TOUCH_BEGIN,
/**
* A touch event sequence has been updated. This event type
* was added in 3.4.
*/
TOUCH_UPDATE,
/**
* A touch event sequence has finished. This event type
* was added in 3.4.
*/
TOUCH_END,
/**
* A touch event sequence has been canceled. This event type
* was added in 3.4.
*/
TOUCH_CANCEL,
/**
* A touchpad swipe gesture event, the current state
* is determined by its phase field. This event type was added in 3.18.
*/
TOUCHPAD_SWIPE,
/**
* A touchpad pinch gesture event, the current state
* is determined by its phase field. This event type was added in 3.18.
*/
TOUCHPAD_PINCH,
/**
* A tablet pad button press event. This event type
* was added in 3.22.
*/
PAD_BUTTON_PRESS,
/**
* A tablet pad button release event. This event type
* was added in 3.22.
*/
PAD_BUTTON_RELEASE,
/**
* A tablet pad axis event from a "ring". This event type was
* added in 3.22.
*/
PAD_RING,
/**
* A tablet pad axis event from a "strip". This event type was
* added in 3.22.
*/
PAD_STRIP,
/**
* A tablet pad group mode change. This event type was
* added in 3.22.
*/
PAD_GROUP_MODE,
/**
* marks the end of the GdkEventType enumeration. Added in 2.18
*/
EVENT_LAST,
}
/**
* Specifies the result of applying a #GdkFilterFunc to a native event.
*/
enum FilterReturn {
/**
* event not handled, continue processing.
*/
CONTINUE,
/**
* native event translated into a GDK event and stored
* in the `event` structure that was passed in.
*/
TRANSLATE,
/**
* event handled, terminate processing.
*/
REMOVE,
}
/**
* Indicates which monitor (in a multi-head setup) a window should span over
* when in fullscreen mode.
*/
enum FullscreenMode {
/**
* Fullscreen on current monitor only.
*/
CURRENT_MONITOR,
/**
* Span across all monitors when fullscreen.
*/
ALL_MONITORS,
}
/**
* Error enumeration for #GdkGLContext.
*/
enum GLError {
/**
* OpenGL support is not available
*/
NOT_AVAILABLE,
/**
* The requested visual format is not supported
*/
UNSUPPORTED_FORMAT,
/**
* The requested profile is not supported
*/
UNSUPPORTED_PROFILE,
}
/**
* Defines how device grabs interact with other devices.
*/
enum GrabOwnership {
/**
* All other devices’ events are allowed.
*/
NONE,
/**
* Other devices’ events are blocked for the grab window.
*/
WINDOW,
/**
* Other devices’ events are blocked for the whole application.
*/
APPLICATION,
}
/**
* Returned by gdk_device_grab(), gdk_pointer_grab() and gdk_keyboard_grab() to
* indicate success or the reason for the failure of the grab attempt.
*/
enum GrabStatus {
/**
* the resource was successfully grabbed.
*/
SUCCESS,
/**
* the resource is actively grabbed by another client.
*/
ALREADY_GRABBED,
/**
* the resource was grabbed more recently than the
* specified time.
*/
INVALID_TIME,
/**
* the grab window or the `confine_to` window are not
* viewable.
*/
NOT_VIEWABLE,
/**
* the resource is frozen by an active grab of another client.
*/
FROZEN,
/**
* the grab failed for some other reason. Since 3.16
*/
FAILED,
}
/**
* Defines the reference point of a window and the meaning of coordinates
* passed to gtk_window_move(). See gtk_window_move() and the "implementation
* notes" section of the
* [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
* specification for more details.
*/
enum Gravity {
/**
* the reference point is at the top left corner.
*/
NORTH_WEST,
/**
* the reference point is in the middle of the top edge.
*/
NORTH,
/**
* the reference point is at the top right corner.
*/
NORTH_EAST,
/**
* the reference point is at the middle of the left edge.
*/
WEST,
/**
* the reference point is at the center of the window.
*/
CENTER,
/**
* the reference point is at the middle of the right edge.
*/
EAST,
/**
* the reference point is at the lower left corner.
*/
SOUTH_WEST,
/**
* the reference point is at the middle of the lower edge.
*/
SOUTH,
/**
* the reference point is at the lower right corner.
*/
SOUTH_EAST,
/**
* the reference point is at the top left corner of the
* window itself, ignoring window manager decorations.
*/
STATIC,
}
/**
* An enumeration that describes the mode of an input device.
*/
enum InputMode {
/**
* the device is disabled and will not report any events.
*/
DISABLED,
/**
* the device is enabled. The device’s coordinate space
* maps to the entire screen.
*/
SCREEN,
/**
* the device is enabled. The device’s coordinate space
* is mapped to a single window. The manner in which this window
* is chosen is undefined, but it will typically be the same
* way in which the focus window for key events is determined.
*/
WINDOW,
}
/**
* An enumeration describing the type of an input device in general terms.
*/
enum InputSource {
/**
* the device is a mouse. (This will be reported for the core
* pointer, even if it is something else, such as a trackball.)
*/
MOUSE,
/**
* the device is a stylus of a graphics tablet or similar device.
*/
PEN,
/**
* the device is an eraser. Typically, this would be the other end
* of a stylus on a graphics tablet.
*/
ERASER,
/**
* the device is a graphics tablet “puck” or similar device.
*/
CURSOR,
/**
* the device is a keyboard.
*/
KEYBOARD,
/**
* the device is a direct-input touch device, such
* as a touchscreen or tablet. This device type has been added in 3.4.
*/
TOUCHSCREEN,
/**
* the device is an indirect touch device, such
* as a touchpad. This device type has been added in 3.4.
*/
TOUCHPAD,
/**
* the device is a trackpoint. This device type has been
* added in 3.22
*/
TRACKPOINT,
/**
* the device is a "pad", a collection of buttons,
* rings and strips found in drawing tablets. This device type has been
* added in 3.22.
*/
TABLET_PAD,
}
/**
* This enum is used with gdk_keymap_get_modifier_mask()
* in order to determine what modifiers the
* currently used windowing system backend uses for particular
* purposes. For example, on X11/Windows, the Control key is used for
* invoking menu shortcuts (accelerators), whereas on Apple computers
* it’s the Command key (which correspond to %GDK_CONTROL_MASK and
* %GDK_MOD2_MASK, respectively).
*/
enum ModifierIntent {
/**
* the primary modifier used to invoke
* menu accelerators.
*/
PRIMARY_ACCELERATOR,
/**
* the modifier used to invoke context menus.
* Note that mouse button 3 always triggers context menus. When this modifier
* is not 0, it additionally triggers context menus when used with mouse button 1.
*/
CONTEXT_MENU,
/**
* the modifier used to extend selections
* using `modifier`-click or `modifier`-cursor-key
*/
EXTEND_SELECTION,
/**
* the modifier used to modify selections,
* which in most cases means toggling the clicked item into or out of the selection.
*/
MODIFY_SELECTION,
/**
* when any of these modifiers is pressed, the
* key event cannot produce a symbol directly. This is meant to be used for
* input methods, and for use cases like typeahead search.
*/
NO_TEXT_INPUT,
/**
* the modifier that switches between keyboard
* groups (AltGr on X11/Windows and Option/Alt on OS X).
*/
SHIFT_GROUP,
/**
* The set of modifier masks accepted
* as modifiers in accelerators. Needed because Command is mapped to MOD2 on
* OSX, which is widely used, but on X11 MOD2 is NumLock and using that for a
* mod key is problematic at best.
* Ref: https://bugzilla.gnome.org/show_bug.cgi?id=736125.
*/
DEFAULT_MOD_MASK,
}
/**
* Specifies the kind of crossing for #GdkEventCrossing.
*
* See the X11 protocol specification of LeaveNotify for
* full details of crossing event generation.
*/
enum NotifyType {
/**
* the window is entered from an ancestor or
* left towards an ancestor.
*/
ANCESTOR,
/**
* the pointer moves between an ancestor and an
* inferior of the window.
*/
VIRTUAL,
/**
* the window is entered from an inferior or
* left towards an inferior.
*/
INFERIOR,
/**
* the window is entered from or left towards
* a window which is neither an ancestor nor an inferior.
*/
NONLINEAR,
/**
* the pointer moves between two windows
* which are not ancestors of each other and the window is part of
* the ancestor chain between one of these windows and their least
* common ancestor.
*/
NONLINEAR_VIRTUAL,
/**
* an unknown type of enter/leave event occurred.
*/
UNKNOWN,
}
/**
* Specifies why a selection ownership was changed.
*/
enum OwnerChange {
/**
* some other app claimed the ownership
*/
NEW_OWNER,
/**
* the window was destroyed
*/
DESTROY,
/**
* the client was closed
*/
CLOSE,
}
/**
* Describes how existing data is combined with new data when
* using gdk_property_change().
*/
enum PropMode {
/**
* the new data replaces the existing data.
*/
REPLACE,
/**
* the new data is prepended to the existing data.
*/
PREPEND,
/**
* the new data is appended to the existing data.
*/
APPEND,
}
/**
* Specifies the type of a property change for a #GdkEventProperty.
*/
enum PropertyState {
/**
* the property value was changed.
*/
NEW_VALUE,
/**
* the property was deleted.
*/
DELETE,
}
/**
* Specifies the direction for #GdkEventScroll.
*/
enum ScrollDirection {
/**
* the window is scrolled up.
*/
UP,
/**
* the window is scrolled down.
*/
DOWN,
/**
* the window is scrolled to the left.
*/
LEFT,
/**
* the window is scrolled to the right.
*/
RIGHT,
/**
* the scrolling is determined by the delta values
* in #GdkEventScroll. See gdk_event_get_scroll_deltas(). Since: 3.4
*/
SMOOTH,
}
/**
* Specifies the kind of modification applied to a setting in a
* #GdkEventSetting.
*/
enum SettingAction {
/**
* a setting was added.
*/
NEW,
/**
* a setting was changed.
*/
CHANGED,
/**
* a setting was deleted.
*/
DELETED,
}
enum Status {
OK,
ERROR,
ERROR_PARAM,
ERROR_FILE,
ERROR_MEM,
}
/**
* This enumeration describes how the red, green and blue components
* of physical pixels on an output device are laid out.
*/
enum SubpixelLayout {
/**
* The layout is not known
*/
UNKNOWN,
/**
* Not organized in this way
*/
NONE,
/**
* The layout is horizontal, the order is RGB
*/
HORIZONTAL_RGB,
/**
* The layout is horizontal, the order is BGR
*/
HORIZONTAL_BGR,
/**
* The layout is vertical, the order is RGB
*/
VERTICAL_RGB,
/**
* The layout is vertical, the order is BGR
*/
VERTICAL_BGR,
}
/**
* Specifies the current state of a touchpad gesture. All gestures are
* guaranteed to begin with an event with phase %GDK_TOUCHPAD_GESTURE_PHASE_BEGIN,
* followed by 0 or several events with phase %GDK_TOUCHPAD_GESTURE_PHASE_UPDATE.
*
* A finished gesture may have 2 possible outcomes, an event with phase
* %GDK_TOUCHPAD_GESTURE_PHASE_END will be emitted when the gesture is
* considered successful, this should be used as the hint to perform any
* permanent changes.
*
* Cancelled gestures may be so for a variety of reasons, due to hardware
* or the compositor, or due to the gesture recognition layers hinting the
* gesture did not finish resolutely (eg. a 3rd finger being added during
* a pinch gesture). In these cases, the last event will report the phase
* %GDK_TOUCHPAD_GESTURE_PHASE_CANCEL, this should be used as a hint
* to undo any visible/permanent changes that were done throughout the
* progress of the gesture.
*
* See also #GdkEventTouchpadSwipe and #GdkEventTouchpadPinch.
*/
enum TouchpadGesturePhase {
/**
* The gesture has begun.
*/
BEGIN,
/**
* The gesture has been updated.
*/
UPDATE,
/**
* The gesture was finished, changes
* should be permanently applied.
*/
END,
/**
* The gesture was cancelled, all
* changes should be undone.
*/
CANCEL,
}
/**
* Specifies the visiblity status of a window for a #GdkEventVisibility.
*/
enum VisibilityState {
/**
* the window is completely visible.
*/
UNOBSCURED,
/**
* the window is partially visible.
*/
PARTIAL,
/**
* the window is not visible at all.
*/
FULLY_OBSCURED,
}
/**
* A set of values that describe the manner in which the pixel values
* for a visual are converted into RGB values for display.
*/
enum VisualType {
/**
* Each pixel value indexes a grayscale value
* directly.
*/
STATIC_GRAY,
/**
* Each pixel is an index into a color map that
* maps pixel values into grayscale values. The color map can be
* changed by an application.
*/
GRAYSCALE,
/**
* Each pixel value is an index into a predefined,
* unmodifiable color map that maps pixel values into RGB values.
*/
STATIC_COLOR,
/**
* Each pixel is an index into a color map that
* maps pixel values into rgb values. The color map can be changed by
* an application.
*/
PSEUDO_COLOR,
/**
* Each pixel value directly contains red, green,
* and blue components. Use gdk_visual_get_red_pixel_details(), etc,
* to obtain information about how the components are assembled into
* a pixel value.
*/
TRUE_COLOR,
/**
* Each pixel value contains red, green, and blue
* components as for %GDK_VISUAL_TRUE_COLOR, but the components are
* mapped via a color table into the final output table instead of
* being converted directly.
*/
DIRECT_COLOR,
}
/**
* Determines a window edge or corner.
*/
enum WindowEdge {
/**
* the top left corner.
*/
NORTH_WEST,
/**
* the top edge.
*/
NORTH,
/**
* the top right corner.
*/
NORTH_EAST,
/**
* the left edge.
*/
WEST,
/**
* the right edge.
*/
EAST,
/**
* the lower left corner.
*/
SOUTH_WEST,
/**
* the lower edge.
*/
SOUTH,
/**
* the lower right corner.
*/
SOUTH_EAST,
}
/**
* Describes the kind of window.
*/
enum WindowType {
/**
* root window; this window has no parent, covers the entire
* screen, and is created by the window system
*/
ROOT,
/**
* toplevel window (used to implement #GtkWindow)
*/
TOPLEVEL,
/**
* child window (used to implement e.g. #GtkEntry)
*/
CHILD,
/**
* override redirect temporary window (used to implement
* #GtkMenu)
*/
TEMP,
/**
* foreign window (see gdk_window_foreign_new())
*/
FOREIGN,
/**
* offscreen window (see
* [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18
*/
OFFSCREEN,
/**
* subsurface-based window; This window is visually
* tied to a toplevel, and is moved/stacked with it. Currently this window
* type is only implemented in Wayland. Since 3.14
*/
SUBSURFACE,
}
/**
* These are hints for the window manager that indicate what type of function
* the window has. The window manager can use this when determining decoration
* and behaviour of the window. The hint must be set before mapping the window.
*
* See the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
* specification for more details about window types.
*/
enum WindowTypeHint {
/**
* Normal toplevel window.
*/
NORMAL,
/**
* Dialog window.
*/
DIALOG,
/**
* Window used to implement a menu; GTK+ uses
* this hint only for torn-off menus, see #GtkTearoffMenuItem.
*/
MENU,
/**
* Window used to implement toolbars.
*/
TOOLBAR,
/**
* Window used to display a splash
* screen during application startup.
*/
SPLASHSCREEN,
/**
* Utility windows which are not detached
* toolbars or dialogs.
*/
UTILITY,
/**
* Used for creating dock or panel windows.
*/
DOCK,
/**
* Used for creating the desktop background
* window.
*/
DESKTOP,
/**
* A menu that belongs to a menubar.
*/
DROPDOWN_MENU,
/**
* A menu that does not belong to a menubar,
* e.g. a context menu.
*/
POPUP_MENU,
/**
* A tooltip.
*/
TOOLTIP,
/**
* A notification - typically a “bubble”
* that belongs to a status icon.
*/
NOTIFICATION,
/**
* A popup from a combo box.
*/
COMBO,
/**
* A window that is used to implement a DND cursor.
*/
DND,
}
/**
* `GDK_INPUT_OUTPUT` windows are the standard kind of window you might expect.
* Such windows receive events and are also displayed on screen.
* `GDK_INPUT_ONLY` windows are invisible; they are usually placed above other
* windows in order to trap or filter the events. You can’t draw on
* `GDK_INPUT_ONLY` windows.
*/
enum WindowWindowClass {
/**
* window for graphics and events
*/
INPUT_OUTPUT,
/**
* window for events only
*/
INPUT_ONLY,
}
/**
* Positioning hints for aligning a window relative to a rectangle.
*
* These hints determine how the window should be positioned in the case that
* the window would fall off-screen if placed in its ideal position.
*
* For example, %GDK_ANCHOR_FLIP_X will replace %GDK_GRAVITY_NORTH_WEST with
* %GDK_GRAVITY_NORTH_EAST and vice versa if the window extends beyond the left
* or right edges of the monitor.
*
* If %GDK_ANCHOR_SLIDE_X is set, the window can be shifted horizontally to fit
* on-screen. If %GDK_ANCHOR_RESIZE_X is set, the window can be shrunken
* horizontally to fit.
*
* In general, when multiple flags are set, flipping should take precedence over
* sliding, which should take precedence over resizing.
* @bitfield
*/
enum AnchorHints {
/**
* allow flipping anchors horizontally
*/
FLIP_X,
/**
* allow flipping anchors vertically
*/
FLIP_Y,
/**
* allow sliding window horizontally
*/
SLIDE_X,
/**
* allow sliding window vertically
*/
SLIDE_Y,
/**
* allow resizing window horizontally
*/
RESIZE_X,
/**
* allow resizing window vertically
*/
RESIZE_Y,
/**
* allow flipping anchors on both axes
*/
FLIP,
/**
* allow sliding window on both axes
*/
SLIDE,
/**
* allow resizing window on both axes
*/
RESIZE,
}
/**
* Flags describing the current capabilities of a device/tool.
* @bitfield
*/
enum AxisFlags {
/**
* X axis is present
*/
X,
/**
* Y axis is present
*/
Y,
/**
* Pressure axis is present
*/
PRESSURE,
/**
* X tilt axis is present
*/
XTILT,
/**
* Y tilt axis is present
*/
YTILT,
/**
* Wheel axis is present
*/
WHEEL,
/**
* Distance axis is present
*/
DISTANCE,
/**
* Z-axis rotation is present
*/
ROTATION,
/**
* Slider axis is present
*/
SLIDER,
}
/**
* Used in #GdkDragContext to indicate what the destination
* should do with the dropped data.
* @bitfield
*/
enum DragAction {
/**
* Means nothing, and should not be used.
*/
DEFAULT,
/**
* Copy the data.
*/
COPY,
/**
* Move the data, i.e. first copy it, then delete
* it from the source using the DELETE target of the X selection protocol.
*/
MOVE,
/**
* Add a link to the data. Note that this is only
* useful if source and destination agree on what it means.
*/
LINK,
/**
* Special action which tells the source that the
* destination will do something that the source doesn’t understand.
*/
PRIVATE,
/**
* Ask the user what to do with the data.
*/
ASK,
}
/**
* A set of bit-flags to indicate which events a window is to receive.
* Most of these masks map onto one or more of the #GdkEventType event types
* above.
*
* See the [input handling overview][chap-input-handling] for details of
* [event masks][event-masks] and [event propagation][event-propagation].
*
* %GDK_POINTER_MOTION_HINT_MASK is deprecated. It is a special mask
* to reduce the number of %GDK_MOTION_NOTIFY events received. When using
* %GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will
* be sent, some of which are marked as a hint (the is_hint member is
* %TRUE). To receive more motion events after a motion hint event,
* the application needs to asks for more, by calling
* gdk_event_request_motions().
*
* Since GTK 3.8, motion events are already compressed by default, independent
* of this mechanism. This compression can be disabled with
* gdk_window_set_event_compression(). See the documentation of that function
* for details.
*
* If %GDK_TOUCH_MASK is enabled, the window will receive touch events
* from touch-enabled devices. Those will come as sequences of #GdkEventTouch
* with type %GDK_TOUCH_UPDATE, enclosed by two events with
* type %GDK_TOUCH_BEGIN and %GDK_TOUCH_END (or %GDK_TOUCH_CANCEL).
* gdk_event_get_event_sequence() returns the event sequence for these
* events, so different sequences may be distinguished.
* @bitfield
*/
enum EventMask {
/**
* receive expose events
*/
EXPOSURE_MASK,
/**
* receive all pointer motion events
*/
POINTER_MOTION_MASK,
/**
* deprecated. see the explanation above
*/
POINTER_MOTION_HINT_MASK,
/**
* receive pointer motion events while any button is pressed
*/
BUTTON_MOTION_MASK,
/**
* receive pointer motion events while 1 button is pressed
*/
BUTTON1_MOTION_MASK,
/**
* receive pointer motion events while 2 button is pressed
*/
BUTTON2_MOTION_MASK,
/**
* receive pointer motion events while 3 button is pressed
*/
BUTTON3_MOTION_MASK,
/**
* receive button press events
*/
BUTTON_PRESS_MASK,
/**
* receive button release events
*/
BUTTON_RELEASE_MASK,
/**
* receive key press events
*/
KEY_PRESS_MASK,
/**
* receive key release events
*/
KEY_RELEASE_MASK,
/**
* receive window enter events
*/
ENTER_NOTIFY_MASK,
/**
* receive window leave events
*/
LEAVE_NOTIFY_MASK,
/**
* receive focus change events
*/
FOCUS_CHANGE_MASK,
/**
* receive events about window configuration change
*/
STRUCTURE_MASK,
/**
* receive property change events
*/
PROPERTY_CHANGE_MASK,
/**
* receive visibility change events
*/
VISIBILITY_NOTIFY_MASK,
/**
* receive proximity in events
*/
PROXIMITY_IN_MASK,
/**
* receive proximity out events
*/
PROXIMITY_OUT_MASK,
/**
* receive events about window configuration changes of
* child windows
*/
SUBSTRUCTURE_MASK,
/**
* receive scroll events
*/
SCROLL_MASK,
/**
* receive touch events. Since 3.4
*/
TOUCH_MASK,
/**
* receive smooth scrolling events. Since 3.4
*/
SMOOTH_SCROLL_MASK,
/**
* receive touchpad gesture events. Since 3.18
*/
TOUCHPAD_GESTURE_MASK,
/**
* receive tablet pad events. Since 3.22
*/
TABLET_PAD_MASK,
/**
* the combination of all the above event masks.
*/
ALL_EVENTS_MASK,
}
/**
* #GdkFrameClockPhase is used to represent the different paint clock
* phases that can be requested. The elements of the enumeration
* correspond to the signals of #GdkFrameClock.
* @bitfield
*/
enum FrameClockPhase {
/**
* no phase
*/
NONE,
/**
* corresponds to GdkFrameClock::flush-events. Should not be handled by applications.
*/
FLUSH_EVENTS,
/**
* corresponds to GdkFrameClock::before-paint. Should not be handled by applications.
*/
BEFORE_PAINT,
/**
* corresponds to GdkFrameClock::update.
*/
UPDATE,
/**
* corresponds to GdkFrameClock::layout.
*/
LAYOUT,
/**
* corresponds to GdkFrameClock::paint.
*/
PAINT,
/**
* corresponds to GdkFrameClock::resume-events. Should not be handled by applications.
*/
RESUME_EVENTS,
/**
* corresponds to GdkFrameClock::after-paint. Should not be handled by applications.
*/
AFTER_PAINT,
}
/**
* A set of bit-flags to indicate the state of modifier keys and mouse buttons
* in various event types. Typical modifier keys are Shift, Control, Meta,
* Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
*
* Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.
*
* Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped
* to Mod2 - Mod5, and indicates this by setting %GDK_SUPER_MASK,
* %GDK_HYPER_MASK or %GDK_META_MASK in the state field of key events.
*
* Note that GDK may add internal values to events which include
* reserved values such as %GDK_MODIFIER_RESERVED_13_MASK. Your code
* should preserve and ignore them. You can use %GDK_MODIFIER_MASK to
* remove all reserved values.
*
* Also note that the GDK X backend interprets button press events for button
* 4-7 as scroll events, so %GDK_BUTTON4_MASK and %GDK_BUTTON5_MASK will never
* be set.
* @bitfield
*/
enum ModifierType {
/**
* the Shift key.
*/
SHIFT_MASK,
/**
* a Lock key (depending on the modifier mapping of the
* X server this may either be CapsLock or ShiftLock).
*/
LOCK_MASK,
/**
* the Control key.
*/
CONTROL_MASK,
/**
* the fourth modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier, but
* normally it is the Alt key).
*/
MOD1_MASK,
/**
* the fifth modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier).
*/
MOD2_MASK,
/**
* the sixth modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier).
*/
MOD3_MASK,
/**
* the seventh modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier).
*/
MOD4_MASK,
/**
* the eighth modifier key (it depends on the modifier
* mapping of the X server which key is interpreted as this modifier).
*/
MOD5_MASK,
/**
* the first mouse button.
*/
BUTTON1_MASK,
/**
* the second mouse button.
*/
BUTTON2_MASK,
/**
* the third mouse button.
*/
BUTTON3_MASK,
/**
* the fourth mouse button.
*/
BUTTON4_MASK,
/**
* the fifth mouse button.
*/
BUTTON5_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_13_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_14_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_15_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_16_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_17_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_18_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_19_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_20_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_21_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_22_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_23_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_24_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_25_MASK,
/**
* the Super modifier. Since 2.10
*/
SUPER_MASK,
/**
* the Hyper modifier. Since 2.10
*/
HYPER_MASK,
/**
* the Meta modifier. Since 2.10
*/
META_MASK,
/**
* A reserved bit flag; do not use in your own code
*/
MODIFIER_RESERVED_29_MASK,
/**
* not used in GDK itself. GTK+ uses it to differentiate
* between (keyval, modifiers) pairs from key press and release events.
*/
RELEASE_MASK,
/**
* a mask covering all modifier types.
*/
MODIFIER_MASK,
}
/**
* Flags describing the seat capabilities.
* @bitfield
*/
enum SeatCapabilities {
/**
* No input capabilities
*/
NONE,
/**
* The seat has a pointer (e.g. mouse)
*/
POINTER,
/**
* The seat has touchscreen(s) attached
*/
TOUCH,
/**
* The seat has drawing tablet(s) attached
*/
TABLET_STYLUS,
/**
* The seat has keyboard(s) attached
*/
KEYBOARD,
/**
* The union of all pointing capabilities
*/
ALL_POINTING,
/**
* The union of all capabilities
*/
ALL,
}
/**
* These are hints originally defined by the Motif toolkit.
* The window manager can use them when determining how to decorate
* the window. The hint must be set before mapping the window.
* @bitfield
*/
enum WMDecoration {
/**
* all decorations should be applied.
*/
ALL,
/**
* a frame should be drawn around the window.
*/
BORDER,
/**
* the frame should have resize handles.
*/
RESIZEH,
/**
* a titlebar should be placed above the window.
*/
TITLE,
/**
* a button for opening a menu should be included.
*/
MENU,
/**
* a minimize button should be included.
*/
MINIMIZE,
/**
* a maximize button should be included.
*/
MAXIMIZE,
}
/**
* These are hints originally defined by the Motif toolkit. The window manager
* can use them when determining the functions to offer for the window. The
* hint must be set before mapping the window.
* @bitfield
*/
enum WMFunction {
/**
* all functions should be offered.
*/
ALL,
/**
* the window should be resizable.
*/
RESIZE,
/**
* the window should be movable.
*/
MOVE,
/**
* the window should be minimizable.
*/
MINIMIZE,
/**
* the window should be maximizable.
*/
MAXIMIZE,
/**
* the window should be closable.
*/
CLOSE,
}
/**
* Used to indicate which fields in the #GdkWindowAttr struct should be honored.
* For example, if you filled in the “cursor” and “x” fields of #GdkWindowAttr,
* pass “`GDK_WA_X` | `GDK_WA_CURSOR”` to gdk_window_new(). Fields in
* #GdkWindowAttr not covered by a bit in this enum are required; for example,
* the `width/``height,` `wclass,` and `window_type` fields are required, they have
* no corresponding flag in #GdkWindowAttributesType.
* @bitfield
*/
enum WindowAttributesType {
/**
* Honor the title field
*/
TITLE,
/**
* Honor the X coordinate field
*/
X,
/**
* Honor the Y coordinate field
*/
Y,
/**
* Honor the cursor field
*/
CURSOR,
/**
* Honor the visual field
*/
VISUAL,
/**
* Honor the wmclass_class and wmclass_name fields
*/
WMCLASS,
/**
* Honor the override_redirect field
*/
NOREDIR,
/**
* Honor the type_hint field
*/
TYPE_HINT,
}
/**
* Used to indicate which fields of a #GdkGeometry struct should be paid
* attention to. Also, the presence/absence of `GDK_HINT_POS,`
* `GDK_HINT_USER_POS,` and `GDK_HINT_USER_SIZE` is significant, thou