-
public void add_option_entries_libgtk_only (OptionGroup group)
Appends gdk option entries to the passed in option group. This is not public API and must not be used
by applications.
-
public void beep ()
Emits a short beep on the default display.
-
public Context cairo_create (Window window)
Creates a Cairo context for drawing to window.
-
public bool cairo_get_clip_rectangle (Context cr, out Rectangle rect)
This is a convenience function around
clip_extents. It rounds the clip extents to integer
coordinates and returns a boolean indicating if a clip area exists.
-
public void cairo_rectangle (Context cr, Rectangle rectangle)
Adds the given rectangle to the current path of cr.
-
public void cairo_region (Context cr, Region region)
Adds the given region to the current path of cr.
-
public Region cairo_region_create_from_surface (Surface surface)
Creates region that describes covers the area where the given surface is more than 50%
opaque.
-
public void cairo_set_source_color (Context cr, Color color)
Sets the specified Color as the source color of cr
.
-
public void cairo_set_source_pixbuf (Context cr, Pixbuf pixbuf, double pixbuf_x, double pixbuf_y)
Sets the given pixbuf as the source pattern for cr.
-
public void cairo_set_source_rgba (Context cr, RGBA rgba)
Sets the specified RGBA as the source color of cr
.
-
public void cairo_set_source_window (Context cr, Window window, double x, double y)
Sets the given window as the source pattern for cr.
-
public void disable_multidevice ()
Disables multidevice support in GDK. This call must happen prior to
open, gtk_init, gtk_init_with_args or
gtk_init_check in order to take effect.
-
public void drag_abort (DragContext context, uint32 time_)
Aborts a drag without dropping.
-
public DragContext drag_begin (Window window, List<Atom> targets)
Starts a drag and creates a new drag context for it. This function assumes that the drag is controlled
by the client pointer device, use drag_begin_for_device to begin a drag
with a different device.
-
public DragContext drag_begin_for_device (Window window, Device device, List<Atom> targets)
Starts a drag and creates a new drag context for it.
-
public void drag_drop (DragContext context, uint32 time_)
Drops on the current destination.
-
public bool drag_drop_succeeded (DragContext context)
Returns whether the dropped data has been successfully transferred. This function is intended to be
used while handling a DROP_FINISHED event, its return value is
meaningless at other times.
-
public void drag_find_window_for_screen (DragContext context, Window drag_window, Screen screen, int x_root, int y_root, out Window dest_window, out DragProtocol protocol)
Finds the destination window and DND protocol to use at the given pointer position.
-
public Atom drag_get_selection (DragContext context)
Returns the selection atom for the current source window.
-
public bool drag_motion (DragContext context, Window dest_window, DragProtocol protocol, int x_root, int y_root, DragAction suggested_action, DragAction possible_actions, uint32 time_)
Updates the drag context when the pointer moves or the set of actions changes.
-
public void drag_status (DragContext context, DragAction action, uint32 time_)
Selects one of the actions offered by the drag source.
-
public void drop_finish (DragContext context, bool success, uint32 time_)
Ends the drag operation after a drop.
-
public void drop_reply (DragContext context, bool accepted, uint32 time_)
Accepts or rejects a drop.
-
public int error_trap_pop ()
-
public void error_trap_pop_ignored ()
Removes an error trap pushed with error_trap_push
, but without bothering to wait and see whether an error occurred. If an error arrives later asynchronously that was triggered
while the trap was pushed, that error will be ignored.
-
public void error_trap_push ()
This function allows X errors to be trapped instead of the normal behavior of exiting the application.
It should only be used if it is not possible to avoid the X error in any other way. Errors are ignored on all
Display currently known to the
DisplayManager. If you don't care which error happens and just want to ignore everything, pop with
error_trap_pop_ignored. If you need the error code, use
error_trap_pop which may have to block and wait for the error to arrive from
the X server.
-
public bool events_get_angle (Event event1, Event event2, double angle)
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.
-
public bool events_get_center (Event event1, Event event2, double x, double y)
If both events contain X/Y information, the center of both coordinates will be returned in x
and y.
-
public bool events_get_distance (Event event1, Event event2, double distance)
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.
-
public bool events_pending ()
Checks if any events are ready to be processed for any display.
-
public void flush ()
Flushes the output buffers of all display connections and waits until all requests have been
processed. This is rarely needed by applications.
-
public weak Window get_default_root_window ()
Obtains the root window (parent all other windows are inside) for the default display and screen.
-
public string get_display ()
Gets the name of the display, which usually comes from the DISPLAY environment variable
or the --display command line option.
-
public unowned string get_display_arg_name ()
Gets the display name specified in the command line arguments passed to
init or parse_args, if any.
-
public unowned string get_program_class ()
Gets the program class. Unless the program class has explicitly been set with
set_program_class or with the --class commandline option, the
default value is the program name (determined with
get_prgname) with the first character converted to uppercase.
-
public bool get_show_events ()
Gets whether event debugging output is enabled.
-
public void init (ref string[] argv)
Initializes the GDK library and connects to the windowing system. If initialization fails, a warning
message is output and the application terminates with a call to exit(1).
-
public bool init_check (ref string[] argv)
Initializes the GDK library and connects to the windowing system, returning true on
success.
-
public GrabStatus keyboard_grab (Window window, bool owner_events, uint32 time_)
Grabs the keyboard so that all events are passed to this application until the keyboard is ungrabbed
with keyboard_ungrab. This overrides any previous keyboard grab by this
client.
-
public void keyboard_ungrab (uint32 time_)
Ungrabs the keyboard on the default display, if it is grabbed by this application.
-
public void keyval_convert_case (uint symbol, out uint lower, out uint upper)
Obtains the upper- and lower-case versions of the keyval symbol. Examples of keyvals are
a, GDK_KEY_Enter, F1, etc.
-
public uint keyval_from_name (string keyval_name)
Converts a key name to a key value.
-
public bool keyval_is_lower (uint keyval)
Returns true if the given key value is in lower case.
-
public bool keyval_is_upper (uint keyval)
Returns true if the given key value is in upper case.
-
public unowned string keyval_name (uint keyval)
Converts a key value into a symbolic name.
-
public uint keyval_to_lower (uint keyval)
Converts a key value to lower case, if applicable.
-
public uint32 keyval_to_unicode (uint keyval)
Convert from a GDK key symbol to the corresponding ISO10646 (Unicode) character.
-
public uint keyval_to_upper (uint keyval)
Converts a key value to upper case, if applicable.
-
public List<weak Visual> list_visuals ()
Lists the available visuals for the default screen. (See
list_visuals) A visual describes a hardware image data format. For
example, a visual might support 24-bit color, or 8-bit color, and might expect pixels to be in a certain format.
-
public void notify_startup_complete ()
Indicates to the GUI environment that the application has finished loading. If the applications opens
windows, this function is normally called after opening the application's initial set of windows.
-
public void notify_startup_complete_with_id (string startup_id)
Indicates to the GUI environment that the application has finished loading, using a given identifier.
-
public weak Window? offscreen_window_get_embedder (Window window)
Gets the window that window is embedded in.
-
public weak Surface offscreen_window_get_surface (Window window)
Gets the offscreen surface that an offscreen window renders into. If you need to keep this around over
window resizes, you need to add a reference to it.
-
public void offscreen_window_set_embedder (Window window, Window embedder)
Sets window to be embedded in embedder.
-
public Context pango_context_get ()
Creates a Context for the default GDK screen.
-
public Context pango_context_get_for_screen (Screen screen)
-
public Region pango_layout_get_clip_region (Layout layout, int x_origin, int y_origin, int index_ranges, int n_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 point to center the layout. index_ranges should contain
ranges of bytes in the layout's text.
-
public void parse_args (ref string[] argv)
Parse command line arguments, and store for future use by calls to
open.
-
public Pixbuf pixbuf_get_from_surface (Surface surface, int src_x, int src_y, int width, int height)
Transfers image data from a XlibSurface
and converts it to an RGB(A) representation inside a Pixbuf. This
allows you to efficiently read individual pixels from cairo surfaces. For GdkWindows, use
pixbuf_get_from_window instead.
-
public Pixbuf pixbuf_get_from_window (Window window, int src_x, int src_y, int width, int height)
Transfers image data from a Window and converts it to an
RGB(A) representation inside a Pixbuf. In other words, copies image
data from a server-side drawable to a client-side RGB(A) buffer. This allows you to efficiently read individual pixels on the client
side.
-
public GrabStatus pointer_grab (Window window, bool owner_events, EventMask event_mask, Window? confine_to, Cursor? cursor, uint32 time_)
Grabs the pointer (usually a mouse) so that all events are passed to this application until the
pointer is ungrabbed with pointer_ungrab, or the grab window becomes
unviewable. This overrides any previous pointer grab by this client.
-
public bool pointer_is_grabbed ()
Returns true if the pointer on the default display is currently grabbed by this
application.
-
public void pointer_ungrab (uint32 time_)
Ungrabs the pointer on the default display, if it is grabbed by this application.
-
public void pre_parse_libgtk_only ()
-
public void property_change (Window window, Atom property, Atom type, int format, PropMode mode, uint8[] data)
Changes the contents of a property on a window.
-
public void property_delete (Window window, Atom property)
Deletes a property from a window.
-
public bool property_get (Window window, Atom property, Atom type, ulong offset, ulong length, int pdelete, out Atom actual_property_type, out int actual_format, out uint8[] data)
Retrieves a portion of the contents of a property. If the property does not exist, then the function
returns false, and NONE will be stored in actual_property_type
.
-
public void query_depths (out int[] depths)
This function returns the available bit depths for the default screen. It's equivalent to listing the
visuals (gdk_list_visuals()) and then looking at the depth field in each visual, removing duplicates.
-
public void query_visual_types (out VisualType[] visual_types)
This function returns the available visual types for the default screen. It's equivalent to listing
the visuals (gdk_list_visuals()) and then looking at the type field in each visual, removing duplicates.
-
public void selection_convert (Window requestor, Atom selection, Atom target, uint32 time_)
-
public weak Window selection_owner_get (Atom selection)
-
public weak Window selection_owner_get_for_display (Display display, Atom selection)
-
public bool selection_owner_set (Window owner, Atom selection, uint32 time_, bool send_event)
-
public bool selection_owner_set_for_display (Display display, Window owner, Atom selection, uint32 time_, bool send_event)
-
public int selection_property_get (Window requestor, uchar[] data, out Atom prop_type, int prop_format)
-
public void selection_send_notify (Window requestor, Atom selection, Atom target, Atom property, uint32 time_)
-
public void selection_send_notify_for_display (Display display, Window requestor, Atom selection, Atom target, Atom property, uint32 time_)
-
public void set_double_click_time (uint msec)
-
public void set_program_class (string program_class)
Sets the program class. The X11 backend uses the program class to set the class name part of the
WM_CLASS property on toplevel windows; see the ICCCM.
-
public void set_show_events (bool show_events)
Sets whether a trace of received events is output. Note that GTK+ must be compiled with debugging
(that is, configured using the --enable-debug option) to use this option.
-
public bool setting_get (string name, Value value)
Obtains a desktop-wide setting, such as the double-click time, for the default screen. See
get_setting.
-
public void test_render_sync (Window window)
Retrieves a pixel from window to force the windowing system to carry out any pending
rendering commands.
-
public bool test_simulate_button (Window window, int x, int y, uint button, ModifierType modifiers, EventType button_pressrelease)
This function is intended to be used in GTK+ test programs. It will warp the mouse pointer to the
given (@x,@y) coordinates within window and simulate a button press or release event. Because the mouse pointer needs
to be warped to the target location, use of this function outside of test programs that run in their own virtual windowing system
(e.g. Xvfb) is not recommended.
-
public bool test_simulate_key (Window window, int x, int y, uint keyval, ModifierType modifiers, EventType key_pressrelease)
This function is intended to be used in GTK+ test programs. If (@x,@y) are > (-1,-1), it will warp
the mouse pointer to the given (@x,@y) coordinates within window and simulate a key press or release event.
-
public int text_property_to_utf8_list_for_display (Display display, Atom encoding, int format, uint8[] text, out string[] list)
Converts a text property in the given encoding to a list of UTF-8 strings.
-
public uint threads_add_idle (SourceFunc function)
-
public uint threads_add_idle_full (int priority, owned SourceFunc function)
Adds a function to be called whenever there are no higher priority events pending. If the function
returns false it is automatically removed from the list of event sources and will not be called again.
-
public uint threads_add_timeout (uint interval, SourceFunc function)
-
public uint threads_add_timeout_full (int priority, uint interval, owned SourceFunc function)
Sets a function to be called at regular intervals holding the GDK lock, with the given priority. The
function is called repeatedly until it returns false, at which point the timeout is automatically destroyed and the
function will not be called again. The notify function is called when the timeout is destroyed. The first call to the
function will be at the end of the first interval.
-
public uint threads_add_timeout_seconds (uint interval, SourceFunc function)
-
public uint threads_add_timeout_seconds_full (int priority, uint interval, owned SourceFunc function)
-
public void threads_enter ()
This macro marks the beginning of a critical section in which GDK and GTK+ functions can be called
safely and without causing race conditions. Only one thread at a time can be in such a critial section.
-
public void threads_init ()
Initializes GDK so that it can be used from multiple threads in conjunction with
threads_enter and threads_leave
. g_thread_init must be called previous to this function.
-
public void threads_leave ()
-
public void threads_set_lock_functions (Callback enter_fn, Callback leave_fn)
Allows the application to replace the standard method that GDK uses to protect its data structures.
Normally, GDK creates a single Mutex that is locked by
threads_enter, and released by
threads_leave; using this function an application provides, instead, a function enter_fn that is called by
threads_enter and a function leave_fn that is called by
threads_leave.
-
public uint unicode_to_keyval (uint32 wc)
Convert from a ISO10646 character to a key symbol.
-
public string utf8_to_string_target (string str)
Converts an UTF-8 string into the best possible representation as a STRING. The representation of
characters not in STRING is not specified; it may be as pseudo-escape sequences \x{ABCD}, or it may be in some other form of
approximation.