]> Pileus Git - ~andy/gtk/blob - gtk/gtkwindow.h
Initial revision
[~andy/gtk] / gtk / gtkwindow.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 #ifndef __GTK_WINDOW_H__
19 #define __GTK_WINDOW_H__
20
21
22 #include <gdk/gdk.h>
23 #include <gtk/gtkaccelerator.h>
24 #include <gtk/gtkbin.h>
25 #include <gtk/gtkenums.h>
26 #include <gtk/gtkwidget.h>
27
28
29 #define GTK_WINDOW(obj)          GTK_CHECK_CAST (obj, gtk_window_get_type (), GtkWindow)
30 #define GTK_WINDOW_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gtk_window_get_type (), GtkWindowClass)
31 #define GTK_IS_WINDOW(obj)       GTK_CHECK_TYPE (obj, gtk_window_get_type ())
32
33
34 typedef struct _GtkWindow       GtkWindow;
35 typedef struct _GtkWindowClass  GtkWindowClass;
36
37 struct _GtkWindow
38 {
39   GtkBin bin;
40
41   gchar *title;
42   gchar *wmclass_name;
43   gchar *wmclass_class;
44   GtkWindowType type;
45   GList *accelerator_tables;
46
47   GtkWidget *focus_widget;
48   GtkWidget *default_widget;
49
50   gshort resize_count;
51   guint need_resize : 1;
52   guint allow_shrink : 1;
53   guint allow_grow : 1;
54   guint auto_shrink : 1;
55   guint handling_resize : 1;
56   guint position : 2;
57   guint use_uposition : 1;
58 };
59
60 struct _GtkWindowClass
61 {
62   GtkBinClass parent_class;
63
64   gint (* move_resize) (GtkWindow *window,
65                         gint      *x,
66                         gint      *y,
67                         gint       width,
68                         gint       height);
69 };
70
71
72 #ifdef __cplusplus
73 extern "C" {
74 #endif /* __cplusplus */
75
76
77 guint      gtk_window_get_type                 (void);
78 GtkWidget* gtk_window_new                      (GtkWindowType        type);
79 void       gtk_window_set_title                (GtkWindow           *window,
80                                                 const gchar         *title);
81 void       gtk_window_set_wmclass              (GtkWindow           *window,
82                                                 gchar               *wmclass_name,
83                                                 gchar               *wmclass_class);
84 void       gtk_window_set_focus                (GtkWindow           *window,
85                                                 GtkWidget           *focus);
86 void       gtk_window_set_default              (GtkWindow           *window,
87                                                 GtkWidget           *defaultw);
88 void       gtk_window_set_policy               (GtkWindow           *window,
89                                                 gint                 allow_shrink,
90                                                 gint                 allow_grow,
91                                                 gint                 auto_shrink);
92 void       gtk_window_add_accelerator_table    (GtkWindow           *window,
93                                                 GtkAcceleratorTable *table);
94 void       gtk_window_remove_accelerator_table (GtkWindow           *window,
95                                                 GtkAcceleratorTable *table);
96 void       gtk_window_position                 (GtkWindow           *window,
97                                                 GtkWindowPosition    position);
98
99
100 #ifdef __cplusplus
101 }
102 #endif /* __cplusplus */
103
104
105 #endif /* __GTK_WINDOW_H__ */