summaryrefslogtreecommitdiff
path: root/gtk/gtkcellarea.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-10-21 22:46:10 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-10-21 22:46:10 +0900
commit8bb20925edeea72c837f5bdcaceb47db10b623a3 (patch)
treeaa938fadf3bec5e6fad1f3fbc07330fb0b42dd02 /gtk/gtkcellarea.c
parentc7e1f567b6124b1f99b17ca0de1985a7f39f4eae (diff)
downloadgtk+-8bb20925edeea72c837f5bdcaceb47db10b623a3.tar.gz
Adding vague initial draft of GtkCellArea to the codebase (treeview-refactor branch).
Diffstat (limited to 'gtk/gtkcellarea.c')
-rw-r--r--gtk/gtkcellarea.c174
1 files changed, 174 insertions, 0 deletions
diff --git a/gtk/gtkcellarea.c b/gtk/gtkcellarea.c
new file mode 100644
index 0000000000..4b44f388f7
--- /dev/null
+++ b/gtk/gtkcellarea.c
@@ -0,0 +1,174 @@
+
+
+
+#include "gtkcellarea.h"
+
+
+
+G_DEFINE_ABSTRACT_TYPE (GtkCellArea, gtk_cell_area, G_TYPE_INITIALLY_UNOWNED);
+
+
+
+/* Basic methods */
+void
+gtk_cell_area_add (GtkCellArea *area,
+ GtkCellRenderer *renderer)
+{
+ GtkCellAreaClass *klass;
+
+ g_return_if_fail (GTK_IS_CELL_AREA (area));
+ g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
+
+ klass = GTK_CELL_AREA_GET_CLASS (area);
+
+ if (klass->add)
+ klass->add (area, renderer);
+ else
+ g_warning ("GtkCellAreaClass::add not implemented for `%s'",
+ g_type_name (G_TYPE_FROM_INSTANCE (area)));
+}
+
+void
+gtk_cell_area_remove (GtkCellArea *area,
+ GtkCellRenderer *renderer)
+{
+ GtkCellAreaClass *klass;
+
+ g_return_if_fail (GTK_IS_CELL_AREA (area));
+ g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
+
+ klass = GTK_CELL_AREA_GET_CLASS (area);
+
+ if (klass->remove)
+ klass->remove (area, renderer);
+ else
+ g_warning ("GtkCellAreaClass::remove not implemented for `%s'",
+ g_type_name (G_TYPE_FROM_INSTANCE (area)));
+}
+
+void
+gtk_cell_area_forall (GtkCellArea *area,
+ GtkCellCallback callback,
+ gpointer callback_data)
+{
+ GtkCellAreaClass *klass;
+
+ g_return_if_fail (GTK_IS_CELL_AREA (area));
+ g_return_if_fail (callback != NULL);
+
+ klass = GTK_CELL_AREA_GET_CLASS (area);
+
+ if (klass->forall)
+ klass->forall (area, callback, callback_data);
+ else
+ g_warning ("GtkCellAreaClass::forall not implemented for `%s'",
+ g_type_name (G_TYPE_FROM_INSTANCE (area)));
+}
+
+void
+gtk_cell_area_apply_attribute (GtkCellArea *area,
+ gint attribute,
+ GValue *value)
+{
+ GtkCellAreaClass *klass;
+
+ g_return_if_fail (GTK_IS_CELL_AREA (area));
+ g_return_if_fail (G_IS_VALUE (value));
+
+ klass = GTK_CELL_AREA_GET_CLASS (area);
+
+ if (klass->forall)
+ klass->apply_attribute (area, attribute, value);
+ else
+ g_warning ("GtkCellAreaClass::apply_attribute not implemented for `%s'",
+ g_type_name (G_TYPE_FROM_INSTANCE (area)));
+
+}
+
+gint
+gtk_cell_area_event (GtkCellArea *area,
+ GtkWidget *widget,
+ GdkEvent *event,
+ const GdkRectangle *cell_area)
+{
+ GtkCellAreaClass *klass;
+
+ g_return_val_if_fail (GTK_IS_CELL_AREA (area), 0);
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), 0);
+ g_return_val_if_fail (event != NULL, 0);
+ g_return_val_if_fail (cell_area != NULL, 0);
+
+ klass = GTK_CELL_AREA_GET_CLASS (area);
+
+ if (klass->forall)
+ klass->apply_attribute (area, attribute, value);
+ else
+ g_warning ("GtkCellAreaClass::apply_attribute not implemented for `%s'",
+ g_type_name (G_TYPE_FROM_INSTANCE (area)));
+}
+
+void
+gtk_cell_area_render (GtkCellArea *area,
+ cairo_t *cr,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area)
+{
+
+}
+
+
+/* Geometry */
+GtkSizeRequestMode
+gtk_cell_area_get_request_mode (GtkCellArea *area)
+{
+
+}
+
+void
+gtk_cell_area_get_preferred_width (GtkCellArea *area,
+ GtkWidget *widget,
+ gint *minimum_size,
+ gint *natural_size)
+{
+
+
+}
+
+void
+gtk_cell_area_get_preferred_height_for_width (GtkCellArea *area,
+ GtkWidget *widget,
+ gint width,
+ gint *minimum_height,
+ gint *natural_height)
+{
+
+}
+
+void
+gtk_cell_area_get_preferred_height (GtkCellArea *area,
+ GtkWidget *widget,
+ gint *minimum_size,
+ gint *natural_size)
+{
+
+
+}
+
+void
+gtk_cell_area_get_preferred_width_for_height (GtkCellArea *area,
+ GtkWidget *widget,
+ gint height,
+ gint *minimum_width,
+ gint *natural_width)
+{
+
+}
+
+void
+gtk_cell_area_get_preferred_size (GtkCellArea *area,
+ GtkWidget *widget,
+ GtkRequisition *minimum_size,
+ GtkRequisition *natural_size)
+{
+
+}