]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkclist.h
Correctly select default printer when there is more than one (CUPS)
[~andy/gtk] / gtk / gtkclist.h
index 7bd437c4040a5168ce4d201538ba8f1113d79c78..d97b5473ee11c7fc96a453297afaed79bad5308b 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_DEPRECATED) || defined (__GTK_CLIST_C__) || defined (__GTK_CTREE_C__)
+
 #ifndef __GTK_CLIST_H__
 #define __GTK_CLIST_H__
 
-#include <gdk/gdk.h>
+
 #include <gtk/gtksignal.h>
 #include <gtk/gtkalignment.h>
 #include <gtk/gtklabel.h>
 #include <gtk/gtkbutton.h>
 #include <gtk/gtkhscrollbar.h>
 #include <gtk/gtkvscrollbar.h>
-#include <gtk/gtkenums.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+
+G_BEGIN_DECLS
+
 
 /* clist flags */
 enum {
   GTK_CLIST_IN_DRAG             = 1 <<  0,
   GTK_CLIST_ROW_HEIGHT_SET      = 1 <<  1,
   GTK_CLIST_SHOW_TITLES         = 1 <<  2,
-  GTK_CLIST_CHILD_HAS_FOCUS     = 1 <<  3,
+  /* Unused */
   GTK_CLIST_ADD_MODE            = 1 <<  4,
   GTK_CLIST_AUTO_SORT           = 1 <<  5,
   GTK_CLIST_AUTO_RESIZE_BLOCKED = 1 <<  6,
@@ -54,7 +55,7 @@ enum {
   GTK_CLIST_USE_DRAG_ICONS      = 1 <<  8,
   GTK_CLIST_DRAW_DRAG_LINE      = 1 <<  9,
   GTK_CLIST_DRAW_DRAG_RECT      = 1 << 10
-}; 
+};
 
 /* cell types */
 typedef enum
@@ -83,11 +84,11 @@ typedef enum
 } GtkButtonAction;
 
 #define GTK_TYPE_CLIST            (gtk_clist_get_type ())
-#define GTK_CLIST(obj)            (GTK_CHECK_CAST ((obj), GTK_TYPE_CLIST, GtkCList))
-#define GTK_CLIST_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CLIST, GtkCListClass))
-#define GTK_IS_CLIST(obj)         (GTK_CHECK_TYPE ((obj), GTK_TYPE_CLIST))
-#define GTK_IS_CLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST))
-#define GTK_CLIST_GET_CLASS(obj)  (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CLIST, GtkCListClass))
+#define GTK_CLIST(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CLIST, GtkCList))
+#define GTK_CLIST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CLIST, GtkCListClass))
+#define GTK_IS_CLIST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CLIST))
+#define GTK_IS_CLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST))
+#define GTK_CLIST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CLIST, GtkCListClass))
 
 
 #define GTK_CLIST_FLAGS(clist)             (GTK_CLIST (clist)->flags)
@@ -97,7 +98,6 @@ typedef enum
 #define GTK_CLIST_IN_DRAG(clist)           (GTK_CLIST_FLAGS (clist) & GTK_CLIST_IN_DRAG)
 #define GTK_CLIST_ROW_HEIGHT_SET(clist)    (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ROW_HEIGHT_SET)
 #define GTK_CLIST_SHOW_TITLES(clist)       (GTK_CLIST_FLAGS (clist) & GTK_CLIST_SHOW_TITLES)
-#define GTK_CLIST_CHILD_HAS_FOCUS(clist)   (GTK_CLIST_FLAGS (clist) & GTK_CLIST_CHILD_HAS_FOCUS)
 #define GTK_CLIST_ADD_MODE(clist)          (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ADD_MODE)
 #define GTK_CLIST_AUTO_SORT(clist)         (GTK_CLIST_FLAGS (clist) & GTK_CLIST_AUTO_SORT)
 #define GTK_CLIST_AUTO_RESIZE_BLOCKED(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_AUTO_RESIZE_BLOCKED)
@@ -150,13 +150,12 @@ struct _GtkCList
   
   guint16 flags;
   
-  /* mem chunks */
-  GMemChunk *row_mem_chunk;
-  GMemChunk *cell_mem_chunk;
+  gpointer reserved1;
+  gpointer reserved2;
 
   guint freeze_count;
   
-  /* allocation rectangle after the conatiner_border_width
+  /* allocation rectangle after the container_border_width
    * and the width of the shadow border */
   GdkRectangle internal_allocation;
   
@@ -225,6 +224,8 @@ struct _GtkCList
   
   /* focus handling */
   gint focus_row;
+
+  gint focus_header_column;
   
   /* dragging the selection */
   gint anchor;
@@ -236,6 +237,9 @@ struct _GtkCList
   GtkSortType sort_type;
   GtkCListCompareFunc compare;
   gint sort_column;
+
+  gint drag_highlight_row;
+  GtkCListDragPos drag_highlight_pos;
 };
 
 struct _GtkCListClass
@@ -348,7 +352,7 @@ struct _GtkCListRow
   GtkStyle *style;
 
   gpointer data;
-  GtkDestroyNotify destroy;
+  GDestroyNotify destroy;
   
   guint fg_set     : 1;
   guint bg_set     : 1;
@@ -436,12 +440,7 @@ struct _GtkCell
   } u;
 };
 
-GtkType gtk_clist_get_type (void) G_GNUC_CONST;
-
-/* constructors useful for gtk-- wrappers */
-void gtk_clist_construct (GtkCList *clist,
-                         gint      columns,
-                         gchar    *titles[]);
+GType gtk_clist_get_type (void) G_GNUC_CONST;
 
 /* create a new GtkCList */
 GtkWidget* gtk_clist_new             (gint   columns);
@@ -630,16 +629,16 @@ gint gtk_clist_get_pixtext (GtkCList   *clist,
 /* sets the foreground color of a row, the color must already
  * be allocated
  */
-void gtk_clist_set_foreground (GtkCList *clist,
-                              gint      row,
-                              GdkColor *color);
+void gtk_clist_set_foreground (GtkCList       *clist,
+                              gint            row,
+                              const GdkColor *color);
 
 /* sets the background color of a row, the color must already
  * be allocated
  */
-void gtk_clist_set_background (GtkCList *clist,
-                              gint      row,
-                              GdkColor *color);
+void gtk_clist_set_background (GtkCList       *clist,
+                              gint            row,
+                              const GdkColor *color);
 
 /* set / get cell styles */
 void gtk_clist_set_cell_style (GtkCList *clist,
@@ -700,10 +699,10 @@ void gtk_clist_set_row_data (GtkCList *clist,
                             gpointer  data);
 
 /* sets a data pointer for a given row with destroy notification */
-void gtk_clist_set_row_data_full (GtkCList         *clist,
-                                 gint              row,
-                                 gpointer          data,
-                                 GtkDestroyNotify  destroy);
+void gtk_clist_set_row_data_full (GtkCList       *clist,
+                                 gint            row,
+                                 gpointer        data,
+                                 GDestroyNotify  destroy);
 
 /* returns the data set for a row */
 gpointer gtk_clist_get_row_data (GtkCList *clist,
@@ -784,8 +783,10 @@ PangoLayout *_gtk_clist_create_cell_layout (GtkCList       *clist,
                                            GtkCListRow    *clist_row,
                                            gint            column);
 
-#ifdef __cplusplus
-}
-#endif                         /* __cplusplus */
+
+G_END_DECLS
+
 
 #endif                         /* __GTK_CLIST_H__ */
+
+#endif /* GTK_DISABLE_DEPRECATED */