-
public
bool accel_groups_activate (Object object, uint accel_key, ModifierType accel_mods)
Finds the first accelerator in any AccelGroup attached to
object that matches accel_key and accel_mods, and activates that accelerator.
-
public unowned
SList<AccelGroup> accel_groups_from_object (Object object)
Gets a list of all accel groups which are attached to object.
-
public
uint accelerator_get_default_mod_mask ()
-
public unowned
string accelerator_get_label (uint accelerator_key, ModifierType accelerator_mods)
Converts an accelerator keyval and modifier mask into a string which can be used to represent the
accelerator to the user.
-
public unowned
string accelerator_name (uint accelerator_key, ModifierType accelerator_mods)
Converts an accelerator keyval and modifier mask into a string parseable by
accelerator_parse.
-
public void accelerator_parse (
string accelerator, out uint accelerator_key, out ModifierType accelerator_mods)
Parses a string representing an accelerator.
-
public void accelerator_set_default_mod_mask (
ModifierType default_mod_mask)
Sets the modifiers that will be considered significant for keyboard accelerators.
-
public
bool accelerator_valid (uint keyval, ModifierType modifiers)
Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator.
-
public
bool alternative_dialog_button_order (Screen screen)
Returns true if dialogs are expected to use an alternative button order on the screen
screen.
-
public
bool bindings_activate (Object object, uint keyval, ModifierType modifiers)
Find a key binding matching keyval and modifiers and activate the binding on
object.
-
public
bool bindings_activate_event (Object object, EventKey event)
Looks up key bindings for object to find one matching
-
public unowned
string check_version (uint required_major, uint required_minor, uint required_micro)
Checks that the GTK+ library in use is compatible with the given version.
-
public void disable_setlocale ()
-
public unowned
DragContext drag_begin (Widget widget, TargetList targets, DragAction actions, int button, Event event)
Initiates a drag on the source side.
-
public
bool drag_check_threshold (Widget widget, int start_x, int start_y, int current_x, int current_y)
Checks to see if a mouse drag starting at (@start_x, start_y) and ending at (@current_x,
current_y) has passed the GTK+ drag threshold, and thus should trigger the beginning of a drag-and-drop operation.
-
public void drag_dest_add_image_targets (Widget widget)
Add the image targets supported by GtkSelection to the target list of the drag destination.
-
public void drag_dest_add_text_targets (Widget widget)
Add the text targets supported by GtkSelection to the target list of the drag destination.
-
public void drag_dest_add_uri_targets (Widget widget)
Add the URI targets supported by GtkSelection to the target list of the drag destination.
-
public
Atom drag_dest_find_target (Widget widget, DragContext context, TargetList target_list)
Looks for a match between context->targets and the returning GDK_NONE.
-
public unowned TargetList drag_dest_get_target_list (Widget widget)
Returns the list of targets this widget can accept from drag-and-drop.
-
public
bool drag_dest_get_track_motion (Widget widget)
Returns whether the widget has been configured to always emit ::drag-motion signals.
-
public void drag_dest_set (Widget widget, DestDefaults flags, TargetEntry[] targets,
DragAction actions)
Sets a widget as a potential drop destination, and adds default behaviors.
-
public void drag_dest_set_proxy (Widget widget,
Window proxy_window, DragProtocol protocol, bool use_coordinates)
-
public void drag_dest_set_target_list (Widget widget, TargetList target_list)
Sets the target types that this widget can accept from drag-and-drop.
-
public void drag_dest_set_track_motion (Widget widget,
bool track_motion)
Tells the widget to emit ::drag-motion and ::drag-leave events regardless of the targets and the
MOTION flag.
-
public void drag_dest_unset (Widget widget)
-
public void drag_finish (
DragContext context, bool success, bool del, uint32 time_)
-
public void drag_get_data (Widget widget,
DragContext context, Atom target, uint32 time_)
-
public unowned Widget drag_get_source_widget (
DragContext context)
-
public void drag_highlight (Widget widget)
-
public void drag_set_icon_default (
DragContext context)
Sets the icon for a particular drag to the default icon.
-
public void drag_set_icon_name (
DragContext context, string icon_name, int hot_x, int hot_y)
Sets the icon for a given drag from a named themed icon.
-
public void drag_set_icon_pixbuf (
DragContext context, Pixbuf pixbuf, int hot_x, int hot_y)
Sets pixbuf as the icon for a given drag.
-
public void drag_set_icon_pixmap (
DragContext context, Colormap colormap, Pixmap pixmap, Bitmap mask, int hot_x, int hot_y)
Sets pixmap as the icon for a given drag.
-
public void drag_set_icon_stock (
DragContext context, string stock_id, int hot_x, int hot_y)
Sets the icon for a given drag from a stock ID.
-
public void drag_set_icon_widget (
DragContext context, Widget widget, int hot_x, int hot_y)
Changes the icon for a widget to a given widget.
-
public void drag_source_add_image_targets (Widget widget)
Add the writable image targets supported by GtkSelection to the target list of the drag source.
-
public void drag_source_add_text_targets (Widget widget)
Add the text targets supported by GtkSelection to the target list of the drag source.
-
public void drag_source_add_uri_targets (Widget widget)
Add the URI targets supported by GtkSelection to the target list of the drag source.
-
public unowned TargetList drag_source_get_target_list (Widget widget)
Gets the list of targets this widget can provide for drag-and-drop.
-
public void drag_source_set (Widget widget,
ModifierType start_button_mask, TargetEntry[] targets, DragAction actions)
Sets up a widget so that GTK+ will start a drag operation when the user clicks and drags on the widget.
-
public void drag_source_set_icon (Widget widget,
Colormap colormap, Pixmap pixmap, Bitmap mask)
Sets the icon that will be used for drags from a particular widget from a pixmap/mask.
-
public void drag_source_set_icon_name (Widget widget,
string icon_name)
Sets the icon that will be used for drags from a particular source to a themed icon.
-
public void drag_source_set_icon_pixbuf (Widget widget,
Pixbuf pixbuf)
Sets the icon that will be used for drags from a particular widget from a GdkPixbuf.
-
public void drag_source_set_icon_stock (Widget widget,
string stock_id)
Sets the icon that will be used for drags from a particular source to a stock icon.
-
public void drag_source_set_target_list (Widget widget, TargetList target_list)
Changes the target types that this widget offers for drag-and-drop.
-
public void drag_source_unset (Widget widget)
-
public void drag_unhighlight (Widget widget)
-
public void draw_insertion_cursor (Widget widget,
Drawable drawable, Rectangle area, Rectangle location, bool is_primary, TextDirection direction, bool draw_arrow)
Draws a text caret on drawable at location.
-
public
bool events_pending ()
-
public unowned
GC gc_get (int depth, Colormap colormap, GCValues values, GCValuesMask values_mask)
-
public void gc_release (
GC gc)
-
public
Event get_current_event ()
Obtains a copy of the event currently being processed by GTK+.
-
public
bool get_current_event_state (out ModifierType state)
If there is a current event and it has a state field, place that state field in state and
return true, otherwise return false.
-
public
uint32 get_current_event_time ()
If there is a current event and it has a timestamp, return that timestamp, otherwise return
GDK_CURRENT_TIME.
-
public unowned
Language get_default_language ()
Returns the PangoLanguage for the default language currently in effect.
-
public unowned Widget get_event_widget (
Event event)
If event is null or the event was not associated with any widget, returns
null, otherwise returns the widget that received the event originally.
-
public
OptionGroup get_option_group (bool open_default_display)
Returns a GOptionGroup for the commandline arguments recognized by GTK+ and GDK.
-
public void grab_add (Widget widget)
-
public unowned Widget grab_get_current ()
-
public void grab_remove (Widget widget)
-
public IconSize icon_size_from_name (
string name)
Looks up the icon size associated with name.
-
public unowned
string icon_size_get_name (IconSize size)
Gets the canonical name of the given icon size.
-
public
bool icon_size_lookup (IconSize size, out int width, out int height)
Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default
Settings.
-
public
bool icon_size_lookup_for_settings (Settings settings, IconSize size, out int width, out int height)
Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular
Settings.
-
public IconSize icon_size_register (
string name, int width, int height)
Registers a new icon size, along the same lines as MENU
, etc.
-
public void icon_size_register_alias (
string alias, IconSize target)
Registers alias as another name for target.
-
public
Type identifier_get_type ()
-
public void init (ref
string[] argv)
Call this function before using any other GTK+ functions in your GUI applications.
-
public void init_add (Function function, void* data)
-
public
bool init_check (ref string[] argv)
This function does the same work as init with only initialized.
-
public
bool init_with_args (ref string[] argv, string parameter_string, OptionEntry[] entries, string? translation_domain) throws Error
-
public
uint key_snooper_install (KeySnoopFunc snooper, void* func_data)
-
public void key_snooper_remove (
uint snooper_handler_id)
-
public void main ()
-
public void main_do_event (
Event event)
-
public
bool main_iteration ()
-
public
bool main_iteration_do (bool blocking)
-
public
uint main_level ()
-
public void main_quit ()
-
public void paint_arrow (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, ArrowType arrow_type, bool fill, int x, int y, int width, int height)
Draws an arrow in the given rectangle on window using the given parameters.
-
public void paint_box (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height)
Draws a box on window with the given parameters.
-
public void paint_box_gap (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width)
Draws a box in window using the given style and state and shadow type, leaving a gap in one
side.
-
public void paint_check (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height)
Draws a check button indicator in the given rectangle on window with the given parameters.
-
public void paint_diamond (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height)
Draws a diamond in the given rectangle on window using the given parameters.
-
public void paint_expander (Style style,
Window window, StateType state_type, Rectangle? area, Widget? widget, string? detail, int x, int y, ExpanderStyle expander_style)
-
public void paint_extension (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height, PositionType gap_side)
Draws an extension, i.
-
public void paint_flat_box (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height)
Draws a flat box on window with the given parameters.
-
public void paint_focus (Style style,
Window window, StateType state_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height)
Draws a focus indicator around the given rectangle on window using the given style.
-
public void paint_handle (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height, Orientation orientation)
-
public void paint_hline (Style style,
Window window, StateType state_type, Rectangle? area, Widget? widget, string? detail, int x1, int x2, int y)
Draws a horizontal line from (@x1, y) to (@x2, y) in window using the
given style and state.
-
public void paint_layout (Style style,
Window window, StateType state_type, bool use_text, Rectangle? area, Widget? widget, string? detail, int x, int y, Layout layout)
Draws a layout on window using the given parameters.
-
public void paint_option (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height)
Draws a radio button indicator in the given rectangle on window with the given parameters.
-
public void paint_polygon (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, Point[] points, bool fill)
-
public void paint_resize_grip (Style style,
Window window, StateType state_type, Rectangle? area, Widget? widget, string? detail, WindowEdge edge, int x, int y, int width, int height)
Draws a resize grip in the given rectangle on window using the given parameters.
-
public void paint_shadow (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height)
Draws a shadow around the given rectangle in window using the given style and state and shadow
type.
-
public void paint_shadow_gap (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width)
Draws a shadow around the given rectangle in window using the given style and state and shadow
type, leaving a gap in one side.
-
public void paint_slider (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height, Orientation orientation)
Draws a slider in the given rectangle on window using the given style and orientation.
-
public void paint_spinner (Style style,
Window window, StateType state_type, Rectangle area, Widget widget, string detail, uint step, int x, int y, int width, int height)
Draws a spinner on window using the given parameters.
-
public void paint_tab (Style style,
Window window, StateType state_type, ShadowType shadow_type, Rectangle? area, Widget? widget, string? detail, int x, int y, int width, int height)
Draws an option menu tab (i.
-
public void paint_vline (Style style,
Window window, StateType state_type, Rectangle? area, Widget? widget, string? detail, int y1_, int y2_, int x)
Draws a vertical line from (@x, y1_) to (@x, y2_) in window using the
given style and state.
-
public
bool parse_args (int argc, string[] argv)
Parses command line arguments, and initializes global attributes of GTK+, but does not actually open a
connection to a display.
-
public
Quark print_error_quark ()
-
public unowned PageSetup print_run_page_setup_dialog (Window parent, PageSetup page_setup, PrintSettings settings)
Runs a page setup dialog, letting the user modify the values from is identical to the passed in
page_setup, otherwise it contains the modifications done in the dialog.
-
public void print_run_page_setup_dialog_async (Window parent, PageSetup page_setup, PrintSettings settings, PageSetupDoneFunc done_cb, void* data)
Runs a page setup dialog, letting the user modify the values from page_setup.
-
public void propagate_event (Widget widget,
Event event)
Sends an event to a widget, propagating the event to parent widgets if the event remains unhandled.
-
public
uint quit_add (uint main_level, Function function, void* data)
-
public void quit_add_destroy (
uint main_level, Object object)
-
public void quit_remove (
uint quit_handler_id)
-
public void quit_remove_by_data (void* data)
-
public void rc_add_default_file (
string filename)
Adds a file to the list of files to be parsed at the end of init.
-
public unowned
string rc_find_module_in_path (string module_file)
Searches for a theme engine in the GTK+ search path.
-
public unowned
string rc_find_pixmap_in_path (Settings settings, Scanner scanner, string pixmap_file)
Looks up a file in pixmap path for the specified Settings.
-
public unowned
string rc_get_default_files ()
Retrieves the current list of RC files that will be parsed at the end of
init.
-
public unowned
string rc_get_im_module_file ()
Obtains the path to the IM modules file.
-
public unowned
string rc_get_im_module_path ()
Obtains the path in which to look for IM modules.
-
public unowned
string rc_get_module_dir ()
Returns a directory in which GTK+ looks for theme engines.
-
public unowned Style rc_get_style (Widget widget)
Finds all matching RC styles for a given widget, composites them together, and then creates a
Style representing the composite appearance.
-
public unowned Style? rc_get_style_by_paths (Settings settings,
string? widget_path, string? class_path, Type type)
Creates up a Style from styles defined in a RC file by providing
the raw components used in matching.
-
public unowned
string rc_get_theme_dir ()
-
public void rc_parse (
string filename)
-
public
uint rc_parse_color (Scanner scanner, Color color)
Parses a color in the format expected in a RC file.
-
public
uint rc_parse_color_full (Scanner scanner, RcStyle style, Color color)
Parses a color in the format expected in a RC file.
-
public
uint rc_parse_priority (Scanner scanner, PathPriorityType priority)
-
public
uint rc_parse_state (Scanner scanner, StateType state)
-
public void rc_parse_string (
string rc_string)
-
public
bool rc_reparse_all ()
If the modification time on any previously read file for the default
Settings has changed, discard all style information and then reread all previously read RC
files.
-
public
bool rc_reparse_all_for_settings (Settings settings, bool force_load)
If the modification time on any previously read file for the given
Settings has changed, discard all style information and then reread all previously read RC
files.
-
public void rc_reset_styles (Settings settings)
This function recomputes the styles for all widgets that use a particular
Settings object.
-
public unowned
Scanner rc_scanner_new ()
-
public void rc_set_default_files (
string filenames)
Sets the list of files that GTK+ will read at the end of init.
-
public void rgb_to_hsv (
double r, double g, double b, double h, double s, double v)
Converts a color from RGB space to HSV.
-
public void selection_add_target (Widget widget,
Atom selection, Atom target, uint info)
Appends a specified target to the list of supported targets for a given widget and selection.
-
public void selection_add_targets (Widget widget,
Atom selection, TargetEntry[] targets, uint ntargets)
Prepends a table of targets to the list of supported targets for a given widget and selection.
-
public
bool selection_clear (Widget widget, EventSelection event)
-
public void selection_clear_targets (Widget widget,
Atom selection)
Remove all targets registered for the given selection for the widget.
-
public
bool selection_convert (Widget widget, Atom selection, Atom target, uint32 time_)
Requests the contents of a selection.
-
public
bool selection_owner_set (Widget widget, Atom selection, uint32 time_)
Claims ownership of a given selection for a particular widget, or, if widget is null
, release ownership of the selection.
-
public
bool selection_owner_set_for_display (Display display, Widget widget, Atom selection, uint32 time_)
Claim ownership of a given selection for a particular widget, or, if widget is null
, release ownership of the selection.
-
public void selection_remove_all (Widget widget)
Removes all handlers and unsets ownership of all selections for a widget.
-
public unowned
string set_locale ()
Initializes internationalization support for GTK+.
-
public void show_about_dialog (Window? parent, ...)
-
public
bool show_uri (Screen? screen, string uri, uint32 timestamp) throws Error
This is a convenience function for launching the default application to show the uri.
-
public void stock_add (StockItem[] items)
Registers each of the stock items in items.
-
public void stock_add_static (StockItem[] items)
Same as stock_add, but doesn't copy items, so
-
public
SList<string> stock_list_ids ()
-
public
bool stock_lookup (string stock_id, StockItem item)
Fills item with the registered values for stock_id, returning true if
stock_id was known.
-
public void stock_set_translate_func (
string domain, owned TranslateFunc func)
Sets a function to be used for translating the label of a stock item.
-
public void target_table_free (TargetEntry[] targets)
-
public TargetEntry target_table_new_from_list (TargetList list,
int n_targets)
This function creates an TargetEntry array that contains
the same targets as the passed list.
-
public
bool targets_include_image (Atom[] targets, bool writable)
Determines if any of the targets in targets can be used to provide a GdkPixbuf.
-
public
bool targets_include_rich_text (Atom[] targets, TextBuffer buffer)
Determines if any of the targets in targets can be used to provide rich text.
-
public
bool targets_include_text (Atom[] targets)
Determines if any of the targets in targets can be used to provide text.
-
public
bool targets_include_uri (Atom[] targets)
Determines if any of the targets in targets can be used to provide an uri list.
-
public unowned Widget test_create_simple_window (
string window_title, string dialog_text)
-
public unowned Widget test_create_widget (
Type widget_type, ...)
-
public unowned Widget test_display_button_window (
string window_title, string dialog_text)
-
public unowned Widget test_find_label (Widget widget,
string label_pattern)
-
public unowned Widget test_find_sibling (Widget base_widget,
Type widget_type)
-
public unowned Widget test_find_widget (Widget widget,
string label_pattern, Type widget_type)
-
public void test_init (
int argcp, out string argvp)
-
public unowned
Type[] test_list_all_types (uint n_types)
-
public void test_register_all_types ()
-
public
double test_slider_get_value (Widget widget)
-
public void test_slider_set_perc (Widget widget,
double percentage)
-
public
bool test_spin_button_click (SpinButton spinner, uint button, bool upwards)
-
public unowned
string test_text_get (Widget widget)
-
public void test_text_set (Widget widget,
string str)
-
public
bool test_widget_click (Widget widget, uint button, ModifierType modifiers)
-
public
bool test_widget_send_key (Widget widget, uint keyval, ModifierType modifiers)
-
public
bool tree_get_row_drag_data (SelectionData selection_data, out TreeModel tree_model, out TreePath path)
Obtains a tree_model and path from selection data of target type
GTK_TREE_MODEL_ROW.
-
public
bool tree_set_row_drag_data (SelectionData selection_data, TreeModel tree_model, TreePath path)
Sets selection data of target type GTK_TREE_MODEL_ROW.