Namespace
Gdk – 3.0
The GTK toolkit
Dependencies
GObject—2.0 | The base type system library |
Browse documentation | |
Pango—1.0 | Text shaping and rendering |
Browse documentation |
Related libraries
Gtk | The GTK toolkit |
Browse documentation |
Classes
AppLaunchContext |
GdkAppLaunchContext is an implementation of |
Cursor |
A |
Device |
The |
DeviceManager |
In addition to a single pointer and keyboard for user interface input, GDK contains support for a variety of input devices, including graphics tablets, touchscreens and multiple pointers/keyboards interacting simultaneously with the user interface. Such input devices often have additional features, such as sub-pixel positioning information and additional device-dependent information. |
DeviceTool | |
Display |
|
DisplayManager |
The purpose of the |
DragContext | |
DrawingContext |
|
FrameClock |
A |
GLContext |
|
Keymap |
A |
Monitor |
GdkMonitor objects represent the individual outputs that are
associated with a |
Screen |
|
Seat |
The |
Visual |
A |
Window |
Interfaces
DevicePad |
|
Structs
Atom |
An opaque type representing a string as an index into a table of strings on the X server. |
Color |
A deprecated: 3.14 |
EventAny |
Contains the fields which are common to all event structs.
Any event pointer can safely be cast to a pointer to a |
EventButton |
Used for button press and button release events. The
|
EventConfigure |
Generated when a window size or position has changed. |
EventCrossing |
Generated when the pointer enters or leaves a window. |
EventDND |
Generated during DND operations. |
EventExpose |
Generated when all or part of a window becomes visible and needs to be redrawn. |
EventFocus |
Describes a change of keyboard focus. |
EventGrabBroken |
Generated when a pointer or keyboard grab is broken. On X11, this happens
when the grab window becomes unviewable (i.e. it or one of its ancestors
is unmapped), or if the same application grabs the pointer or keyboard
again. Note that implicit grabs (which are initiated by button presses)
can also cause since: 2.8 |
EventKey |
Describes a key press or key release event. |
EventMotion |
Generated when the pointer moves. |
EventOwnerChange |
Generated when the owner of a selection changes. On X11, this information is only available if the X server supports the XFIXES extension. since: 2.6 |
EventPadAxis |
Generated during since: 3.22 |
EventPadButton |
Generated during since: 3.22 |
EventPadGroupMode |
Generated during since: 3.22 |
EventProperty |
Describes a property change on a window. |
EventProximity |
Proximity events are generated when using GDK’s wrapper for the XInput extension. The XInput extension is an add-on for standard X that allows you to use nonstandard devices such as graphics tablets. A proximity event indicates that the stylus has moved in or out of contact with the tablet, or perhaps that the user’s finger has moved in or out of contact with a touch screen. |
EventScroll |
Generated from button presses for the buttons 4 to 7. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned. |
EventSelection |
Generated when a selection is requested or ownership of a selection is taken over by another client application. |
EventSequence | |
EventSetting |
Generated when a setting is modified. |
EventTouch |
Used for touch events.
|
EventTouchpadPinch |
Generated during touchpad swipe gestures. |
EventTouchpadSwipe |
Generated during touchpad swipe gestures. |
EventVisibility |
Generated when the window visibility status has changed. deprecated: 3.12 |
EventWindowState |
Generated when the state of a toplevel window changes. |
FrameTimings |
A |
Geometry |
The |
KeymapKey |
A |
Point |
Defines the x and y coordinates of a point. |
Rectangle |
Defines the position and size of a rectangle. It is identical to cairo_rectangle_int_t. |
RGBA |
A |
TimeCoord |
A |
WindowAttr |
Attributes to use for a newly-created window. |
WindowRedirect |
Unions
Event |
A |
Aliases
XEvent |
Used to represent native events (XEvents for the X11 backend, MSGs for Win32). |
Enumerations
AxisUse |
An enumeration describing the way in which a device axis (valuator) maps onto the predefined valuator types that GTK+ understands. |
ByteOrder |
A set of values describing the possible byte-orders for storing pixel values in memory. |
CrossingMode |
Specifies the crossing mode for |
CursorType |
Predefined cursors. |
DevicePadFeature |
A pad feature. |
DeviceToolType |
Indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc. since: 3.22 |
DeviceType |
Indicates the device type. See [above][GdkDeviceManager.description] for more information about the meaning of these device types. |
DragCancelReason |
Used in since: 3.20 |
DragProtocol |
Used in |
EventType |
Specifies the type of the event. |
FilterReturn |
Specifies the result of applying a |
FullscreenMode |
Indicates which monitor (in a multi-head setup) a window should span over when in fullscreen mode. since: 3.8 |
GrabOwnership |
Defines how device grabs interact with other devices. |
GrabStatus |
Returned by gdk_device_grab(), |
Gravity |
Defines the reference point of a window and the meaning of coordinates
passed to gtk_window_move(). See |
InputMode |
An enumeration that describes the mode of an input device. |
InputSource |
An enumeration describing the type of an input device in general terms. |
ModifierIntent |
This enum is used with since: 3.4 |
NotifyType |
Specifies the kind of crossing for |
OwnerChange |
Specifies why a selection ownership was changed. |
PropertyState |
Specifies the type of a property change for a |
PropMode |
Describes how existing data is combined with new data when using gdk_property_change(). |
ScrollDirection |
Specifies the direction for |
SettingAction |
Specifies the kind of modification applied to a setting in a
|
Status | |
SubpixelLayout |
This enumeration describes how the red, green and blue components of physical pixels on an output device are laid out. since: 3.22 |
TouchpadGesturePhase |
Specifies the current state of a touchpad gesture. All gestures are
guaranteed to begin with an event with phase |
VisibilityState |
Specifies the visiblity status of a window for a |
VisualType |
A set of values that describe the manner in which the pixel values for a visual are converted into RGB values for display. |
WindowEdge |
Determines a window edge or corner. |
WindowType |
Describes the kind of window. |
WindowTypeHint |
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. |
WindowWindowClass |
|
Bitfields
AnchorHints |
Positioning hints for aligning a window relative to a rectangle. since: 3.22 |
AxisFlags |
Flags describing the current capabilities of a device/tool. since: 3.22 |
DragAction |
Used in |
EventMask |
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 |
FrameClockPhase |
since: 3.8 |
ModifierType |
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. |
SeatCapabilities |
Flags describing the seat capabilities. since: 3.20 |
WindowAttributesType |
Used to indicate which fields in the |
WindowHints |
Used to indicate which fields of a |
WindowState |
Specifies the state of a toplevel window. |
WMDecoration |
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. |
WMFunction |
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. |
Error Domains
GLError |
Error enumeration for since: 3.16 |
Callbacks
EventFunc |
Specifies the type of function passed to |
FilterFunc |
Specifies the type of function used to filter native events before they are converted to GDK events. |
SeatGrabPrepareFunc |
Type of the callback used to set up since: 3.20 |
WindowChildFunc |
A function of this type is passed to gdk_window_invalidate_maybe_recurse(). It gets called for each child of the window to determine whether to recursively invalidate it or now. |
WindowInvalidateHandlerFunc |
Whenever some area of the window is invalidated (directly in the
window or in a child window) this gets called with since: 3.10 |
Functions
add_option_entries_libgtk_only |
Appends gdk option entries to the passed in option group. This is not public API and must not be used by applications. deprecated: 3.16 |
beep |
Emits a short beep on the default display. |
cairo_create |
Creates a Cairo context for drawing to deprecated: 3.22 since: 2.8 |
cairo_draw_from_gl |
This is the main way to draw GL content in GTK+. It takes a render buffer ID
( since: 3.16 |
cairo_get_clip_rectangle |
This is a convenience function around cairo_clip_extents(). It rounds the clip extents to integer coordinates and returns a boolean indicating if a clip area exists. |
cairo_get_drawing_context |
Retrieves the since: 3.22 |
cairo_rectangle |
Adds the given rectangle to the current path of since: 2.8 |
cairo_region |
Adds the given region to the current path of since: 2.8 |
cairo_region_create_from_surface |
Creates region that describes covers the area where the given
|
cairo_set_source_color |
Sets the specified deprecated: 3.4 since: 2.8 |
cairo_set_source_pixbuf |
Sets the given pixbuf as the source pattern for since: 2.8 |
cairo_set_source_rgba |
Sets the specified since: 3.0 |
cairo_set_source_window |
Sets the given window as the source pattern for since: 2.24 |
cairo_surface_create_from_pixbuf |
Creates an image surface with the same contents as the pixbuf. since: 3.10 |
disable_multidevice |
Disables multidevice support in GDK. This call must happen prior
to gdk_display_open(), gtk_init(), since: 3.0 |
drag_abort |
Aborts a drag without dropping. |
drag_begin |
Starts a drag and creates a new drag context for it.
This function assumes that the drag is controlled by the
client pointer device, use |
drag_begin_for_device |
Starts a drag and creates a new drag context for it. |
drag_begin_from_point |
Starts a drag and creates a new drag context for it. since: 3.20 |
drag_drop |
Drops on the current destination. |
drag_drop_done |
Inform GDK if the drop ended successfully. Passing since: 3.20 |
drag_drop_succeeded |
Returns whether the dropped data has been successfully
transferred. This function is intended to be used while
handling a since: 2.6 |
drag_find_window_for_screen |
Finds the destination window and DND protocol to use at the given pointer position. since: 2.2 |
drag_get_selection |
Returns the selection atom for the current source window. |
drag_motion |
Updates the drag context when the pointer moves or the set of actions changes. |
drag_status |
Selects one of the actions offered by the drag source. |
drop_finish |
Ends the drag operation after a drop. |
drop_reply |
Accepts or rejects a drop. |
error_trap_pop |
Removes an error trap pushed with gdk_error_trap_push().
May block until an error has been definitively received
or not received from the X server. |
error_trap_pop_ignored |
Removes an error trap pushed with gdk_error_trap_push(), but without bothering to wait and see whether an error occurred. If an error arrives later asynchronously that was triggered while the trap was pushed, that error will be ignored. since: 3.0 |
error_trap_push |
This function allows X errors to be trapped instead of the normal
behavior of exiting the application. It should only be used if it
is not possible to avoid the X error in any other way. Errors are
ignored on all |
events_get_angle |
If both events contain X/Y information, this function will return since: 3.0 |
events_get_center |
If both events contain X/Y information, the center of both coordinates
will be returned in since: 3.0 |
events_get_distance |
If both events have X/Y information, the distance between both coordinates
(as in a straight line going from since: 3.0 |
events_pending |
Checks if any events are ready to be processed for any display. |
flush |
Flushes the output buffers of all display connections and waits until all requests have been processed. This is rarely needed by applications. |
get_default_root_window |
Obtains the root window (parent all other windows are inside) for the default display and screen. |
get_display |
Gets the name of the display, which usually comes from the
deprecated: 3.8 |
get_display_arg_name |
Gets the display name specified in the command line arguments passed
to since: 2.2 |
get_program_class |
Gets the program class. Unless the program class has explicitly
been set with |
get_show_events |
Gets whether event debugging output is enabled. |
init |
Initializes the GDK library and connects to the windowing system.
If initialization fails, a warning message is output and the application
terminates with a call to |
init_check |
Initializes the GDK library and connects to the windowing system,
returning |
keyboard_grab |
Grabs the keyboard so that all events are passed to this application until the keyboard is ungrabbed with gdk_keyboard_ungrab(). This overrides any previous keyboard grab by this client. deprecated: 3.0 |
keyboard_ungrab |
Ungrabs the keyboard on the default display, if it is grabbed by this application. deprecated: 3.0 |
keyval_convert_case |
Obtains the upper- and lower-case versions of the keyval |
keyval_from_name |
Converts a key name to a key value. |
keyval_is_lower |
Returns |
keyval_is_upper |
Returns |
keyval_name |
Converts a key value into a symbolic name. |
keyval_to_lower |
Converts a key value to lower case, if applicable. |
keyval_to_unicode |
Convert from a GDK key symbol to the corresponding ISO10646 (Unicode) character. |
keyval_to_upper |
Converts a key value to upper case, if applicable. |
list_visuals |
Lists the available visuals for the default screen. (See gdk_screen_list_visuals()) A visual describes a hardware image data format. For example, a visual might support 24-bit color, or 8-bit color, and might expect pixels to be in a certain format. deprecated: 3.22 |
notify_startup_complete |
Indicates to the GUI environment that the application has finished loading. If the applications opens windows, this function is normally called after opening the application’s initial set of windows. since: 2.2 |
notify_startup_complete_with_id |
Indicates to the GUI environment that the application has finished loading, using a given identifier. since: 2.12 |
offscreen_window_get_embedder |
Gets the window that since: 2.18 |
offscreen_window_get_surface |
Gets the offscreen surface that an offscreen window renders into. If you need to keep this around over window resizes, you need to add a reference to it. |
offscreen_window_set_embedder |
Sets since: 2.18 |
pango_context_get |
Creates a |
pango_context_get_for_display |
Creates a since: 3.22 |
pango_context_get_for_screen |
Creates a since: 2.2 |
pango_layout_get_clip_region |
Obtains a clip region which contains the areas where the given ranges
of text would be drawn. |
pango_layout_line_get_clip_region |
Obtains a clip region which contains the areas where the given
ranges of text would be drawn. |
parse_args |
Parse command line arguments, and store for future use by calls to gdk_display_open(). since: 2.2 |
pixbuf_get_from_surface |
Transfers image data from a #cairo_surface_t and converts it to an RGB(A)
representation inside a |
pixbuf_get_from_window |
Transfers image data from a |
pointer_grab |
Grabs the pointer (usually a mouse) so that all events are passed to this application until the pointer is ungrabbed with gdk_pointer_ungrab(), or the grab window becomes unviewable. This overrides any previous pointer grab by this client. deprecated: 3.0 |
pointer_is_grabbed |
Returns deprecated: 3.0 |
pointer_ungrab |
Ungrabs the pointer on the default display, if it is grabbed by this application. deprecated: 3.0 |
pre_parse_libgtk_only |
Prepare for parsing command line arguments for GDK. This is not public API and should not be used in application code. deprecated: 3.16 |
property_change |
Changes the contents of a property on a window. |
property_delete |
Deletes a property from a window. |
property_get |
Retrieves a portion of the contents of a property. If the
property does not exist, then the function returns |
query_depths |
This function returns the available bit depths for the default screen. It’s equivalent to listing the visuals (gdk_list_visuals()) and then looking at the depth field in each visual, removing duplicates. deprecated: 3.22 |
query_visual_types |
This function returns the available visual types for the default screen. It’s equivalent to listing the visuals (gdk_list_visuals()) and then looking at the type field in each visual, removing duplicates. deprecated: 3.22 |
selection_convert |
Retrieves the contents of a selection in a given form. |
selection_owner_get |
Determines the owner of the given selection. |
selection_owner_get_for_display |
Determine the owner of the given selection. since: 2.2 |
selection_owner_set |
Sets the owner of the given selection. |
selection_owner_set_for_display |
Sets the since: 2.2 |
selection_property_get |
Retrieves selection data that was stored by the selection
data in response to a call to gdk_selection_convert(). This function
will not be used by applications, who should use the |
selection_send_notify |
Sends a response to SelectionRequest event. |
selection_send_notify_for_display |
Send a response to SelectionRequest event. since: 2.2 |
set_allowed_backends |
Sets a list of backends that GDK should try to use. since: 3.10 |
set_double_click_time |
Set the double click time for the default display. See gdk_display_set_double_click_time(). See also gdk_display_set_double_click_distance(). Applications should not set this, it is a global user-configured setting. |
set_program_class |
Sets the program class. The X11 backend uses the program class to set
the class name part of the |
set_show_events |
Sets whether a trace of received events is output.
Note that GTK+ must be compiled with debugging (that is,
configured using the |
setting_get |
Obtains a desktop-wide setting, such as the double-click time, for the default screen. See gdk_screen_get_setting(). |
synthesize_window_state | |
test_render_sync |
Retrieves a pixel from since: 2.14 |
test_simulate_button |
This function is intended to be used in GTK+ test programs.
It will warp the mouse pointer to the given ( since: 2.14 |
test_simulate_key |
This function is intended to be used in GTK+ test programs.
If ( since: 2.14 |
text_property_to_utf8_list_for_display |
Converts a text property in the given encoding to a list of UTF-8 strings. since: 2.2 |
threads_add_idle |
A wrapper for the common usage of since: 2.12 |
threads_add_idle_full |
Adds a function to be called whenever there are no higher priority
events pending. If the function returns since: 2.12 |
threads_add_timeout |
A wrapper for the common usage of since: 2.12 |
threads_add_timeout_full |
Sets a function to be called at regular intervals holding the GDK lock,
with the given priority. The function is called repeatedly until it
returns since: 2.12 |
threads_add_timeout_seconds |
A wrapper for the common usage of since: 2.14 |
threads_add_timeout_seconds_full |
A variant of since: 2.14 |
threads_enter |
This function marks the beginning of a critical section in which GDK and GTK+ functions can be called safely and without causing race conditions. Only one thread at a time can be in such a critial section. deprecated: 3.6 |
threads_init |
Initializes GDK so that it can be used from multiple threads
in conjunction with deprecated: 3.6 |
threads_leave |
Leaves a critical region begun with gdk_threads_enter(). deprecated: 3.6 |
threads_set_lock_functions |
Allows the application to replace the standard method that
GDK uses to protect its data structures. Normally, GDK
creates a single deprecated: 3.6 since: 2.4 |
unicode_to_keyval |
Convert from a ISO10646 character to a key symbol. |
utf8_to_string_target |
Converts an UTF-8 string into the best possible representation as a STRING. The representation of characters not in STRING is not specified; it may be as pseudo-escape sequences \x{ABCD}, or it may be in some other form of approximation. |
Function Macros
ATOM_TO_POINTER |
Converts a |
DEPRECATED_FOR | |
DISPLAY_OBJECT | |
POINTER_TO_ATOM |
Extracts a |
THREADS_ENTER |
This macro marks the beginning of a critical section in which GDK and
GTK+ functions can be called safely and without causing race
conditions. Only one thread at a time can be in such a critial
section. The macro expands to a no-op if #G_THREADS_ENABLED has not
been defined. Typically deprecated: 3.6 |
THREADS_LEAVE |
This macro marks the end of a critical section begun with #GDK_THREADS_ENTER. deprecated: 3.6 |
UNAVAILABLE |