Functions¶
Details¶
- 
Gladeui.catalog_add_path(path)¶
- Parameters: - path ( - str) – the new path containing catalogs- Adds a new path to the list of path to look catalogs for. 
- 
Gladeui.catalog_destroy_all()¶
- Destroy and free all resources related with every loaded catalog. 
- 
Gladeui.catalog_get_extra_paths()¶
- Returns: - a list paths added by - Gladeui.Catalog.add_path()- Return type: - [ - str]
- 
Gladeui.catalog_is_loaded(name)¶
- Parameters: - name ( - str) – a catalog object- Returns: - Whether name is loaded or not - Return type: - bool
- 
Gladeui.catalog_load_all()¶
- Returns: - the list of loaded - Gladeui.Catalog*- Return type: - [ - Gladeui.Catalog]- Loads all available catalogs in the system. First loads catalogs from - Gladeui.ENV_CATALOG_PATH, then from- Gladeui.App.get_catalogs_dir() and finally from paths specified with- Gladeui.Catalog.add_path()
- 
Gladeui.catalog_remove_path(path)¶
- Parameters: - path ( - stror- None) – the new path containing catalogs or- Noneto remove all of them- Remove path from the list of path to look catalogs for. - Noneto remove all paths.
- 
Gladeui.cursor_get_add_widget_pixbuf()¶
- Return type: - GdkPixbuf.Pixbuf
- 
Gladeui.cursor_init()¶
- Initializes cursors for use with - Gladeui.Cursor.set().
- 
Gladeui.cursor_set(project, window, type)¶
- Parameters: - project (Gladeui.Project) –
- window (Gdk.Window) – aGdk.Window
- type (Gladeui.CursorType) – aGladeui.CursorType
 - Sets the cursor for window to something appropriate based on type. (also sets the cursor on all visible project widgets) 
- project (
- 
Gladeui.displayable_value_is_disabled(type, value)¶
- Parameters: - type (GObject.GType) –
- value (str) –
 - Return type: 
- type (
- 
Gladeui.displayable_value_set_disabled(type, value, disabled)¶
- Parameters: - type (GObject.GType) –
- value (str) –
- disabled (bool) –
 
- type (
- 
Gladeui.get_displayable_value(type, value)¶
- Parameters: - type (GObject.GType) –
- value (str) –
 - Return type: 
- type (
- 
Gladeui.get_value_from_displayable(type, displayabe)¶
- Parameters: - type (GObject.GType) –
- displayabe (str) –
 - Return type: 
- type (
- 
Gladeui.init()¶
- Initialization function for libgladeui (not - Gladeui.App) It builds paths, bind text domain, and register icons
- 
Gladeui.init_debug_flags()¶
- 
Gladeui.param_spec_objects(name, nick, blurb, accepted_type, flags)¶
- Parameters: - name (str) –
- nick (str) –
- blurb (str) –
- accepted_type (GObject.GType) –
- flags (GObject.ParamFlags) –
 - Returns: - a - GObject.ParamSpecdescribing a list of- GObject.Object- Return type: 
- name (
- 
Gladeui.propert_get_insensitive_tooltip(property)¶
- Parameters: - property ( - Gladeui.Property) –- Return type: - str
- 
Gladeui.property_def_get_default_from_spec(spec)¶
- Parameters: - spec ( - GObject.ParamSpec) –- Return type: - GObject.Value
- 
Gladeui.property_def_make_flags_from_string(type, string)¶
- Parameters: - type (GObject.GType) –
- string (str) –
 - Return type: 
- type (
- 
Gladeui.property_def_set_weights(properties, parent)¶
- Parameters: - properties ([Gladeui.PropertyDef]) – a list ofGladeui.PropertyDef
- parent (GObject.GType) – theGObject.GTypeof the parent
 - This function assigns “weight” to each property in its natural order staring from 1. If parent is 0 weight will be set for every - Gladeui.PropertyDefin the list. This function will not override weight if it is already set (weight >= 0.0)
- properties ([
- 
Gladeui.property_def_update_from_node(node, object_type, property_def_ref, domain)¶
- Parameters: - node (Gladeui.XmlNode) – the property node
- object_type (GObject.GType) – theGObject.GTypeof the owning object
- property_def_ref (Gladeui.PropertyDeforNone) – a pointer to the property class
- domain (str) – the domain to translate catalog strings from
 - Returns: - Trueon success. property_def_ref is set to- Noneif the property has Disabled=”- True”.- property_def_ref: - a pointer to the property class - Return type: - ( - bool, property_def_ref:- Gladeui.PropertyDefor- None)- Updates the property_def_ref with the contents of the node in the xml file. Only the values found in the xml file are overridden. 
- node (
- 
Gladeui.register_displayable_value(type, value, domain, string)¶
- Parameters: - type (GObject.GType) –
- value (str) –
- domain (str) –
- string (str) –
 
- type (
- 
Gladeui.register_translated_value(type, value, string)¶
- Parameters: - type (GObject.GType) –
- value (str) –
- string (str) –
 
- type (
- 
Gladeui.setup_log_handlers()¶
- Sets up a log handler to manage all - GLib.LogLevelFlags.LEVEL_MASKerrors of domain: GLib, GLib-- GObject.Object, Gtk, Gdk, and domainless.
- 
Gladeui.standard_boolean_spec()¶
- Returns: - a - GObject.ParamSpecdescribing a boolean- Return type: - GObject.ParamSpec
- 
Gladeui.standard_float_spec()¶
- Returns: - a - GObject.ParamSpecdescribing a float- Return type: - GObject.ParamSpec
- 
Gladeui.standard_gdkcolor_spec()¶
- Returns: - a - GObject.ParamSpecdescribing a- Gdk.Color- Return type: - GObject.ParamSpec
- 
Gladeui.standard_int_spec()¶
- Returns: - a - GObject.ParamSpecdescribing an int- Return type: - GObject.ParamSpec
- 
Gladeui.standard_objects_spec()¶
- Returns: - a - GObject.ParamSpecdescribing a list of- GObject.Object- Return type: - GObject.ParamSpec- This was developed for the purpose of holding a list of ‘targets’ in an - Atk.Relation(we are setting it up as a property)
- 
Gladeui.standard_pixbuf_spec()¶
- Returns: - a - GObject.ParamSpecdescribing a- GdkPixbuf.Pixbuf- Return type: - GObject.ParamSpec
- 
Gladeui.standard_stock_image_spec()¶
- Returns: - a - GObject.ParamSpecdescribing a list of builtin stock image- Return type: - GObject.ParamSpec
- 
Gladeui.standard_stock_spec()¶
- Returns: - a - GObject.ParamSpecdescribing a list of builtin stock item- Return type: - GObject.ParamSpec
- 
Gladeui.standard_string_spec()¶
- Returns: - a - GObject.ParamSpecdescribing a string- Return type: - GObject.ParamSpec
- 
Gladeui.standard_strv_spec()¶
- Returns: - a - GObject.ParamSpecdescribing an array of strings- Return type: - GObject.ParamSpec
- 
Gladeui.standard_uint_spec()¶
- Returns: - a - GObject.ParamSpecdescribing an uint- Return type: - GObject.ParamSpec
- 
Gladeui.type_has_displayable_values(type)¶
- Parameters: - type ( - GObject.GType) –- Return type: - bool
- 
Gladeui.util_canonical_path(path)¶
- Parameters: - path ( - str) – any path that may contain “..” or “.” components- Returns: - an absolute path to the specified file or directory that contains no “..” or “.” components (this does not call readlink like realpath() does). - Return type: - str
- 
Gladeui.util_check_and_warn_scrollable(parent, child_adaptor, parent_widget)¶
- Parameters: - parent (Gladeui.Widget) –
- child_adaptor (Gladeui.WidgetAdaptor) –
- parent_widget (Gtk.Widget) –
 - Return type: 
- parent (
- 
Gladeui.util_compare_stock_labels(a, b)¶
- Parameters: - a (objectorNone) – a #gconstpointer to aGtk.StockItem
- b (objectorNone) – a #gconstpointer to aGtk.StockItem
 - Returns: - negative value if a < b; zero if a = b; positive value if a > b - Return type: - This is a - GLib.CompareFuncthat compares the labels of two stock items, ignoring any ‘_’ characters. It isn’t particularly efficient.
- a (
- 
Gladeui.util_container_get_all_children(container)¶
- Parameters: - container ( - Gtk.Container) – a- Gtk.Container- Returns: - a - GLib.Listgiving the contents of container- Return type: - [ - Gtk.Widget]- Use this to itterate over all children in a - Gtk.Container, as it used _forall() instead of _foreach() (and the GTK+ version of this function is simply not exposed).
- 
Gladeui.util_count_placeholders(parent)¶
- Parameters: - parent ( - Gladeui.Widget) – a- Gladeui.Widget- Returns: - the amount of - Gladeui.Placeholdersparented by parent- Return type: - int
- 
Gladeui.util_duplicate_underscores(name)¶
- Parameters: - name ( - str) – a string- Returns: - a newly allocated string - Return type: - str- Duplicates name, but the copy has two underscores in place of any single underscore in the original. 
- 
Gladeui.util_file_dialog_new(title, project, parent, action)¶
- Parameters: - title (str) – dialog title
- project (Gladeui.Project) – aGladeui.Projectused when saving
- parent (Gtk.Window) – a parentGtk.Windowfor the dialog
- action (Gladeui.UtilFileDialogType) – aGladeui.UtilFileDialogTypeto say if the dialog will open or save
 - Returns: - a “glade file” file chooser dialog. The caller is responsible for showing the dialog - Return type: 
- title (
- 
Gladeui.util_file_is_writeable(path)¶
- Parameters: - path ( - str) – the path to the file- Returns: - Trueif file is writeable- Return type: - bool- Checks whether the file at path is writeable 
- 
Gladeui.util_find_iter_by_widget(model, findme, column)¶
- Parameters: - model (Gtk.TreeModel) – aGtk.TreeModel
- findme (Gladeui.Widget) – aGladeui.Widget
- column (int) – aint
 - Returns: - a newly allocated - Gtk.TreeIterfrom model corresponding to findme which should be freed with- Gtk.TreeIter.free()- Return type: - Looks through model for the - Gtk.TreeItercorresponding to findme under column.
- model (
- 
Gladeui.util_get_devhelp_icon(size)¶
- Parameters: - size ( - Gtk.IconSize) – the preferred icon size- Returns: - a - Gtk.Image- Return type: - Gtk.Widget- Creates an image displaying the devhelp icon. 
- 
Gladeui.util_get_file_mtime(filename)¶
- Parameters: - filename ( - str) – A filename- Raises: - GLib.Error- Returns: - The mtime of the file, or %0 if the file attributes could not be read. - Return type: - int- Gets the UTC modification time of file filename. 
- 
Gladeui.util_get_placeholder_from_pointer(container)¶
- Parameters: - container ( - Gtk.Container) – a- Gtk.Container- Returns: - a - Gtk.Widget- Return type: - Gtk.Widget
- 
Gladeui.util_get_type_from_name(name, have_func)¶
- Parameters: - name (str) – the name of theGObject.GType- like ‘Gtk.Widget’ or a “get-type” function.
- have_func (bool) – function-name flag – true if the name is a “get-type” function.
 - Returns: - the new - GObject.GType- Return type: - Returns the type using the “get type” function name based on name. If the have_func flag is true,`name` is used directly, otherwise the get-type function is contrived from name then used. 
- name (
- 
Gladeui.util_object_is_loading(object)¶
- Parameters: - object ( - GObject.Object) – A- GObject.Object- Returns: - Whether the object’s project is being loaded or not. - Return type: - bool
- 
Gladeui.util_read_prop_name(str)¶
- Parameters: - str ( - str) – a string- Return type: - str- Return a usable version of a property identifier as found in a freshly parserd #GladeInterface 
- 
Gladeui.util_remove_scroll_events(widget)¶
- Parameters: - widget ( - Gtk.Widget) –
- 
Gladeui.util_replace(str, a, b)¶
- Parameters: - Replaces each occurrence of the character a in str to b. 
- 
Gladeui.util_search_devhelp(book, page, search)¶
- Parameters: 
- 
Gladeui.util_url_show(url)¶
- Parameters: - url ( - str) – An URL to display- Returns: - Trueif a web browser was successfully launched, or- False- Return type: - bool- Portable function for showing an URL url in a web browser. 
- 
Gladeui.utils_boolean_from_string(string)¶
- Parameters: - string ( - str) – the string to convert- Returns: - Trueif there was an error on the conversion,- Falseotherwise.- value: - return location - Return type: - ( - bool, value:- bool)- Parse a boolean value 
- 
Gladeui.utils_cairo_draw_line(cr, color, x1, y1, x2, y2)¶
- Parameters: 
- 
Gladeui.utils_cairo_draw_rectangle(cr, color, filled, x, y, width, height)¶
- Parameters: 
- 
Gladeui.utils_enum_string_from_value(enum_type, value)¶
- Parameters: - enum_type (GObject.GType) –
- value (int) –
 - Return type: 
- enum_type (
- 
Gladeui.utils_enum_string_from_value_displayable(flags_type, value)¶
- Parameters: - flags_type (GObject.GType) –
- value (int) –
 - Return type: 
- flags_type (
- 
Gladeui.utils_enum_value_from_string(enum_type, strval)¶
- Parameters: - enum_type (GObject.GType) –
- strval (str) –
 - Return type: 
- enum_type (
- 
Gladeui.utils_flags_string_from_value(enum_type, value)¶
- Parameters: - enum_type (GObject.GType) –
- value (int) –
 - Return type: 
- enum_type (
- 
Gladeui.utils_flags_string_from_value_displayable(flags_type, value)¶
- Parameters: - flags_type (GObject.GType) –
- value (int) –
 - Return type: 
- flags_type (
- 
Gladeui.utils_flags_value_from_string(enum_type, strval)¶
- Parameters: - enum_type (GObject.GType) –
- strval (str) –
 - Return type: 
- enum_type (
- 
Gladeui.utils_get_pointer(widget, window, device, x, y)¶
- Parameters: - widget (Gtk.Widget) – The widget to get the mouse position relative for
- window (Gdk.Window) – The window of the current event, orNone
- device (Gdk.Device) – The device, if not specified, the current event will be expected to have a device.
- x (int) – The location to store the mouse pointer X position
- y (int) – The location to store the mouse pointer Y position
 - Get’s the pointer position relative to widget, while window and device are not absolutely needed, they should be passed wherever possible. 
- widget (
- 
Gladeui.utils_get_pspec_from_funcname(funcname)¶
- Parameters: - funcname ( - str) – the symbol name of a function to generate a- GObject.ParamSpec- Returns: - A - GObject.ParamSpeccreated by the delegate function specified by funcname- Return type: - GObject.ParamSpecor- None
- 
Gladeui.utils_hijack_key_press(win, event, user_data)¶
- Parameters: - win (Gtk.Window) – aGtk.Window
- event (Gdk.EventKey) – theGdk.EventKey
- user_data (objectorNone) – unused
 - Returns: - whether the event was handled - Return type: - This function is meant to be attached to key-press-event of a toplevel, it simply allows the window contents to treat key events /before/ accelerator keys come into play (this way widgets dont get deleted when cutting text in an entry etc.). Creates a liststore suitable for comboboxes and such to chose from a variety of types. 
- win (
- 
Gladeui.utils_liststore_from_enum_type(enum_type, include_empty)¶
- Parameters: - enum_type (GObject.GType) – AGObject.GType
- include_empty (bool) – whether to prepend an “Unset” slot
 - Returns: - A new - Gtk.ListStore- Return type: - Creates a liststore suitable for comboboxes and such to chose from a variety of types. 
- enum_type (
- 
Gladeui.utils_pointer_mode_render_icon(mode, size)¶
- Parameters: - mode (Gladeui.PointerMode) – theGladeui.PointerModeto render as icon
- size (Gtk.IconSize) – icon size
 - Returns: - the rendered - GdkPixbuf.Pixbuf- Return type: - Render an icon representing the pointer mode. Best view with sizes bigger than - Gtk.IconSize.LARGE_TOOLBAR.
- mode (
- 
Gladeui.utils_string_from_value(value)¶
- Parameters: - value ( - GObject.Value) – a- GObject.Valueto convert- Returns: - A newly allocated string - Return type: - str- Serializes - GObject.Valueinto a string (using glade conversion routines)
- 
Gladeui.utils_value_from_string(type, string, project)¶
- Parameters: - type (GObject.GType) – aGObject.GTypeto convert with
- string (str) – the string to convert
- project (Gladeui.Project) – theGladeui.Projectto look for formats of object names when needed
 - Returns: - A newly allocated and set - GObject.Value- Return type: - Allocates and sets a - GObject.Valueof type type set to string (using glade conversion routines)
- type (
- 
Gladeui.xml_dump_from_context(context)¶
- Parameters: - context ( - Gladeui.XmlContext) – a- Gladeui.XmlContext- Returns: - the XML string, free the allocated memory with - GLib.free() after use- Return type: - str- Dump the XML string from the context. 
- 
Gladeui.xml_get_boolean(node, name, _default)¶
- Parameters: - node (Gladeui.XmlNode) –
- name (str) –
- _default (bool) –
 - Return type: 
- node (
- 
Gladeui.xml_get_content(node_in)¶
- Parameters: - node_in ( - Gladeui.XmlNode) – a- Gladeui.XmlNode- Returns: - A newly allocated string - Return type: - str- Gets a string containing the content of node_in. 
- 
Gladeui.xml_get_property_boolean(node_in, name, _default)¶
- Parameters: - node_in (Gladeui.XmlNode) –
- name (str) –
- _default (bool) –
 - Return type: 
- node_in (
- 
Gladeui.xml_get_property_double(node_in, name, _default)¶
- Parameters: - node_in (Gladeui.XmlNode) –
- name (str) –
- _default (float) –
 - Return type: 
- node_in (
- 
Gladeui.xml_get_property_int(node_in, name, _default)¶
- Parameters: - node_in (Gladeui.XmlNode) –
- name (str) –
- _default (int) –
 - Return type: 
- node_in (
- 
Gladeui.xml_get_property_string(node_in, name)¶
- Parameters: - node_in (Gladeui.XmlNode) –
- name (str) –
 - Return type: 
- node_in (
- 
Gladeui.xml_get_property_string_required(node_in, name, xtra)¶
- Parameters: - node_in (Gladeui.XmlNode) –
- name (str) –
- xtra (str) –
 - Return type: 
- node_in (
- 
Gladeui.xml_get_property_targetable_versions(node_in, name)¶
- Parameters: - node_in (Gladeui.XmlNode) – aGladeui.XmlNode
- name (str) – a property name
 - Returns: - a list of - Gladeui.TargetableVersion- Return type: - Get the list of targetable versions for a property 
- node_in (
- 
Gladeui.xml_get_property_version(node_in, name, major, minor)¶
- Parameters: - node_in (Gladeui.XmlNode) –
- name (str) –
- major (int) –
- minor (int) –
 - Return type: 
- node_in (
- 
Gladeui.xml_get_value_int(node_in, name, val)¶
- Parameters: - node_in (Gladeui.XmlNode) – aGladeui.XmlNode
- name (str) – a string
- val (int) – a pointer to an #int
 - Returns: - Return type: - Gets an integer value for a node either carried as an attribute or as the content of a child. 
- node_in (
- 
Gladeui.xml_get_value_int_required(node, name, val)¶
- Parameters: - node (Gladeui.XmlNode) – aGladeui.XmlNode
- name (str) – a string
- val (int) – a pointer to an #int
 - Returns: - Falseif name is not in node- Return type: - This is a wrapper around - Gladeui.xml_get_value_int(), only it emits a g_warning() if node did not contain the requested tag
- node (
- 
Gladeui.xml_get_value_string(node, name)¶
- Parameters: - node (Gladeui.XmlNode) –
- name (str) –
 - Return type: 
- node (
- 
Gladeui.xml_get_value_string_required(node, name, xtra_info)¶
- Parameters: - node (Gladeui.XmlNode) –
- name (str) –
- xtra_info (str) –
 - Return type: 
- node (
- 
Gladeui.xml_load_sym_from_node(node_in, module, tagname, sym_location)¶
- Parameters: - node_in (Gladeui.XmlNode) –
- module (GModule.Module) –
- tagname (str) –
- sym_location (objectorNone) –
 - Return type: 
- node_in (
- 
Gladeui.xml_search_child(node, name)¶
- Parameters: - node (Gladeui.XmlNode) –
- name (str) –
 - Return type: 
- node (
- 
Gladeui.xml_search_child_required(tree, name)¶
- Parameters: - tree (Gladeui.XmlNode) – AGladeui.XmlNode
- name (str) – the name of the child
 - Returns: - the requested - Gladeui.XmlNode- Return type: - just a small wrapper around - Gladeui.xml_search_childthat displays an error if the child was not found
- tree (
- 
Gladeui.xml_set_content(node_in, content)¶
- Parameters: - node_in (Gladeui.XmlNode) – aGladeui.XmlNode
- content (str) – a string
 - Sets the content of node to content. 
- node_in (
- 
Gladeui.xml_set_value(node_in, name, val)¶
- Parameters: - node_in (Gladeui.XmlNode) – aGladeui.XmlNode
- name (str) – a string
- val (str) – a string
 - Sets the property name in node_in to val 
- node_in (