gtk.gdk Constants — the built-in constants of the gtk.gdk module
GDK Windowing Constant GDK Drag Action Constants GDK Device Axis Use Constants GDK Byte Order Constants GDK Cap Style Constants GDK Crossing Mode Constants GDK Cursor Type Constants GDK Drag Protocol Constants GDK Event Mask Flag Constants GDK Event Type Constants GDK Extension Mode Constants GDK Fill Constants GDK Fill Rule Constants GDK Filter Return Constants GDK Function Constants GDK GC Values Mask Flag Constants GDK Gravity Constants GDK Image Type Constants GDK Input Condition Flag Constants GDK Input Mode Constants GDK Input Source Constants GDK Join Style Constants GDK Line Style Constants GDK Modifier Constants GDK Notify Type Constants GDK Overlap Type Constants GDK Owner Change Constants GDK Parent Relative Constant GDK Pixbuf Rotation Constants GDK Property Mode Constants GDK Property State Constants GDK RGB Dither Constants GDK Scroll Direction Constants GDK Setting Action Constants GDK Subwindow Mode Constants GDK Visibility State Constants GDK Visual Type Constants GDK Window Class Constants GDK Window Edge Constants GDK Window Hints Constants GDK Window State Flag Constants GDK Window Type Constants GDK Window Type Hint Constants GDK WM Decoration Constants GDK WM Function Constants
This constant is available in PyGTK 2.16 and above.
This consntant specifies which windowing backend GDK uses.
It is similar to GDK_WINDOWING_*
C macros.
The constant value is one of the following strings (note that
all values are lowercase):
| X Window System |
| Microsoft Windows API |
| Mac OS X Quartz |
| Direct Frame Buffer on a UNIX-like system |
| Unknown (this can in theory happen if GTK+ library is newer than PyGTK) |
The Drag Action constants are used by gtk.gdk.DragContext
objects to indicate what the destination should do with the dropped
data.
| |
| Copy the data. |
| Move the data, i.e. first copy it, then delete it from the source using the DELETE target of the X selection protocol. |
| Add a link to the data. Note that this is only useful if source and destination agree on what it means. |
| Special action which tells the source that the destination will do something that the source doesn't understand. |
| Ask the user what to do with the data. |
The Device Axis constants describing the way in which a device axis (valuator) maps onto predefined valuator types.
| the axis is ignored. |
| the axis is used as the x axis. |
| the axis is used as the y axis. |
| the axis is used for pressure information. |
| the axis is used for x tilt information. |
| the axis is used for y tilt information. |
| the axis is used for wheel information. |
| a constant equal to the numerically highest axis value. |
The Byte Order constants specify a set of values describing the possible byte-orders for storing pixel values in memory.
| 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. |
| The values are stored with the most-significant byte first. For instance, the 32-bit value 0xffeecc would be stored in memory as 0x00, 0xcc, 0xee, 0xff. |
The Cap Style constants specify how the end of lines are drawn.
| The same as gtk.gdk.CAP_BUTT for
lines of non-zero width but for zero width lines, the final point on the
line will not be drawn. |
| The ends of the lines are drawn squared off and extending to the coordinates of the end point. |
| The ends of the lines are drawn as semicircles with the diameter equal to the line width and centered at the end point. |
| The ends of the lines are drawn squared off and extending half the width of the line beyond the end point. |
The Crossing Mode constants specify the crossing mode for the
Crossing gtk.gdk.Event
The Cursor Type constants specify the set of standard cursors available.
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
The Drag Protocol constants specify the protocol for a gtk.gdk.DragContext
according to which DND
is done.
| The Motif DND protocol. |
| The Xdnd protocol. |
| An extension to the Xdnd protocol for unclaimed root window drops. |
| no protocol. |
| The simple WM_DROPFILES protocol. |
| The complex OLE2 DND protocol (not implemented). |
| Intra-application DND. |
The Event Mask flag constants are a set of bit-flags that specify the events a window is to receive. Most of these masks map onto one or more of the Event Type Constants.
gtk.gdk.EXPOSURE_MASK | |
gtk.gdk.POINTER_MOTION_MASK | |
gtk.gdk.POINTER_MOTION_HINT_MASK | |
gtk.gdk.BUTTON_MOTION_MASK | |
gtk.gdk.BUTTON1_MOTION_MASK | |
gtk.gdk.BUTTON2_MOTION_MASK | |
gtk.gdk.BUTTON3_MOTION_MASK | |
gtk.gdk.BUTTON_PRESS_MASK | |
gtk.gdk.BUTTON_RELEASE_MASK | |
gtk.gdk.KEY_PRESS_MASK | |
gtk.gdk.KEY_RELEASE_MASK | |
gtk.gdk.ENTER_NOTIFY_MASK | |
gtk.gdk.LEAVE_NOTIFY_MASK | |
gtk.gdk.FOCUS_CHANGE_MASK | |
gtk.gdk.STRUCTURE_MASK | |
gtk.gdk.PROPERTY_CHANGE_MASK | |
gtk.gdk.VISIBILITY_NOTIFY_MASK | |
gtk.gdk.PROXIMITY_IN_MASK | |
gtk.gdk.PROXIMITY_OUT_MASK | |
gtk.gdk.SUBSTRUCTURE_MASK | |
gtk.gdk.SCROLL_MASK | |
gtk.gdk.ALL_EVENTS_MASK |
The Event Type constants specify the type of an event.
| a special code to indicate a null event. |
| 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. |
| the window has been destroyed. |
| all or part of the window has become visible and needs to be redrawn. |
| the pointer (usually a mouse) has moved. |
| a mouse button has been pressed. |
| a mouse button has been double-clicked (clicked twice within
a short period of time). Note that each click also generates a gtk.gdk.BUTTON_PRESS event. |
| a mouse button has been clicked 3 times in a short period of time. Note that each click also generates a gtk.gdk.BUTTON_PRESS event. |
| a mouse button has been released. |
| a key has been pressed. |
| a key has been released. |
| the pointer has entered the window. |
| the pointer has left the window. |
| the keyboard focus has entered or left the window. |
| the size, position or stacking order of the window has changed. Note that PyGTK discards these events for gtk.gdk.WINDOW_CHILD windows. |
| the window has been mapped. |
| the window has been unmapped. |
| a property on the window has been changed or deleted. |
| the application has lost ownership of a selection. |
| another application has requested a selection. |
| a selection has been received. |
| an input device has moved into contact with a sensing surface (e.g. a touchscreen or graphics tablet). |
| an input device has moved out of contact with a sensing surface. |
| the mouse has entered the window while a drag is in progress. |
| the mouse has left the window while a drag is in progress |
| the mouse has moved in the window while a drag is in progress. |
| the status of the drag operation initiated by the window has changed. |
| a drop operation onto the window has started. |
| the drop operation initiated by the window has completed. |
| a message has been received from another application. |
| the window visibility status has changed. |
| indicates that the source region was completely available when parts of a drawable were copied. This is not very useful. |
| a scroll had occurred for a window |
| the window state has changed |
| a setting has changed |
The Extension Mode constants specify which extension events are desired for a particular widget.
| No extension events are desired. |
| All extension events are desired. |
| Extension events are desired only if a cursor will be displayed for the device. |
The Fill constants specify how primitives are drawn.
| draw with the foreground color. |
| draw with a tiled pixmap. |
| draw using the stipple bitmap. Pixels corresponding to bits in the stipple bitmap that are set will be drawn in the foreground color; pixels corresponding to bits that are not set will be left untouched. |
| draw using the stipple bitmap. Pixels corresponding to bits in the stipple bitmap that are set will be drawn in the foreground color; pixels corresponding to bits that are not set will be drawn with the background color. |
The Fill Rule constants specify the method for determining which pixels are included in a region, when creating a GdkRegion from a polygon. The fill rule is only relevant for polygons which overlap themselves. Not used in PyGTK.
| Areas which are overlapped an odd number of times are included in the region, while areas overlapped an even number of times are not. |
| Overlapping areas are always included. |
The Filter Return constants specify the result of filtering a
native event. See the gtk.gdk.Window.add_filter
()
method for more information.
| Event not handled, continue processing. |
| Native event translated and stored into the gtk.gdk.Event passed
in. |
| Event handled, terminate processing. |
The Function constants specify how the bit values for the source
pixels are combined with the bit values for destination pixels to produce
the final result. The sixteen values here correspond to the 16 different
possible 2x2 truth tables. Only a couple of these values are usually useful;
for colored images, only gtk.gdk.COPY
,
gtk.gdk.XOR
and gtk.gdk.INVERT
are
generally useful. For bitmaps, gtk.gdk.AND
and
gtk.gdk.OR
are also useful.
gtk.gdk.COPY | |
gtk.gdk.INVERT | |
gtk.gdk.XOR | |
gtk.gdk.CLEAR | |
gtk.gdk.AND | |
gtk.gdk.AND_REVERSE. | |
gtk.gdk.AND_INVERT | |
gtk.gdk.NOOP | |
gtk.gdk.OR | |
gtk.gdk.EQUIV | |
gtk.gdk.OR_REVERSE | |
gtk.gdk.COPY_INVERT | |
gtk.gdk.OR_INVERT | |
gtk.gdk.NAND | |
gtk.gdk.NOR | |
gtk.gdk.SET |
The GC Values Mask flag constants are a set of bit flags used to specify which fields GdkGCValues structure are set. These are only used internally by PyGTK.
| the foreground is set. |
| the background is set. |
| the font is set. |
| the function is set. |
| the fill is set. |
| the tile is set. |
| the stipple is set. |
| the clip_mask is set. |
| the subwindow_mode is set. |
| the ts_x_origin is set. |
| the ts_y_origin is set. |
| the clip_x_origin is set. |
| the clip_y_origin is set. |
| the graphics_exposures is set. |
| the line_width is set. |
| the line_style is set. |
| the cap_style is set. |
| the join_style is set. |
The Gravity constants specify the reference point of a window
and the meaning of coordinates passed to the gtk.Window.move
()
method.
| The reference point is at the top left corner. |
| The reference point is in the middle of the top edge. |
| The reference point is at the top right corner. |
| The reference point is at the middle of the left edge. |
| The reference point is at the center of the window. |
| The reference point is at the middle of the right edge. |
| The reference point is at the lower left corner. |
| The reference point is at the middle of the lower edge. |
| The reference point is at the lower right corner. |
| The reference point is at the top left corner of the window itself, ignoring window manager decorations. |
The Image Type constants specify the type of a gtk.gdk.Image
.
| The original X image type, which is quite slow since the image has to be transferred from the client to the server to display it. |
| A faster image type, which uses shared memory to transfer the image data between client and server. However this will only be available if client and server are on the same machine and the shared memory extension is supported by the server. |
| Specifies that gtk.gdk.IMAGE_SHARED should be tried first, and if that fails then gtk.gdk.IMAGE_NORMAL will be used. |
The Input Condition constants are a set of bit-flags that
specify conditions for which an input callback will be triggered. The three
members of this enumeration correspond to the
readfds
, writefds
, and
exceptfds
arguments to the
select
system call.
| The file descriptor has become available for reading. (Or, as is standard in Unix, a socket or pipe was closed at the other end; this is the case if a subsequent read on the file descriptor returns a count of zero.) |
| The file descriptor has become available for writing. |
| An exception was raised on the file descriptor. |
The Input Mode constants specify the mode of an input device.
| the device is disabled and will not report any events. |
| the device is enabled. The device's coordinate space maps to the entire 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. |
The Input Source constants specify the type of an input device in general terms.
| the device is a mouse. (This will be reported for the core pointer, even if it is something else, such as a trackball.) |
| the device is a stylus of a graphics tablet or similar device. |
| the device is an eraser. Typically, this would be the other end of a stylus on a graphics tablet. |
| the device is a graphics tablet "puck" or similar device. |
The Join Style constants specify how the joins between segments of a polygon are drawn.
| The sides of each line are extended to meet at an angle. |
| The sides of the two lines are joined by a circular arc. |
| The sides of the two lines are joined by a straight line which makes an equal angle with each line. |
The Line Style constants specify how lines are drawn.
| Lines are drawn solid. |
| Lines are drawn dashed where even segments are drawn but odd segments are not drawn. |
| Lines are drawn dashed where even segments are drawn
normally but odd segments are drawn in the background color if the fill
style is gtk.gdk.SOLID , or in the background color masked
by the stipple if the fill style is
gtk.gdk.STIPPLED . |
The Modifier constants are 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.
| The Shift key. |
| A Lock key (depending on the modifier mapping of the X server this may either be CapsLock or ShiftLock). |
| The Control key. |
| 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). |
| The fifth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). |
| The sixth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). |
| The seventh modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). |
| The eighth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). |
| The first mouse button. |
| The second mouse button. |
| The third mouse button. |
| The fourth mouse button. |
| The fifth mouse button. |
| Differentiates between (keyval, modifiers) pairs from key press and release events. |
| all of the above |
The Notify Type constants specify the kind of crossing for the
Crossing gtk.gdk.Event
| the window is entered from an ancestor or left toward an ancestor. |
| the pointer moves between an ancestor and an inferior of the window. |
| the window is entered from an inferior or left toward an inferior. |
| the window is entered from or left toward a window which is neither an ancestor nor an inferior. |
| 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. |
| ??? |
The Overlap Type constants specify the possible values returned
by the gtk.gdk.Region.rect_in
()
method.
| The rectangle is inside the GdkRegion. |
| The rectangle is outside the GdkRegion. |
| The rectangle is partly inside the GdkRegion. |
The Owner Change constants specify the possible values
indicating why selection ownership changed. These are used by the
gdk.OWNER_CHANGE
type gtk.gdk.Event
"owner" attribute.
| The rectangle is inside the GdkRegion. |
| The rectangle is outside the GdkRegion. |
| The rectangle is partly inside the GdkRegion. |
This constant is available in PyGTK 2.10 and above.
The Parent Relative constant is a special value (equivalent to
1L) for gtk.gdk.Pixmap
variables, indicating that the background pixmap for a window should
be inherited from the parent window.
| the background pixmap for a window should be inherited from the parent window. |
The Pixbuf Rotation constants specify the angles that a pixbuf
can be rotated using the gtk.gdk.Pixbuf.rotate_simple
()
method.
| No rotation. Rotate by 0 degrees. |
| Rotate by 90 degrees. |
| Rotate by 180 degrees. |
| Rotate by 270 degrees. |
The Property Mode constants specify how existing data is
combined with new data when using the the gtk.gdk.Window.property_change
()
method.
| The new data replaces the existing data. |
| The new data is prepended to the existing data. |
| The new data is appended to the existing data. |
The Property State constants specify the type of a property
change for a Property gtk.gdk.Event
| the property value was changed. |
| the property was deleted. |
The RGB Dither constants specify the type of dithering to apply to the image on display.
| Never use dithering. |
| Use dithering in 8 bits per pixel (and below) only. |
| Use dithering in 16 bits per pixel and below. |
The Scroll Direction constants specify the direction for the
Scroll.gtk.gdk.Event
| the window is scrolled up. |
| the window is scrolled down. |
| the window is scrolled to the left. |
| the window is scrolled to the right. |
The Setting Action constants specify the kind of modification
applied to a setting in a Setting gtk.gdk.Event
| A setting was added. |
| A setting was changed. |
| A setting was deleted. |
The Subwindow Mode constants specify how drawing onto a window will affect child windows of that window.
| only draw onto the window itself not the subwindows. |
| draw onto the window and child windows. |
The Visibility State constants specify the visibility status of a
window for the Visibility gtk.gdk.Event
| the window is completely visible. |
| the window is partially visible. |
| the window is not visible at all. |
The Visual Type constants specify a set of values that describe the manner in which the pixel values for a visual are converted into RGB values for display.
| Each pixel value indexes a grayscale value directly. |
| 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. |
| Each pixel value is an index into a predefined, unmodifiable color map that maps pixel values into RGB values. |
| 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. |
| Each pixel value directly contains red, green, and blue
components. The red_mask, green_mask, and blue_mask fields of the gtk.gdk.Visual
structure describe how the components are assembled into a pixel
value. |
| Each pixel value contains red, green, and blue components
as for gtk.gdk.TRUE_COLOR , but the components are mapped
via a color table into the final output table instead of being converted
directly. |
The Window Class constants specify the class of
window. gtk.gdk.INPUT_OUTPUT
windows are the standard
kind of window you might expect. gtk.gdk.INPUT_ONLY
windows are invisible; they are used to trap events, but you can't draw on
them.
| A window for graphics and events. |
| A window for events only. |
The Window Edge constants specify window edge or corner.
| The top left corner. |
| The top edge. |
| The top right corner. |
| The left edge. |
| The right edge. |
| The lower left corner. |
| The lower edge. |
| The lower right corner. |
The Window Hints constants specify the fields of a GdkGeometry
struct should be paid attention to. Also, the presence/absence of
gtk.gdk.HINT_POS
,
gtk.gdk.HINT_USER_POS
, and
gtk.gdk.HINT_USER_SIZE
is significant, though they don't
directly refer to GdkGeometry
fields. gtk.gdk.HINT_USER_POS
will be set automatically
by gtk.Window
if you call the gtk.Window.move
()
method. gtk.gdk.HINT_USER_POS
and
gtk.gdk.HINT_USER_SIZE
should be set if the user
specified a size/position using a --geometry command-line argument; the
gtk.Window.parse_geometry
()
method automatically sets these flags. These constants aren't useful in
PyGTK.
| Indicates that the program has positioned the window |
| Min size fields are set |
| Max size fields are set |
| Base size fields are set |
| Aspect ratio fields are set |
| Resize increment fields are set |
| Window gravity field is set |
| Indicates that the window's position was explicitly set by the user |
| Indicates that the window's size was explicitly set by the user |
The Window State flag constants are a set of bit-flags that specify the state of a toplevel window.
| The window is not shown. |
| The window is minimized. |
| The window is maximized. |
| The window is sticky. |
| The window is maximized without decorations. Available in PyGTK 2.2 and above. |
| The window is kept above other windows. Available in PyGTK 2.4 and above. |
| The window is kept below other windows. Available in PyGTK 2.4 and above. |
The Window Type constants specify the type of window.
| The root window; this window has no parent, covers the entire screen, and is created by the window system. |
| A toplevel window (used to implement gtk.Window ). |
| A child window (used to implement widgets e.g. gtk.Entry ). |
| A useless/deprecated compatibility type. |
| An override redirect temporary window (used to implement
gtk.Menu ). |
| A foreign window (see the gtk.gdk.window_foreign_new ()
function). |
The Window Type Hint constants specify hints for the window manager that indicate what type of function the window has. The window manager can use this when determining decoration and behavior of the window. The hint must be set before mapping the window.
| A normal toplevel window. |
| A dialog window. |
| A window used to implement a menu. |
| A window used to implement a toolbar. |
| A window used to implement a splash screen |
| |
| A window used to implement a docking bar. |
| A window used to implement a desktop. |
| A menu that belongs to a menubar. |
| A menu that does not belong to a menubar, e.g. a context menu. |
| A tooltip. |
| A notification - typically a "bubble" that belongs to a status icon. |
| A popup from a combo box. |
| A window that is used to implement a DND cursor. |
The WM Decoration constants are bit-flags that specify the hints that the window manager can use when determining how to decorate the window. The hints must be set before mapping the window.
| All decorations should be applied. |
| A frame should be drawn around the window. |
| The frame should have resize handles. |
| A titlebar should be placed above the window. |
| A button for opening a menu should be included. |
| A minimize button should be included. |
| A maximize button should be included. |
The WM Function constants specify 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.
| All functions should be offered. |
| The window should be resizable. |
| The window should be movable. |
| The window should be minimizable. |
| The window should be maximizable. |
| The window should be closeable. |