![]() |
![]() |
![]() |
Libmatewnck Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
#include <libmatewnck/libmatewnck.h> struct MatewnckPager; GtkWidget * matewnck_pager_new (MatewnckScreen *screen
); void matewnck_pager_set_screen (MatewnckPager *pager
,MatewnckScreen *screen
); gboolean matewnck_pager_set_orientation (MatewnckPager *pager
,GtkOrientation orientation
); gboolean matewnck_pager_set_n_rows (MatewnckPager *pager
,int n_rows
); enum MatewnckPagerLayoutPolicy; void matewnck_pager_set_layout_policy (MatewnckPager *pager
,MatewnckPagerLayoutPolicy policy
); enum MatewnckPagerDisplayMode; void matewnck_pager_set_display_mode (MatewnckPager *pager
,MatewnckPagerDisplayMode mode
); void matewnck_pager_set_show_all (MatewnckPager *pager
,gboolean show_all_workspaces
); void matewnck_pager_set_shadow_type (MatewnckPager *pager
,GtkShadowType shadow_type
);
A MatewnckPager 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 MatewnckPager offers ways to move windows between workspaces and to change the current workspace.
Alternatively, a MatewnckPager can be configured to only show the names of the workspace instead of their contents.
The MatewnckPager 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 MatewnckPager automatically tries to obtain the manager selection
for the screen and only sets the layout if it owns the manager selection.
See matewnck_pager_set_orientation()
and matewnck_pager_set_n_rows()
to change the
layout.
struct MatewnckPager;
The MatewnckPager struct contains only private fields and should not be directly accessed.
GtkWidget * matewnck_pager_new (MatewnckScreen *screen
);
Creates a new MatewnckPager. The MatewnckPager will show the MatewnckWorkspace of the MatewnckScreen it is on.
|
deprecated argument, can be NULL . |
Returns : |
a newly created MatewnckPager. |
void matewnck_pager_set_screen (MatewnckPager *pager
,MatewnckScreen *screen
);
matewnck_pager_set_screen
has been deprecated since version 2.20 and should not be used in newly-written code.
Does nothing.
|
a MatewnckPager. |
|
a MatewnckScreen. |
Since 2.2
gboolean matewnck_pager_set_orientation (MatewnckPager *pager
,GtkOrientation orientation
);
Tries to change the orientation of the layout of MatewnckWorkspace on the
MatewnckScreen pager
is watching. Since no more than one application should
set this property of a MatewnckScreen at a time, setting the layout is not
guaranteed to work.
If orientation
is GTK_ORIENTATION_HORIZONTAL
, the MatewnckWorkspace will be
laid out in rows, with the first MatewnckWorkspace in the top left corner.
If orientation
is GTK_ORIENTATION_VERTICAL
, the MatewnckWorkspace will be
laid out in columns, with the first MatewnckWorkspace in the top left corner.
For example, if the layout contains one row, but the orientation of the layout is vertical, the MatewnckPager will display a column of MatewnckWorkspace.
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 MatewnckPager. |
|
orientation to use for the layout of MatewnckWorkspace on the
MatewnckScreen pager is watching. |
Returns : |
TRUE if the layout of MatewnckWorkspace has been successfully
changed or did not need to be changed, FALSE otherwise. |
gboolean matewnck_pager_set_n_rows (MatewnckPager *pager
,int n_rows
);
Tries to change the number of rows in the layout of MatewnckWorkspace on the
MatewnckScreen pager
is watching. Since no more than one application should
set this property of a MatewnckScreen 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 MatewnckPager. |
|
the number of rows to use for the layout of MatewnckWorkspace on the
MatewnckScreen pager is watching. |
Returns : |
TRUE if the layout of MatewnckWorkspace has been successfully
changed or did not need to be changed, FALSE otherwise. |
typedef enum { MATEWNCK_PAGER_LAYOUT_POLICY_AUTOMATIC, MATEWNCK_PAGER_LAYOUT_POLICY_WIDTH_FOR_HEIGHT, MATEWNCK_PAGER_LAYOUT_POLICY_HEIGHT_FOR_WIDTH } MatewnckPagerLayoutPolicy;
Policy defining the geometry management used by a MatewnckPager.
the MatewnckPager geometry management is "height for width" when in vertical orientation, or "width for height" when in horizontal orientation. This is the default behavior. | |
the MatewnckPager calculates its width in proportion to a preset height. This can be used for a vertical MatewnckPager inside a horizontal panel. | |
the MatewnckPager calculates its height in proportion to a preset width. This can be used for a horizontal MatewnckPager inside a vertical panel. |
Since 2.32
void matewnck_pager_set_layout_policy (MatewnckPager *pager
,MatewnckPagerLayoutPolicy policy
);
Sets the layout policy for pager
to policy
.
|
a MatewnckPager. |
|
a layout policy. |
Since 2.32
typedef enum { MATEWNCK_PAGER_DISPLAY_NAME, MATEWNCK_PAGER_DISPLAY_CONTENT } MatewnckPagerDisplayMode;
Mode defining what a MatewnckPager will display.
the MatewnckPager will only display the names of the workspaces. | |
the MatewnckPager will display a representation for each window in the workspaces. |
void matewnck_pager_set_display_mode (MatewnckPager *pager
,MatewnckPagerDisplayMode mode
);
Sets the display mode for pager
to mode
.
|
a MatewnckPager. |
|
a display mode. |
void matewnck_pager_set_show_all (MatewnckPager *pager
,gboolean show_all_workspaces
);
Sets pager
to display all MatewnckWorkspace or not, according to
show_all_workspaces
.
|
a MatewnckPager. |
|
whether to display all MatewnckWorkspace in pager . |
void matewnck_pager_set_shadow_type (MatewnckPager *pager
,GtkShadowType shadow_type
);
Sets the shadow type for pager
to shadow_type
. The main use of this
function is proper integration of MatewnckPager in panels with non-system
backgrounds.
|
a MatewnckPager. |
|
a shadow type. |
Since 2.2