4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Convenience Functions</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="Libxfce4panel Reference Manual">
8
8
<link rel="up" href="libxfce4panel-miscelleanous.html" title="Part IV. Miscelleanous">
9
9
<link rel="prev" href="libxfce4panel-miscelleanous.html" title="Part IV. Miscelleanous">
40
40
<pre class="synopsis">
41
41
#include <libxfce4panel/libxfce4panel.h>
43
<a href="http://library.gnome.org/devel/gtk3/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="libxfce4panel-Convenience-Functions.html#xfce-panel-create-button" title="xfce_panel_create_button ()">xfce_panel_create_button</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
44
<a href="http://library.gnome.org/devel/gtk3/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="libxfce4panel-Convenience-Functions.html#xfce-panel-create-toggle-button" title="xfce_panel_create_toggle_button ()">xfce_panel_create_toggle_button</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
43
<a href="http://developer.gnome.org/gtk2/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="libxfce4panel-Convenience-Functions.html#xfce-panel-create-button" title="xfce_panel_create_button ()">xfce_panel_create_button</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
44
<a href="http://developer.gnome.org/gtk2/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="libxfce4panel-Convenience-Functions.html#xfce-panel-create-toggle-button" title="xfce_panel_create_toggle_button ()">xfce_panel_create_toggle_button</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
45
45
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libxfce4panel-Convenience-Functions.html#xfce-panel-get-channel-name" title="xfce_panel_get_channel_name ()">xfce_panel_get_channel_name</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
46
46
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="libxfce4panel-Convenience-Functions.html#xfce-panel-pixbuf-from-source" title="xfce_panel_pixbuf_from_source ()">xfce_panel_pixbuf_from_source</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source</code></em>,
47
<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk3/GtkIconTheme.html"><span class="type">GtkIconTheme</span></a> *icon_theme</code></em>,
47
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkIconTheme.html"><span class="type">GtkIconTheme</span></a> *icon_theme</code></em>,
48
48
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> size</code></em>);
49
49
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="libxfce4panel-Convenience-Functions.html#xfce-panel-pixbuf-from-source-at-size" title="xfce_panel_pixbuf_from_source_at_size ()">xfce_panel_pixbuf_from_source_at_size</a>
50
50
(<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source</code></em>,
51
<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk3/GtkIconTheme.html"><span class="type">GtkIconTheme</span></a> *icon_theme</code></em>,
51
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkIconTheme.html"><span class="type">GtkIconTheme</span></a> *icon_theme</code></em>,
52
52
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> dest_width</code></em>,
53
53
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> dest_height</code></em>);
54
54
#define <a class="link" href="libxfce4panel-Convenience-Functions.html#xfce-allow-panel-customization" title="xfce_allow_panel_customization">xfce_allow_panel_customization</a>
67
67
<a name="libxfce4panel-Convenience-Functions.details"></a><h2>Details</h2>
68
68
<div class="refsect2">
69
69
<a name="xfce-panel-create-button"></a><h3>xfce_panel_create_button ()</h3>
70
<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk3/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * xfce_panel_create_button (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
70
<pre class="programlisting"><a href="http://developer.gnome.org/gtk2/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * xfce_panel_create_button (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
72
Create regular <a href="http://library.gnome.org/devel/gtk3/GtkButton.html"><span class="type">GtkButton</span></a> with a few properties set to be useful in the
73
Xfce panel: Flat (<a href="http://library.gnome.org/devel/gtk3/gtk-Standard-Enumerations.html#GTK-RELIEF-NONE:CAPS"><code class="literal">GTK_RELIEF_NONE</code></a>), no focus on click and minimal padding.
72
Create regular <a href="http://developer.gnome.org/gtk2/GtkButton.html"><span class="type">GtkButton</span></a> with a few properties set to be useful in the
73
Xfce panel: Flat (<a href="http://developer.gnome.org/gtk2/gtk3-Standard-Enumerations.html#GTK-RELIEF-NONE:CAPS"><code class="literal">GTK_RELIEF_NONE</code></a>), no focus on click and minimal padding.
75
<div class="variablelist"><table border="0">
75
<div class="variablelist"><table border="0" class="variablelist">
76
77
<col align="left" valign="top">
78
81
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
79
<td>newly created <a href="http://library.gnome.org/devel/gtk3/GtkButton.html"><span class="type">GtkButton</span></a>.</td>
82
<td>newly created <a href="http://developer.gnome.org/gtk2/GtkButton.html"><span class="type">GtkButton</span></a>.</td>
84
87
<div class="refsect2">
85
88
<a name="xfce-panel-create-toggle-button"></a><h3>xfce_panel_create_toggle_button ()</h3>
86
<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk3/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * xfce_panel_create_toggle_button (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
89
<pre class="programlisting"><a href="http://developer.gnome.org/gtk2/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * xfce_panel_create_toggle_button (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
88
Create regular <a href="http://library.gnome.org/devel/gtk3/GtkToggleButton.html"><span class="type">GtkToggleButton</span></a> with a few properties set to be useful in
89
Xfce panel: Flat (<a href="http://library.gnome.org/devel/gtk3/gtk-Standard-Enumerations.html#GTK-RELIEF-NONE:CAPS"><code class="literal">GTK_RELIEF_NONE</code></a>), no focus on click and minimal padding.
91
Create regular <a href="http://developer.gnome.org/gtk2/GtkToggleButton.html"><span class="type">GtkToggleButton</span></a> with a few properties set to be useful in
92
Xfce panel: Flat (<a href="http://developer.gnome.org/gtk2/gtk3-Standard-Enumerations.html#GTK-RELIEF-NONE:CAPS"><code class="literal">GTK_RELIEF_NONE</code></a>), no focus on click and minimal padding.
91
<div class="variablelist"><table border="0">
94
<div class="variablelist"><table border="0" class="variablelist">
92
96
<col align="left" valign="top">
94
100
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
95
<td>newly created <a href="http://library.gnome.org/devel/gtk3/GtkToggleButton.html"><span class="type">GtkToggleButton</span></a>.</td>
101
<td>newly created <a href="http://developer.gnome.org/gtk2/GtkToggleButton.html"><span class="type">GtkToggleButton</span></a>.</td>
105
111
this returns "xfce4-panel", but you can override this value with the
106
112
environment variable XFCE_PANEL_CHANNEL_NAME.
108
<div class="variablelist"><table border="0">
114
<div class="variablelist"><table border="0" class="variablelist">
109
116
<col align="left" valign="top">
111
120
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
112
121
<td>name of the Xfconf channel
121
130
<div class="refsect2">
122
131
<a name="xfce-panel-pixbuf-from-source"></a><h3>xfce_panel_pixbuf_from_source ()</h3>
123
132
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * xfce_panel_pixbuf_from_source (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source</code></em>,
124
<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk3/GtkIconTheme.html"><span class="type">GtkIconTheme</span></a> *icon_theme</code></em>,
133
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkIconTheme.html"><span class="type">GtkIconTheme</span></a> *icon_theme</code></em>,
125
134
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> size</code></em>);</pre>
127
136
See xfce_panel_pixbuf_from_source_at_size
129
<div class="variablelist"><table border="0">
138
<div class="variablelist"><table border="0" class="variablelist">
130
140
<col align="left" valign="top">
133
145
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
156
168
<a name="xfce-panel-pixbuf-from-source-at-size"></a><h3>xfce_panel_pixbuf_from_source_at_size ()</h3>
157
169
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * xfce_panel_pixbuf_from_source_at_size
158
170
(<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source</code></em>,
159
<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk3/GtkIconTheme.html"><span class="type">GtkIconTheme</span></a> *icon_theme</code></em>,
171
<em class="parameter"><code><a href="http://developer.gnome.org/gtk2/GtkIconTheme.html"><span class="type">GtkIconTheme</span></a> *icon_theme</code></em>,
160
172
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> dest_width</code></em>,
161
173
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> dest_height</code></em>);</pre>
173
185
If it is when loaded from the disk, the pixbuf is scaled
174
186
preserving the aspect ratio.
176
<div class="variablelist"><table border="0">
188
<div class="variablelist"><table border="0" class="variablelist">
177
190
<col align="left" valign="top">
180
195
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>