Enums

Details

class Gdk.AxisUse(value)

Bases: GObject.GEnum

Defines how device axes are interpreted by GTK.

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.

IGNORE = 0

the axis is ignored.

X = 1

the axis is used as the x axis.

ROTATION = 10

the axis is used for pen rotation information

SLIDER = 11

the axis is used for pen slider information

LAST = 12

a constant equal to the numerically highest axis value.

Y = 2

the axis is used as the y axis.

DELTA_X = 3

the axis is used as the scroll x delta

DELTA_Y = 4

the axis is used as the scroll y delta

PRESSURE = 5

the axis is used for pressure information.

XTILT = 6

the axis is used for x tilt information.

YTILT = 7

the axis is used for y tilt information.

WHEEL = 8

the axis is used for wheel information.

DISTANCE = 9

the axis is used for pen/tablet distance information

class Gdk.CrossingMode(value)

Bases: GObject.GEnum

Specifies the crossing mode for enter and leave events.

NORMAL = 0

crossing because of pointer motion.

GRAB = 1

crossing because a grab is activated.

UNGRAB = 2

crossing because a grab is deactivated.

GTK_GRAB = 3

crossing because a GTK grab is activated.

GTK_UNGRAB = 4

crossing because a GTK grab is deactivated.

STATE_CHANGED = 5

crossing because a GTK widget changed state (e.g. sensitivity).

TOUCH_BEGIN = 6

crossing because a touch sequence has begun, this event is synthetic as the pointer might have not left the surface.

TOUCH_END = 7

crossing because a touch sequence has ended, this event is synthetic as the pointer might have not left the surface.

DEVICE_SWITCH = 8

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 surface.

class Gdk.DevicePadFeature(value)

Bases: GObject.GEnum

A pad feature.

BUTTON = 0

a button

RING = 1

a ring-shaped interactive area

STRIP = 2

a straight interactive area

class Gdk.DeviceToolType(value)

Bases: GObject.GEnum

Indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc.

UNKNOWN = 0

Tool is of an unknown type.

PEN = 1

Tool is a standard tablet stylus.

ERASER = 2

Tool is standard tablet eraser.

BRUSH = 3

Tool is a brush stylus.

PENCIL = 4

Tool is a pencil stylus.

AIRBRUSH = 5

Tool is an airbrush stylus.

MOUSE = 6

Tool is a mouse.

LENS = 7

Tool is a lens cursor.

class Gdk.DragCancelReason(value)

Bases: GObject.GEnum

Used in GdkDrag to the reason of a cancelled DND operation.

NO_TARGET = 0

There is no suitable drop target.

USER_CANCELLED = 1

Drag cancelled by the user

ERROR = 2

Unspecified error.

class Gdk.EventType(value)

Bases: GObject.GEnum

Specifies the type of the event.

DELETE = 0

the window manager has requested that the toplevel surface be hidden or destroyed, usually when the user clicks on a special icon in the title bar.

MOTION_NOTIFY = 1

the pointer (usually a mouse) has moved.

PROXIMITY_OUT = 10

an input device has moved out of contact with a sensing surface.

DRAG_ENTER = 11

the mouse has entered the surface while a drag is in progress.

DRAG_LEAVE = 12

the mouse has left the surface while a drag is in progress.

DRAG_MOTION = 13

the mouse has moved in the surface while a drag is in progress.

DROP_START = 14

a drop operation onto the surface has started.

SCROLL = 15

the scroll wheel was turned

GRAB_BROKEN = 16

a pointer or keyboard grab was broken.

TOUCH_BEGIN = 17

A new touch event sequence has just started.

TOUCH_UPDATE = 18

A touch event sequence has been updated.

TOUCH_END = 19

A touch event sequence has finished.

BUTTON_PRESS = 2

a mouse button has been pressed.

TOUCH_CANCEL = 20

A touch event sequence has been canceled.

TOUCHPAD_SWIPE = 21

A touchpad swipe gesture event, the current state is determined by its phase field.

TOUCHPAD_PINCH = 22

A touchpad pinch gesture event, the current state is determined by its phase field.

PAD_BUTTON_PRESS = 23

A tablet pad button press event.

PAD_BUTTON_RELEASE = 24

A tablet pad button release event.

PAD_RING = 25

A tablet pad axis event from a “ring”.

PAD_STRIP = 26

A tablet pad axis event from a “strip”.

PAD_GROUP_MODE = 27

A tablet pad group mode change.

TOUCHPAD_HOLD = 28

A touchpad hold gesture event, the current state is determined by its phase field.

New in version 4.6.

EVENT_LAST = 29

marks the end of the Gdk.EventType enumeration.

BUTTON_RELEASE = 3

a mouse button has been released.

KEY_PRESS = 4

a key has been pressed.

KEY_RELEASE = 5

a key has been released.

ENTER_NOTIFY = 6

the pointer has entered the surface.

LEAVE_NOTIFY = 7

the pointer has left the surface.

FOCUS_CHANGE = 8

the keyboard focus has entered or left the surface.

PROXIMITY_IN = 9

an input device has moved into contact with a sensing surface (e.g. a touchscreen or graphics tablet).

class Gdk.FullscreenMode(value)

Bases: GObject.GEnum

Indicates which monitor a surface should span over when in fullscreen mode.

CURRENT_MONITOR = 0

Fullscreen on current monitor only.

ALL_MONITORS = 1

Span across all monitors when fullscreen.

class Gdk.GLError(value)

Bases: GObject.GEnum

Error enumeration for GdkGLContext.

classmethod quark()[source]
Return type:

int

NOT_AVAILABLE = 0

OpenGL support is not available

UNSUPPORTED_FORMAT = 1

The requested visual format is not supported

UNSUPPORTED_PROFILE = 2

The requested profile is not supported

COMPILATION_FAILED = 3

The shader compilation failed

The shader linking failed

class Gdk.Gravity(value)

Bases: GObject.GEnum

Defines the reference point of a surface and is used in GdkPopupLayout.

NORTH_WEST = 1

the reference point is at the top left corner.

STATIC = 10

the reference point is at the top left corner of the surface itself, ignoring window manager decorations.

NORTH = 2

the reference point is in the middle of the top edge.

NORTH_EAST = 3

the reference point is at the top right corner.

WEST = 4

the reference point is at the middle of the left edge.

CENTER = 5

the reference point is at the center of the surface.

EAST = 6

the reference point is at the middle of the right edge.

SOUTH_WEST = 7

the reference point is at the lower left corner.

SOUTH = 8

the reference point is at the middle of the lower edge.

SOUTH_EAST = 9

the reference point is at the lower right corner.

class Gdk.InputSource(value)

Bases: GObject.GEnum

An enumeration describing the type of an input device in general terms.

MOUSE = 0

the device is a mouse. (This will be reported for the core pointer, even if it is something else, such as a trackball.)

PEN = 1

the device is a stylus of a graphics tablet or similar device.

KEYBOARD = 2

the device is a keyboard.

TOUCHSCREEN = 3

the device is a direct-input touch device, such as a touchscreen or tablet

TOUCHPAD = 4

the device is an indirect touch device, such as a touchpad

TRACKPOINT = 5

the device is a trackpoint

TABLET_PAD = 6

the device is a “pad”, a collection of buttons, rings and strips found in drawing tablets

class Gdk.KeyMatch(value)

Bases: GObject.GEnum

Describes how well an event matches a given keyval and modifiers.

GdkKeyMatch values are returned by [method`Gdk`.KeyEvent.matches].

NONE = 0

The key event does not match

PARTIAL = 1

The key event matches if keyboard state (specifically, the currently active group) is ignored

EXACT = 2

The key event matches

class Gdk.MemoryFormat(value)

Bases: GObject.GEnum

GdkMemoryFormat describes formats that image data can have in memory.

It describes formats by listing the contents of the memory passed to it. So Gdk.MemoryFormat.A8R8G8B8 will be 1 byte (8 bits) of alpha, followed by a byte each of red, green and blue. It is not endian-dependent, so cairo.Format.ARGB32 is represented by different GdkMemoryFormats on architectures with different endiannesses.

Its naming is modelled after VkFormat for details).

B8G8R8A8_PREMULTIPLIED = 0

4 bytes; for blue, green, red, alpha. The color values are premultiplied with the alpha value.

A8R8G8B8_PREMULTIPLIED = 1

4 bytes; for alpha, red, green, blue. The color values are premultiplied with the alpha value.

R16G16B16A16_PREMULTIPLIED = 10

4 guint16 values; for red, green, blue, alpha. The color values are premultiplied with the alpha value.

New in version 4.6.

R16G16B16A16 = 11

4 guint16 values; for red, green, blue, alpha.

New in version 4.6.

R16G16B16_FLOAT = 12

3 half-float values; for red, green, blue. The data is opaque.

New in version 4.6.

R16G16B16A16_FLOAT_PREMULTIPLIED = 13

4 half-float values; for red, green, blue and alpha. The color values are premultiplied with the alpha value.

New in version 4.6.

R16G16B16A16_FLOAT = 14

4 half-float values; for red, green, blue and alpha.

New in version 4.6.

R32G32B32_FLOAT = 15
R32G32B32A32_FLOAT_PREMULTIPLIED = 16

4 float values; for red, green, blue and alpha. The color values are premultiplied with the alpha value.

New in version 4.6.

R32G32B32A32_FLOAT = 17

4 float values; for red, green, blue and alpha.

New in version 4.6.

G8A8_PREMULTIPLIED = 18

2 bytes; for grayscale, alpha. The color values are premultiplied with the alpha value.

New in version 4.12.

G8A8 = 19

2 bytes; for grayscale, alpha.

New in version 4.12.

R8G8B8A8_PREMULTIPLIED = 2

4 bytes; for red, green, blue, alpha The color values are premultiplied with the alpha value.

G8 = 20

One byte; for grayscale. The data is opaque.

New in version 4.12.

G16A16_PREMULTIPLIED = 21

2 guint16 values; for grayscale, alpha. The color values are premultiplied with the alpha value.

New in version 4.12.

G16A16 = 22

2 guint16 values; for grayscale, alpha.

New in version 4.12.

G16 = 23

One guint16 value; for grayscale. The data is opaque.

New in version 4.12.

A8 = 24

One byte; for alpha.

New in version 4.12.

A16 = 25

One guint16 value; for alpha.

New in version 4.12.

A16_FLOAT = 26
A32_FLOAT = 27
N_FORMATS = 28

The number of formats. This value will change as more formats get added, so do not rely on its concrete integer.

B8G8R8A8 = 3

4 bytes; for blue, green, red, alpha.

A8R8G8B8 = 4

4 bytes; for alpha, red, green, blue.

R8G8B8A8 = 5

4 bytes; for red, green, blue, alpha.

A8B8G8R8 = 6

4 bytes; for alpha, blue, green, red.

R8G8B8 = 7

3 bytes; for red, green, blue. The data is opaque.

B8G8R8 = 8

3 bytes; for blue, green, red. The data is opaque.

R16G16B16 = 9

3 guint16 values; for red, green, blue.

New in version 4.6.

class Gdk.NotifyType(value)

Bases: GObject.GEnum

Specifies the kind of crossing for enter and leave events.

See the X11 protocol specification of LeaveNotify for full details of crossing event generation.

ANCESTOR = 0

the surface is entered from an ancestor or left towards an ancestor.

VIRTUAL = 1

the pointer moves between an ancestor and an inferior of the surface.

INFERIOR = 2

the surface is entered from an inferior or left towards an inferior.

NONLINEAR = 3

the surface is entered from or left towards a surface which is neither an ancestor nor an inferior.

NONLINEAR_VIRTUAL = 4

the pointer moves between two surfaces which are not ancestors of each other and the surface is part of the ancestor chain between one of these surfaces and their least common ancestor.

UNKNOWN = 5

an unknown type of enter/leave event occurred.

class Gdk.ScrollDirection(value)

Bases: GObject.GEnum

Specifies the direction for scroll events.

UP = 0

the surface is scrolled up.

DOWN = 1

the surface is scrolled down.

LEFT = 2

the surface is scrolled to the left.

RIGHT = 3

the surface is scrolled to the right.

SMOOTH = 4

the scrolling is determined by the delta values in scroll events. See Gdk.ScrollEvent.get_deltas()

class Gdk.ScrollUnit(value)

Bases: GObject.GEnum

Specifies the unit of scroll deltas.

When you get Gdk.ScrollUnit.WHEEL, a delta of 1.0 means 1 wheel detent click in the south direction, 2.0 means 2 wheel detent clicks in the south direction… This is the same logic for negative values but in the north direction.

If you get Gdk.ScrollUnit.SURFACE, are managing a scrollable view and get a value of 123, you have to scroll 123 surface logical pixels right if it’s delta_x or down if it’s delta_y. This is the same logic for negative values but you have to scroll left instead of right if it’s delta_x and up instead of down if it’s delta_y.

1 surface logical pixel is equal to 1 real screen pixel multiplied by the final scale factor of your graphical interface (the product of the desktop scale factor and eventually a custom scale factor in your app).

New in version 4.8.

WHEEL = 0

The delta is in number of wheel clicks.

SURFACE = 1

The delta is in surface pixels to scroll directly on screen.

class Gdk.SubpixelLayout(value)

Bases: GObject.GEnum

This enumeration describes how the red, green and blue components of physical pixels on an output device are laid out.

UNKNOWN = 0

The layout is not known

NONE = 1

Not organized in this way

HORIZONTAL_RGB = 2

The layout is horizontal, the order is RGB

HORIZONTAL_BGR = 3

The layout is horizontal, the order is BGR

VERTICAL_RGB = 4

The layout is vertical, the order is RGB

VERTICAL_BGR = 5

The layout is vertical, the order is BGR

class Gdk.SurfaceEdge(value)

Bases: GObject.GEnum

Determines a surface edge or corner.

NORTH_WEST = 0

the top left corner.

NORTH = 1

the top edge.

NORTH_EAST = 2

the top right corner.

WEST = 3

the left edge.

EAST = 4

the right edge.

SOUTH_WEST = 5

the lower left corner.

SOUTH = 6

the lower edge.

SOUTH_EAST = 7

the lower right corner.

class Gdk.TextureError(value)

Bases: GObject.GEnum

Possible errors that can be returned by GdkTexture constructors.

New in version 4.6.

classmethod quark()[source]
Return type:

int

TOO_LARGE = 0

Not enough memory to handle this image

CORRUPT_IMAGE = 1

The image data appears corrupted

UNSUPPORTED_CONTENT = 2

The image contains features that cannot be loaded

UNSUPPORTED_FORMAT = 3

The image format is not supported

class Gdk.TitlebarGesture(value)

Bases: GObject.GEnum

New in version 4.4.

DOUBLE_CLICK = 1
RIGHT_CLICK = 2
MIDDLE_CLICK = 3
class Gdk.TouchpadGesturePhase(value)

Bases: GObject.GEnum

Specifies the current state of a touchpad gesture.

All gestures are guaranteed to begin with an event with phase Gdk.TouchpadGesturePhase.BEGIN, followed by 0 or several events with phase Gdk.TouchpadGesturePhase.UPDATE.

A finished gesture may have 2 possible outcomes, an event with phase Gdk.TouchpadGesturePhase.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.TouchpadGesturePhase.CANCEL, this should be used as a hint to undo any visible/permanent changes that were done throughout the progress of the gesture.

BEGIN = 0

The gesture has begun.

UPDATE = 1

The gesture has been updated.

END = 2

The gesture was finished, changes should be permanently applied.

CANCEL = 3

The gesture was cancelled, all changes should be undone.

class Gdk.VulkanError(value)

Bases: GObject.GEnum

Error enumeration for GdkVulkanContext.

classmethod quark()[source]
Return type:

int

UNSUPPORTED = 0

Vulkan is not supported on this backend or has not been compiled in.

NOT_AVAILABLE = 1

Vulkan support is not available on this Surface