1 /* pager object */
2 /* vim: set sw=2 et: */
3 
4 /*
5  * Copyright (C) 2001 Havoc Pennington
6  * Copyright (C) 2003, 2005-2007 Vincent Untz
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
24 #ifndef WNCK_PAGER_H
25 #define WNCK_PAGER_H
26 
27 #include <gtk/gtk.h>
28 #include <libwnck/screen.h>
29 
30 G_BEGIN_DECLS
31 
32 #define WNCK_TYPE_PAGER              (wnck_pager_get_type ())
33 #define WNCK_PAGER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), WNCK_TYPE_PAGER, WnckPager))
34 #define WNCK_PAGER_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), WNCK_TYPE_PAGER, WnckPagerClass))
35 #define WNCK_IS_PAGER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), WNCK_TYPE_PAGER))
36 #define WNCK_IS_PAGER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), WNCK_TYPE_PAGER))
37 #define WNCK_PAGER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), WNCK_TYPE_PAGER, WnckPagerClass))
38 
39 typedef struct _WnckPager        WnckPager;
40 typedef struct _WnckPagerClass   WnckPagerClass;
41 typedef struct _WnckPagerPrivate WnckPagerPrivate;
42 
43 /**
44  * WnckPager:
45  *
46  * The #WnckPager struct contains only private fields and should not be
47  * directly accessed.
48  */
49 struct _WnckPager
50 {
51   GtkContainer parent_instance;
52 
53   WnckPagerPrivate *priv;
54 };
55 
56 struct _WnckPagerClass
57 {
58   GtkContainerClass parent_class;
59 
60   /* Padding for future expansion */
61   void (* pad1) (void);
62   void (* pad2) (void);
63   void (* pad3) (void);
64   void (* pad4) (void);
65 };
66 
67 /**
68  * WnckPagerDisplayMode:
69  * @WNCK_PAGER_DISPLAY_NAME: the #WnckPager will only display the names of the
70  * workspaces.
71  * @WNCK_PAGER_DISPLAY_CONTENT: the #WnckPager will display a representation
72  * for each window in the workspaces.
73  *
74  * Mode defining what a #WnckPager will display.
75  */
76 typedef enum {
77   WNCK_PAGER_DISPLAY_NAME,
78   WNCK_PAGER_DISPLAY_CONTENT
79 } WnckPagerDisplayMode;
80 
81 GType wnck_pager_get_type (void) G_GNUC_CONST;
82 
83 GtkWidget* wnck_pager_new (WnckScreen *screen);
84 
85 gboolean wnck_pager_set_orientation (WnckPager         *pager,
86 				     GtkOrientation     orientation);
87 gboolean wnck_pager_set_n_rows   (WnckPager            *pager,
88 				  int                   n_rows);
89 void wnck_pager_set_display_mode (WnckPager            *pager,
90 				  WnckPagerDisplayMode  mode);
91 void wnck_pager_set_show_all     (WnckPager            *pager,
92 				  gboolean              show_all_workspaces);
93 void wnck_pager_set_shadow_type  (WnckPager	       *pager,
94 				  GtkShadowType		shadow_type);
95 
96 
97 #ifndef WNCK_DISABLE_DEPRECATED
98 void wnck_pager_set_screen       (WnckPager            *pager,
99 				  WnckScreen           *screen);
100 #endif /* WNCK_DISABLE_DEPRECATED */
101 
102 G_END_DECLS
103 
104 #endif /* WNCK_PAGER_H */
105 
106 
107