summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrenderer.h
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2001-09-17 21:44:20 +0000
committerJonathan Blandford <jrb@src.gnome.org>2001-09-17 21:44:20 +0000
commita25167914836070833b1720933d048ba82a40c64 (patch)
tree0c86d02687e6bef28c3d983e1f7792edce462c4d /gtk/gtkcellrenderer.h
parentef79a175b51bf5924d63b15c11bb7987857f10bd (diff)
downloadgtk+-a25167914836070833b1720933d048ba82a40c64.tar.gz
Add editable interface. This should be the last big GtkTreeView API
Mon Sep 17 17:39:52 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkcelleditable.[ch]: Add editable interface. This should be the last big GtkTreeView API change. * gtk/gtkcellrenderer.[ch]: Get rid of the "event" vfunc, and replace with "activate" and "start_editing". Also, added a "can_activate" and "can_edit" property. * gtk/gtktreeviewcolumn.c: modify to use above.
Diffstat (limited to 'gtk/gtkcellrenderer.h')
-rw-r--r--gtk/gtkcellrenderer.h132
1 files changed, 71 insertions, 61 deletions
diff --git a/gtk/gtkcellrenderer.h b/gtk/gtkcellrenderer.h
index 730fe13f8c..0a1624a51b 100644
--- a/gtk/gtkcellrenderer.h
+++ b/gtk/gtkcellrenderer.h
@@ -22,11 +22,9 @@
#include <gtk/gtkobject.h>
#include <gtk/gtkwidget.h>
+#include <gtk/gtkcelleditable.h>
-#ifdef __cplusplus
-extern "C" {
-
-#endif /* __cplusplus */
+G_BEGIN_DECLS
typedef enum
{
@@ -61,6 +59,7 @@ struct _GtkCellRenderer
guint16 ypad;
guint can_activate : 1;
+ guint can_edit : 1;
guint visible : 1;
guint is_expander : 1;
guint is_expanded : 1;
@@ -71,64 +70,75 @@ struct _GtkCellRendererClass
GtkObjectClass parent_class;
/* vtable - not signals */
- void (* get_size) (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height);
-
- void (* render) (GtkCellRenderer *cell,
- GdkWindow *window,
- GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
- GtkCellRendererState flags);
-
- gboolean (* event) (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags);
+ void (* get_size) (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height);
+ void (* render) (GtkCellRenderer *cell,
+ GdkWindow *window,
+ GtkWidget *widget,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GdkRectangle *expose_area,
+ GtkCellRendererState flags);
+ gboolean (* activate) (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ gchar *path,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GtkCellRendererState flags);
+ GtkCellEditable *(* start_editing) (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ gchar *path,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GtkCellRendererState flags);
};
-GtkType gtk_cell_renderer_get_type (void);
-void gtk_cell_renderer_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height);
-void gtk_cell_renderer_render (GtkCellRenderer *cell,
- GdkWindow *window,
- GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
- GtkCellRendererState flags);
-gboolean gtk_cell_renderer_event (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags);
-void gtk_cell_renderer_set_fixed_size (GtkCellRenderer *cell,
- gint width,
- gint height);
-void gtk_cell_renderer_get_fixed_size (GtkCellRenderer *cell,
- gint *width,
- gint *height);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
+GType gtk_cell_renderer_get_type (void) G_GNUC_CONST;
+
+void gtk_cell_renderer_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height);
+void gtk_cell_renderer_render (GtkCellRenderer *cell,
+ GdkWindow *window,
+ GtkWidget *widget,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GdkRectangle *expose_area,
+ GtkCellRendererState flags);
+gboolean gtk_cell_renderer_activate (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ gchar *path,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GtkCellRendererState flags);
+GtkCellEditable *gtk_cell_renderer_start_editing (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ gchar *path,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GtkCellRendererState flags);
+void gtk_cell_renderer_set_fixed_size (GtkCellRenderer *cell,
+ gint width,
+ gint height);
+void gtk_cell_renderer_get_fixed_size (GtkCellRenderer *cell,
+ gint *width,
+ gint *height);
+
+
+
+G_END_DECLS
#endif /* __GTK_CELL_RENDERER_H__ */