Defines all possible DND actions. This can be used in gdk_drop_status() messages when any drop can be accepted or a more specific drop method is not yet known. Positioning hints for aligning a surface relative to a rectangle. These hints determine how the surface should be positioned in the case that the surface 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 surface extends beyond the left or right edges of the monitor. If %GDK_ANCHOR_SLIDE_X is set, the surface can be shifted horizontally to fit on-screen. If %GDK_ANCHOR_RESIZE_X is set, the surface 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. allow flipping anchors horizontally allow flipping anchors vertically allow sliding surface horizontally allow sliding surface vertically allow resizing surface horizontally allow resizing surface vertically allow flipping anchors on both axes allow sliding surface on both axes allow resizing surface on both axes GdkAppLaunchContext is an implementation of #GAppLaunchContext that handles launching an application in a graphical context. It provides startup notification and allows to launch applications on a specific screen or workspace. ## Launching an application |[<!-- language="C" --> GdkAppLaunchContext *context; context = gdk_display_get_app_launch_context (display); gdk_app_launch_context_set_display (display); gdk_app_launch_context_set_timestamp (gdk_event_get_time (event)); if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error)) g_warning ("Launching failed: %s\n", error->message); g_object_unref (context); ]| Gets the #GdkDispolat that @context is for. the display of @context a #GdkAppLaunchContext Sets the workspace on which applications will be launched when using this context when running under a window manager that supports multiple workspaces, as described in the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec). When the workspace is not specified or @desktop is set to -1, it is up to the window manager to pick one, typically it will be the current workspace. a #GdkAppLaunchContext the number of a workspace, or -1 Sets the icon for applications that are launched with this context. Window Managers can use this information when displaying startup notification. See also gdk_app_launch_context_set_icon_name(). a #GdkAppLaunchContext a #GIcon, or %NULL Sets the icon for applications that are launched with this context. The @icon_name will be interpreted in the same way as the Icon field in desktop files. See also gdk_app_launch_context_set_icon(). If both @icon and @icon_name are set, the @icon_name takes priority. If neither @icon or @icon_name is set, the icon is taken from either the file that is passed to launched application or from the #GAppInfo for the launched application itself. a #GdkAppLaunchContext an icon name, or %NULL Sets the timestamp of @context. The timestamp should ideally be taken from the event that triggered the launch. Window managers can use this information to avoid moving the focus to the newly launched application when the user is busy typing in another window. This is also known as 'focus stealing prevention'. a #GdkAppLaunchContext a timestamp Flags describing the current capabilities of a device/tool. X axis is present Y axis is present Pressure axis is present X tilt axis is present Y tilt axis is present Wheel axis is present Distance axis is present Z-axis rotation is present Slider axis is present 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. 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. the axis is used for pen/tablet distance information the axis is used for pen rotation information the axis is used for pen slider information a constant equal to the numerically highest axis value. The middle button. The primary button. This is typically the left mouse button, or the right button in a left-handed setup. The secondary button. This is typically the right mouse button, or the left button in a left-handed setup. 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, 0xff, 0xee, 0xcc. Represents the current time, and can be used anywhere a time is expected. #GdkCairoContext is an object representing the platform-specific draw context. #GdkCairoContexts are created for a #GdkDisplay using gdk_surface_create_cairo_context(), and the context can then be used to draw on that #GdkSurface. Retrieves a Cairo context to be used to draw on the #GdkSurface of @context. A call to gdk_draw_context_begin_frame() with this @context must have been done or this function will return %NULL. The returned context is guaranteed to be valid until gdk_draw_context_end_frame() is called. a Cairo context to be used to draw the contents of the #GdkSurface. %NULL is returned when @contet is not drawing. a #GdkCairoContext that is currently drawing The #GdkClipboard object represents a clipboard of data shared between different applications or between different parts of the same application. To get a GdkClipboard object, use gdk_display_get_clipboard() or gdk_display_get_primary_clipboard(). You can find out about the data that is currently available in a clipboard using gdk_clipboard_get_formats(). To make text or image data available in a clipboard, use gdk_clipboard_set_text() or gdk_clipboard_set_texture(). For other data, you can use gdk_clipboard_set_content(), which takes a #GdkContentProvider object. To read textual or image data from a clipboard, use gdk_clipboard_read_text_async() or gdk_clipboard_read_texture_async(). For other data, use gdk_clipboard_read_async(), which provides a #GInputStream object. Returns the #GdkContentProvider currently set on @clipboard. If the @clipboard is empty or its contents are not owned by the current process, %NULL will be returned. The content of a clipboard or %NULL if the clipboard does not maintain any content. a #GdkClipboard Gets the #GdkDisplay that the clipboard was created for. a #GdkDisplay a #GdkClipboard Gets the formats that the clipboard can provide its current contents in. The formats of the clipboard a #GdkClipboard Returns if the clipboard is local. A clipboard is considered local if it was last claimed by the running application. Note that gdk_clipboard_get_content() may return %NULL even on a local clipboard. In this case the clipboard is empty. %TRUE if the clipboard is local a #GdkClipboard Asynchronously requests an input stream to read the @clipboard's contents from. When the operation is finished @callback will be called. You can then call gdk_clipboard_read_finish() to get the result of the operation. The clipboard will choose the most suitable mime type from the given list to fulfill the request, preferring the ones listed first. a #GdkClipboard a %NULL-terminated array of mime types to choose from the [I/O priority][io-priority] of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Finishes an asynchronous clipboard read started with gdk_clipboard_read_async(). a #GInputStream or %NULL on error. a #GdkClipboard a #GAsyncResult pointer to store the chosen mime type in or %NULL Asynchronously request the @clipboard contents converted to a string. When the operation is finished @callback will be called. You can then call gdk_clipboard_read_text_finish() to get the result. This is a simple wrapper around gdk_clipboard_read_value_async(). Use that function or gdk_clipboard_read_async() directly if you need more control over the operation. a #GdkClipboard optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Finishes an asynchronous clipboard read started with gdk_clipboard_read_text_async(). a new string or %NULL on error. a #GdkClipboard a #GAsyncResult Asynchronously request the @clipboard contents converted to a #GdkPixbuf. When the operation is finished @callback will be called. You can then call gdk_clipboard_read_texture_finish() to get the result. This is a simple wrapper around gdk_clipboard_read_value_async(). Use that function or gdk_clipboard_read_async() directly if you need more control over the operation. a #GdkClipboard optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Finishes an asynchronous clipboard read started with gdk_clipboard_read_texture_async(). a new #GdkTexture or %NULL on error. a #GdkClipboard a #GAsyncResult Asynchronously request the @clipboard contents converted to the given @type. When the operation is finished @callback will be called. You can then call gdk_clipboard_read_value_finish() to get the resulting #GValue. For local clipboard contents that are available in the given #GType, the value will be copied directly. Otherwise, GDK will try to use gdk_content_deserialize_async() to convert the clipboard's data. a #GdkClipboard a #GType to read the [I/O priority][io-priority] of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Finishes an asynchronous clipboard read started with gdk_clipboard_read_value_async(). a #GValue containing the result. a #GdkClipboard a #GAsyncResult Sets the clipboard to contain the value collected from the given varargs. a #GdkClipboard type of value to set value contents conforming to @type Sets a new content provider on @clipboard. The clipboard will claim the #GdkDisplay's resources and advertise these new contents to other applications. In the rare case of a failure, this function will return %FALSE. The clipboard will then continue reporting its old contents and ignore @provider. If the contents are read by either an external application or the @clipboard's read functions, @clipboard will select the best format to transfer the contents and then request that format from @provider. %TRUE if setting the clipboard succeeded a #GdkClipboard the new contents of @clipboard or %NULL to clear the clipboard Puts the given @text into the clipboard. a #GdkClipboard Text to put into the clipboard Puts the given @texture into the clipboard. a #GdkClipboard a #GdkTexture to put into the clipboard Sets the clipboard to contain the value collected from the given @args. a #GdkClipboard type of value to set varargs containing the value of @type Sets the @clipboard to contain the given @value. a #GdkClipboard a #GValue to set Asynchronously instructs the @clipboard to store its contents remotely to preserve them for later usage. If the clipboard is not local, this function does nothing but report success. This function is called automatically when gtk_main() or #GtkApplication exit, so you likely don't need to call it. a #GdkClipboard the [I/O priority][io-priority] of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Finishes an asynchronous clipboard store started with gdk_clipboard_store_async(). %TRUE if storing was successful. a #GdkClipboard a #GAsyncResult The #GdkContentProvider or %NULL if the clipboard is empty or contents are provided otherwise. The #GdkDisplay that the clipboard belongs to. The possible formats that the clipboard can provide its data in. %TRUE if the contents of the clipboard are owned by this process. The ::changed signal is emitted when the clipboard changes ownership. The type of a function that can be registered with gdk_content_register_deserializer(). When the function gets called to operate on content, it can call functions on the @deserializer object to obtain the mime type, input stream, user data, etc. for its operation. a #GdkContentDeserializer A GdkContentDeserializer is used to deserialize content received via inter-application data transfers. Gets the cancellable that was passed to gdk_content_deserialize_async(). the cancellable for the current operation a #GdkContentDeserializer Gets the GType to create an instance of. the GType for the current operation a #GdkContentDeserializer Gets the input stream that was passed to gdk_content_deserialize_async(). the input stream for the current operation a #GdkContentDeserializer Gets the mime type to deserialize from. the mime type for the current operation a #GdkContentDeserializer Gets the io priority that was passed to gdk_content_deserialize_async(). the io priority for the current operation a #GdkContentDeserializer Gets the data that was associated with @deserializer via gdk_content_deserializer_set_task_data(). the task data for @deserializer a #GdkContentDeserializer Gets the user data that was passed when the deserializer was registered. the user data for this deserializer a #GdkContentDeserializer Gets the #GValue to store the deserialized object in. the #GValue for the current operation a #GdkContentDeserializer Indicate that the deserialization has ended with an error. This function consumes @error. a #GdkContentDeserializer a #GError Indicate that the deserialization has been successfully completed. a #GdkContentDeserializer Associate data with the current deserialization operation. a #GdkContentDeserializer data to associate with this operation destroy notify for @data This section describes the #GdkContentFormats structure that is used to advertise and negotiate the format of content passed between different widgets, windows or applications using for example the clipboard or drag'n'drop. GDK supports content in 2 forms: #GType and mime type. Using #GTypes is meant only for in-process content transfers. Mime types are meant to be used for data passing both in-process and out-of-process. The details of how data is passed is described in the documentation of the actual implementations. A #GdkContentFormats describes a set of possible formats content can be exchanged in. It is assumed that this set is ordered. #GTypes are more important than mime types. Order between different #Gtypes or mime types is the order they were added in, most important first. Functions that care about order, such as gdk_content_formats_union() will describe in their documentation how they interpret that order, though in general the order of the first argument is considered the primary order of the result, followed by the order of further arguments. For debugging purposes, the function gdk_content_formats_to_string() exists. It will print a comma-seperated formats of formats from most important to least important. #GdkContentFormats is an immutable struct. After creation, you cannot change the types it represents. Instead, new #GdkContentFormats have to be created. The #GdkContentFormatsBuilder structure is meant to help in this endeavor. Creates a new #GdkContentFormats from an array of mime types. The mime types must be valid and different from each other or the behavior of the return value is undefined. If you cannot guarantee this, use #GdkContentFormatsBuilder instead. the new #GdkContentFormats. Pointer to an array of mime types number of entries in @mime_types. Creates a new #GdkContentFormats for a given #GType. a new #GdkContentFormats a $GType Checks if a given #GType is part of the given @formats. %TRUE if the #GType was found a #GdkContentFormats the #GType to search for Checks if a given mime type is part of the given @formats. %TRUE if the mime_type was found a #GdkContentFormats the mime type to search for Gets the #GTypes included in @formats. Note that @formats may not contain any #GTypes, in particular when they are empty. In that case %NULL will be returned. %G_TYPE_INVALID-terminated array of types included in @formats or %NULL if none. a #GdkContentFormats optional pointer to take the number of #GTypes contained in the return value Gets the mime types included in @formats. Note that @formats may not contain any mime types, in particular when they are empty. In that case %NULL will be returned. %NULL-terminated array of interned strings of mime types included in @formats or %NULL if none. a #GdkContentFormats optional pointer to take the number of mime types contained in the return value Checks if @first and @second have any matching formats. %TRUE if a matching format was found. the primary #GdkContentFormats to intersect the #GdkContentFormats to intersect with Finds the first #GType from @first that is also contained in @second. If no matching #GType is found, %G_TYPE_INVALID is returned. The first common #GType or %G_TYPE_INVALID if none. the primary #GdkContentFormats to intersect the #GdkContentFormats to intersect with Finds the first mime type from @first that is also contained in @second. If no matching mime type is found, %NULL is returned. The first common mime type or %NULL if none. the primary #GdkContentFormats to intersect the #GdkContentFormats to intersect with Prints the given @formats into a string for human consumption. This is meant for debugging and logging. The form of the representation may change at any time and is not guaranteed to stay identical. a #GdkContentFormats a #GString to print into Increases the reference count of a #GdkContentFormats by one. the passed in #GdkContentFormats. a #GdkContentFormats Prints the given @formats into a human-readable string. This is a small wrapper around gdk_content_formats_print() to help when debugging. a new string a #GdkContentFormats Append all missing types from @second to @first, in the order they had in @second. a new #GdkContentFormats the #GdkContentFormats to merge into the #GdkContentFormats to merge from Add GTypes for mime types in @formats for which deserializers are registered. a new #GdkContentFormats a #GdkContentFormats Add mime types for GTypes in @formats for which deserializers are registered. a new #GdkContentFormats a #GdkContentFormats Add GTypes for the mime types in @formats for which serializers are registered. a new #GdkContentFormats a #GdkContentFormats Add mime types for GTypes in @formats for which serializers are registered. a new #GdkContentFormats a #GdkContentFormats Decreases the reference count of a #GdkContentFormats by one. If the resulting reference count is zero, frees the formats. a #GdkContentFormats A #GdkContentFormatsBuilder struct is an opaque struct. It is meant to not be kept around and only be used to create new #GdkContentFormats objects. Create a new #GdkContentFormatsBuilder object. The resulting builder would create an empty #GdkContentFormats. Use addition functions to add types to it. a new #GdkContentFormatsBuilder Appends all formats from @formats to @builder, skipping those that already exist. a #GdkContentFormatsBuilder the formats to add Appends @gtype to @builder if it has not already been added. a #GdkContentFormatsBuilder a #GType Appends @mime_type to @builder if it has not already been added. a #GdkContentFormatsBuilder a mime type Creates a new #GdkContentFormats from the current state of the given @builder, and frees the @builder instance. the newly created #GdkContentFormats with all the formats added to @builder a #GdkContentFormatsBuilder Acquires a reference on the given @builder. This function is intended primarily for bindings. #GdkContentFormatsBuilder objects should not be kept around. the given #GdkContentFormatsBuilder with its reference count increased a #GdkContentFormatsBuilder Creates a new #GdkContentFormats from the given @builder. The given #GdkContentFormatsBuilder is reset once this function returns; you cannot call this function multiple times on the same @builder instance. This function is intended primarily for bindings. C code should use gdk_content_formats_builder_free_to_formats(). the newly created #GdkContentFormats with all the formats added to @builder a #GdkContentFormatsBuilder Releases a reference on the given @builder. a #GdkContentFormatsBuilder A GdkContentProvider is used to provide content for the clipboard in a number of formats. To create a GdkContentProvider, use gdk_content_provider_new_for_value() or gdk_content_provider_new_for_bytes(). GDK knows how to handle common text and image formats out-of-the-box. See #GdkContentSerializer and #GdkContentDeserializer if you want to add support for application-specific data formats. Create a content provider that provides the given @bytes as data for the given @mime_type. a new #GdkContentProvider the mime type a #GBytes with the data for @mime_type Create a content provider that provides the given @value. a new #GdkContentProvider a #GValue Create a content provider that provides the value of the given @type. The value is provided using G_VALUE_COLLECT(), so the same rules apply as when calling g_object_new() or g_object_set(). a new #GdkContentProvider Type of value to follow value Creates a content provider that represents all the given @providers. Whenever data needs to be written, the union provider will try the given @providers in the given order and the first one supporting a format will be chosen to provide it. This allows an easy way to support providing data in different formats. For example, an image may be provided by its file and by the iamge contents with a call such as |[<!-- language="C" --> gdk_content_provider_new_union ((GdkContentProvider *[2]) { gdk_content_provider_new_typed (G_TYPE_FILE, file), gdk_content_provider_new_typed (G_TYPE_TEXTURE, texture) }, 2); ]| a new #GdkContentProvider The #GdkContentProviders to present the union of the number of providers Emits the #GdkContentProvider::contents-changed signal. a #GdkContentProvider Gets the contents of @provider stored in @value. The @value will have been initialized to the #GType the value should be provided in. This given #GType does not need to be listed in the formats returned by gdk_content_provider_ref_formats(). However, if the given #GType is not supported, this operation can fail and #G_IO_ERROR_NOT_SUPPORTED will be reported. %TRUE if the value was set successfully. Otherwise @error will be set to describe the failure. a #GdkContentProvider the #GValue to fill Gets the formats that the provider can provide its current contents in. The formats of the provider a #GdkContentProvider Gets the formats that the provider suggests other applications to store the data in. An example of such an application would be a clipboard manager. This can be assumed to be a subset of gdk_content_provider_ref_formats(). The storable formats of the provider a #GdkContentProvider Asynchronously writes the contents of @provider to @stream in the given @mime_type. When the operation is finished @callback will be called. You can then call gdk_content_provider_write_mime_type_finish() to get the result of the operation. The given mime type does not need to be listed in the formats returned by gdk_content_provider_ref_formats(). However, if the given #GType is not supported, #G_IO_ERROR_NOT_SUPPORTED will be reported. The given @stream will not be closed. a #GdkContentProvider the mime type to provide the data in the #GOutputStream to write to the [I/O priority][io-priority] of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Finishes an asynchronous write operation started with gdk_content_provider_write_mime_type_async(). %TRUE if the operation was completed successfully. Otherwise @error will be set to describe the failure. a #GdkContentProvider a #GAsyncResult Emits the #GdkContentProvider::contents-changed signal. a #GdkContentProvider Gets the contents of @provider stored in @value. The @value will have been initialized to the #GType the value should be provided in. This given #GType does not need to be listed in the formats returned by gdk_content_provider_ref_formats(). However, if the given #GType is not supported, this operation can fail and #G_IO_ERROR_NOT_SUPPORTED will be reported. %TRUE if the value was set successfully. Otherwise @error will be set to describe the failure. a #GdkContentProvider the #GValue to fill Gets the formats that the provider can provide its current contents in. The formats of the provider a #GdkContentProvider Gets the formats that the provider suggests other applications to store the data in. An example of such an application would be a clipboard manager. This can be assumed to be a subset of gdk_content_provider_ref_formats(). The storable formats of the provider a #GdkContentProvider Asynchronously writes the contents of @provider to @stream in the given @mime_type. When the operation is finished @callback will be called. You can then call gdk_content_provider_write_mime_type_finish() to get the result of the operation. The given mime type does not need to be listed in the formats returned by gdk_content_provider_ref_formats(). However, if the given #GType is not supported, #G_IO_ERROR_NOT_SUPPORTED will be reported. The given @stream will not be closed. a #GdkContentProvider the mime type to provide the data in the #GOutputStream to write to the [I/O priority][io-priority] of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Finishes an asynchronous write operation started with gdk_content_provider_write_mime_type_async(). %TRUE if the operation was completed successfully. Otherwise @error will be set to describe the failure. a #GdkContentProvider a #GAsyncResult The possible formats that the provider can provide its data in. The subset of formats that clipboard managers should store this provider's data in. Emitted whenever the content provided by this provider has changed. a #GdkContentProvider The formats of the provider a #GdkContentProvider The storable formats of the provider a #GdkContentProvider a #GdkContentProvider the mime type to provide the data in the #GOutputStream to write to the [I/O priority][io-priority] of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function %TRUE if the operation was completed successfully. Otherwise @error will be set to describe the failure. a #GdkContentProvider a #GAsyncResult %TRUE if the value was set successfully. Otherwise @error will be set to describe the failure. a #GdkContentProvider the #GValue to fill The type of a function that can be registered with gdk_content_register_serializer(). When the function gets called to operate on content, it can call functions on the @serializer object to obtain the mime type, output stream, user data, etc. for its operation. a #GdkContentSerializer A GdkContentSerializer is used to serialize content for inter-application data transfers. Gets the cancellable that was passed to gdk_content_serialize_async(). the cancellable for the current operation a #GdkContentSerializer Gets the GType to of the object to serialize. the GType for the current operation a #GdkContentSerializer Gets the mime type to serialize to. the mime type for the current operation a #GdkContentSerializer Gets the output stream that was passed to gdk_content_serialize_async(). the output stream for the current operation a #GdkContentSerializer Gets the io priority that was passed to gdk_content_serialize_async(). the io priority for the current operation a #GdkContentSerializer Gets the data that was associated with @serializer via gdk_content_serializer_set_task_data(). the task data for @serializer a #GdkContentSerializer Gets the user data that was passed when the serializer was registered. the user data for this serializer a #GdkContentSerializer Gets the #GValue to read the object to serialize from. the #GValue for the current operation a #GdkContentSerializer Indicate that the serialization has ended with an error. This function consumes @error. a #GdkContentSerializer a #GError Indicate that the serialization has been successfully completed. a #GdkContentSerializer Associate data with the current serialization operation. a #GdkContentSerializer data to associate with this operation destroy notify for @data Specifies the crossing mode for enter and leave events. crossing because of pointer motion. crossing because a grab is activated. crossing because a grab is deactivated. crossing because a GTK+ grab is activated. crossing because a GTK+ grab is deactivated. crossing because a GTK+ widget changed state (e.g. sensitivity). crossing because a touch sequence has begun, this event is synthetic as the pointer might have not left the surface. crossing because a touch sequence has ended, this event is synthetic as the pointer might have not left the surface. 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. A #GdkCursor represents a cursor. Its contents are private. Cursors are immutable objects, so they can not change after they have been constructed. Creates a new cursor by looking up @name in the current cursor theme. A recommended set of cursor names that will work across different platforms can be found in the CSS specification: - "none" - ![](default_cursor.png) "default" - ![](help_cursor.png) "help" - ![](pointer_cursor.png) "pointer" - ![](context_menu_cursor.png) "context-menu" - ![](progress_cursor.png) "progress" - ![](wait_cursor.png) "wait" - ![](cell_cursor.png) "cell" - ![](crosshair_cursor.png) "crosshair" - ![](text_cursor.png) "text" - ![](vertical_text_cursor.png) "vertical-text" - ![](alias_cursor.png) "alias" - ![](copy_cursor.png) "copy" - ![](no_drop_cursor.png) "no-drop" - ![](move_cursor.png) "move" - ![](not_allowed_cursor.png) "not-allowed" - ![](grab_cursor.png) "grab" - ![](grabbing_cursor.png) "grabbing" - ![](all_scroll_cursor.png) "all-scroll" - ![](col_resize_cursor.png) "col-resize" - ![](row_resize_cursor.png) "row-resize" - ![](n_resize_cursor.png) "n-resize" - ![](e_resize_cursor.png) "e-resize" - ![](s_resize_cursor.png) "s-resize" - ![](w_resize_cursor.png) "w-resize" - ![](ne_resize_cursor.png) "ne-resize" - ![](nw_resize_cursor.png) "nw-resize" - ![](sw_resize_cursor.png) "sw-resize" - ![](se_resize_cursor.png) "se-resize" - ![](ew_resize_cursor.png) "ew-resize" - ![](ns_resize_cursor.png) "ns-resize" - ![](nesw_resize_cursor.png) "nesw-resize" - ![](nwse_resize_cursor.png) "nwse-resize" - ![](zoom_in_cursor.png) "zoom-in" - ![](zoom_out_cursor.png) "zoom-out" a new #GdkCursor, or %NULL if there is no cursor with the given name the name of the cursor %NULL or the #GdkCursor to fall back to when this one cannot be supported Creates a new cursor from a #GdkTexture. a new #GdkCursor. the texture providing the pixel data the horizontal offset of the “hotspot” of the cursor the vertical offset of the “hotspot” of the cursor %NULL or the #GdkCursor to fall back to when this one cannot be supported Returns the fallback for this @cursor. The fallback will be used if this cursor is not available on a given #GdkDisplay. For named cursors, this can happen when using nonstandard names or when using an incomplete cursor theme. For textured cursors, this can happen when the texture is too large or when the #GdkDisplay it is used on does not support textured cursors. the fallback of the cursor or %NULL to use the default cursor as fallback. a #GdkCursor. Returns the horizontal offset of the hotspot. The hotspot indicates the pixel that will be directly above the cursor. the horizontal offset of the hotspot or 0 for named cursors a #GdkCursor. Returns the vertical offset of the hotspot. The hotspot indicates the pixel that will be directly above the cursor. the vertical offset of the hotspot or 0 for named cursors a #GdkCursor. Returns the name of the cursor. If the cursor is not a named cursor, %NULL will be returned and the GdkCursor::texture property will be set. the name of the cursor or %NULL if it is not a named cursor a #GdkCursor. Returns the texture for the cursor. If the cursor is a named cursor, %NULL will be returned and the GdkCursor::name property will be set. the texture for cursor or %NULL if it is a named cursor a #GdkCursor. The #GdkDevice object represents a single input device, such as a keyboard, a mouse, a touchpad, etc. See the #GdkSeat documentation for more information about the various kinds of master and slave devices, and their relationships. Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history(). an array of #GdkTimeCoord. the length of the array. Returns the associated device to @device, if @device is of type %GDK_DEVICE_TYPE_MASTER, it will return the paired pointer or keyboard. If @device is of type %GDK_DEVICE_TYPE_SLAVE, it will return the master device to which @device is attached to. If @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be returned, as there is no associated device. The associated device, or %NULL a #GdkDevice Returns the axes currently available on the device. a #GdkDevice Interprets an array of double as axis values for a given device, and locates the value in the array for a given axis use. %TRUE if the given axis use was found, otherwise %FALSE a #GdkDevice pointer to an array of axes the use to look for location to store the found value. Returns a null-terminated array of strings, containing the labels for the axes that @device currently has. If the device has no axes, %NULL is returned. A null-terminated string array, free with g_strfreev(). a #GdkDevice Returns the axis use for @index_. a #GdkAxisUse specifying how the axis is used. a pointer #GdkDevice. the index of the axis. Interprets an array of double as axis values for a given device, and locates the value in the array for a given axis label, as returned by gdk_device_get_axes() %TRUE if the given axis use was found, otherwise %FALSE. a pointer #GdkDevice. pointer to an array of axes name of the label location to store the found value. Retrieves the #GdkDeviceTool associated to @device. the #GdkDeviceTool a #GdkDevice Returns the device type for @device. the #GdkDeviceType for @device. a #GdkDevice Returns the #GdkDisplay to which @device pertains. a #GdkDisplay. This memory is owned by GTK+, and must not be freed or unreffed. a #GdkDevice Determines whether the pointer follows device motion. This is not meaningful for keyboard devices, which don't have a pointer. %TRUE if the pointer follows device motion a #GdkDevice Obtains the motion history for a pointer device; given a starting and ending timestamp, return all events in the motion history for the device in the given range of time. Some windowing systems do not support motion history, in which case, %FALSE will be returned. (This is not distinguishable from the case where motion history is supported and no events were found.) Note that there is also gdk_surface_set_event_compression() to get more motion events delivered directly, independent of the windowing system. %TRUE if the windowing system supports motion history and at least one event was found. a #GdkDevice the surface with respect to which which the event coordinates will be reported starting timestamp for range of events to return ending timestamp for the range of events to return location to store a newly-allocated array of #GdkTimeCoord, or %NULL location to store the length of @events, or %NULL If @index_ has a valid keyval, this function will return %TRUE and fill in @keyval and @modifiers with the keyval settings. %TRUE if keyval is set for @index. a #GdkDevice. the index of the macro button to get. return value for the keyval. return value for modifiers. Gets information about which surface the given pointer device is in, based on events that have been received so far from the display server. If another application has a pointer grab, or this application has a grab with owner_events = %FALSE, %NULL may be returned even if the pointer is physically over one of this application's surfaces. the last surface the device a #GdkDevice, with a source other than %GDK_SOURCE_KEYBOARD Returns the number of axes the device currently has. the number of axes. a pointer #GdkDevice Returns the number of keys the device currently has. the number of keys. a #GdkDevice Determines the name of the device. a name a #GdkDevice Retrieves the number of touch points associated to @device. the number of touch points a #GdkDevice Returns the product ID of this device, or %NULL if this information couldn't be obtained. This ID is retrieved from the device, and is thus constant for it. See gdk_device_get_vendor_id() for more information. the product ID, or %NULL a slave #GdkDevice Returns the #GdkSeat the device belongs to. A #GdkSeat. This memory is owned by GTK+ and must not be freed. A #GdkDevice Determines the type of the device. a #GdkInputSource a #GdkDevice Gets the current state of a pointer device relative to @surface. As a slave device’s coordinates are those of its master pointer, this function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE, unless there is an ongoing grab on them. See gdk_seat_grab(). a #GdkDevice. a #GdkSurface. an array of doubles to store the values of the axes of @device in, or %NULL. location to store the modifiers, or %NULL. Obtains the surface underneath @device, returning the location of the device in @win_x and @win_y in double precision. Returns %NULL if the surface tree under @device is not known to GDK (for example, belongs to another application). As a slave device coordinates are those of its master pointer, This function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE, unless there is an ongoing grab on them, see gdk_seat_grab(). the #GdkSurface under the device position, or %NULL. pointer #GdkDevice to query info to. return location for the X coordinate of the device location, relative to the surface origin, or %NULL. return location for the Y coordinate of the device location, relative to the surface origin, or %NULL. Returns the vendor ID of this device, or %NULL if this information couldn't be obtained. This ID is retrieved from the device, and is thus constant for it. This function, together with gdk_device_get_product_id(), can be used to eg. compose #GSettings paths to store settings for this device. |[<!-- language="C" --> static GSettings * get_device_settings (GdkDevice *device) { const gchar *vendor, *product; GSettings *settings; GdkDevice *device; gchar *path; vendor = gdk_device_get_vendor_id (device); product = gdk_device_get_product_id (device); path = g_strdup_printf ("/org/example/app/devices/%s:%s/", vendor, product); settings = g_settings_new_with_path (DEVICE_SCHEMA, path); g_free (path); return settings; } ]| the vendor ID, or %NULL a slave #GdkDevice If the device if of type %GDK_DEVICE_TYPE_MASTER, it will return the list of slave devices attached to it, otherwise it will return %NULL the list of slave devices, or %NULL. The list must be freed with g_list_free(), the contents of the list are owned by GTK+ and should not be freed. a #GdkDevice Specifies how an axis of a device is used. a pointer #GdkDevice the index of the axis specifies how the axis is used Specifies the X key event to generate when a macro button of a device is pressed. a #GdkDevice the index of the macro button to set the keyval to generate the modifiers to set Associated pointer or keyboard with this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER always come in keyboard/pointer pairs. Other device types will have a %NULL associated device. The axes currently available for this device. The #GdkDisplay the #GdkDevice pertains to. Whether the device is represented by a cursor on the screen. Devices of type %GDK_DEVICE_TYPE_MASTER will have %TRUE here. Number of axes in the device. The device name. The maximal number of concurrent touches on a touch device. Will be 0 if the device is not a touch device or if the number of touches is unknown. Product ID of this device, see gdk_device_get_product_id(). #GdkSeat of this device. Source type for the device. Device role in the device manager. Vendor ID of this device, see gdk_device_get_vendor_id(). The ::changed signal is emitted either when the #GdkDevice has changed the number of either axes or keys. For example In X this will normally happen when the slave device routing events through the master device changes (for example, user switches from the USB mouse to a tablet), in that case the master device will change to reflect the new slave device axes and keys. The ::tool-changed signal is emitted on pen/eraser #GdkDevices whenever tools enter or leave proximity. The new current tool #GdkDevicePad is an interface implemented by devices of type %GDK_SOURCE_TABLET_PAD, it allows querying the features provided by the pad device. Tablet pads may contain one or more groups, each containing a subset of the buttons/rings/strips available. gdk_device_pad_get_n_groups() can be used to obtain the number of groups, gdk_device_pad_get_n_features() and gdk_device_pad_get_feature_group() can be combined to find out the number of buttons/rings/strips the device has, and how are they grouped. Each of those groups have different modes, which may be used to map each individual pad feature to multiple actions. Only one mode is effective (current) for each given group, different groups may have different current modes. The number of available modes in a group can be found out through gdk_device_pad_get_group_n_modes(), and the current mode for a given group will be notified through the #GdkEventPadGroupMode event. Returns the group the given @feature and @idx belong to, or -1 if feature/index do not exist in @pad. The group number of the queried pad feature. a #GdkDevicePad the feature type to get the group from the index of the feature to get the group from Returns the number of modes that @group may have. The number of modes available in @group. a #GdkDevicePad group to get the number of available modes from Returns the number of features a tablet pad has. The amount of elements of type @feature that this pad has. a #GdkDevicePad a pad feature Returns the number of groups this pad device has. Pads have at least one group. A pad group is a subcollection of buttons/strip/rings that is affected collectively by a same current mode. The number of button/ring/strip groups in the pad. a #GdkDevicePad A pad feature. a button a ring-shaped interactive area a straight interactive area Gets the hardware ID of this tool, or 0 if it's not known. When non-zero, the identificator is unique for the given tool model, meaning that two identical tools will share the same @hardware_id, but will have different serial numbers (see gdk_device_tool_get_serial()). This is a more concrete (and device specific) method to identify a #GdkDeviceTool than gdk_device_tool_get_tool_type(), as a tablet may support multiple devices with the same #GdkDeviceToolType, but having different hardware identificators. The hardware identificator of this tool. a #GdkDeviceTool Gets the serial of this tool, this value can be used to identify a physical tool (eg. a tablet pen) across program executions. The serial ID for this tool a #GdkDeviceTool Gets the #GdkDeviceToolType of the tool. The physical type for this tool. This can be used to figure out what sort of pen is being used, such as an airbrush or a pencil. a #GdkDeviceTool Indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc. Tool is of an unknown type. Tool is a standard tablet stylus. Tool is standard tablet eraser. Tool is a brush stylus. Tool is a pencil stylus. Tool is an airbrush stylus. Tool is a mouse. Tool is a lens cursor. Indicates the device type. Device is a master (or virtual) device. There will be an associated focus indicator on the screen. Device is a slave (or physical) device. Device is a physical device, currently not attached to any seat. GdkDisplay objects are the GDK representation of a workstation. Their purpose are two-fold: - To manage and provide information about input devices (pointers, keyboards, etc) - To manage and provide information about output devices (monitors, projectors, etc) Most of the input device handling has been factored out into separate #GdkSeat objects. Every display has a one or more seats, which can be accessed with gdk_display_get_default_seat() and gdk_display_list_seats(). Output devices are represented by #GdkMonitor objects, which can be accessed with gdk_display_get_monitor() and similar APIs. Gets the default #GdkDisplay. This is a convenience function for: `gdk_display_manager_get_default_display (gdk_display_manager_get ())`. a #GdkDisplay, or %NULL if there is no default display. Opens a display. a #GdkDisplay, or %NULL if the display could not be opened the name of the display to open Emits a short beep on @display a #GdkDisplay Closes the connection to the windowing system for the given display, and cleans up associated resources. a #GdkDisplay Returns %TRUE if there is an ongoing grab on @device for @display. %TRUE if there is a grab in effect for @device. a #GdkDisplay a #GdkDevice Flushes any requests queued for the windowing system; this happens automatically when the main loop blocks waiting for new events, but if your application is drawing without returning control to the main loop, you may need to call this function explicitly. A common case where this function needs to be called is when an application is executing drawing commands from a thread other than the thread where the main loop is running. This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing. a #GdkDisplay Returns a #GdkAppLaunchContext suitable for launching applications on the given display. a new #GdkAppLaunchContext for @display. Free with g_object_unref() when done a #GdkDisplay Gets the clipboard used for copy/paste operations. the display's clipboard a #GdkDisplay Returns the default group leader surface for all toplevel surfaces on @display. This surface is implicitly created by GDK. See gdk_surface_set_group(). The default group leader surface for @display a #GdkDisplay Returns the default #GdkSeat for this display. the default seat. a #GdkDisplay Gets the next #GdkEvent to be processed for @display, fetching events from the windowing system if necessary. the next #GdkEvent to be processed, or %NULL if no events are pending a #GdkDisplay Returns the #GdkKeymap attached to @display. the #GdkKeymap attached to @display. the #GdkDisplay Gets a monitor associated with this display. the #GdkMonitor, or %NULL if @monitor_num is not a valid monitor number a #GdkDisplay number of the monitor Gets the monitor in which the largest area of @surface resides, or a monitor close to @surface if it is outside of all monitors. the monitor with the largest overlap with @surface a #GdkDisplay a #GdkSurface Gets the number of monitors that belong to @display. The returned number is valid until the next emission of the #GdkDisplay::monitor-added or #GdkDisplay::monitor-removed signal. the number of monitors a #GdkDisplay Gets the name of the display. a string representing the display name. This string is owned by GDK and should not be modified or freed. a #GdkDisplay Gets the clipboard used for the primary selection. On backends where the primary clipboard is not supported natively, GDK emulates this clipboard locally. the primary clipboard a #GdkDisplay Retrieves a desktop-wide setting such as double-click time for the @display. %TRUE if the setting existed and a value was stored in @value, %FALSE otherwise a #GdkDisplay the name of the setting location to store the value of the setting Gets the startup notification ID for a Wayland display, or %NULL if no ID has been defined. the startup notification ID for @display, or %NULL a #GdkDisplay Returns whether the display has events that are waiting to be processed. %TRUE if there are events ready to be processed. a #GdkDisplay Finds out if the display has been closed. %TRUE if the display is closed. a #GdkDisplay Returns whether surfaces can reasonably be expected to have their alpha channel drawn correctly on the screen. Check gdk_display_is_rgba() for wether the display supports an alpha channel. On X11 this function returns whether a compositing manager is compositing on @display. On modern displays, this value is always %TRUE. Whether surfaces with RGBA visuals can reasonably be expected to have their alpha channels drawn correctly on the screen. a #GdkDisplay Returns wether surfaces on this @display are created with an alpha channel. Even if a %TRUE is returned, it is possible that the surface’s alpha channel won’t be honored when displaying the surface on the screen: in particular, for X an appropriate windowing manager and compositing manager must be running to provide appropriate display. Use gdk_display_is_composited() to check if that is the case. For setting an overall opacity for a top-level surface, see gdk_surface_set_opacity(). On modern displays, this value is always %TRUE. %TRUE if surfaces are created with an alpha channel or %FALSE if the display does not support this functionality. a #GdkDisplay Returns the list of seats known to @display. the list of seats known to the #GdkDisplay a #GdkDisplay Indicates to the GUI environment that the application has finished loading, using a given identifier. GTK+ will call this function automatically for #GtkWindow with custom startup-notification identifier unless gtk_window_set_auto_startup_notification() is called to disable that feature. a #GdkDisplay a startup-notification identifier, for which notification process should be completed Gets a copy of the first #GdkEvent in the @display’s event queue, without removing the event from the queue. (Note that this function will not get more events from the windowing system. It only checks the events that have already been moved to the GDK event queue.) the first #GdkEvent on the event queue a #GdkDisplay Appends the given event onto the front of the event queue for @display. a #GdkDisplay a #GdkEvent Returns %TRUE if gdk_surface_input_shape_combine_mask() can be used to modify the input shape of surfaces on @display. %TRUE if surfaces with modified input shape are supported a #GdkDisplay Returns %TRUE if gdk_surface_shape_combine_mask() can be used to create shaped windows on @display. %TRUE if shaped windows are supported a #GdkDisplay Flushes any requests queued for the windowing system and waits until all requests have been handled. This is often used for making sure that the display is synchronized with the current state of the program. Calling gdk_display_sync() before gdk_error_trap_pop() makes sure that any errors generated from earlier requests are handled before the error trap is removed. This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing. a #GdkDisplay %TRUE if the display properly composits the alpha channel. See gdk_display_is_composited() for details. %TRUE if the display supports an alpha channel. See gdk_display_is_rgba() for details. The ::closed signal is emitted when the connection to the windowing system for @display is closed. %TRUE if the display was closed due to an error The ::monitor-added signal is emitted whenever a monitor is added. the monitor that was just added The ::monitor-removed signal is emitted whenever a monitor is removed. the monitor that was just removed The ::opened signal is emitted when the connection to the windowing system for @display is opened. The ::seat-added signal is emitted whenever a new seat is made known to the windowing system. the seat that was just added The ::seat-removed signal is emitted whenever a seat is removed by the windowing system. the seat that was just removed The ::setting-changed signal is emitted whenever a setting changes its value. the name of the setting that changed The purpose of the #GdkDisplayManager singleton object is to offer notification when displays appear or disappear or the default display changes. You can use gdk_display_manager_get() to obtain the #GdkDisplayManager singleton, but that should be rarely necessary. Typically, initializing GTK opens a display that you can work with without ever accessing the #GdkDisplayManager. The GDK library can be built with support for multiple backends. The #GdkDisplayManager object determines which backend is used at runtime. When writing backend-specific code that is supposed to work with multiple GDK backends, you have to consider both compile time and runtime. At compile time, use the #GDK_WINDOWING_X11, #GDK_WINDOWING_WIN32 macros, etc. to find out which backends are present in the GDK library you are building your application against. At runtime, use type-check macros like GDK_IS_X11_DISPLAY() to find out which backend is in use: ## Backend-specific code ## {#backend-specific} |[<!-- language="C" --> #ifdef GDK_WINDOWING_X11 if (GDK_IS_X11_DISPLAY (display)) { // make X11-specific calls here } else #endif #ifdef GDK_WINDOWING_QUARTZ if (GDK_IS_QUARTZ_DISPLAY (display)) { // make Quartz-specific calls here } else #endif g_error ("Unsupported GDK backend"); ]| Gets the singleton #GdkDisplayManager object. When called for the first time, this function consults the `GDK_BACKEND` environment variable to find out which of the supported GDK backends to use (in case GDK has been compiled with multiple backends). Applications can use gdk_set_allowed_backends() to limit what backends can be used. The global #GdkDisplayManager singleton; gdk_parse_args(), gdk_init(), or gdk_init_check() must have been called first. Gets the default #GdkDisplay. a #GdkDisplay, or %NULL if there is no default display. a #GdkDisplayManager List all currently open displays. a newly allocated #GSList of #GdkDisplay objects. Free with g_slist_free() when you are done with it. a #GdkDisplayManager Opens a display. a #GdkDisplay, or %NULL if the display could not be opened a #GdkDisplayManager the name of the display to open Sets @display as the default display. a #GdkDisplayManager a #GdkDisplay The ::display-opened signal is emitted when a display is opened. the opened display The GdkDrag struct contains only private fields and should not be accessed directly. Starts a drag and creates a new drag context for it. This function is called by the drag source. After this call, you probably want to set up the drag icon using the surface returned by gdk_drag_get_drag_surface(). This function returns a reference to the GdkDrag object, but GTK keeps its own reference as well, as long as the DND operation is going on. Note: if @actions include %GDK_ACTION_MOVE, you need to listen for the #GdkDrag::dnd-finished signal and delete the data at the source if gdk_drag_get_selected_action() returns %GDK_ACTION_MOVE. a newly created #GdkDrag or %NULL on error. the source surface for this drag the device that controls this drag the offered content the actions supported by this drag the x offset to @device's position where the drag nominally started the y offset to @device's position where the drag nominally started Gets the #GdkDrop from a DND event. the drop a DND event Inform GDK if the drop ended successfully. Passing %FALSE for @success may trigger a drag cancellation animation. This function is called by the drag source, and should be the last call before dropping the reference to the @drag. The #GdkDrag will only take the first gdk_drag_drop_done() call as effective, if this function is called multiple times, all subsequent calls will be ignored. a #GdkDrag whether the drag was ultimatively successful Determines the bitmask of possible actions proposed by the source. the #GdkDragAction flags a #GdkDrag Returns the #GdkContentProvider associated to the GdkDrag object. The #GdkContentProvider associated to @drag. a #GdkDrag Returns the #GdkDevice associated to the GdkDrag object. The #GdkDevice associated to @drag. a #GdkDrag Gets the #GdkDisplay that the drag object was created for. a #GdkDisplay a #GdkDrag Returns the surface on which the drag icon should be rendered during the drag operation. Note that the surface may not be available until the drag operation has begun. GDK will move the surface in accordance with the ongoing drag operation. The surface is owned by @drag and will be destroyed when the drag operation is over. the drag surface, or %NULL a #GdkDrag Retrieves the formats supported by this GdkDrag object. a #GdkContentFormats a #GdkDrag Determines the action chosen by the drag destination. a #GdkDragAction value a #GdkDrag Returns the #GdkSurface where the drag originates. The #GdkSurface where the drag originates a #GdkDrag Sets the position of the drag surface that will be kept under the cursor hotspot. Initially, the hotspot is at the top left corner of the drag surface. a #GdkDrag x coordinate of the drag surface hotspot y coordinate of the drag surface hotspot The #GdkContentProvider. The #GdkDevice that is performing the drag. The #GdkDisplay that the drag belongs to. The possible formats that the drag can provide its data in. The drag operation was cancelled. The reason the drag was cancelled The drag operation was finished, the destination finished reading all data. The drag object can now free all miscellaneous data. The drag operation was performed on an accepting client. Used in #GdkDrop and #GdkDrag to indicate the actions that the destination can and 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, and is not supported on all platforms. Ask the user what to do with the data. Checks if @action represents a single action or if it includes multiple flags that can be selected from. When @action is 0 - ie no action was given, %TRUE is returned. %TRUE if exactly one action was given a #GdkDragAction Used in #GdkDrag to the reason of a cancelled DND operation. There is no suitable drop target. Drag cancelled by the user Unspecified error. A #GdkDragSurface is a surface that is used during a DND operation. Present @drag_surface. %FALSE if it failed to be presented, otherwise %TRUE. the unconstrained drag_surface width to layout the unconstrained drag_surface height to layout #GdkDrawContext is the base object used by contexts implementing different rendering methods, such as #GdkGLContext or #GdkVulkanContext. It provides shared functionality between those contexts. You will always interact with one of those s.ubclasses. A GdkDrawContext is always associated with a single toplevel surface. Indicates that you are beginning the process of redrawing @region on the @context's surface. Calling this function begins a drawing operation using @context on the surface that @context was created from. The actual requirements and guarantees for the drawing operation vary for different implementations of drawing, so a #GdkCairoContext and a #GdkGLContext need to be treated differently. A call to this function is a requirement for drawing and must be followed by a call to gdk_draw_context_end_frame(), which will complete the drawing operation and ensure the contents become visible on screen. Note that the @region passed to this function is the minimum region that needs to be drawn and depending on implementation, windowing system and hardware in use, it might be necessary to draw a larger region. Drawing implementation must use gdk_draw_context_get_frame_region() to query the region that must be drawn. When using GTK+, the widget system automatically places calls to gdk_draw_context_begin_frame() and gdk_draw_context_end_frame() via the use of #GskRenderers, so application code does not need to call these functions explicitly. the context used to draw the frame minimum region that should be drawn Ends a drawing operation started with gdk_draw_context_begin_frame() and makes the drawing available on screen. See that function for more details about drawing. When using a #GdkGLContext, this function may call `glFlush()` implicitly before returning; it is not recommended to call `glFlush()` explicitly before calling this function. a #GdkDrawContext Retrieves the #GdkDisplay the @context is created for a #GdkDisplay or %NULL a #GdkDrawContext Retrieves the region that is currently in the process of being repainted. After a call to gdk_draw_context_begin_frame() this function will return a union of the region passed to that function and the area of the surface that the @context determined needs to be repainted. If @context is not inbetween calls to gdk_draw_context_begin_frame() and gdk_draw_context_end_frame(), %NULL will be returned. a Cairo region or %NULL if not drawing a frame. a #GdkDrawContext Retrieves the #GdkSurface used by the @context. a #GdkSurface or %NULL a #GdkDrawContext Returns %TRUE if @context is in the process of drawing to its surface after a call to gdk_draw_context_begin_frame() and not yet having called gdk_draw_context_end_frame(). In this situation, drawing commands may be effecting the contents of a @context's surface. %TRUE if the context is between begin_frame() and end_frame() calls. a #GdkDrawContext The #GdkDisplay used to create the #GdkDrawContext. The #GdkSurface the gl context is bound to. The GdkDrop struct contains only private fields and should not be accessed directly. Ends the drag operation after a drop. The @action must be a single action selected from the actions available via gdk_drop_get_actions(). a #GdkDrop the action performed by the destination or 0 if the drop failed Returns the possible actions for this #GdkDrop. If this value contains multiple actions - ie gdk_drag_action_is_unique() returns %FALSE for the result - gdk_drag_finish() must choose the action to use when accepting the drop. This will only happen if you passed %GDK_ACTION_ASK as one of the possible actions in gdk_drag_status(). %GDK_ACTION_ASK itself will not be included in the actions returned by this function. This value may change over the lifetime of the #GdkDrop both as a response to source side actions as well as to calls to gdk_drop_status() or gdk_drag_finish(). The source side will not change this value anymore once a drop has started. The possible #GdkDragActions a #GdkDrop Returns the #GdkDevice performing the drop. The #GdkDevice performing the drop. a #GdkDrop Gets the #GdkDisplay that @self was created for. a #GdkDisplay a #GdkDrop If this is an in-app drag-and-drop operation, returns the #GdkDrag that corresponds to this drop. If it is not, %NULL is returned. the corresponding #GdkDrag a #GdkDrop Returns the #GdkContentFormats that the drop offers the data to be read in. The possible #GdkContentFormats a #GdkDrop Returns the #GdkSurface performing the drop. The #GdkSurface performing the drop. a #GdkDrop Asynchronously read the dropped data from a #GdkDrop in a format that complies with one of the mime types. a #GdkDrop pointer to an array of mime types the io priority for the read operation optional #GCancellable object, %NULL to ignore a #GAsyncReadyCallback to call when the request is satisfied the data to pass to @callback Finishes an async drop read operation, see gdk_drop_read_async(). the #GInputStream, or %NULL a #GdkDrop a #GAsyncResult return location for the used mime type Asynchronously request the drag operation's contents converted to the given @type. When the operation is finished @callback will be called. You can then call gdk_drop_read_value_finish() to get the resulting #GValue. For local drag'n'drop operations that are available in the given #GType, the value will be copied directly. Otherwise, GDK will try to use gdk_content_deserialize_async() to convert the data. a #GdkDrop a #GType to read the [I/O priority][io-priority] of the request. optional #GCancellable object, %NULL to ignore. callback to call when the request is satisfied the data to pass to callback function Finishes an async drop read started with gdk_drop_read_value_async(). a #GValue containing the result. a #GdkDrop a #GAsyncResult Selects all actions that are potentially supported by the destination. When calling this function, do not restrict the passed in actions to the ones provided by gdk_drop_get_actions(). Those actions may change in the future, even depending on the actions you provide here. The @preferred action is a hint to the drag'n'drop mechanism about which action to use when multiple actions are possible. This function should be called by drag destinations in response to %GDK_DRAG_ENTER or %GDK_DRAG_MOTION events. If the destination does not yet know the exact actions it supports, it should set any possible actions first and then later call this function again. a #GdkDrop Supported actions of the destination, or 0 to indicate that a drop will not be accepted A unique action that's a member of @actions indicating the preferred action. The possible actions for this drop The #GdkDevice performing the drop The #GdkDisplay that the drop belongs to. The #GdkDrag that initiated this drop The possible formats that the drop can provide its data in. The #GdkSurface the drop happens on Use this macro as the return value for continuing the propagation of an event handler. Use this macro as the return value for stopping the propagation of an event handler. The GdkEvent struct contains only private fields and should not be accessed directly. If both events contain X/Y information, this function will return %TRUE and return in @angle the relative angle from @event1 to @event2. The rotation direction for positive angles is from the positive X axis towards the positive Y axis. %TRUE if the angle could be calculated. first #GdkEvent second #GdkEvent return location for the relative angle between both events If both events contain X/Y information, the center of both coordinates will be returned in @x and @y. %TRUE if the center could be calculated. first #GdkEvent second #GdkEvent return location for the X coordinate of the center return location for the Y coordinate of the center If both events have X/Y information, the distance between both coordinates (as in a straight line going from @event1 to @event2) will be returned. %TRUE if the distance could be calculated. first #GdkEvent second #GdkEvent return location for the distance Extracts all axis values from an event. %TRUE on success, otherwise %FALSE a #GdkEvent the array of values for all axes the length of array Extract the axis value for a particular axis use from an event structure. %TRUE if the specified axis was found, otherwise %FALSE a #GdkEvent the axis use to look for location to store the value found Returns the device of an event. a #GdkDevice, or %NULL. a #GdkEvent. If the event was generated by a device that supports different tools (eg. a tablet), this function will return a #GdkDeviceTool representing the tool that caused the event. Otherwise, %NULL will be returned. Note: the #GdkDeviceTools will be constant during the application lifetime, if settings must be stored persistently across runs, see gdk_device_tool_get_serial() The current device tool, or %NULL a #GdkEvent Retrieves the #GdkDisplay associated to the @event. a #GdkDisplay a #GdkEvent If @event is a touch event, returns the #GdkEventSequence to which the event belongs. Otherwise, return %NULL. the event sequence that the event belongs to a #GdkEvent Retrieves the type of the event. a #GdkEventType a #GdkEvent Returns the modifier state field of an event. the modifier state of @event a #GdkEvent Retrieves the history of the @event motion, as a list of time and coordinates. a list of time and coordinates a #GdkEvent of type %GDK_MOTION_NOTIFY Returns whether this event is an 'emulated' pointer event (typically from a touch event), as opposed to a real one. %TRUE if this event is emulated a #GdkEvent Extract the event surface relative x/y coordinates from an event. a #GdkEvent location to put event surface x coordinate location to put event surface y coordinate This function returns the hardware (slave) #GdkDevice that has triggered the event, falling back to the virtual (master) device (as in gdk_event_get_device()) if the event wasn’t caused by interaction with a hardware device. This may happen for example in synthesized crossing events after a #GdkSurface updates its geometry or a grab is acquired/released. If the event does not contain a device field, this function will return %NULL. a #GdkDevice, or %NULL. a #GdkEvent Extracts the #GdkSurface associated with an event. The #GdkSurface associated with the event a #GdkEvent Returns the time stamp from @event, if there is one; otherwise returns #GDK_CURRENT_TIME. time stamp field from @event a #GdkEvent Increase the ref count of @event. @event a #GdkEvent This function returns whether a #GdkEventButton should trigger a context menu, according to platform conventions. The right mouse button always triggers context menus. Additionally, if gdk_keymap_get_modifier_mask() returns a non-0 mask for %GDK_MODIFIER_INTENT_CONTEXT_MENU, then the left mouse button will also trigger a context menu if this modifier is pressed. This function should always be used instead of simply checking for event->button == %GDK_BUTTON_SECONDARY. %TRUE if the event should trigger a context menu. a #GdkEvent, currently only button events are meaningful values Decrease the ref count of @event, and free it if the last reference is dropped. a #GdkEvent A set of bit-flags to indicate which events a surface 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]. If %GDK_TOUCH_MASK is enabled, the surface 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. receive expose events receive all pointer motion events receive pointer motion events while any button is pressed receive pointer motion events while 1 button is pressed receive pointer motion events while 2 button is pressed receive pointer motion events while 3 button is pressed receive button press events receive button release events receive key press events receive key release events receive surface enter events receive surface leave events receive focus change events receive events about surface configuration change receive property change events receive proximity in events receive proximity out events receive events about surface configuration changes of child surfaces receive scroll events receive touch events receive smooth scrolling events receive touchpad gesture events receive tablet pad events the combination of all the above event masks. GdkEventSequence is an opaque type representing a sequence of related touch events. Specifies the type of the event. 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. the pointer (usually a mouse) has moved. a mouse button has been pressed. a mouse button has been released. a key has been pressed. a key has been released. the pointer has entered the surface. the pointer has left the surface. the keyboard focus has entered or left the surface. the size of the surface has changed. 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 surface while a drag is in progress. the mouse has left the surface while a drag is in progress. the mouse has moved in the surface while a drag is in progress. a drop operation onto the surface has started. the scroll wheel was turned a pointer or keyboard grab was broken. A new touch event sequence has just started. A touch event sequence has been updated. A touch event sequence has finished. A touch event sequence has been canceled. A touchpad swipe gesture event, the current state is determined by its phase field. A touchpad pinch gesture event, the current state is determined by its phase field. A tablet pad button press event. A tablet pad button release event. A tablet pad axis event from a "ring". A tablet pad axis event from a "strip". A tablet pad group mode change. marks the end of the GdkEventType enumeration. A #GdkFrameClock tells the application when to update and repaint a window. This may be synced to the vertical refresh rate of the monitor, for example. Even when the frame clock uses a simple timer rather than a hardware-based vertical sync, the frame clock helps because it ensures everything paints at the same time (reducing the total number of frames). The frame clock can also automatically stop painting when it knows the frames will not be visible, or scale back animation framerates. #GdkFrameClock is designed to be compatible with an OpenGL-based implementation or with mozRequestAnimationFrame in Firefox, for example. A frame clock is idle until someone requests a frame with gdk_frame_clock_request_phase(). At some later point that makes sense for the synchronization being implemented, the clock will process a frame and emit signals for each phase that has been requested. (See the signals of the #GdkFrameClock class for documentation of the phases. %GDK_FRAME_CLOCK_PHASE_UPDATE and the #GdkFrameClock::update signal are most interesting for application writers, and are used to update the animations, using the frame time given by gdk_frame_clock_get_frame_time(). The frame time is reported in microseconds and generally in the same timescale as g_get_monotonic_time(), however, it is not the same as g_get_monotonic_time(). The frame time does not advance during the time a frame is being painted, and outside of a frame, an attempt is made so that all calls to gdk_frame_clock_get_frame_time() that are called at a “similar” time get the same value. This means that if different animations are timed by looking at the difference in time between an initial value from gdk_frame_clock_get_frame_time() and the value inside the #GdkFrameClock::update signal of the clock, they will stay exactly synchronized. Starts updates for an animation. Until a matching call to gdk_frame_clock_end_updating() is made, the frame clock will continually request a new frame with the %GDK_FRAME_CLOCK_PHASE_UPDATE phase. This function may be called multiple times and frames will be requested until gdk_frame_clock_end_updating() is called the same number of times. a #GdkFrameClock Stops updates for an animation. See the documentation for gdk_frame_clock_begin_updating(). a #GdkFrameClock Gets the frame timings for the current frame. the #GdkFrameTimings for the frame currently being processed, or even no frame is being processed, for the previous frame. Before any frames have been processed, returns %NULL. a #GdkFrameClock A #GdkFrameClock maintains a 64-bit counter that increments for each frame drawn. inside frame processing, the value of the frame counter for the current frame. Outside of frame processing, the frame counter for the last frame. a #GdkFrameClock Gets the time that should currently be used for animations. Inside the processing of a frame, it’s the time used to compute the animation position of everything in a frame. Outside of a frame, it's the time of the conceptual “previous frame,” which may be either the actual previous frame time, or if that’s too old, an updated time. a timestamp in microseconds, in the timescale of of g_get_monotonic_time(). a #GdkFrameClock #GdkFrameClock internally keeps a history of #GdkFrameTimings objects for recent frames that can be retrieved with gdk_frame_clock_get_timings(). The set of stored frames is the set from the counter values given by gdk_frame_clock_get_history_start() and gdk_frame_clock_get_frame_counter(), inclusive. the frame counter value for the oldest frame that is available in the internal frame history of the #GdkFrameClock. a #GdkFrameClock Using the frame history stored in the frame clock, finds the last known presentation time and refresh interval, and assuming that presentation times are separated by the refresh interval, predicts a presentation time that is a multiple of the refresh interval after the last presentation time, and later than @base_time. a #GdkFrameClock base time for determining a presentaton time a location to store the determined refresh interval, or %NULL. A default refresh interval of 1/60th of a second will be stored if no history is present. a location to store the next candidate presentation time after the given base time. 0 will be will be stored if no history is present. Retrieves a #GdkFrameTimings object holding timing information for the current frame or a recent frame. The #GdkFrameTimings object may not yet be complete: see gdk_frame_timings_get_complete(). the #GdkFrameTimings object for the specified frame, or %NULL if it is not available. See gdk_frame_clock_get_history_start(). a #GdkFrameClock the frame counter value identifying the frame to be received. Asks the frame clock to run a particular phase. The signal corresponding the requested phase will be emitted the next time the frame clock processes. Multiple calls to gdk_frame_clock_request_phase() will be combined together and only one frame processed. If you are displaying animated content and want to continually request the %GDK_FRAME_CLOCK_PHASE_UPDATE phase for a period of time, you should use gdk_frame_clock_begin_updating() instead, since this allows GTK to adjust system parameters to get maximally smooth animations. a #GdkFrameClock the phase that is requested This signal ends processing of the frame. Applications should generally not handle this signal. This signal begins processing of the frame. Applications should generally not handle this signal. This signal is used to flush pending motion events that are being batched up and compressed together. Applications should not handle this signal. This signal is emitted as the second step of toolkit and application processing of the frame. Any work to update sizes and positions of application elements should be performed. GTK normally handles this internally. This signal is emitted as the third step of toolkit and application processing of the frame. The frame is repainted. GDK normally handles this internally and produces expose events, which are turned into GTK #GtkWidget::draw signals. This signal is emitted after processing of the frame is finished, and is handled internally by GTK to resume normal event processing. Applications should not handle this signal. This signal is emitted as the first step of toolkit and application processing of the frame. Animations should be updated using gdk_frame_clock_get_frame_time(). Applications can connect directly to this signal, or use gtk_widget_add_tick_callback() as a more convenient interface. #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. no phase corresponds to GdkFrameClock::flush-events. Should not be handled by applications. corresponds to GdkFrameClock::before-paint. Should not be handled by applications. corresponds to GdkFrameClock::update. corresponds to GdkFrameClock::layout. corresponds to GdkFrameClock::paint. corresponds to GdkFrameClock::resume-events. Should not be handled by applications. corresponds to GdkFrameClock::after-paint. Should not be handled by applications. A #GdkFrameTimings object holds timing information for a single frame of the application’s displays. To retrieve #GdkFrameTimings objects, use gdk_frame_clock_get_timings() or gdk_frame_clock_get_current_timings(). The information in #GdkFrameTimings is useful for precise synchronization of video with the event or audio streams, and for measuring quality metrics for the application’s display, such as latency and jitter. The timing information in a #GdkFrameTimings is filled in incrementally as the frame as drawn and passed off to the window system for processing and display to the user. The accessor functions for #GdkFrameTimings can return 0 to indicate an unavailable value for two reasons: either because the information is not yet available, or because it isn't available at all. Once gdk_frame_timings_get_complete() returns %TRUE for a frame, you can be certain that no further values will become available and be stored in the #GdkFrameTimings. %TRUE if all information that will be available for the frame has been filled in. a #GdkFrameTimings Gets the frame counter value of the #GdkFrameClock when this this frame was drawn. the frame counter value for this frame a #GdkFrameTimings Returns the frame time for the frame. This is the time value that is typically used to time animations for the frame. See gdk_frame_clock_get_frame_time(). the frame time for the frame, in the timescale of g_get_monotonic_time() A #GdkFrameTimings Gets the predicted time at which this frame will be displayed. Although no predicted time may be available, if one is available, it will be available while the frame is being generated, in contrast to gdk_frame_timings_get_presentation_time(), which is only available after the frame has been presented. In general, if you are simply animating, you should use gdk_frame_clock_get_frame_time() rather than this function, but this function is useful for applications that want exact control over latency. For example, a movie player may want this information for Audio/Video synchronization. The predicted time at which the frame will be presented, in the timescale of g_get_monotonic_time(), or 0 if no predicted presentation time is available. a #GdkFrameTimings Reurns the presentation time. This is the time at which the frame became visible to the user. the time the frame was displayed to the user, in the timescale of g_get_monotonic_time(), or 0 if no presentation time is available. See gdk_frame_timings_get_complete() a #GdkFrameTimings Gets the natural interval between presentation times for the display that this frame was displayed on. Frame presentation usually happens during the “vertical blanking interval”. the refresh interval of the display, in microseconds, or 0 if the refresh interval is not available. See gdk_frame_timings_get_complete(). a #GdkFrameTimings Increases the reference count of @timings. @timings a #GdkFrameTimings Decreases the reference count of @timings. If @timings is no longer referenced, it will be freed. a #GdkFrameTimings Indicates which monitor (in a multi-head setup) a surface should span over when in fullscreen mode. Fullscreen on current monitor only. Span across all monitors when fullscreen. #GdkGLContext is an object representing the platform-specific OpenGL draw context. #GdkGLContexts are created for a #GdkSurface using gdk_surface_create_gl_context(), and the context will match the the characteristics of the surface. A #GdkGLContext is not tied to any particular normal framebuffer. For instance, it cannot draw to the #GdkSurface back buffer. The GDK repaint system is in full control of the painting to that. Instead, you can create render buffers or textures and use gdk_cairo_draw_from_gl() in the draw function of your widget to draw them. Then GDK will handle the integration of your rendering with that of other widgets. Support for #GdkGLContext is platform-specific, context creation can fail, returning %NULL context. A #GdkGLContext has to be made "current" in order to start using it, otherwise any OpenGL call will be ignored. ## Creating a new OpenGL context ## In order to create a new #GdkGLContext instance you need a #GdkSurface, which you typically get during the realize call of a widget. A #GdkGLContext is not realized until either gdk_gl_context_make_current(), or until it is realized using gdk_gl_context_realize(). It is possible to specify details of the GL context like the OpenGL version to be used, or whether the GL context should have extra state validation enabled after calling gdk_surface_create_gl_context() by calling gdk_gl_context_realize(). If the realization fails you have the option to change the settings of the #GdkGLContext and try again. ## Using a GdkGLContext ## You will need to make the #GdkGLContext the current context before issuing OpenGL calls; the system sends OpenGL commands to whichever context is current. It is possible to have multiple contexts, so you always need to ensure that the one which you want to draw with is the current one before issuing commands: |[<!-- language="C" --> gdk_gl_context_make_current (context); ]| You can now perform your drawing using OpenGL commands. You can check which #GdkGLContext is the current one by using gdk_gl_context_get_current(); you can also unset any #GdkGLContext that is currently set by calling gdk_gl_context_clear_current(). Clears the current #GdkGLContext. Any OpenGL call after this function returns will be ignored until gdk_gl_context_make_current() is called. Retrieves the current #GdkGLContext. the current #GdkGLContext, or %NULL Retrieves the value set using gdk_gl_context_set_debug_enabled(). %TRUE if debugging is enabled a #GdkGLContext Retrieves the #GdkDisplay the @context is created for a #GdkDisplay or %NULL a #GdkGLContext Retrieves the value set using gdk_gl_context_set_forward_compatible(). %TRUE if the context should be forward compatible a #GdkGLContext Retrieves the major and minor version requested by calling gdk_gl_context_set_required_version(). a #GdkGLContext return location for the major version to request return location for the minor version to request Retrieves the #GdkGLContext that this @context share data with. a #GdkGLContext or %NULL a #GdkGLContext Retrieves the #GdkSurface used by the @context. a #GdkSurface or %NULL a #GdkGLContext Checks whether the @context is using an OpenGL or OpenGL ES profile. %TRUE if the #GdkGLContext is using an OpenGL ES profile a #GdkGLContext Retrieves the OpenGL version of the @context. The @context must be realized prior to calling this function. a #GdkGLContext return location for the major version return location for the minor version Whether the #GdkGLContext is in legacy mode or not. The #GdkGLContext must be realized before calling this function. When realizing a GL context, GDK will try to use the OpenGL 3.2 core profile; this profile removes all the OpenGL API that was deprecated prior to the 3.2 version of the specification. If the realization is successful, this function will return %FALSE. If the underlying OpenGL implementation does not support core profiles, GDK will fall back to a pre-3.2 compatibility profile, and this function will return %TRUE. You can use the value returned by this function to decide which kind of OpenGL API to use, or whether to do extension discovery, or what kind of shader programs to load. %TRUE if the GL context is in legacy mode a #GdkGLContext Makes the @context the current one. a #GdkGLContext Realizes the given #GdkGLContext. It is safe to call this function on a realized #GdkGLContext. %TRUE if the context is realized a #GdkGLContext Sets whether the #GdkGLContext should perform extra validations and run time checking. This is useful during development, but has additional overhead. The #GdkGLContext must not be realized or made current prior to calling this function. a #GdkGLContext whether to enable debugging in the context Sets whether the #GdkGLContext should be forward compatible. Forward compatibile contexts must not support OpenGL functionality that has been marked as deprecated in the requested version; non-forward compatible contexts, on the other hand, must support both deprecated and non deprecated functionality. The #GdkGLContext must not be realized or made current prior to calling this function. a #GdkGLContext whether the context should be forward compatible Sets the major and minor version of OpenGL to request. Setting @major and @minor to zero will use the default values. The #GdkGLContext must not be realized or made current prior to calling this function. a #GdkGLContext the major version to request the minor version to request Requests that GDK create an OpenGL ES context instead of an OpenGL one, if the platform and windowing system allows it. The @context must not have been realized. By default, GDK will attempt to automatically detect whether the underlying GL implementation is OpenGL or OpenGL ES once the @context is realized. You should check the return value of gdk_gl_context_get_use_es() after calling gdk_gl_context_realize() to decide whether to use the OpenGL or OpenGL ES API, extensions, or shaders. a #GdkGLContext: whether the context should use OpenGL ES instead of OpenGL, or -1 to allow auto-detection The #GdkGLContext that this context is sharing data with, or %NULL Error enumeration for #GdkGLContext. OpenGL support is not available The requested visual format is not supported The requested profile is not supported The shader compilation failed The shader linking failed Creates a new texture for an existing GL texture. Note that the GL texture must not be modified until @destroy is called, which will happen when the GdkTexture object is finalized, or due to an explicit call of gdk_gl_texture_release(). A newly-created #GdkTexture a #GdkGLContext the ID of a texture that was created with @context the nominal width of the texture the nominal height of the texture a destroy notify that will be called when the GL resources are released data that gets passed to @destroy Releases the GL resources held by a #GdkGLTexture that was created with gdk_gl_texture_new(). The texture contents are still available via the gdk_texture_download() function, after this function has been called. a #GdkTexture wrapping a GL texture The #GdkGeometry struct gives the window manager information about a surface’s geometry constraints. Normally you would set these on the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow then sets the hints on the #GdkSurface it creates. gdk_surface_set_geometry_hints() expects the hints to be fully valid already and simply passes them to the window manager; in contrast, gtk_window_set_geometry_hints() performs some interpretation. For example, #GtkWindow will apply the hints to the geometry widget instead of the toplevel window, if you set a geometry widget. Also, the @min_width/@min_height/@max_width/@max_height fields may be set to -1, and #GtkWindow will substitute the size request of the surface or geometry widget. If the minimum size hint is not provided, #GtkWindow will use its requisition as the minimum size. If the minimum size is provided and a geometry widget is set, #GtkWindow will take the minimum size as the minimum size of the geometry widget rather than the entire surface. The base size is treated similarly. The canonical use-case for gtk_window_set_geometry_hints() is to get a terminal widget to resize properly. Here, the terminal text area should be the geometry widget; #GtkWindow will then automatically set the base size to the size of other widgets in the terminal window, such as the menubar and scrollbar. Then, the @width_inc and @height_inc fields should be set to the size of one character in the terminal. Finally, the base size should be set to the size of one character. The net effect is that the minimum size of the terminal will have a 1x1 character terminal area, and only terminal sizes on the “character grid” will be allowed. Here’s an example of how the terminal example would be implemented, assuming a terminal area widget called “terminal” and a toplevel window “toplevel”: |[<!-- language="C" --> GdkGeometry hints; hints.base_width = terminal->char_width; hints.base_height = terminal->char_height; hints.min_width = terminal->char_width; hints.min_height = terminal->char_height; hints.width_inc = terminal->char_width; hints.height_inc = terminal->char_height; gtk_window_set_geometry_hints (GTK_WINDOW (toplevel), GTK_WIDGET (terminal), &hints, GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE); ]| The other useful fields are the @min_aspect and @max_aspect fields; these contain a width/height ratio as a floating point number. If a geometry widget is set, the aspect applies to the geometry widget rather than the entire window. The most common use of these hints is probably to set @min_aspect and @max_aspect to the same value, thus forcing the window to keep a constant aspect ratio. minimum width of surface (or -1 to use requisition, with #GtkWindow only) minimum height of surface (or -1 to use requisition, with #GtkWindow only) maximum width of surface (or -1 to use requisition, with #GtkWindow only) maximum height of surface (or -1 to use requisition, with #GtkWindow only) allowed surface widths are @base_width + @width_inc * N where N is any integer (-1 allowed with #GtkWindow) allowed surface widths are @base_height + @height_inc * N where N is any integer (-1 allowed with #GtkWindow) width resize increment height resize increment minimum width/height ratio maximum width/height ratio surface gravity, see gtk_window_set_gravity() Defines how device grabs interact with other devices. All other devices’ events are allowed. Other devices’ events are blocked for the grab surface. Other devices’ events are blocked for the whole application. Returned by gdk_device_grab() to indicate success or the reason for the failure of the grab attempt. the resource was successfully grabbed. the resource is actively grabbed by another client. the resource was grabbed more recently than the specified time. the grab surface or the @confine_to surface are not viewable. the resource is frozen by an active grab of another client. the grab failed for some other reason Defines the reference point of a surface 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. 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 surface. 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 surface itself, ignoring window manager decorations. An enumeration describing 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 device is a keyboard. the device is a direct-input touch device, such as a touchscreen or tablet. This device type has been added in 3.4. the device is an indirect touch device, such as a touchpad. This device type has been added in 3.4. the device is a trackpoint. This device type has been added in 3.22 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. A #GdkKeymap defines the translation from keyboard state (including a hardware key, a modifier mask, and active keyboard group) to a keyval. This translation has two phases. The first phase is to determine the effective keyboard group and level for the keyboard state; the second phase is to look up the keycode/group/level triplet in the keymap and see what keyval it corresponds to. Maps the non-virtual modifiers (i.e Mod2, Mod3, ...) which are set in @state to the virtual modifiers (i.e. Super, Hyper and Meta) and set the corresponding bits in @state. GDK already does this before delivering key events, but for compatibility reasons, it only sets the first virtual modifier it finds, whereas this function sets all matching virtual modifiers. This function is useful when matching key events against accelerators. a #GdkKeymap pointer to the modifier mask to change Returns whether the Caps Lock modifer is locked. %TRUE if Caps Lock is on a #GdkKeymap Returns the direction of effective layout of the keymap. The direction of a layout is the direction of the majority of its symbols. See pango_unichar_direction(). %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL if it can determine the direction. %PANGO_DIRECTION_NEUTRAL otherwise. a #GdkKeymap Retrieves the #GdkDisplay associated to the @keymap. a #GdkDisplay a #GdkKeymap Returns the keyvals bound to @hardware_keycode. The Nth #GdkKeymapKey in @keys is bound to the Nth keyval in @keyvals. Free the returned arrays with g_free(). When a keycode is pressed by the user, the keyval from this list of entries is selected by considering the effective keyboard group and level. See gdk_keymap_translate_keyboard_state(). %TRUE if there were any entries a #GdkKeymap a keycode return location for array of #GdkKeymapKey, or %NULL return location for array of keyvals, or %NULL length of @keys and @keyvals Obtains a list of keycode/group/level combinations that will generate @keyval. Groups and levels are two kinds of keyboard mode; in general, the level determines whether the top or bottom symbol on a key is used, and the group determines whether the left or right symbol is used. On US keyboards, the shift key changes the keyboard level, and there are no groups. A group switch key might convert a keyboard between Hebrew to English modes, for example. #GdkEventKey contains a %group field that indicates the active keyboard group. The level is computed from the modifier mask. The returned array should be freed with g_free(). %TRUE if keys were found and returned a #GdkKeymap a keyval, such as %GDK_KEY_a, %GDK_KEY_Up, %GDK_KEY_Return, etc. return location for an array of #GdkKeymapKey return location for number of elements in returned array Returns the modifier mask the @keymap’s windowing system backend uses for a particular purpose. Note that this function always returns real hardware modifiers, not virtual ones (e.g. it will return #GDK_MOD1_MASK rather than #GDK_META_MASK if the backend maps MOD1 to META), so there are use cases where the return value of this function has to be transformed by gdk_keymap_add_virtual_modifiers() in order to contain the expected result. the modifier mask used for @intent. a #GdkKeymap the use case for the modifier mask Returns the current modifier state. the current modifier state. a #GdkKeymap Returns whether the Num Lock modifer is locked. %TRUE if Num Lock is on a #GdkKeymap Returns whether the Scroll Lock modifer is locked. %TRUE if Scroll Lock is on a #GdkKeymap Determines if keyboard layouts for both right-to-left and left-to-right languages are in use. %TRUE if there are layouts in both directions, %FALSE otherwise a #GdkKeymap Looks up the keyval mapped to a keycode/group/level triplet. If no keyval is bound to @key, returns 0. For normal user input, you want to use gdk_keymap_translate_keyboard_state() instead of this function, since the effective group/level may not be the same as the current keyboard state. a keyval, or 0 if none was mapped to the given @key a #GdkKeymap a #GdkKeymapKey with keycode, group, and level initialized Maps the virtual modifiers (i.e. Super, Hyper and Meta) which are set in @state to their non-virtual counterparts (i.e. Mod2, Mod3,...) and set the corresponding bits in @state. This function is useful when matching key events against accelerators. %FALSE if two virtual modifiers were mapped to the same non-virtual modifier. Note that %FALSE is also returned if a virtual modifier is mapped to a non-virtual modifier that was already set in @state. a #GdkKeymap pointer to the modifier state to map Translates the contents of a #GdkEventKey into a keyval, effective group, and level. Modifiers that affected the translation and are thus unavailable for application use are returned in @consumed_modifiers. See [Groups][key-group-explanation] for an explanation of groups and levels. The @effective_group is the group that was actually used for the translation; some keys such as Enter are not affected by the active keyboard group. The @level is derived from @state. For convenience, #GdkEventKey already contains the translated keyval, so this function isn’t as useful as you might think. @consumed_modifiers gives modifiers that should be masked outfrom @state when comparing this key press to a hot key. For instance, on a US keyboard, the `plus` symbol is shifted, so when comparing a key press to a `<Control>plus` accelerator `<Shift>` should be masked out. |[<!-- language="C" --> // We want to ignore irrelevant modifiers like ScrollLock #define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK) state = gdk_event_get_modifier_state (event); gdk_keymap_translate_keyboard_state (keymap, gdk_key_event_get_keycode (event), state, gdk_key_event_get_group (event), &keyval, NULL, NULL, &consumed); if (keyval == GDK_PLUS && (state & ~consumed & ALL_ACCELS_MASK) == GDK_CONTROL_MASK) // Control was pressed ]| An older interpretation @consumed_modifiers was that it contained all modifiers that might affect the translation of the key; this allowed accelerators to be stored with irrelevant consumed modifiers, by doing: |[<!-- language="C" --> // XXX Don’t do this XXX if (keyval == accel_keyval && (state & ~consumed & ALL_ACCELS_MASK) == (accel_mods & ~consumed)) // Accelerator was pressed ]| However, this did not work if multi-modifier combinations were used in the keymap, since, for instance, `<Control>` would be masked out even if only `<Control><Alt>` was used in the keymap. To support this usage as well as well as possible, all single modifier combinations that could affect the key for any combination of modifiers will be returned in @consumed_modifiers; multi-modifier combinations are returned only when actually found in @state. When you store accelerators, you should always store them with consumed modifiers removed. Store `<Control>plus`, not `<Control><Shift>plus`, %TRUE if there was a keyval bound to the keycode/state/group a #GdkKeymap a keycode a modifier state active keyboard group return location for keyval, or %NULL return location for effective group, or %NULL return location for level, or %NULL return location for modifiers that were used to determine the group or level, or %NULL The ::direction-changed signal gets emitted when the direction of the keymap changes. See gdk_keymap_get_direction(). The ::keys-changed signal is emitted when the mapping represented by @keymap changes. The ::state-changed signal is emitted when the state of the keyboard changes, e.g when Caps Lock is turned on or off. See gdk_keymap_get_caps_lock_state(). A #GdkKeymapKey is a hardware key that can be mapped to a keyval. the hardware keycode. This is an identifying number for a physical key. indicates movement in a horizontal direction. Usually groups are used for two different languages. In group 0, a key might have two English characters, and in group 1 it might have two Hebrew characters. The Hebrew characters will be printed on the key next to the English characters. indicates which symbol on the key will be used, in a vertical direction. So on a standard US keyboard, the key with the number “1” on it also has the exclamation point ("!") character on it. The level indicates whether to use the “1” or the “!” symbol. The letter keys are considered to have a lowercase letter at level 0, and an uppercase letter at level 1, though only the uppercase letter is printed. #GdkMemoryFormat describes a format that bytes can have in memory. It describes formats by listing the contents of the memory passed to it. So GDK_MEMORY_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 (see https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VkFormat for details). 4 bytes; for blue, green, red, alpha. The color values are premultiplied with the alpha value. 4 bytes; for alpha, red, green, blue. The color values are premultiplied with the alpha value. 4 bytes; for blue, green, red, alpha. 4 bytes; for alpha, red, green, blue. 4 bytes; for red, green, blue, alpha. 4 bytes; for alpha, blue, green, red. 3 bytes; for red, green, blue. The data is opaque. 3 bytes; for blue, green, red. The data is opaque. The number of formats. This value will change as more formats get added, so do not rely on its concrete integer. Creates a new texture for a blob of image data. The #GBytes must contain @stride x @height pixels in the given format. A newly-created #GdkTexture the width of the texture the height of the texture the format of the data the #GBytes containing the pixel data rowstride for the data 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). the primary modifier used to invoke menu accelerators. 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. the modifier used to extend selections using `modifier`-click or `modifier`-cursor-key the modifier used to modify selections, which in most cases means toggling the clicked item into or out of the 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. the modifier that switches between keyboard groups (AltGr on X11/Windows and Option/Alt on OS X). 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. 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. 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. 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. A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code the Super modifier the Hyper modifier the Meta modifier A reserved bit flag; do not use in your own code A reserved bit flag; do not use in your own code a mask covering all modifier types. GdkMonitor objects represent the individual outputs that are associated with a #GdkDisplay. GdkDisplay has APIs to enumerate monitors with gdk_display_get_n_monitors() and gdk_display_get_monitor(), and to find particular monitors with gdk_display_get_primary_monitor() or gdk_display_get_monitor_at_surface(). Gets the name of the monitor's connector, if available. the name of the connector a #GdkMonitor Gets the display that this monitor belongs to. the display a #GdkMonitor Retrieves the size and position of an individual monitor within the display coordinate space. The returned geometry is in ”application pixels”, not in ”device pixels” (see gdk_monitor_get_scale_factor()). a #GdkMonitor a #GdkRectangle to be filled with the monitor geometry Gets the height in millimeters of the monitor. the physical height of the monitor a #GdkMonitor Gets the name or PNP ID of the monitor's manufacturer, if available. Note that this value might also vary depending on actual display backend. PNP ID registry is located at https://uefi.org/pnp_id_list the name of the manufacturer, or %NULL a #GdkMonitor Gets the string identifying the monitor model, if available. the monitor model, or %NULL a #GdkMonitor Gets the refresh rate of the monitor, if available. The value is in milli-Hertz, so a refresh rate of 60Hz is returned as 60000. the refresh rate in milli-Hertz, or 0 a #GdkMonitor Gets the internal scale factor that maps from monitor coordinates to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2). This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a surface where it is better to use gdk_surface_get_scale_factor() instead. the scale factor a #GdkMonitor Gets information about the layout of red, green and blue primaries for each pixel in this monitor, if available. the subpixel layout a #GdkMonitor Gets the width in millimeters of the monitor. the physical width of the monitor a #GdkMonitor Retrieves the size and position of the “work area” on a monitor within the display coordinate space. The returned geometry is in ”application pixels”, not in ”device pixels” (see gdk_monitor_get_scale_factor()). The work area should be considered when positioning menus and similar popups, to avoid placing them below panels, docks or other desktop components. Note that not all backends may have a concept of workarea. This function will return the monitor geometry if a workarea is not available, or does not apply. a #GdkMonitor a #GdkRectangle to be filled with the monitor workarea Returns %TRUE if the @monitor object corresponds to a physical monitor. The @monitor becomes invalid when the physical monitor is unplugged or removed. %TRUE if the object corresponds to a physical monitor a #GdkMonitor The ::invalidate signal gets emitted when the output represented by @monitor gets disconnected. Specifies the kind of crossing for enter and leave events. See the X11 protocol specification of LeaveNotify for full details of crossing event generation. the surface is entered from an ancestor or left towards an ancestor. the pointer moves between an ancestor and an inferior of the surface. the surface is entered from an inferior or left towards an inferior. the surface is entered from or left towards a surface which is neither an ancestor nor an inferior. 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. an unknown type of enter/leave event occurred. A special value, indicating that the background for a surface should be inherited from the parent surface. This is the priority that the idle handler processing surface updates is given in the [GLib Main Loop][glib-The-Main-Event-Loop]. #GdkPaintable is a simple interface used by GDK and GDK to represent objects that can be painted anywhere at any size without requiring any sort of layout. The interface is inspired by similar concepts elsewhere, such as [ClutterContent](https://developer.gnome.org/clutter/stable/ClutterContent.html), [HTML/CSS Paint Sources](https://www.w3.org/TR/css-images-4/#paint-source), or [SVG Paint Servers](https://www.w3.org/TR/SVG2/pservers.html). A #GdkPaintable can be snapshot at any time and size using gdk_paintable_snapshot(). How the paintable interprets that size and if it scales or centers itself into the given rectangle is implementation defined, though if you are implementing a #GdkPaintable and don't know what to do, it is suggested that you scale your paintable ignoring any potential aspect ratio. The contents that a #GdkPaintable produces may depend on the #GdkSnapshot passed to it. For example, paintables may decide to use more detailed images on higher resolution screens or when OpenGL is available. A #GdkPaintable will however always produce the same output for the same snapshot. A #GdkPaintable may change its contents, meaning that it will now produce a different output with the same snpashot. Once that happens, it will call gdk_paintable_invalidate_contents() which will emit the #GdkPaintable::invalidate-contents signal. If a paintable is known to never change its contents, it will set the %GDK_PAINTABLE_STATIC_CONTENT flag. If a consumer cannot deal with changing contents, it may call gdk_paintable_get_static_image() which will return a static paintable and use that. A paintable can report an intrinsic (or preferred) size or aspect ratio it wishes to be rendered at, though it doesn't have to. Consumers of the interface can use this information to layout thepaintable appropriately. Just like the contents, the size of a paintable can change. A paintable will indicate this by calling gdk_paintable_invalidate_size() which will emit the #GdkPaintable::invalidate-size signal. And just like for contents, if a paintable is known to never change its size, it will set the %GDK_PAINTABLE_STATIC_SIZE flag. Besides API for applications, there are some functions that are only useful for implementing subclasses and should not be used by applications: gdk_paintable_invalidate_contents(), gdk_paintable_invalidate_size(), gdk_paintable_new_empty(). Returns a paintable that has the given intrinsic size and draws nothing. This is often useful for implementing the GdkPaintableClass:get_current_image() virtual function when the paintable is in an incomplete state (like a #GtkMediaStream before receiving the first frame). a #GdkPaintable The intrinsic width to report. Can be 0 for no width. The intrinsic height to report. Can be 0 for no height. Gets an immutable paintable for the current contents displayed by @paintable. This is useful when you want to retain the current state of an animation, for example to take a screenshot of a running animation. If the @paintable is already immutable, it will return itself. An immutable paintable for the current contents of @paintable. a #GdkPaintable Get flags for the paintable. This is oftentimes useful for optimizations. See #GdkPaintableFlags for the flags and what they mean. The #GdkPaintableFlags for this paintable. a #GdkPaintable Gets the preferred aspect ratio the @paintable would like to be displayed at. The aspect ration is the width divided by the height, so a value of 0.5 means that the @paintable prefers to be displayed twice as high as it is wide. Consumers of this interface can use this to preserve aspect ratio when displaying this paintable. This is a purely informational value and does not in any way limit the values that may be passed to gdk_paintable_snapshot(). Usually when a @paintable returns non-0 values from gdk_paintable_get_intrinsic_width() and gdk_paintable_get_intrinsic_height() the aspect ratio should conform to those values, though that is not required. If the @paintable does not have a preferred aspect ratio, it returns 0.0. Negative values are never returned. the intrinsic aspect ratio of @paintable or 0.0 if none. a #GdkPaintable Gets the preferred height the @paintable would like to be displayed at. Consumers of this interface can use this to reserve enough space to draw the paintable. This is a purely informational value and does not in any way limit the values that may be passed to gdk_paintable_snapshot(). If the @paintable does not have a preferred height, it returns 0. Negative values are never returned. the intrinsic height of @paintable or 0 if none. a #GdkPaintable Gets the preferred width the @paintable would like to be displayed at. Consumers of this interface can use this to reserve enough space to draw the paintable. This is a purely informational value and does not in any way limit the values that may be passed to gdk_paintable_snapshot(). If the @paintable does not have a preferred width, it returns 0. Negative values are never returned. the intrinsic width of @paintable or 0 if none. a #GdkPaintable Snapshots the given paintable with the given @width and @height at the current (0,0) offset of the @snapshot. If @width and @height are not larger than zero, this function will do nothing. a #GdkPaintable a #GdkSnapshot to snapshot to width to snapshot in height to snapshot in Applies the sizing algorithm outlined in https://drafts.csswg.org/css-images-3/#default-sizing to the given @paintable. See that link for more details. It is not necessary to call this function when both @specified_width and @specified_height are known, but it is useful to call this function in GtkWidget:measure implementations to compute the other dimension when only one dimension is given. a #GdkPaintable the width @paintable could be drawn into or 0.0 if unknown the height @paintable could be drawn into or 0.0 if unknown the width @paintable would be drawn into if no other constraints were given the height @paintable would be drawn into if no other constraints were given will be set to the concrete width computed. will be set to the concrete height computed. Gets an immutable paintable for the current contents displayed by @paintable. This is useful when you want to retain the current state of an animation, for example to take a screenshot of a running animation. If the @paintable is already immutable, it will return itself. An immutable paintable for the current contents of @paintable. a #GdkPaintable Get flags for the paintable. This is oftentimes useful for optimizations. See #GdkPaintableFlags for the flags and what they mean. The #GdkPaintableFlags for this paintable. a #GdkPaintable Gets the preferred aspect ratio the @paintable would like to be displayed at. The aspect ration is the width divided by the height, so a value of 0.5 means that the @paintable prefers to be displayed twice as high as it is wide. Consumers of this interface can use this to preserve aspect ratio when displaying this paintable. This is a purely informational value and does not in any way limit the values that may be passed to gdk_paintable_snapshot(). Usually when a @paintable returns non-0 values from gdk_paintable_get_intrinsic_width() and gdk_paintable_get_intrinsic_height() the aspect ratio should conform to those values, though that is not required. If the @paintable does not have a preferred aspect ratio, it returns 0.0. Negative values are never returned. the intrinsic aspect ratio of @paintable or 0.0 if none. a #GdkPaintable Gets the preferred height the @paintable would like to be displayed at. Consumers of this interface can use this to reserve enough space to draw the paintable. This is a purely informational value and does not in any way limit the values that may be passed to gdk_paintable_snapshot(). If the @paintable does not have a preferred height, it returns 0. Negative values are never returned. the intrinsic height of @paintable or 0 if none. a #GdkPaintable Gets the preferred width the @paintable would like to be displayed at. Consumers of this interface can use this to reserve enough space to draw the paintable. This is a purely informational value and does not in any way limit the values that may be passed to gdk_paintable_snapshot(). If the @paintable does not have a preferred width, it returns 0. Negative values are never returned. the intrinsic width of @paintable or 0 if none. a #GdkPaintable Called by implementations of #GdkPaintable to invalidate their contents. Unless the contents are invalidated, implementations must guarantee that multiple calls to GdkPaintable::snapshot produce the same output. This function will emit the GdkPaintable::invalidate-contents signal. If a @paintable reports the %GDK_PAINTABLE_STATIC_CONTENTS flag, it must not call this function. a #GdkPaintable Called by implementations of #GdkPaintable to invalidate their size. As long as the size is not invalidated, @paintable must return the same values for its width, height and intrinsic height. This function will emit the GdkPaintable::invalidate-size signal. If a @paintable reports the %GDK_PAINTABLE_STATIC_SIZE flag, it must not call this function. a #GdkPaintable Snapshots the given paintable with the given @width and @height at the current (0,0) offset of the @snapshot. If @width and @height are not larger than zero, this function will do nothing. a #GdkPaintable a #GdkSnapshot to snapshot to width to snapshot in height to snapshot in Emitted when the contents of the @paintable change. Examples for such an event would be videos changing to the next frame or the icon theme for an icon changing. Emitted when the intrinsic size of the @paintable changes. This means the values reported by at least one of gdk_paintable_get_intrinsic_width(), gdk_paintable_get_intrinsic_height() or gdk_paintable_get_intrinsic_aspect_ratio() has changed. Examples for such an event would be a paintable displaying the contents of a toplevel surface being resized. Flags about this object. Implementations use these for optimizations such as caching. The size is immutable. The GdkPaintable::invalidate-size signal will never be emitted. The content is immutable. The GdkPaintable::invalidate-content signal will never be emitted. The list of functions that can be implemented for the #GdkPaintable interface. Note that apart from the first function, no function is mandatory to implement, though it is a good idea to implement GdkPaintable:get_current_image() for non-static paintables and GdkPaintable:get_flags() if the image is not dynamic as the default implementation returns no flags and that will make the implementation likely quite slow. a #GdkPaintable a #GdkSnapshot to snapshot to width to snapshot in height to snapshot in An immutable paintable for the current contents of @paintable. a #GdkPaintable The #GdkPaintableFlags for this paintable. a #GdkPaintable the intrinsic width of @paintable or 0 if none. a #GdkPaintable the intrinsic height of @paintable or 0 if none. a #GdkPaintable the intrinsic aspect ratio of @paintable or 0.0 if none. a #GdkPaintable Defines the x and y coordinates of a point. the x coordinate of the point the y coordinate of the point A #GdkPopup is a surface that is attached to another surface, and is positioned relative to it. Returns whether this popup is set to hide on outside clicks. %TRUE if @popup will autohide a #GdkPopup Returns the parent surface of a popup. the parent surface a #GdkPopup Obtains the position of the popup relative to its parent. the X coordinate of @popup position a #GdkPopup Obtains the position of the popup relative to its parent. the Y coordinate of @popup position a #GdkPopup Gets the current popup rectangle anchor. The value returned may change after calling gdk_popup_present(), or after the "popup-layout-changed" is emitted. the current rectangle anchor value of @popup a #GdkPopup Gets the current popup surface anchor. The value returned may change after calling gdk_popup_present(), or after the "popup-layout-changed" is emitted. the current surface anchor value of @popup a #GdkPopup Present @popup after having processed the #GdkPopupLayout rules. If the popup was previously now showing, it will be showed, otherwise it will change position according to @layout. After calling this function, the result of the layout can be queried using gdk_popup_get_position(), gdk_surface_get_width(), gdk_surface_get_height(), gdk_popup_get_rect_anchor() and gdk_popup_get_surface_anchor(). Presenting may have fail, for example if it was immediately hidden if the @popup was set to autohide. %FALSE if it failed to be presented, otherwise %TRUE. the #GdkPopup to show the unconstrained popup width to layout the unconstrained popup height to layout the #GdkPopupLayout object used to layout Popups are positioned relative to their parent surface. The GdkPopupLayout struct contains information that is necessary to do so. Create a popup layout description. Used together with gdk_surface_present_popup() to describe how a popup surface should be placed and behave on-screen. @anchor_rect is relative to the top-left corner of the surface's parent. @rect_anchor and @surface_anchor determine anchor points on @anchor_rect and surface to pin together. The position of @anchor_rect's anchor point can optionally be offset using gdk_popup_layout_set_offset(), which is equivalent to offsetting the position of surface. newly created instance of #GdkPopupLayout the anchor #GdkRectangle to align @surface with the point on @anchor_rect to align with @surface's anchor point the point on @surface to align with @rect's anchor point Create a new #GdkPopupLayout and copy the contents of @layout into it. a copy of @layout. a #GdkPopupLayout Check whether @layout and @other has identical layout properties. %TRUE if @layout and @other have identical layout properties, otherwise %FALSE. a #GdkPopupLayout another #GdkPopupLayout Get the #GdkAnchorHints. the #GdkAnchorHints. a #GdkPopupLayout Get the anchor rectangle. The anchor rectangle. a #GdkPopupLayout Get the delta the anchor rectangle is offset with a #GdkPopupLayout a pointer to where to store the delta x coordinate a pointer to where to store the delta y coordinate Returns the anchor position on the anchor rectangle. the anchor on the anchor rectangle. a #GdkPopupLayout Returns the anchor position on the popup surface. the anchor on the popup surface. a #GdkPopupLayout Increases the reference count of @value. the same @layout a #GdkPopupLayout Set new anchor hints. The set @anchor_hints determines how @surface will be moved if the anchor points cause it to move off-screen. For example, %GDK_ANCHOR_FLIP_X will replace %GDK_GRAVITY_NORTH_WEST with %GDK_GRAVITY_NORTH_EAST and vice versa if @surface extends beyond the left or right edges of the monitor. a #GdkPopupLayout the new #GdkAnchorHints Set the anchor rectangle. a #GdkPopupLayout the new anchor rectangle Offset the position of the anchor rectangle with the given delta. a #GdkPopupLayout x delta to offset the anchor rectangle with y delta to offset the anchor rectangle with Set the anchor on the anchor rectangle. a #GdkPopupLayout the new rect anchor Set the anchor on the popup surface. a #GdkPopupLayout the new popup surface anchor Decreases the reference count of @value. a #GdkPopupLayout A #GdkRGBA is used to represent a (possibly translucent) color, in a way that is compatible with cairo’s notion of color. The intensity of the red channel from 0.0 to 1.0 inclusive The intensity of the green channel from 0.0 to 1.0 inclusive The intensity of the blue channel from 0.0 to 1.0 inclusive The opacity of the color from 0.0 for completely translucent to 1.0 for opaque Makes a copy of a #GdkRGBA. The result must be freed through gdk_rgba_free(). A newly allocated #GdkRGBA, with the same contents as @rgba a #GdkRGBA Compares two RGBA colors. %TRUE if the two colors compare equal a #GdkRGBA pointer another #GdkRGBA pointer Frees a #GdkRGBA created with gdk_rgba_copy() a #GdkRGBA A hash function suitable for using for a hash table that stores #GdkRGBAs. The hash value for @p a #GdkRGBA pointer Checks if an @rgba value is transparent. That is, drawing with the value would not produce any change. %TRUE if the @rgba is clear a #GdkRGBA Checks if an @rgba value is opaque. That is, drawing with the value will not retain any results from previous contents. %TRUE if the @rgba is opaque a #GdkRGBA Parses a textual representation of a color, filling in the @red, @green, @blue and @alpha fields of the @rgba #GdkRGBA. The string can be either one of: - A standard name (Taken from the X11 rgb.txt file). - A hexadecimal value in the form “\#rgb”, “\#rrggbb”, “\#rrrgggbbb” or ”\#rrrrggggbbbb” - A RGB color in the form “rgb(r,g,b)” (In this case the color will have full opacity) - A RGBA color in the form “rgba(r,g,b,a)” Where “r”, “g”, “b” and “a” are respectively the red, green, blue and alpha color values. In the last two cases, “r”, “g”, and “b” are either integers in the range 0 to 255 or percentage values in the range 0% to 100%, and a is a floating point value in the range 0 to 1. %TRUE if the parsing succeeded the #GdkRGBA to fill in the string specifying the color Returns a textual specification of @rgba in the form `rgb(r,g,b)` or `rgba(r g,b,a)`, where “r”, “g”, “b” and “a” represent the red, green, blue and alpha values respectively. “r”, “g”, and “b” are represented as integers in the range 0 to 255, and “a” is represented as a floating point value in the range 0 to 1. These string forms are string forms that are supported by the CSS3 colors module, and can be parsed by gdk_rgba_parse(). Note that this string representation may lose some precision, since “r”, “g” and “b” are represented as 8-bit integers. If this is a concern, you should use a different representation. A newly allocated text string a #GdkRGBA Defines the position and size of a rectangle. It is identical to #cairo_rectangle_int_t. the x coordinate of the top left corner the y coordinate of the top left corner the width of the rectangle the height of the rectangle Returns #TRUE if @rect contains the point described by @x and @y. #TRUE if @rect contains the point a #GdkRectangle X coordinate Y coordinate Checks if the two given rectangles are equal. %TRUE if the rectangles are equal. a #GdkRectangle a #GdkRectangle Calculates the intersection of two rectangles. It is allowed for @dest to be the same as either @src1 or @src2. If the rectangles do not intersect, @dest’s width and height is set to 0 and its x and y values are undefined. If you are only interested in whether the rectangles intersect, but not in the intersecting area itself, pass %NULL for @dest. %TRUE if the rectangles intersect. a #GdkRectangle a #GdkRectangle return location for the intersection of @src1 and @src2, or %NULL Calculates the union of two rectangles. The union of rectangles @src1 and @src2 is the smallest rectangle which includes both @src1 and @src2 within it. It is allowed for @dest to be the same as either @src1 or @src2. Note that this function does not ignore 'empty' rectangles (ie. with zero width or height). a #GdkRectangle a #GdkRectangle return location for the union of @src1 and @src2 Specifies the direction for scroll events. the surface is scrolled up. the surface is scrolled down. the surface is scrolled to the left. the surface is scrolled to the right. the scrolling is determined by the delta values in scroll events. See gdk_event_get_scroll_deltas() The #GdkSeat object represents a collection of input devices that belong to a user. Returns the capabilities this #GdkSeat currently has. the seat capabilities a #GdkSeat Returns the #GdkDisplay this seat belongs to. a #GdkDisplay. This object is owned by GTK and must not be freed. a #GdkSeat Returns the master device that routes keyboard events. a master #GdkDevice with keyboard capabilities. This object is owned by GTK and must not be freed. a #GdkSeat Returns all master pointers with the given capabilities driven by this @seat. On most backends this function will return a list with a single element (meaning that all input devices drive the same onscreen cursor). In other backends where there can possibly be multiple foci (eg. wayland), this function will return all master #GdkDevices that represent these. A list of master pointing devices The #GdkSeat Queried capabilities Returns the master device that routes pointer events. a master #GdkDevice with pointer capabilities. This object is owned by GTK and must not be freed. a #GdkSeat Returns the slave devices that match the given capabilities. A list of #GdkDevices. The list must be freed with g_list_free(), the elements are owned by GDK and must not be freed. a #GdkSeat capabilities to get devices for #GdkDisplay of this seat. The ::device-added signal is emitted when a new input device is related to this seat. the newly added #GdkDevice. The ::device-removed signal is emitted when an input device is removed (e.g. unplugged). the just removed #GdkDevice. The ::tool-added signal is emitted whenever a new tool is made known to the seat. The tool may later be assigned to a device (i.e. on proximity with a tablet). The device will emit the #GdkDevice::tool-changed signal accordingly. A same tool may be used by several devices. the new #GdkDeviceTool known to the seat This signal is emitted whenever a tool is no longer known to this @seat. the just removed #GdkDeviceTool Flags describing the seat capabilities. No input capabilities The seat has a pointer (e.g. mouse) The seat has touchscreen(s) attached The seat has drawing tablet(s) attached The seat has keyboard(s) attached The seat has drawing tablet pad(s) attached The union of all pointing capabilities The union of all capabilities This enumeration describes how the red, green and blue components of physical pixels on an output device are laid out. The layout is not known Not organized in this way The layout is horizontal, the order is RGB The layout is horizontal, the order is BGR The layout is vertical, the order is RGB The layout is vertical, the order is BGR A #GdkSurface is a (usually) rectangular region on the screen. It’s a low-level object, used to implement high-level objects such as #GtkWindow on the GTK level. Create a new popup surface. The surface will be attached to @parent and can be positioned relative to it using gdk_surface_show_popup() or later using gdk_surface_layout_popup(). a new #GdkSurface the parent surface to attach the surface to whether to hide the surface on outside clicks Creates a new toplevel surface. the new #GdkSurface the display to create the surface on width of new surface height of new surface Constrains a desired width and height according to a set of geometry hints (such as minimum and maximum size). a #GdkGeometry structure a mask indicating what portions of @geometry are set desired width of surface desired height of the surface location to store resulting width location to store resulting height Emits a short beep associated to @surface in the appropriate display, if supported. Otherwise, emits a short beep on the display just as gdk_display_beep(). a toplevel #GdkSurface Begins a surface move operation (for a toplevel surface). a toplevel #GdkSurface the device used for the operation the button being used to drag, or 0 for a keyboard-initiated drag surface X coordinate of mouse click that began the drag surface Y coordinate of mouse click that began the drag timestamp of mouse click that began the drag Begins a surface resize operation (for a toplevel surface). You might use this function to implement a “window resize grip,” a toplevel #GdkSurface the edge or corner from which the drag is started the device used for the operation the button being used to drag, or 0 for a keyboard-initiated drag surface X coordinate of mouse click that began the drag surface Y coordinate of mouse click that began the drag timestamp of mouse click that began the drag (use gdk_event_get_time()) Creates a new #GdkCairoContext for rendering on @surface. the newly created #GdkCairoContext a #GdkSurface Creates a new #GdkGLContext matching the framebuffer format to the visual of the #GdkSurface. The context is disconnected from any particular surface or surface. If the creation of the #GdkGLContext failed, @error will be set. Before using the returned #GdkGLContext, you will need to call gdk_gl_context_make_current() or gdk_gl_context_realize(). the newly created #GdkGLContext, or %NULL on error a #GdkSurface Create a new surface that is as compatible as possible with the given @surface. For example the new surface will have the same fallback resolution and font options as @surface. Generally, the new surface will also use the same backend as @surface, unless that is not possible for some reason. The type of the returned surface may be examined with cairo_surface_get_type(). Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.) a pointer to the newly allocated surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a “nil” surface if @other is already in an error state or any other error occurs. surface to make new surface similar to the content for the new surface width of the new surface height of the new surface Creates a new #GdkVulkanContext for rendering on @surface. If the creation of the #GdkVulkanContext failed, @error will be set. the newly created #GdkVulkanContext, or %NULL on error a #GdkSurface Destroys the window system resources associated with @surface and decrements @surface's reference count. The window system resources for all children of @surface are also destroyed, but the children’s reference counts are not decremented. Note that a surface will not be destroyed automatically when its reference count reaches zero. You must call this function yourself before that happens. a #GdkSurface Temporarily freezes a surface such that it won’t receive expose events. The surface will begin receiving expose events again when gdk_surface_thaw_updates() is called. If gdk_surface_freeze_updates() has been called more than once, gdk_surface_thaw_updates() must be called an equal number of times to begin processing exposes. a #GdkSurface Retrieves a #GdkCursor pointer for the cursor currently set on the specified #GdkSurface, or %NULL. If the return value is %NULL then there is no custom cursor set on the specified surface, and it is using the cursor for its parent surface. a #GdkCursor, or %NULL. The returned object is owned by the #GdkSurface and should not be unreferenced directly. Use gdk_surface_set_cursor() to unset the cursor of the surface a #GdkSurface Retrieves a #GdkCursor pointer for the @device currently set on the specified #GdkSurface, or %NULL. If the return value is %NULL then there is no custom cursor set on the specified surface, and it is using the cursor for its parent surface. a #GdkCursor, or %NULL. The returned object is owned by the #GdkSurface and should not be unreferenced directly. Use gdk_surface_set_cursor() to unset the cursor of the surface a #GdkSurface. a master, pointer #GdkDevice. Obtains the current device position in doubles and modifier state. The position is given in coordinates relative to the upper left corner of @surface. a #GdkSurface. pointer #GdkDevice to query to. return location for the X coordinate of @device, or %NULL. return location for the Y coordinate of @device, or %NULL. return location for the modifier mask, or %NULL. Gets the #GdkDisplay associated with a #GdkSurface. the #GdkDisplay associated with @surface a #GdkSurface Gets the frame clock for the surface. The frame clock for a surface never changes unless the surface is reparented to a new toplevel surface. the frame clock surface to get frame clock for Returns the height of the given @surface. On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server. The height of @surface a #GdkSurface Checks whether the surface has been mapped (with gdk_surface_show() or gdk_surface_show_unraised()). %TRUE if the surface is mapped a #GdkSurface Returns the internal scale factor that maps from surface coordiantes to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2). A higher value means that drawing is automatically scaled up to a higher resolution, so any code doing drawing will automatically look nicer. However, if you are supplying pixel-based data the scale value can be used to determine whether to use a pixel resource with higher resolution data. The scale of a surface may change during runtime, if this happens a configure event will be sent to the toplevel surface. the scale factor surface to get scale factor for Returns %TRUE if the surface is aware of the existence of multiple devices. %TRUE if the surface handles multidevice features. a #GdkSurface. Returns the width of the given @surface. On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server. The width of @surface a #GdkSurface For toplevel surfaces, withdraws them, so they will no longer be known to the window manager; for all surfaces, unmaps them, so they won’t be displayed. Normally done automatically as part of gtk_widget_hide(). a #GdkSurface Check to see if a surface is destroyed.. %TRUE if the surface is destroyed a #GdkSurface Check if the surface and all ancestors of the surface are mapped. (This is not necessarily "viewable" in the X sense, since we only check as far as we have GDK surface parents, not to the root surface.) %TRUE if the surface is viewable a #GdkSurface Forces an expose event for @surface to be scheduled. If the invalid area of @surface is empty, an expose event will still be emitted. Its invalid region will be empty. This function is useful for implementations that track invalid regions on their own. a #GdkSurface Sets the default mouse pointer for a #GdkSurface. Note that @cursor must be for the same display as @surface. Use gdk_cursor_new_from_name() or gdk_cursor_new_from_texture() to create the cursor. To make the cursor invisible, use %GDK_BLANK_CURSOR. Passing %NULL for the @cursor argument to gdk_surface_set_cursor() means that @surface will use the cursor of its parent surface. Most surfaces should use this default. a #GdkSurface a cursor Sets a specific #GdkCursor for a given device when it gets inside @surface. Use gdk_cursor_new_fromm_name() or gdk_cursor_new_from_texture() to create the cursor. To make the cursor invisible, use %GDK_BLANK_CURSOR. Passing %NULL for the @cursor argument to gdk_surface_set_cursor() means that @surface will use the cursor of its parent surface. Most surfaces should use this default. a #GdkSurface a master, pointer #GdkDevice a #GdkCursor Apply the region to the surface for the purpose of event handling. Mouse events which happen while the pointer position corresponds to an unset bit in the mask will be passed on the surface below @surface. An input shape is typically used with RGBA surfaces. The alpha channel of the surface defines which pixels are invisible and allows for nicely antialiased borders, and the input shape controls where the surface is “clickable”. On the X11 platform, this requires version 1.1 of the shape extension. On the Win32 platform, this functionality is not present and the function does nothing. a #GdkSurface region of surface to be reactive For optimisation purposes, compositing window managers may like to not draw obscured regions of surfaces, or turn off blending during for these regions. With RGB windows with no transparency, this is just the shape of the window, but with ARGB32 windows, the compositor does not know what regions of the window are transparent or not. This function only works for toplevel surfaces. GTK will update this property automatically if the @surface background is opaque, as we know where the opaque regions are. If your surface background is not opaque, please update this property in your #GtkWidget:css-changed handler. a top-level or non-native #GdkSurface a region, or %NULL Newer GTK windows using client-side decorations use extra geometry around their frames for effects like shadows and invisible borders. Window managers that want to maximize windows or snap to edges need to know where the extents of the actual frame lie, so that users don’t feel like windows are snapping against random invisible edges. Note that this property is automatically updated by GTK, so this function should only be used by applications which do not use GTK to create toplevel surfaces. a #GdkSurface The left extent The right extent The top extent The bottom extent This function will enable multidevice features in @surface. Multidevice aware surfaces will need to handle properly multiple, per device enter/leave events, device grabs and grab ownerships. a #GdkSurface. %TRUE to enable multidevice support in @surface. Thaws a surface frozen with gdk_surface_freeze_updates(). Note that this will not necessarily schedule updates if the surface freeze count reaches zero. a #GdkSurface Translates the given coordinates from being relative to the @from surface to being relative to the @to surface. Note that this only works if @to and @from are popups or transient-for to the same toplevel (directly or indirectly). %TRUE if the coordinates were successfully translated the origin surface the target surface coordinates to translate coordinates to translate The mouse pointer for a #GdkSurface. See gdk_surface_set_cursor() and gdk_surface_get_cursor() for details. The #GdkDisplay connection of the surface. See gdk_surface_get_display() for details. Emitted when GDK receives an input event for @surface. %TRUE to indicate that the event has been handled an input event Emitted when the layout of a popup @surface has changed, e.g. if the popup layout was reactive and after the parent moved causing the popover to end up partially off-screen. Emitted when part of the surface needs to be redrawn. %TRUE to indicate that the signal has been handled the region that needs to be redrawn Emitted when the size of @surface is changed. the new width the new height Determines a surface 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. 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, though they don't directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set automatically by #GtkWindow if you call gtk_window_move(). @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user specified a size/position using a --geometry command-line argument; gtk_window_parse_geometry() automatically sets these flags. indicates that the program has positioned the surface 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 surface gravity field is set indicates that the surface’s position was explicitly set by the user indicates that the surface’s size was explicitly set by the user Specifies the state of a toplevel surface. On platforms that support information about individual edges, the %GDK_SURFACE_STATE_TILED state will be set whenever any of the individual tiled states is set. On platforms that lack that support, the tiled state will give an indication of tiledness without any of the per-edge states being set. the surface is not shown the surface is minimized the surface is maximized the surface is sticky the surface is maximized without decorations the surface is kept above other surfaces the surface is kept below other surfaces the surface is presented as focused (with active decorations) the surface is in a tiled state whether the top edge is tiled whether the top edge is resizable whether the right edge is tiled whether the right edge is resizable whether the bottom edge is tiled whether the bottom edge is resizable whether the left edge is tiled whether the left edge is resizable 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. Normal toplevel window. Dialog window. Window used to implement a menu; GTK uses this hint only for torn-off menus, see #GtkTearoffMenuItem. Window used to implement toolbars. Window used to display a splash screen during application startup. Utility windows which are not detached toolbars or dialogs. Used for creating dock or panel windows. Used for creating the desktop background window. 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. A GdkTexture represents image data that can be displayed on screen. There are various ways to create GdkTexture objects from a #GdkPixbuf or a cairo surface, or other pixel data. An important aspect of GdkTextures is that they are immutable - once the image data has been wrapped in a GdkTexture, it may be uploaded to the GPU or used in other ways that make it impractical to allow modification. Creates a new texture object representing the GdkPixbuf. a new #GdkTexture a #GdkPixbuf Creates a new texture by loading an image from a file. The file format is detected automatically. If %NULL is returned, then @error will be set. A newly-created #GdkTexture or %NULL if an error occured. #GFile to load Creates a new texture by loading an image from a resource. The file format is detected automatically. It is a fatal error if @resource_path does not specify a valid image resource and the program will abort if that happens. If you are unsure about the validity of a resource, use gdk_texture_new_from_file() to load it. A newly-created texture the path of the resource file Downloads the @texture into local memory. This may be an expensive operation, as the actual texture data may reside on a GPU or on a remote display server. The data format of the downloaded data is equivalent to %CAIRO_FORMAT_ARGB32, so every downloaded pixel requires 4 bytes of memory. Downloading a texture into a Cairo image surface: |[<!-- language="C" --> surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, gdk_texture_get_width (texture), gdk_texture_get_height (texture)); gdk_texture_download (texture, cairo_image_surface_get_data (surface), cairo_image_surface_get_stride (surface)); cairo_surface_mark_dirty (surface); ]| a #GdkTexture pointer to enough memory to be filled with the downloaded data of @texture rowstride in bytes Returns the height of the @texture. the height of the #GdkTexture a #GdkTexture Returns the width of @texture. the width of the #GdkTexture a #GdkTexture Store the given @texture to the @filename as a PNG file. This is a utility function intended for debugging and testing. If you want more control over formats, proper error handling or want to store to a #GFile or other location, you might want to look into using the gdk-pixbuf library. %TRUE if saving succeeded, %FALSE on failure. a #GdkTexture the filename to store to The height of the texture. The width of the texture. A #GdkTimeCoord stores a single event in a motion history. The timestamp for this event. the values of the device’s axes. A #GdkToplevel is a freestanding toplevel surface. Sets keyboard focus to @surface. In most cases, gtk_window_present_with_time() should be used on a #GtkWindow, rather than calling this function. a #GdkToplevel timestamp of the event triggering the surface focus Gets the bitwise OR of the currently active surface state flags, from the #GdkSurfaceState enumeration. surface state bitfield a #GdkToplevel Requests that the @toplevel inhibit the system shortcuts, asking the desktop environment/windowing system to let all keyboard events reach the surface, as long as it is focused, instead of triggering system actions. If granted, the rerouting remains active until the default shortcuts processing is restored with gdk_toplevel_restore_system_shortcuts(), or the request is revoked by the desktop enviroment, windowing system or the user. A typical use case for this API is remote desktop or virtual machine viewers which need to inhibit the default system keyboard shortcuts so that the remote session or virtual host gets those instead of the local environment. The windowing system or desktop environment may ask the user to grant or deny the request or even choose to ignore the request entirely. The caller can be notified whenever the request is granted or revoked by listening to the GdkToplevel::shortcuts-inhibited property. the #GdkToplevel requesting system keyboard shortcuts the #GdkEvent that is triggering the inhibit request, or %NULL if none is available. Asks to lower the @toplevel below other windows. The windowing system may choose to ignore the request. %TRUE if the surface was lowered a #GdkToplevel Asks to minimize the @toplevel. The windowing system may choose to ignore the request. %TRUE if the surface was minimized a #GdkToplevel Present @toplevel after having processed the #GdkToplevelLayout rules. If the toplevel was previously now showing, it will be showed, otherwise it will change layout according to @layout. Presenting may fail. %FALSE if @toplevel failed to be presented, otherwise %TRUE. the #GdkToplevel to show the unconstrained toplevel width to layout the unconstrained toplevel height to layout the #GdkToplevelLayout object used to layout Restore default system keyboard shortcuts which were previously requested to be inhibited by gdk_toplevel_inhibit_system_shortcuts(). a #GdkToplevel Setting @decorated to %FALSE hints the desktop environment that the surface has its own, client-side decorations and does not need to have window decorations added. a #GdkToplevel %TRUE to request decorations Setting @deletable to %TRUE hints the desktop environment that it should offer the user a way to close the surface. a #GdkToplevel %TRUE to request a delete button Sets a list of icons for the surface. One of these will be used to represent the surface in iconic form. The icon may be shown in window lists or task bars. Which icon size is shown depends on the window manager. The window manager can scale the icon but setting several size icons can give better image quality. Note that some platforms don't support surface icons. a #GdkToplevel A list of textures to use as icon, of different sizes The application can use this hint to tell the window manager that a certain surface has modal behaviour. The window manager can use this information to handle modal surfaces in a special way. You should only use this on surfaces for which you have previously called gdk_toplevel_set_transient_for(). A toplevel surface %TRUE if the surface is modal, %FALSE otherwise. When using GTK, typically you should use gtk_window_set_startup_id() instead of this low-level function. a #GdkToplevel a string with startup-notification identifier Sets the title of a toplevel surface, to be displayed in the titlebar, in lists of windows, etc. a #GdkToplevel title of @surface Indicates to the window manager that @surface is a transient dialog associated with the application surface @parent. This allows the window manager to do things like center @surface on @parent and keep @surface above @parent. See gtk_window_set_transient_for() if you’re using #GtkWindow or #GtkDialog. a #GdkToplevel another toplevel #GdkSurface Asks the windowing system to show the window menu. The window menu is the menu shown when right-clicking the titlebar on traditional windows managed by the window manager. This is useful for windows using client-side decorations, activating it with a right-click on the window decorations. %TRUE if the window menu was shown and %FALSE otherwise. a #GdkToplevel a #GdkEvent to show the menu for Returns whether the desktop environment supports tiled window states. %TRUE if the desktop environment supports tiled window states a #GdkToplevel Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc). The GdkToplevelLayout struct contains information that is necessary to do so, and is passed to gdk_toplevel_present(). Create a toplevel layout description. Used together with gdk_toplevel_present() to describe how a toplevel surface should be placed and behave on-screen. newly created instance of #GdkToplevelLayout the minimum width for the layout the minimum height for the layout Create a new #GdkToplevelLayout and copy the contents of @layout into it. a copy of @layout. a #GdkToplevelLayout Check whether @layout and @other has identical layout properties. %TRUE if @layout and @other have identical layout properties, otherwise %FALSE. a #GdkToplevelLayout another #GdkToplevelLayout Returns whether the layout should cause the surface to be fullscreen when presented. %TRUE if @layout is fullscreen a #GdkToplevelLayout Returns the monitor that the layout is fullscreening the surface on. the monitor on which @layout fullscreens a #GdkToplevelLayout Returns whether the layout should present the surface as maximized. %TRUE if the layout is maximized a #GdkToplevelLayout Returns the minimum height of the given layout. the minimum height of @layout a #GdkToplevelLayout Returns the minimum width of the given layout. the minimum width of @layout a #GdkToplevelLayout Returns whether the layout should allow the user to resize the surface. %TRUE if the layout is resizable a #GdkToplevelLayout Increases the reference count of @layout. the same @layout a #GdkToplevelLayout Sets whether the layout should cause the surface to be fullscreen when presented. a #GdkToplevelLayout %TRUE to fullscreen the surface the monitor to fullscreen on Sets whether the layout should cause the surface to be maximized when presented. a #GdkToplevelLayout %TRUE to maximize Sets whether the layout should allow the user to resize the surface after it has been presented. a #GdkToplevelLayout %TRUE to allow resizing Decreases the reference count of @layout. a #GdkToplevelLayout 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. The gesture has begun. The gesture has been updated. The gesture was finished, changes should be permanently applied. The gesture was cancelled, all changes should be undone. #GdkVulkanContext is an object representing the platform-specific Vulkan draw context. #GdkVulkanContexts are created for a #GdkSurface using gdk_surface_create_vulkan_context(), and the context will match the the characteristics of the surface. Support for #GdkVulkanContext is platform-specific, context creation can fail, returning %NULL context. This signal is emitted when the images managed by this context have changed. Usually this means that the swapchain had to be recreated, for example in response to a change of the surface size. Error enumeration for #GdkVulkanContext. Vulkan is not supported on this backend or has not been compiled in. Vulkan support is not available on this Surface Extract the button number from a button event. the button of @event a button event This is the main way to draw GL content in GTK. It takes a render buffer ID (@source_type == #GL_RENDERBUFFER) or a texture id (@source_type == #GL_TEXTURE) and draws it onto @cr with an OVER operation, respecting the current clip. The top left corner of the rectangle specified by @x, @y, @width and @height will be drawn at the current (0,0) position of the cairo_t. This will work for *all* cairo_t, as long as @surface is realized, but the fallback implementation that reads back the pixels from the buffer may be used in the general case. In the case of direct drawing to a surface with no special effects applied to @cr it will however use a more efficient approach. For #GL_RENDERBUFFER the code will always fall back to software for buffers with alpha components, so make sure you use #GL_TEXTURE if using alpha. Calling this may change the current GL context. a cairo context The surface we're rendering for (not necessarily into) The GL ID of the source buffer The type of the @source The scale-factor that the @source buffer is allocated for The source x position in @source to start copying from in GL coordinates The source y position in @source to start copying from in GL coordinates The width of the region to draw The height of the region to draw Adds the given rectangle to the current path of @cr. a cairo context a #GdkRectangle Adds the given region to the current path of @cr. a cairo context a #cairo_region_t Creates region that describes covers the area where the given @surface is more than 50% opaque. This function takes into account device offsets that might be set with cairo_surface_set_device_offset(). A #cairo_region_t; must be freed with cairo_region_destroy() a cairo surface Sets the given pixbuf as the source pattern for @cr. The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y. a cairo context a #GdkPixbuf X coordinate of location to place upper left corner of @pixbuf Y coordinate of location to place upper left corner of @pixbuf Sets the specified #GdkRGBA as the source color of @cr. a cairo context a #GdkRGBA Uploads the contents of a Cairo @surface to a GL texture @target. a Cairo surface a GL texture target the width of the texture @target the height of the texture @target a #GdkGLContext, or %NULL to use the currently bound context Extracts the surface size from a configure event. a configure event return location for surface width return location for surface height Read content from the given input stream and deserialize it, asynchronously. When the operation is finished, @callback will be called. You can then call gdk_content_deserialize_finish() to get the result of the operation. a #GInputStream to read the serialized content from the mime type to deserialize from the GType to deserialize from the io priority of the operation optional #GCancellable object callback to call when the operation is done data to pass to the callback function Finishes a content deserialization operation. %TRUE if the operation was successful. In this case, @value is set. %FALSE if an error occurred. In this case, @error is set the #GAsyncResult return location for the result of the operation Registers a function to create objects of a given @type from a serialized representation with the given mime type. the mime type which the function can deserialize from the type of objects that the function creates the callback data that @deserialize can access destroy notify for @data Registers a function to convert objects of the given @type to a serialized representation with the given mime type. the type of objects that the function can serialize the mime type to serialize to the callback data that @serialize can access destroy notify for @data Serialize content and write it to the given output stream, asynchronously. When the operation is finished, @callback will be called. You can then call gdk_content_serialize_finish() to get the result of the operation. a #GOutputStream to write the serialized content to the mime type to serialize to the content to serialize the io priority of the operation optional #GCancellable object callback to call when the operation is done data to pass to the callback function Finishes a content serialization operation. %TRUE if the operation was successful, %FALSE if an error occurred. In this case, @error is set the #GAsyncResult Extracts the notify detail from a crossing event. the notify detail of @event a crossing event Extracts the crossing mode from a crossing event. the mode of @event a crossing event Checks if @action represents a single action or if it includes multiple flags that can be selected from. When @action is 0 - ie no action was given, %TRUE is returned. %TRUE if exactly one action was given a #GdkDragAction If both events contain X/Y information, this function will return %TRUE and return in @angle the relative angle from @event1 to @event2. The rotation direction for positive angles is from the positive X axis towards the positive Y axis. %TRUE if the angle could be calculated. first #GdkEvent second #GdkEvent return location for the relative angle between both events If both events contain X/Y information, the center of both coordinates will be returned in @x and @y. %TRUE if the center could be calculated. first #GdkEvent second #GdkEvent return location for the X coordinate of the center return location for the Y coordinate of the center If both events have X/Y information, the distance between both coordinates (as in a straight line going from @event1 to @event2) will be returned. %TRUE if the distance could be calculated. first #GdkEvent second #GdkEvent return location for the distance Extracts whether this event is about focus entering or leaving the surface. %TRUE of the focus is entering a focus change event Extracts the grab surface from a grab broken event. the grab surface of @event a grab broken event Canonicalizes the given mime type and interns the result. If @string is not a valid mime type, %NULL is returned instead. See RFC 2048 for the syntax if mime types. An interned string for the canonicalized mime type or %NULL if the string wasn't a valid mime type string of a potential mime type Extracts the group from a key event. the group of @event a key event Extracts the keycode from a key event. the keycode of @event a key event Extracts the keyval from a key event. the keyval of @event a key event Extracts the scancode from a key event. the scancode of @event a key event Extracts whether the key event is for a modifier key. %TRUE if the @event is for a modifier key a key event Obtains the upper- and lower-case versions of the keyval @symbol. Examples of keyvals are #GDK_KEY_a, #GDK_KEY_Enter, #GDK_KEY_F1, etc. a keyval return location for lowercase version of @symbol return location for uppercase version of @symbol Converts a key name to a key value. The names are the same as those in the `gdk/gdkkeysyms.h` header file but without the leading “GDK_KEY_”. the corresponding key value, or %GDK_KEY_VoidSymbol if the key name is not a valid key a key name Returns %TRUE if the given key value is in lower case. %TRUE if @keyval is in lower case, or if @keyval is not subject to case conversion. a key value. Returns %TRUE if the given key value is in upper case. %TRUE if @keyval is in upper case, or if @keyval is not subject to case conversion. a key value. Converts a key value into a symbolic name. The names are the same as those in the `gdk/gdkkeysyms.h` header file but without the leading “GDK_KEY_”. a string containing the name of the key, or %NULL if @keyval is not a valid key. The string should not be modified. a key value Converts a key value to lower case, if applicable. the lower case form of @keyval, or @keyval itself if it is already in lower case or it is not subject to case conversion. a key value. Convert from a GDK key symbol to the corresponding ISO10646 (Unicode) character. the corresponding unicode character, or 0 if there is no corresponding character. a GDK key symbol Converts a key value to upper case, if applicable. the upper case form of @keyval, or @keyval itself if it is already in upper case or it is not subject to case conversion. a key value. Extracts the information from a pad strip or ring event. a pad strip or ring event Return location for the axis index Return location for the axis value Extracts information about the pressed button from a pad event. the button of @event a pad button event Extracts group and mode information from a pad event. a pad event return location for the group return location for the mode Returns a paintable that has the given intrinsic size and draws nothing. This is often useful for implementing the GdkPaintableClass:get_current_image() virtual function when the paintable is in an incomplete state (like a #GtkMediaStream before receiving the first frame). a #GdkPaintable The intrinsic width to report. Can be 0 for no width. The intrinsic height to report. Can be 0 for no height. Obtains a clip region which contains the areas where the given ranges of text would be drawn. @x_origin and @y_origin are the top left point to center the layout. @index_ranges should contain ranges of bytes in the layout’s text. Note that the regions returned correspond to logical extents of the text ranges, not ink extents. So the drawn layout may in fact touch areas out of the clip region. The clip region is mainly useful for highlightling parts of text, such as when text is selected. a clip region containing the given ranges a #PangoLayout X pixel where you intend to draw the layout with this clip Y pixel where you intend to draw the layout with this clip array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes number of ranges in @index_ranges, i.e. half the size of @index_ranges Obtains a clip region which contains the areas where the given ranges of text would be drawn. @x_origin and @y_origin are the top left position of the layout. @index_ranges should contain ranges of bytes in the layout’s text. The clip region will include space to the left or right of the line (to the layout bounding box) if you have indexes above or below the indexes contained inside the line. This is to draw the selection all the way to the side of the layout. However, the clip region is in line coordinates, not layout coordinates. Note that the regions returned correspond to logical extents of the text ranges, not ink extents. So the drawn line may in fact touch areas out of the clip region. The clip region is mainly useful for highlightling parts of text, such as when text is selected. a clip region containing the given ranges a #PangoLayoutLine X pixel where you intend to draw the layout line with this clip baseline pixel where you intend to draw the layout line with this clip array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes number of ranges in @index_ranges, i.e. half the size of @index_ranges Transfers image data from a #cairo_surface_t and converts it to an RGB(A) representation inside a #GdkPixbuf. This allows you to efficiently read individual pixels from cairo surfaces. This function will create an RGB pixbuf with 8 bits per channel. The pixbuf will contain an alpha channel if the @surface contains one. A newly-created pixbuf with a reference count of 1, or %NULL on error surface to copy from Source X coordinate within @surface Source Y coordinate within @surface Width in pixels of region to get Height in pixels of region to get Creates a new pixbuf from @texture. This should generally not be used in newly written code as later stages will almost certainly convert the pixbuf back into a texture to draw it on screen. a new #GdkPixbuf or %NULL in case of an error a #GdkTexture Extracts the scroll deltas of a scroll event. The deltas will be zero unless the scroll direction is %GDK_SCROLL_SMOOTH. a scroll event return location for x scroll delta return location for y scroll delta Extracts the direction of a scroll event. the scroll direction of @event a scroll event Check whether a scroll event is a stop scroll event. Scroll sequences with smooth scroll information may provide a stop scroll event once the interaction with the device finishes, e.g. by lifting a finger. This stop scroll event is the signal that a widget may trigger kinetic scrolling based on the current velocity. Stop scroll events always have a delta of 0/0. %TRUE if the event is a scroll stop event a scroll event Sets a list of backends that GDK should try to use. This can be be useful if your application does not work with certain GDK backends. By default, GDK tries all included backends. For example, |[<!-- language="C" --> gdk_set_allowed_backends ("wayland,quartz,*"); ]| instructs GDK to try the Wayland backend first, followed by the Quartz backend, and then all others. If the `GDK_BACKEND` environment variable is set, it determines what backends are tried in what order, while still respecting the set of allowed backends that are specified by this function. The possible backend names are x11, win32, quartz, broadway, wayland. You can also include a * in the list to try all remaining backends. This call must happen prior to gdk_display_open(), gtk_init(), or gtk_init_check() in order to take effect. a comma-separated list of backends Extracts whether a touch event is emulating a pointer event. %TRUE if @event is emulating a touch event Extracts delta information from a touchpad event. a touchpad event return location for x return location for y Extracts the touchpad gesture phase from a touchpad event. the gesture phase of @event a touchpad #GdkEvent Extracts the number of fingers from a touchpad event. the number of fingers for @event a touchpad event Extracts the angle delta from a touchpad pinch event. the angle delta of @event a touchpad pinch event Extracts the scale from a touchpad pinch event. the scale of @event a touchpad pinch event Convert from a ISO10646 character to a key symbol. the corresponding GDK key symbol, if one exists. or, if there is no corresponding symbol, wc | 0x01000000 a ISO10646 encoded character