Remove HILDON_ENABLE_UNSTABLE_API.
[hildon] / src / hildon-window.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_WINDOW_H__
26 #define                                         __HILDON_WINDOW_H__
27
28 #include                                        <glib.h>
29 #include                                        <glib-object.h>
30 #include                                        <gtk/gtkwindow.h>
31 #include                                        <gtk/gtkmenu.h>
32 #include                                        <gtk/gtktoolbar.h>
33 #include                                        <gdk/gdkx.h>
34
35 #include                                        "hildon-defines.h"
36
37 G_BEGIN_DECLS
38
39 #define                                         HILDON_WINDOW_LONG_PRESS_TIME 800 /* in ms */
40
41 #define                                         HILDON_TYPE_WINDOW \
42                                                 (hildon_window_get_type())
43
44 #define                                         HILDON_WINDOW(obj) \
45                                                 (GTK_CHECK_CAST (obj, HILDON_TYPE_WINDOW, HildonWindow))
46
47 #define                                         HILDON_WINDOW_CLASS(klass) \
48                                                 (GTK_CHECK_CLASS_CAST ((klass),\
49                                                 HILDON_TYPE_WINDOW, HildonWindowClass))
50
51 #define                                         HILDON_IS_WINDOW(obj) \
52                                                 (GTK_CHECK_TYPE (obj, HILDON_TYPE_WINDOW))
53
54 #define                                         HILDON_IS_WINDOW_CLASS(klass) \
55                                                 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_WINDOW))
56
57 #define                                         HILDON_WINDOW_GET_CLASS(obj) \
58                                                 ((HildonWindowClass *) G_OBJECT_GET_CLASS(obj))
59
60 typedef struct                                  _HildonWindow HildonWindow;
61
62 typedef struct                                  _HildonWindowClass HildonWindowClass;
63
64 typedef enum
65 {
66     HILDON_WINDOW_CO_COPY,
67     HILDON_WINDOW_CO_CUT,
68     HILDON_WINDOW_CO_PASTE
69 }                                               HildonWindowClipboardOperation;
70
71 struct                                          _HildonWindow
72 {
73     GtkWindow parent;
74 };
75
76 struct                                          _HildonWindowClass
77 {
78     GtkWindowClass parent_class;
79
80     /* opera hacks for clip board operation */
81     void (*clipboard_operation)(HildonWindow *hwindow, int operation);
82     /* Padding for future extension */
83     void (*_hildon_reserved1)(void);
84     void (*_hildon_reserved2)(void);
85     void (*_hildon_reserved3)(void);
86 };
87
88 GType G_GNUC_CONST
89 hildon_window_get_type                          (void);
90
91 GtkWidget*
92 hildon_window_new                               (void);
93
94 void        
95 hildon_window_add_with_scrollbar                (HildonWindow *self,
96                                                  GtkWidget    *child);
97
98 GtkMenu*    
99 hildon_window_get_menu                          (HildonWindow *self);
100
101 void        
102 hildon_window_set_menu                          (HildonWindow *self,
103                                                  GtkMenu      *menu);
104
105 void    
106 hildon_window_add_toolbar                       (HildonWindow *self,
107                                                  GtkToolbar   *toolbar);
108
109 void        
110 hildon_window_remove_toolbar                    (HildonWindow *self,
111                                                  GtkToolbar   *toolbar);
112
113 gboolean    
114 hildon_window_get_is_topmost                    (HildonWindow *self);
115
116 G_END_DECLS
117
118 #endif                                          /* __HILDON_WINDOW_H__ */