]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkwindow.h
Bug 539363 – Segfault when creating GtkPlugs
[~andy/gtk] / gtk / gtkwindow.h
index 4d4fc53d7e4b277c65b7b434af0a9a0a53e900e8..dcc4a26bace1401aa572e88cc820b4abfde28172 100644 (file)
  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
+#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <gtk/gtk.h> can be included directly."
+#endif
+
 #ifndef __GTK_WINDOW_H__
 #define __GTK_WINDOW_H__
 
@@ -53,63 +57,63 @@ struct _GtkWindow
 {
   GtkBin bin;
 
-  gchar *title;
-  gchar *wmclass_name;
-  gchar *wmclass_class;
-  gchar *wm_role;
-
-  GtkWidget *focus_widget;
-  GtkWidget *default_widget;
-  GtkWindow *transient_parent;
-  GtkWindowGeometryInfo *geometry_info;
-  GdkWindow *frame;
-  GtkWindowGroup *group;
-
-  guint16 configure_request_count;
-  guint allow_shrink : 1;
-  guint allow_grow : 1;
-  guint configure_notify_received : 1;
+  gchar *GSEAL (title);
+  gchar *GSEAL (wmclass_name);
+  gchar *GSEAL (wmclass_class);
+  gchar *GSEAL (wm_role);
+
+  GtkWidget *GSEAL (focus_widget);
+  GtkWidget *GSEAL (default_widget);
+  GtkWindow *GSEAL (transient_parent);
+  GtkWindowGeometryInfo *GSEAL (geometry_info);
+  GdkWindow *GSEAL (frame);
+  GtkWindowGroup *GSEAL (group);
+
+  guint16 GSEAL (configure_request_count);
+  guint GSEAL (allow_shrink) : 1;
+  guint GSEAL (allow_grow) : 1;
+  guint GSEAL (configure_notify_received) : 1;
   /* The following flags are initially TRUE (before a window is mapped).
    * They cause us to compute a configure request that involves
    * default-only parameters. Once mapped, we set them to FALSE.
    * Then we set them to TRUE again on unmap (for position)
    * and on unrealize (for size).
    */
-  guint need_default_position : 1;
-  guint need_default_size : 1;
-  guint position : 3;
-  guint type : 4; /* GtkWindowType */ 
-  guint has_user_ref_count : 1;
-  guint has_focus : 1;
-
-  guint modal : 1;
-  guint destroy_with_parent : 1;
+  guint GSEAL (need_default_position) : 1;
+  guint GSEAL (need_default_size) : 1;
+  guint GSEAL (position) : 3;
+  guint GSEAL (type) : 4; /* GtkWindowType */ 
+  guint GSEAL (has_user_ref_count) : 1;
+  guint GSEAL (has_focus) : 1;
+
+  guint GSEAL (modal) : 1;
+  guint GSEAL (destroy_with_parent) : 1;
   
-  guint has_frame : 1;
+  guint GSEAL (has_frame) : 1;
 
   /* gtk_window_iconify() called before realization */
-  guint iconify_initially : 1;
-  guint stick_initially : 1;
-  guint maximize_initially : 1;
-  guint decorated : 1;
+  guint GSEAL (iconify_initially) : 1;
+  guint GSEAL (stick_initially) : 1;
+  guint GSEAL (maximize_initially) : 1;
+  guint GSEAL (decorated) : 1;
   
-  guint type_hint : 3; /* GdkWindowTypeHint if the hint is one of the original eight. If not, then
-                       * it contains GDK_WINDOW_TYPE_HINT_NORMAL
-                       */
-  guint gravity : 5; /* GdkGravity */
+  guint GSEAL (type_hint) : 3; /* GdkWindowTypeHint if the hint is one of the original eight. If not, then
+                               * it contains GDK_WINDOW_TYPE_HINT_NORMAL
+                               */
+  guint GSEAL (gravity) : 5; /* GdkGravity */
 
-  guint is_active : 1;
-  guint has_toplevel_focus : 1;
+  guint GSEAL (is_active) : 1;
+  guint GSEAL (has_toplevel_focus) : 1;
   
-  guint frame_left;
-  guint frame_top;
-  guint frame_right;
-  guint frame_bottom;
+  guint GSEAL (frame_left);
+  guint GSEAL (frame_top);
+  guint GSEAL (frame_right);
+  guint GSEAL (frame_bottom);
 
-  guint keys_changed_handler;
+  guint GSEAL (keys_changed_handler);
   
-  GdkModifierType mnemonic_modifier;
-  GdkScreen      *screen;
+  GdkModifierType GSEAL (mnemonic_modifier);
+  GdkScreen      *GSEAL (screen);
 };
 
 struct _GtkWindowClass
@@ -125,6 +129,11 @@ struct _GtkWindowClass
 
   void     (* activate_focus)          (GtkWindow       *window);
   void     (* activate_default)        (GtkWindow       *window);
+
+  /* as of GTK+ 2.12 the "move-focus" signal has been moved to GtkWidget,
+   * so this is merley a virtual function now. Overriding it in subclasses
+   * continues to work though.
+   */
   void     (* move_focus)              (GtkWindow       *window,
                                         GtkDirectionType direction);
   
@@ -148,7 +157,7 @@ struct _GtkWindowGroup
 {
   GObject parent_instance;
 
-  GSList *grabs;
+  GSList *GSEAL (grabs);
 };
 
 struct _GtkWindowGroupClass
@@ -178,6 +187,8 @@ void       gtk_window_set_wmclass              (GtkWindow           *window,
                                                const gchar         *wmclass_class);
 void       gtk_window_set_role                 (GtkWindow           *window,
                                                 const gchar         *role);
+void       gtk_window_set_startup_id           (GtkWindow           *window,
+                                                const gchar         *startup_id);
 G_CONST_RETURN gchar *gtk_window_get_role      (GtkWindow           *window);
 void       gtk_window_add_accel_group          (GtkWindow           *window,
                                                GtkAccelGroup       *accel_group);
@@ -191,11 +202,15 @@ void       gtk_window_set_focus                (GtkWindow           *window,
 GtkWidget *gtk_window_get_focus                (GtkWindow           *window);
 void       gtk_window_set_default              (GtkWindow           *window,
                                                GtkWidget           *default_widget);
+GtkWidget *gtk_window_get_default              (GtkWindow           *window);
 gboolean   gtk_window_activate_default        (GtkWindow           *window);
 
 void       gtk_window_set_transient_for        (GtkWindow           *window, 
                                                GtkWindow           *parent);
 GtkWindow *gtk_window_get_transient_for        (GtkWindow           *window);
+void       gtk_window_set_opacity              (GtkWindow           *window, 
+                                               gdouble              opacity);
+gdouble    gtk_window_get_opacity              (GtkWindow           *window);
 void       gtk_window_set_type_hint            (GtkWindow           *window, 
                                                GdkWindowTypeHint    hint);
 GdkWindowTypeHint gtk_window_get_type_hint     (GtkWindow           *window);
@@ -379,6 +394,8 @@ void             gtk_window_group_add_window    (GtkWindowGroup     *window_grou
                                                 GtkWindow          *window);
 void             gtk_window_group_remove_window (GtkWindowGroup     *window_group,
                                                 GtkWindow          *window);
+GList *          gtk_window_group_list_windows  (GtkWindowGroup     *window_group);
+
 
 /* --- internal functions --- */
 void            _gtk_window_internal_set_focus (GtkWindow *window,