1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
|
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="WnckPager">
<refmeta>
<refentrytitle role="top_of_page" id="WnckPager.top_of_page">WnckPager</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBWNCK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>WnckPager</refname>
<refpurpose>a pager widget, showing the content of workspaces.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsect1 id="WnckPager.stability-level">
<title>Stability Level</title>
Unstable, unless otherwise indicated
</refsect1>
<refsynopsisdiv id="WnckPager.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
#include <libwnck/libwnck.h>
<link linkend="WnckPager-struct">WnckPager</link>;
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="wnck-pager-new">wnck_pager_new</link> (<link linkend="WnckScreen">WnckScreen</link> *screen);
<link linkend="void">void</link> <link linkend="wnck-pager-set-screen">wnck_pager_set_screen</link> (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="WnckScreen">WnckScreen</link> *screen);
<link linkend="gboolean">gboolean</link> <link linkend="wnck-pager-set-orientation">wnck_pager_set_orientation</link> (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="GtkOrientation">GtkOrientation</link> orientation);
<link linkend="gboolean">gboolean</link> <link linkend="wnck-pager-set-n-rows">wnck_pager_set_n_rows</link> (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="int">int</link> n_rows);
enum <link linkend="WnckPagerDisplayMode">WnckPagerDisplayMode</link>;
<link linkend="void">void</link> <link linkend="wnck-pager-set-display-mode">wnck_pager_set_display_mode</link> (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="WnckPagerDisplayMode">WnckPagerDisplayMode</link> mode);
<link linkend="void">void</link> <link linkend="wnck-pager-set-show-all">wnck_pager_set_show_all</link> (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="gboolean">gboolean</link> show_all_workspaces);
<link linkend="void">void</link> <link linkend="wnck-pager-set-shadow-type">wnck_pager_set_shadow_type</link> (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="GtkShadowType">GtkShadowType</link> shadow_type);
</synopsis>
</refsynopsisdiv>
<refsect1 id="WnckPager.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
<link linkend="GObject">GObject</link>
+----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
+----<link linkend="GtkObject">GtkObject</link>
+----<link linkend="GtkWidget">GtkWidget</link>
+----WnckPager
</synopsis>
</refsect1>
<refsect1 id="WnckPager.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
WnckPager implements
<link linkend="AtkImplementorIface">AtkImplementorIface</link> and <link linkend="GtkBuildable">GtkBuildable</link>.</para>
</refsect1>
<refsect1 id="WnckPager.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="WnckPager"><type>WnckPager</type></link> shows a miniature view of the workspaces, representing managed
windows by small rectangles, and allows the user to initiate various window
manager actions by manipulating these representations. The <link linkend="WnckPager"><type>WnckPager</type></link> offers
ways to move windows between workspaces and to change the current workspace.
</para>
<para>
Alternatively, a <link linkend="WnckPager"><type>WnckPager</type></link> can be configured to only show the names of the
workspace instead of their contents.
</para>
<para>
The <link linkend="WnckPager"><type>WnckPager</type></link> is also responsible for setting the layout of the workspaces.
Since only one application can be responsible for setting the layout on a
screen, the <link linkend="WnckPager"><type>WnckPager</type></link> automatically tries to obtain the manager selection
for the screen and only sets the layout if it owns the manager selection.
See <link linkend="wnck-pager-set-orientation"><function>wnck_pager_set_orientation()</function></link> and <link linkend="wnck-pager-set-n-rows"><function>wnck_pager_set_n_rows()</function></link> to change the
layout.</para>
<para>
</para>
</refsect1>
<refsect1 id="WnckPager.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="WnckPager-struct" role="struct">
<title>WnckPager</title>
<indexterm zone="WnckPager-struct"><primary>WnckPager</primary></indexterm><programlisting>typedef struct _WnckPager WnckPager;</programlisting>
<para>
The <link linkend="WnckPager"><type>WnckPager</type></link> struct contains only private fields and should not be
directly accessed.</para>
<para>
</para></refsect2>
<refsect2 id="wnck-pager-new" role="function">
<title>wnck_pager_new ()</title>
<indexterm zone="wnck-pager-new"><primary>wnck_pager_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* wnck_pager_new (<link linkend="WnckScreen">WnckScreen</link> *screen);</programlisting>
<para>
Creates a new <link linkend="WnckPager"><type>WnckPager</type></link>. The <link linkend="WnckPager"><type>WnckPager</type></link> will show the <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> of the
<link linkend="WnckScreen"><type>WnckScreen</type></link> it is on.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>screen</parameter> :</term>
<listitem><simpara> deprecated argument, can be <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a newly created <link linkend="WnckPager"><type>WnckPager</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="wnck-pager-set-screen" role="function" condition="deprecated:2.20:|since:2.2">
<title>wnck_pager_set_screen ()</title>
<indexterm zone="wnck-pager-set-screen" role="deprecated"><primary>wnck_pager_set_screen</primary></indexterm><indexterm zone="wnck-pager-set-screen" role="2.2"><primary>wnck_pager_set_screen</primary></indexterm><programlisting><link linkend="void">void</link> wnck_pager_set_screen (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="WnckScreen">WnckScreen</link> *screen);</programlisting>
<warning><para><literal>wnck_pager_set_screen</literal> has been deprecated since version 2.20 and should not be used in newly-written code. </para></warning>
<para>
Does nothing.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pager</parameter> :</term>
<listitem><simpara> a <link linkend="WnckPager"><type>WnckPager</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>screen</parameter> :</term>
<listitem><simpara> a <link linkend="WnckScreen"><type>WnckScreen</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2
</para></refsect2>
<refsect2 id="wnck-pager-set-orientation" role="function">
<title>wnck_pager_set_orientation ()</title>
<indexterm zone="wnck-pager-set-orientation"><primary>wnck_pager_set_orientation</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> wnck_pager_set_orientation (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="GtkOrientation">GtkOrientation</link> orientation);</programlisting>
<para>
Tries to change the orientation of the layout of <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> on the
<link linkend="WnckScreen"><type>WnckScreen</type></link> <parameter>pager</parameter> is watching. Since no more than one application should
set this property of a <link linkend="WnckScreen"><type>WnckScreen</type></link> at a time, setting the layout is not
guaranteed to work.
</para>
<para>
If <parameter>orientation</parameter> is <link linkend="GTK-ORIENTATION-HORIZONTAL:CAPS"><literal>GTK_ORIENTATION_HORIZONTAL</literal></link>, the <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> will be
laid out in rows, with the first <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> in the top left corner.
</para>
<para>
If <parameter>orientation</parameter> is <link linkend="GTK-ORIENTATION-VERTICAL:CAPS"><literal>GTK_ORIENTATION_VERTICAL</literal></link>, the <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> will be
laid out in columns, with the first <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> in the top left corner.
</para>
<para>
For example, if the layout contains one row, but the orientation of the
layout is vertical, the <link linkend="WnckPager"><type>WnckPager</type></link> will display a column of <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link>.
</para>
<para>
If <parameter>pager</parameter> has not been added to a widget hierarchy, the call will fail
because <parameter>pager</parameter> can't know the screen on which to modify the orientation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pager</parameter> :</term>
<listitem><simpara> a <link linkend="WnckPager"><type>WnckPager</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>orientation</parameter> :</term>
<listitem><simpara> orientation to use for the layout of <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> on the
<link linkend="WnckScreen"><type>WnckScreen</type></link> <parameter>pager</parameter> is watching.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the layout of <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> has been successfully
changed or did not need to be changed, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="wnck-pager-set-n-rows" role="function">
<title>wnck_pager_set_n_rows ()</title>
<indexterm zone="wnck-pager-set-n-rows"><primary>wnck_pager_set_n_rows</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> wnck_pager_set_n_rows (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="int">int</link> n_rows);</programlisting>
<para>
Tries to change the number of rows in the layout of <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> on the
<link linkend="WnckScreen"><type>WnckScreen</type></link> <parameter>pager</parameter> is watching. Since no more than one application should
set this property of a <link linkend="WnckScreen"><type>WnckScreen</type></link> at a time, setting the layout is not
guaranteed to work.
</para>
<para>
If <parameter>pager</parameter> has not been added to a widget hierarchy, the call will fail
because <parameter>pager</parameter> can't know the screen on which to modify the layout.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pager</parameter> :</term>
<listitem><simpara> a <link linkend="WnckPager"><type>WnckPager</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_rows</parameter> :</term>
<listitem><simpara> the number of rows to use for the layout of <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> on the
<link linkend="WnckScreen"><type>WnckScreen</type></link> <parameter>pager</parameter> is watching.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the layout of <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> has been successfully
changed or did not need to be changed, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="WnckPagerDisplayMode" role="enum">
<title>enum WnckPagerDisplayMode</title>
<indexterm zone="WnckPagerDisplayMode"><primary>WnckPagerDisplayMode</primary></indexterm><programlisting>typedef enum {
WNCK_PAGER_DISPLAY_NAME,
WNCK_PAGER_DISPLAY_CONTENT
} WnckPagerDisplayMode;
</programlisting>
<para>
Mode defining what a <link linkend="WnckPager"><type>WnckPager</type></link> will display.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="WNCK-PAGER-DISPLAY-NAME:CAPS" role="constant">
<term><literal>WNCK_PAGER_DISPLAY_NAME</literal></term>
<listitem><simpara> the <link linkend="WnckPager"><type>WnckPager</type></link> will only display the names of the
workspaces.
</simpara></listitem>
</varlistentry>
<varlistentry id="WNCK-PAGER-DISPLAY-CONTENT:CAPS" role="constant">
<term><literal>WNCK_PAGER_DISPLAY_CONTENT</literal></term>
<listitem><simpara> the <link linkend="WnckPager"><type>WnckPager</type></link> will display a representation
for each window in the workspaces.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="wnck-pager-set-display-mode" role="function">
<title>wnck_pager_set_display_mode ()</title>
<indexterm zone="wnck-pager-set-display-mode"><primary>wnck_pager_set_display_mode</primary></indexterm><programlisting><link linkend="void">void</link> wnck_pager_set_display_mode (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="WnckPagerDisplayMode">WnckPagerDisplayMode</link> mode);</programlisting>
<para>
Sets the display mode for <parameter>pager</parameter> to <parameter>mode</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pager</parameter> :</term>
<listitem><simpara> a <link linkend="WnckPager"><type>WnckPager</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter> :</term>
<listitem><simpara> a display mode.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="wnck-pager-set-show-all" role="function">
<title>wnck_pager_set_show_all ()</title>
<indexterm zone="wnck-pager-set-show-all"><primary>wnck_pager_set_show_all</primary></indexterm><programlisting><link linkend="void">void</link> wnck_pager_set_show_all (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="gboolean">gboolean</link> show_all_workspaces);</programlisting>
<para>
Sets <parameter>pager</parameter> to display all <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> or not, according to
<parameter>show_all_workspaces</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pager</parameter> :</term>
<listitem><simpara> a <link linkend="WnckPager"><type>WnckPager</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>show_all_workspaces</parameter> :</term>
<listitem><simpara> whether to display all <link linkend="WnckWorkspace"><type>WnckWorkspace</type></link> in <parameter>pager</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="wnck-pager-set-shadow-type" role="function" condition="since:2.2">
<title>wnck_pager_set_shadow_type ()</title>
<indexterm zone="wnck-pager-set-shadow-type" role="2.2"><primary>wnck_pager_set_shadow_type</primary></indexterm><programlisting><link linkend="void">void</link> wnck_pager_set_shadow_type (<link linkend="WnckPager">WnckPager</link> *pager,
<link linkend="GtkShadowType">GtkShadowType</link> shadow_type);</programlisting>
<para>
Sets the shadow type for <parameter>pager</parameter> to <parameter>shadow_type</parameter>. The main use of this
function is proper integration of <link linkend="WnckPager"><type>WnckPager</type></link> in panels with non-system
backgrounds.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pager</parameter> :</term>
<listitem><simpara> a <link linkend="WnckPager"><type>WnckPager</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>shadow_type</parameter> :</term>
<listitem><simpara> a shadow type.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2
</para></refsect2>
</refsect1>
<refsect1 id="WnckPager.see-also">
<title>See Also</title>
<link linkend="WnckScreen"><type>WnckScreen</type></link>
</refsect1>
</refentry>
|