]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkwidget.h
Incremented version to 1.2.0. -Shawn <amundson@gtk.org>
[~andy/gtk] / gtk / gtkwidget.h
index 295a29fc34572c37fb748ec7c77b9a35fdd9947d..c980387ab2d0b2b3009a9e9b5295d2948239ba42 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
+/*
+ * Modified by the GTK+ Team and others 1997-1999.  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/. 
+ */
+
 #ifndef __GTK_WIDGET_H__
 #define __GTK_WIDGET_H__
 
@@ -49,7 +57,10 @@ typedef enum
   GTK_HAS_DEFAULT      = 1 << 14,
   GTK_HAS_GRAB        = 1 << 15,
   GTK_RC_STYLE        = 1 << 16,
-  GTK_COMPOSITE_CHILD  = 1 << 17
+  GTK_COMPOSITE_CHILD  = 1 << 17,
+  GTK_NO_REPARENT      = 1 << 18,
+  GTK_APP_PAINTABLE    = 1 << 19,
+  GTK_RECEIVES_DEFAULT = 1 << 20
 } GtkWidgetFlags;
 
 /* Macro for casting a pointer to a GtkWidget or GtkWidgetClass pointer.
@@ -87,6 +98,8 @@ typedef enum
 #define GTK_WIDGET_HAS_GRAB(wid)         ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_GRAB) != 0)
 #define GTK_WIDGET_RC_STYLE(wid)         ((GTK_WIDGET_FLAGS (wid) & GTK_RC_STYLE) != 0)
 #define GTK_WIDGET_COMPOSITE_CHILD(wid)          ((GTK_WIDGET_FLAGS (wid) & GTK_COMPOSITE_CHILD) != 0)
+#define GTK_WIDGET_APP_PAINTABLE(wid)    ((GTK_WIDGET_FLAGS (wid) & GTK_APP_PAINTABLE) != 0)
+#define GTK_WIDGET_RECEIVES_DEFAULT(wid)  ((GTK_WIDGET_FLAGS (wid) & GTK_RECEIVES_DEFAULT) != 0)
   
 /* Macros for setting and clearing widget flags.
  */
@@ -346,7 +359,7 @@ struct _GtkWidgetClass
                                    GdkDragContext     *context,
                                    GtkSelectionData   *selection_data,
                                    guint               info,
-                                   guint32             time);
+                                   guint               time);
   void (* drag_data_delete)        (GtkWidget         *widget,
                                    GdkDragContext     *context);
 
@@ -370,11 +383,17 @@ struct _GtkWidgetClass
                                    gint                y,
                                    GtkSelectionData   *selection_data,
                                    guint               info,
-                                   guint32             time);
+                                   guint               time);
   
   /* action signals */
   void (* debug_msg)              (GtkWidget          *widget,
                                    const gchar        *string);
+
+  /* Padding for future expandsion */
+  GtkFunction pad1;
+  GtkFunction pad2;
+  GtkFunction pad3;
+  GtkFunction pad4;
 };
 
 struct _GtkWidgetAuxInfo
@@ -451,6 +470,8 @@ void           gtk_widget_size_request        (GtkWidget           *widget,
                                           GtkRequisition      *requisition);
 void      gtk_widget_size_allocate       (GtkWidget           *widget,
                                           GtkAllocation       *allocation);
+void       gtk_widget_get_child_requisition (GtkWidget        *widget,
+                                            GtkRequisition    *requisition);
 void      gtk_widget_add_accelerator     (GtkWidget           *widget,
                                           const gchar         *accel_signal,
                                           GtkAccelGroup       *accel_group,
@@ -496,7 +517,9 @@ gchar*         gtk_widget_get_name            (GtkWidget           *widget);
 void      gtk_widget_set_state           (GtkWidget           *widget,
                                           GtkStateType         state);
 void      gtk_widget_set_sensitive       (GtkWidget           *widget,
-                                          gint                 sensitive);
+                                          gboolean             sensitive);
+void      gtk_widget_set_app_paintable   (GtkWidget           *widget,
+                                          gboolean             app_paintable);
 void      gtk_widget_set_parent          (GtkWidget           *widget,
                                           GtkWidget           *parent);
 void      gtk_widget_set_parent_window   (GtkWidget           *widget,
@@ -521,6 +544,19 @@ GtkWidget*   gtk_widget_get_ancestor       (GtkWidget      *widget,
                                         GtkType        widget_type);
 GdkColormap* gtk_widget_get_colormap   (GtkWidget      *widget);
 GdkVisual*   gtk_widget_get_visual     (GtkWidget      *widget);
+
+/* The following functions must not be called on an already
+ * realized widget. Because it is possible that somebody
+ * can call get_colormap() or get_visual() and save the
+ * result, these functions are probably only safe to
+ * call in a widget's init() function.
+ */
+void         gtk_widget_set_colormap    (GtkWidget      *widget,
+                                        GdkColormap    *colormap);
+void         gtk_widget_set_visual      (GtkWidget      *widget, 
+                                        GdkVisual      *visual);
+
+
 gint        gtk_widget_get_events      (GtkWidget      *widget);
 void        gtk_widget_get_pointer     (GtkWidget      *widget,
                                         gint           *x,
@@ -605,10 +641,6 @@ void            gtk_widget_class_path         (GtkWidget *widget,
 #endif /* GTK_TRACE_OBJECTS && __GNUC__ */
 
 
-/* deprecated */
-void       gtk_widget_freeze_accelerators (GtkWidget          *widget);
-void      gtk_widget_thaw_accelerators   (GtkWidget           *widget);
-
 
 #ifdef __cplusplus
 }