Functions¶
|
|
|
|
|
|
|
Details¶
- Libxfce4panel.check_version(required_major, required_minor, required_micro)¶
- Parameters:
- Returns:
None
if the library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by the library and must not be freed or modified by the caller.- Return type:
Checks that the libxfce4panel library in use is compatible with the given version. Generally you would pass in the constants
Libxfce4panel.MAJOR_VERSION
,Libxfce4panel.MINOR_VERSION
andLibxfce4panel.MICRO_VERSION
as the three arguments to this function; that produces a check that the library in use is compatible with the version of libxfce4panel the extension was compiled against.- Checking the runtime version of the Libxfce4panel library
const gchar *mismatch; mismatch = libxfce4panel_check_version (LIBXFCE4PANEL_MAJOR_VERSION, LIBXFCE4PANEL_MINOR_VERSION, LIBXFCE4PANEL_MICRO_VERSION); if (G_UNLIKELY (mismatch != NULL)) g_error ("Version mismatch: %<!---->s", mismatch);
New in version 4.8.
- Libxfce4panel.panel_create_button()¶
- Returns:
newly created
Gtk.Button
.- Return type:
Create regular
Gtk.Button
with a few properties set to be useful in the Xfce panel: Flat (Gtk.ReliefStyle.NONE
), no focus on click and minimal padding.
- Libxfce4panel.panel_create_toggle_button()¶
- Returns:
newly created
Gtk.ToggleButton
.- Return type:
Create regular
Gtk.ToggleButton
with a few properties set to be useful in Xfce panel: Flat (Gtk.ReliefStyle.NONE
), no focus on click and minimal padding.
- Libxfce4panel.panel_get_channel_name()¶
- Returns:
name of the Xfconf channel
See also: XFCE_PANEL_CHANNEL_NAME, xfce_panel_plugin_xfconf_channel_new and
Libxfce4panel.PanelPlugin.get_property_base
- Return type:
Function for the name of the Xfconf channel used by the panel. By default this returns “xfce4-panel”, but you can override this value with the environment variable XFCE_PANEL_CHANNEL_NAME.
New in version 4.8.
- Libxfce4panel.panel_pixbuf_from_source(source, icon_theme, size)¶
- Parameters:
source (
str
) – string that contains the location of an iconicon_theme (
Gtk.IconTheme
orNone
) – icon theme orNone
to use the default icon themesize (
int
) – size the icon that should be loaded
- Returns:
a
GdkPixbuf.Pixbuf
orNone
if nothing was found. The value should be released withGObject.Object.unref
when no longer used.See also:
Libxfce4panel.PanelImage
- Return type:
See
Libxfce4panel.panel_pixbuf_from_source_at_size
New in version 4.8.
- Libxfce4panel.panel_pixbuf_from_source_at_size(source, icon_theme, dest_width, dest_height)¶
- Parameters:
source (
str
) – string that contains the location of an iconicon_theme (
Gtk.IconTheme
orNone
) – icon theme orNone
to use the default icon themedest_width (
int
) – the maximum returned width of theGdkPixbuf.Pixbuf
dest_height (
int
) – the maximum returned height of theGdkPixbuf.Pixbuf
- Returns:
a
GdkPixbuf.Pixbuf
orNone
if nothing was found. The value should be released withGObject.Object.unref
when no longer used.See also:
Libxfce4panel.PanelImage
- Return type:
Try to load a pixbuf from a source string. The source could be an abolute path, an icon name or a filename that points to a file in the pixmaps directory.
This function is particularly usefull for loading names from the Icon key of desktop files.
The pixbuf is never bigger than dest_width and dest_height. If it is when loaded from the disk, the pixbuf is scaled preserving the aspect ratio.
New in version 4.10.
- Libxfce4panel.panel_set_image_from_source(image, source, icon_theme, size, scale)¶
- Parameters:
source (
str
) – string that contains the location of an iconicon_theme (
Gtk.IconTheme
orNone
) – icon theme orNone
to use the default icon themesize (
int
) – size the icon that should be loadedscale (
int
) – desired scale (seeGtk.Widget.get_scale_factor
())
See
Libxfce4panel.panel_pixbuf_from_source_at_size
()See also:
Libxfce4panel.PanelImage
New in version 4.17.4.