2008-08-08 Alberto Garcia <agarcia@igalia.com>
[hildon] / src / hildon-program.h
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2006 Nokia Corporation, all rights reserved.
5  *
6  * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24
25 #ifndef                                         __HILDON_PROGRAM_H__
26 #define                                         __HILDON_PROGRAM_H__
27
28 #include                                        <glib-object.h>
29 #include                                        "hildon-window.h"
30 #include                                        "hildon-stackable-window.h"
31
32 G_BEGIN_DECLS
33
34 typedef struct                                  _HildonProgram HildonProgram;
35
36 typedef struct                                  _HildonProgramClass HildonProgramClass;
37
38 #define                                         HILDON_TYPE_PROGRAM \
39                                                 (hildon_program_get_type())
40
41 #define                                         HILDON_PROGRAM(obj) \
42                                                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
43                                                 HILDON_TYPE_PROGRAM, HildonProgram))
44
45 #define                                         HILDON_PROGRAM_CLASS(obj) \
46                                                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
47                                                 HILDON_TYPE_PROGRAM, HildonProgramClass))
48
49 #define                                         HILDON_IS_PROGRAM(obj) \
50                                                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_PROGRAM))
51
52 #define                                         HILDON_IS_PROGRAM_CLASS(klass) \
53                                                 (G_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_PROGRAM))
54
55 #define                                         HILDON_PROGRAM_GET_CLASS(obj) \
56                                                 ((HildonProgramClass *) G_OBJECT_GET_CLASS(obj))
57
58 struct                                          _HildonProgram
59 {
60     GObject parent;
61 };
62
63 struct                                          _HildonProgramClass
64 {
65     GObjectClass parent;
66
67     /* Padding for future extension */
68     void (*_hildon_reserved1)(void);
69     void (*_hildon_reserved2)(void);
70     void (*_hildon_reserved3)(void);
71     void (*_hildon_reserved4)(void);
72 };
73
74 GType G_GNUC_CONST
75 hildon_program_get_type                         (void);
76
77 HildonProgram*
78 hildon_program_get_instance                     (void);
79
80 void
81 hildon_program_add_window                       (HildonProgram *self, 
82                                                  HildonWindow *window);
83
84 void
85 hildon_program_remove_window                    (HildonProgram *self, 
86                                                  HildonWindow *window);
87
88 void
89 hildon_program_set_can_hibernate                (HildonProgram *self, 
90                                                  gboolean can_hibernate);
91
92 gboolean
93 hildon_program_get_can_hibernate                (HildonProgram *self);
94
95 void
96 hildon_program_set_common_menu                  (HildonProgram *self, 
97                                                  GtkMenu *menu);
98
99 GtkMenu*
100 hildon_program_get_common_menu                  (HildonProgram *self);
101
102 void
103 hildon_program_set_common_toolbar               (HildonProgram *self, 
104                                                  GtkToolbar *toolbar);
105
106 GtkToolbar*
107 hildon_program_get_common_toolbar               (HildonProgram *self);
108
109 gboolean
110 hildon_program_get_is_topmost                   (HildonProgram *self);
111
112 HildonStackableWindow *
113 hildon_program_pop_window_stack                 (HildonProgram *self);
114
115 HildonStackableWindow *
116 hildon_program_peek_window_stack                (HildonProgram *self);
117
118 void
119 hildon_program_go_to_root_window                (HildonProgram *self);
120
121 G_END_DECLS
122
123 #endif                                          /* __HILDON_PROGRAM_H__ */