Libwnck Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
#include <libwnck/libwnck.h> struct WnckPager; GtkWidget * wnck_pager_new (WnckScreen *screen
); void wnck_pager_set_screen (WnckPager *pager
,WnckScreen *screen
); gboolean wnck_pager_set_orientation (WnckPager *pager
,GtkOrientation orientation
); gboolean wnck_pager_set_n_rows (WnckPager *pager
,int n_rows
); enum WnckPagerDisplayMode; void wnck_pager_set_display_mode (WnckPager *pager
,WnckPagerDisplayMode mode
); void wnck_pager_set_show_all (WnckPager *pager
,gboolean show_all_workspaces
); void wnck_pager_set_shadow_type (WnckPager *pager
,GtkShadowType shadow_type
);
A WnckPager 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 WnckPager offers ways to move windows between workspaces and to change the current workspace.
Alternatively, a WnckPager can be configured to only show the names of the workspace instead of their contents.
The WnckPager 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 WnckPager automatically tries to obtain the manager selection
for the screen and only sets the layout if it owns the manager selection.
See wnck_pager_set_orientation()
and wnck_pager_set_n_rows()
to change the
layout.
struct WnckPager;
The WnckPager struct contains only private fields and should not be directly accessed.
GtkWidget * wnck_pager_new (WnckScreen *screen
);
Creates a new WnckPager. The WnckPager will show the WnckWorkspace of the WnckScreen it is on.
void wnck_pager_set_screen (WnckPager *pager
,WnckScreen *screen
);
wnck_pager_set_screen
has been deprecated since version 2.20 and should not be used in newly-written code.
Does nothing.
|
a WnckPager. |
|
a WnckScreen. |
Since 2.2
gboolean wnck_pager_set_orientation (WnckPager *pager
,GtkOrientation orientation
);
Tries to change the orientation of the layout of WnckWorkspace on the
WnckScreen pager
is watching. Since no more than one application should
set this property of a WnckScreen at a time, setting the layout is not
guaranteed to work.
If orientation
is GTK_ORIENTATION_HORIZONTAL
, the WnckWorkspace will be
laid out in rows, with the first WnckWorkspace in the top left corner.
If orientation
is GTK_ORIENTATION_VERTICAL
, the WnckWorkspace will be
laid out in columns, with the first WnckWorkspace in the top left corner.
For example, if the layout contains one row, but the orientation of the layout is vertical, the WnckPager will display a column of WnckWorkspace.
If pager
has not been added to a widget hierarchy, the call will fail
because pager
can't know the screen on which to modify the orientation.
|
a WnckPager. |
|
orientation to use for the layout of WnckWorkspace on the
WnckScreen pager is watching. |
Returns : |
TRUE if the layout of WnckWorkspace has been successfully
changed or did not need to be changed, FALSE otherwise. |
gboolean wnck_pager_set_n_rows (WnckPager *pager
,int n_rows
);
Tries to change the number of rows in the layout of WnckWorkspace on the
WnckScreen pager
is watching. Since no more than one application should
set this property of a WnckScreen at a time, setting the layout is not
guaranteed to work.
If pager
has not been added to a widget hierarchy, the call will fail
because pager
can't know the screen on which to modify the layout.
|
a WnckPager. |
|
the number of rows to use for the layout of WnckWorkspace on the
WnckScreen pager is watching. |
Returns : |
TRUE if the layout of WnckWorkspace has been successfully
changed or did not need to be changed, FALSE otherwise. |
typedef enum { WNCK_PAGER_DISPLAY_NAME, WNCK_PAGER_DISPLAY_CONTENT } WnckPagerDisplayMode;
Mode defining what a WnckPager will display.
void wnck_pager_set_display_mode (WnckPager *pager
,WnckPagerDisplayMode mode
);
Sets the display mode for pager
to mode
.
|
a WnckPager. |
|
a display mode. |
void wnck_pager_set_show_all (WnckPager *pager
,gboolean show_all_workspaces
);
Sets pager
to display all WnckWorkspace or not, according to
show_all_workspaces
.
|
a WnckPager. |
|
whether to display all WnckWorkspace in pager . |
void wnck_pager_set_shadow_type (WnckPager *pager
,GtkShadowType shadow_type
);
Sets the shadow type for pager
to shadow_type
. The main use of this
function is proper integration of WnckPager in panels with non-system
backgrounds.
|
a WnckPager. |
|
a shadow type. |
Since 2.2