1
/*
2
 * This file is a part of hildon
3
 *
4
 * Copyright (C) 2006 Nokia Corporation, all rights reserved.
5
 *
6
 * Contact: Rodrigo Novo <rodrigo.novo@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
30
#include                                        "hildon-window.h"
31
#include                                        "hildon-stackable-window.h"
32
33
G_BEGIN_DECLS
34
35
typedef struct                                  _HildonProgram HildonProgram;
36
37
typedef struct                                  _HildonProgramClass HildonProgramClass;
38
39
#define                                         HILDON_TYPE_PROGRAM \
40
                                                (hildon_program_get_type())
41
42
#define                                         HILDON_PROGRAM(obj) \
43
                                                (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
44
                                                HILDON_TYPE_PROGRAM, HildonProgram))
45
46
#define                                         HILDON_PROGRAM_CLASS(obj) \
47
                                                (G_TYPE_CHECK_CLASS_CAST ((obj), \
48
                                                HILDON_TYPE_PROGRAM, HildonProgramClass))
49
50
#define                                         HILDON_IS_PROGRAM(obj) \
51
                                                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_PROGRAM))
52
53
#define                                         HILDON_IS_PROGRAM_CLASS(klass) \
54
                                                (G_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_PROGRAM))
55
56
#define                                         HILDON_PROGRAM_GET_CLASS(obj) \
57
                                                ((HildonProgramClass *) G_OBJECT_GET_CLASS(obj))
58
59
struct                                          _HildonProgram
60
{
61
    GObject parent;
62
};
63
64
struct                                          _HildonProgramClass
65
{
66
    GObjectClass parent;
67
68
    /* Padding for future extension */
69
    void (*_hildon_reserved1)(void);
70
    void (*_hildon_reserved2)(void);
71
    void (*_hildon_reserved3)(void);
72
    void (*_hildon_reserved4)(void);
73
};
74
75
GType G_GNUC_CONST
76
hildon_program_get_type                         (void);
77
78
HildonProgram*
79
hildon_program_get_instance                     (void);
80
81
void
82
hildon_program_add_window                       (HildonProgram *self, 
83
                                                 HildonWindow *window);
84
85
void
86
hildon_program_remove_window                    (HildonProgram *self, 
87
                                                 HildonWindow *window);
88
89
void
90
hildon_program_set_can_hibernate                (HildonProgram *self, 
91
                                                 gboolean can_hibernate);
92
93
gboolean
94
hildon_program_get_can_hibernate                (HildonProgram *self);
95
96
void
97
hildon_program_set_common_menu                  (HildonProgram *self, 
98
                                                 GtkMenu *menu);
99
100
GtkMenu*
101
hildon_program_get_common_menu                  (HildonProgram *self);
102
103
void
104
hildon_program_set_common_app_menu              (HildonProgram *self,
105
                                                 HildonAppMenu *menu);
106
107
HildonAppMenu*
108
hildon_program_get_common_app_menu              (HildonProgram *self);
109
110
void
111
hildon_program_set_common_toolbar               (HildonProgram *self, 
112
                                                 GtkToolbar *toolbar);
113
114
GtkToolbar*
115
hildon_program_get_common_toolbar               (HildonProgram *self);
116
117
gboolean
118
hildon_program_get_is_topmost                   (HildonProgram *self);
119
120
#ifndef HILDON_DISABLE_DEPRECATED
121
HildonStackableWindow *
122
hildon_program_pop_window_stack                 (HildonProgram *self);
123
124
HildonStackableWindow *
125
hildon_program_peek_window_stack                (HildonProgram *self);
126
127
void
128
hildon_program_go_to_root_window                (HildonProgram *self);
129
#endif /* HILDON_DISABLE_DEPRECATED */
130
131
G_END_DECLS
132
133
#endif                                          /* __HILDON_PROGRAM_H__ */