Commit c020b3b4 authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

Rename some stuff:

2001-01-04  Havoc Pennington  <hp@redhat.com>

        Rename some stuff:

	s/gtk_tree_view_column_set_size/gtk_tree_view_column_set_width/g;

	s/GtkModelSimple/GtkTreeModelSimple/g;
	s/GTK_MODEL_SIMPLE/GTK_TREE_MODEL_SIMPLE/g;
	s/gtk_model_simple/gtk_tree_model_simple/g;
	s/gtkmodelsimple/gtktreemodelsimple/g;

	s/gtk_tree_view_column_set_header_active/gtk_tree_view_column_set_header_clickable/g;

	s/GtkTreeViewColumnType/GtkTreeViewColumnSizing/g;
	s/column_set_col_type/column_set_sizing/g;

	s/GtkTreeSelectionType/GtkTreeSelectionMode/g;
	s/gtk_tree_selection_set_type/gtk_tree_selection_set_mode/g;

	s/GtkCellRendererType/GtkCellRendererState/g;

	* gtk/gtkcellrenderertoggle.c: remove _ macro, include gtkintl.h
	(gtk_cell_renderer_toggle_class_init): change "state" property to
	"active", to match GtkToggleButton
	(gtk_cell_renderer_toggle_get_active): new function, bug
	40269
	(gtk_cell_renderer_toggle_set_active): new function
	(gtk_cell_renderer_toggle_set_property): route changes to toggle
	state through gtk_cell_renderer_set_active
parent ef069fa0
2001-01-04 Havoc Pennington <hp@redhat.com>
Rename some stuff:
s/gtk_tree_view_column_set_size/gtk_tree_view_column_set_width/g;
s/GtkModelSimple/GtkTreeModelSimple/g;
s/GTK_MODEL_SIMPLE/GTK_TREE_MODEL_SIMPLE/g;
s/gtk_model_simple/gtk_tree_model_simple/g;
s/gtkmodelsimple/gtktreemodelsimple/g;
s/gtk_tree_view_column_set_header_active/gtk_tree_view_column_set_header_clickable/g;
s/GtkTreeViewColumnType/GtkTreeViewColumnSizing/g;
s/column_set_col_type/column_set_sizing/g;
s/GtkTreeSelectionType/GtkTreeSelectionMode/g;
s/gtk_tree_selection_set_type/gtk_tree_selection_set_mode/g;
s/GtkCellRendererType/GtkCellRendererState/g;
* gtk/gtkcellrenderertoggle.c: remove _ macro, include gtkintl.h
(gtk_cell_renderer_toggle_class_init): change "state" property to
"active", to match GtkToggleButton
(gtk_cell_renderer_toggle_get_active): new function, bug
40269
(gtk_cell_renderer_toggle_set_active): new function
(gtk_cell_renderer_toggle_set_property): route changes to toggle
state through gtk_cell_renderer_set_active
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
......
2001-01-04 Havoc Pennington <hp@redhat.com>
Rename some stuff:
s/gtk_tree_view_column_set_size/gtk_tree_view_column_set_width/g;
s/GtkModelSimple/GtkTreeModelSimple/g;
s/GTK_MODEL_SIMPLE/GTK_TREE_MODEL_SIMPLE/g;
s/gtk_model_simple/gtk_tree_model_simple/g;
s/gtkmodelsimple/gtktreemodelsimple/g;
s/gtk_tree_view_column_set_header_active/gtk_tree_view_column_set_header_clickable/g;
s/GtkTreeViewColumnType/GtkTreeViewColumnSizing/g;
s/column_set_col_type/column_set_sizing/g;
s/GtkTreeSelectionType/GtkTreeSelectionMode/g;
s/gtk_tree_selection_set_type/gtk_tree_selection_set_mode/g;
s/GtkCellRendererType/GtkCellRendererState/g;
* gtk/gtkcellrenderertoggle.c: remove _ macro, include gtkintl.h
(gtk_cell_renderer_toggle_class_init): change "state" property to
"active", to match GtkToggleButton
(gtk_cell_renderer_toggle_get_active): new function, bug
40269
(gtk_cell_renderer_toggle_set_active): new function
(gtk_cell_renderer_toggle_set_property): route changes to toggle
state through gtk_cell_renderer_set_active
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
......
2001-01-04 Havoc Pennington <hp@redhat.com>
Rename some stuff:
s/gtk_tree_view_column_set_size/gtk_tree_view_column_set_width/g;
s/GtkModelSimple/GtkTreeModelSimple/g;
s/GTK_MODEL_SIMPLE/GTK_TREE_MODEL_SIMPLE/g;
s/gtk_model_simple/gtk_tree_model_simple/g;
s/gtkmodelsimple/gtktreemodelsimple/g;
s/gtk_tree_view_column_set_header_active/gtk_tree_view_column_set_header_clickable/g;
s/GtkTreeViewColumnType/GtkTreeViewColumnSizing/g;
s/column_set_col_type/column_set_sizing/g;
s/GtkTreeSelectionType/GtkTreeSelectionMode/g;
s/gtk_tree_selection_set_type/gtk_tree_selection_set_mode/g;
s/GtkCellRendererType/GtkCellRendererState/g;
* gtk/gtkcellrenderertoggle.c: remove _ macro, include gtkintl.h
(gtk_cell_renderer_toggle_class_init): change "state" property to
"active", to match GtkToggleButton
(gtk_cell_renderer_toggle_get_active): new function, bug
40269
(gtk_cell_renderer_toggle_set_active): new function
(gtk_cell_renderer_toggle_set_property): route changes to toggle
state through gtk_cell_renderer_set_active
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
......
2001-01-04 Havoc Pennington <hp@redhat.com>
Rename some stuff:
s/gtk_tree_view_column_set_size/gtk_tree_view_column_set_width/g;
s/GtkModelSimple/GtkTreeModelSimple/g;
s/GTK_MODEL_SIMPLE/GTK_TREE_MODEL_SIMPLE/g;
s/gtk_model_simple/gtk_tree_model_simple/g;
s/gtkmodelsimple/gtktreemodelsimple/g;
s/gtk_tree_view_column_set_header_active/gtk_tree_view_column_set_header_clickable/g;
s/GtkTreeViewColumnType/GtkTreeViewColumnSizing/g;
s/column_set_col_type/column_set_sizing/g;
s/GtkTreeSelectionType/GtkTreeSelectionMode/g;
s/gtk_tree_selection_set_type/gtk_tree_selection_set_mode/g;
s/GtkCellRendererType/GtkCellRendererState/g;
* gtk/gtkcellrenderertoggle.c: remove _ macro, include gtkintl.h
(gtk_cell_renderer_toggle_class_init): change "state" property to
"active", to match GtkToggleButton
(gtk_cell_renderer_toggle_get_active): new function, bug
40269
(gtk_cell_renderer_toggle_set_active): new function
(gtk_cell_renderer_toggle_set_property): route changes to toggle
state through gtk_cell_renderer_set_active
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
......
2001-01-04 Havoc Pennington <hp@redhat.com>
Rename some stuff:
s/gtk_tree_view_column_set_size/gtk_tree_view_column_set_width/g;
s/GtkModelSimple/GtkTreeModelSimple/g;
s/GTK_MODEL_SIMPLE/GTK_TREE_MODEL_SIMPLE/g;
s/gtk_model_simple/gtk_tree_model_simple/g;
s/gtkmodelsimple/gtktreemodelsimple/g;
s/gtk_tree_view_column_set_header_active/gtk_tree_view_column_set_header_clickable/g;
s/GtkTreeViewColumnType/GtkTreeViewColumnSizing/g;
s/column_set_col_type/column_set_sizing/g;
s/GtkTreeSelectionType/GtkTreeSelectionMode/g;
s/gtk_tree_selection_set_type/gtk_tree_selection_set_mode/g;
s/GtkCellRendererType/GtkCellRendererState/g;
* gtk/gtkcellrenderertoggle.c: remove _ macro, include gtkintl.h
(gtk_cell_renderer_toggle_class_init): change "state" property to
"active", to match GtkToggleButton
(gtk_cell_renderer_toggle_get_active): new function, bug
40269
(gtk_cell_renderer_toggle_set_active): new function
(gtk_cell_renderer_toggle_set_property): route changes to toggle
state through gtk_cell_renderer_set_active
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
......
2001-01-04 Havoc Pennington <hp@redhat.com>
Rename some stuff:
s/gtk_tree_view_column_set_size/gtk_tree_view_column_set_width/g;
s/GtkModelSimple/GtkTreeModelSimple/g;
s/GTK_MODEL_SIMPLE/GTK_TREE_MODEL_SIMPLE/g;
s/gtk_model_simple/gtk_tree_model_simple/g;
s/gtkmodelsimple/gtktreemodelsimple/g;
s/gtk_tree_view_column_set_header_active/gtk_tree_view_column_set_header_clickable/g;
s/GtkTreeViewColumnType/GtkTreeViewColumnSizing/g;
s/column_set_col_type/column_set_sizing/g;
s/GtkTreeSelectionType/GtkTreeSelectionMode/g;
s/gtk_tree_selection_set_type/gtk_tree_selection_set_mode/g;
s/GtkCellRendererType/GtkCellRendererState/g;
* gtk/gtkcellrenderertoggle.c: remove _ macro, include gtkintl.h
(gtk_cell_renderer_toggle_class_init): change "state" property to
"active", to match GtkToggleButton
(gtk_cell_renderer_toggle_get_active): new function, bug
40269
(gtk_cell_renderer_toggle_set_active): new function
(gtk_cell_renderer_toggle_set_property): route changes to toggle
state through gtk_cell_renderer_set_active
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
......
2001-01-04 Havoc Pennington <hp@redhat.com>
Rename some stuff:
s/gtk_tree_view_column_set_size/gtk_tree_view_column_set_width/g;
s/GtkModelSimple/GtkTreeModelSimple/g;
s/GTK_MODEL_SIMPLE/GTK_TREE_MODEL_SIMPLE/g;
s/gtk_model_simple/gtk_tree_model_simple/g;
s/gtkmodelsimple/gtktreemodelsimple/g;
s/gtk_tree_view_column_set_header_active/gtk_tree_view_column_set_header_clickable/g;
s/GtkTreeViewColumnType/GtkTreeViewColumnSizing/g;
s/column_set_col_type/column_set_sizing/g;
s/GtkTreeSelectionType/GtkTreeSelectionMode/g;
s/gtk_tree_selection_set_type/gtk_tree_selection_set_mode/g;
s/GtkCellRendererType/GtkCellRendererState/g;
* gtk/gtkcellrenderertoggle.c: remove _ macro, include gtkintl.h
(gtk_cell_renderer_toggle_class_init): change "state" property to
"active", to match GtkToggleButton
(gtk_cell_renderer_toggle_get_active): new function, bug
40269
(gtk_cell_renderer_toggle_set_active): new function
(gtk_cell_renderer_toggle_set_property): route changes to toggle
state through gtk_cell_renderer_set_active
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
......
......@@ -125,7 +125,6 @@ gtk_public_h_sources = @STRIP_BEGIN@ \
gtkmenushell.h \
gtkmessagedialog.h \
gtkmisc.h \
gtkmodelsimple.h \
gtknotebook.h \
gtkoldeditable.h \
gtkobject.h \
......@@ -174,6 +173,7 @@ gtk_public_h_sources = @STRIP_BEGIN@ \
gtktree.h \
gtktreeitem.h \
gtktreemodel.h \
gtktreemodelsimple.h \
gtktreemodelsort.h \
gtktreeselection.h \
gtktreestore.h \
......@@ -282,7 +282,6 @@ gtk_c_sources = @STRIP_BEGIN@ \
gtkmenushell.c \
gtkmessagedialog.c \
gtkmisc.c \
gtkmodelsimple.c \
gtknotebook.c \
gtkobject.c \
gtkoldeditable.c \
......@@ -337,6 +336,7 @@ gtk_c_sources = @STRIP_BEGIN@ \
gtktreeitem.c \
gtktreedatalist.c \
gtktreemodel.c \
gtktreemodelsimple.c \
gtktreemodelsort.c \
gtktreeselection.c \
gtktreestore.c \
......
......@@ -101,7 +101,6 @@
#include <gtk/gtkmenushell.h>
#include <gtk/gtkmessagedialog.h>
#include <gtk/gtkmisc.h>
#include <gtk/gtkmodelsimple.h>
#include <gtk/gtknotebook.h>
#include <gtk/gtkobject.h>
#include <gtk/gtkoldeditable.h>
......@@ -141,6 +140,7 @@
#include <gtk/gtktree.h>
#include <gtk/gtktreeitem.h>
#include <gtk/gtktreemodel.h>
#include <gtk/gtktreemodelsimple.h>
#include <gtk/gtktreemodelsort.h>
#include <gtk/gtktreeselection.h>
#include <gtk/gtktreestore.h>
......
......@@ -30,10 +30,10 @@ extern "C" {
typedef enum
{
GTK_CELL_RENDERER_SELECTED = 1 << 0,
GTK_CELL_RENDERER_PRELIT = 1 << 1,
GTK_CELL_RENDERER_SELECTED = 1 << 0,
GTK_CELL_RENDERER_PRELIT = 1 << 1,
GTK_CELL_RENDERER_INSENSITIVE = 1 << 2
} GtkCellRendererType;
} GtkCellRendererState;
#define GTK_TYPE_CELL_RENDERER (gtk_cell_renderer_get_type ())
#define GTK_CELL_RENDERER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRenderer))
......
......@@ -20,11 +20,7 @@
#include <stdlib.h>
#include <gtk/gtkcellrenderertoggle.h>
#include <gtk/gtksignal.h>
#ifndef _
#define _(x) x
#endif
#include "gtkintl.h"
static void gtk_cell_renderer_toggle_get_property (GObject *object,
guint param_id,
......@@ -65,7 +61,7 @@ enum {
enum {
PROP_ZERO,
PROP_STATE,
PROP_ACTIVE,
PROP_RADIO
};
......@@ -104,7 +100,7 @@ gtk_cell_renderer_toggle_get_type (void)
static void
gtk_cell_renderer_toggle_init (GtkCellRendererToggle *celltoggle)
{
celltoggle->state = FALSE;
celltoggle->active = FALSE;
celltoggle->radio = FALSE;
GTK_CELL_RENDERER (celltoggle)->xpad = 2;
GTK_CELL_RENDERER (celltoggle)->ypad = 2;
......@@ -124,10 +120,10 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
cell_class->event = gtk_cell_renderer_toggle_event;
g_object_class_install_property (object_class,
PROP_STATE,
g_param_spec_boolean ("state",
PROP_ACTIVE,
g_param_spec_boolean ("active",
_("Toggle state"),
_("The toggle-state of the button."),
_("The toggle state of the button"),
FALSE,
G_PARAM_READABLE |
G_PARAM_WRITABLE));
......@@ -136,7 +132,7 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
PROP_RADIO,
g_param_spec_boolean ("radio",
_("Radio state"),
_("Draw the toggle button as a radio button."),
_("Draw the toggle button as a radio button"),
FALSE,
G_PARAM_READABLE |
G_PARAM_WRITABLE));
......@@ -163,8 +159,8 @@ gtk_cell_renderer_toggle_get_property (GObject *object,
switch (param_id)
{
case PROP_STATE:
g_value_set_boolean (value, celltoggle->state);
case PROP_ACTIVE:
g_value_set_boolean (value, celltoggle->active);
break;
case PROP_RADIO:
g_value_set_boolean (value, celltoggle->radio);
......@@ -187,8 +183,8 @@ gtk_cell_renderer_toggle_set_property (GObject *object,
switch (param_id)
{
case PROP_STATE:
celltoggle->state = g_value_get_boolean (value);
case PROP_ACTIVE:
gtk_cell_renderer_toggle_set_active (celltoggle, g_value_get_boolean (value));
break;
case PROP_RADIO:
celltoggle->radio = g_value_get_boolean (value);
......@@ -252,7 +248,7 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
cell_area->x + real_xoffset,
cell_area->y + real_yoffset,
width, height);
if (celltoggle->state)
if (celltoggle->active)
{
gdk_draw_line (window,
widget->style->black_gc,
......@@ -278,7 +274,7 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
width,
height,
0, 360*64);
if (celltoggle->state)
if (celltoggle->active)
{
gdk_draw_arc (window,
widget->style->black_gc,
......@@ -317,3 +313,26 @@ gtk_cell_renderer_toggle_set_radio (GtkCellRendererToggle *toggle,
toggle->radio = radio;
}
gboolean
gtk_cell_renderer_toggle_get_active (GtkCellRendererToggle *toggle)
{
g_return_val_if_fail (GTK_IS_CELL_RENDERER_TOGGLE (toggle), FALSE);
return toggle->active;
}
void
gtk_cell_renderer_toggle_set_active (GtkCellRendererToggle *toggle,
gboolean setting)
{
g_return_if_fail (GTK_IS_CELL_RENDERER_TOGGLE (toggle));
setting = !! setting;
if (toggle->active != setting)
{
toggle->active = setting;
g_object_notify (G_OBJECT (toggle), "active");
}
}
......@@ -41,7 +41,7 @@ struct _GtkCellRendererToggle
GtkCellRenderer parent;
/*< private >*/
guint state : 1;
guint active : 1;
guint radio : 1;
};
......@@ -59,6 +59,9 @@ GtkCellRenderer *gtk_cell_renderer_toggle_new (void);
void gtk_cell_renderer_toggle_set_radio (GtkCellRendererToggle *toggle,
gboolean radio);
gboolean gtk_cell_renderer_toggle_get_active (GtkCellRendererToggle *toggle);
void gtk_cell_renderer_toggle_set_active (GtkCellRendererToggle *toggle,
gboolean setting);
#ifdef __cplusplus
}
......
/* gtkmodelsimple.c
/* gtktreemodelsimple.c
* Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
*
* This library is free software; you can redistribute it and/or
......@@ -17,7 +17,7 @@
* Boston, MA 02111-1307, USA.
*/
#include "gtkmodelsimple.h"
#include "gtktreemodelsimple.h"
#include "gtksignal.h"
enum {
CHANGED,
......@@ -41,9 +41,9 @@ enum {
LAST_SIGNAL
};
static void gtk_model_simple_init (GtkModelSimple *model_simple);
static void gtk_model_simple_class_init (GtkModelSimpleClass *class);
static void gtk_model_simple_tree_model_init (GtkTreeModelIface *iface);
static void gtk_tree_model_simple_init (GtkTreeModelSimple *model_simple);
static void gtk_tree_model_simple_class_init (GtkTreeModelSimpleClass *class);
static void gtk_tree_model_simple_tree_model_init (GtkTreeModelIface *iface);
static gint gtk_real_model_simple_get_n_columns (GtkTreeModel *tree_model);
static GType gtk_real_model_simple_get_column_type (GtkTreeModel *tree_model,
gint index);
......@@ -82,7 +82,7 @@ static guint model_simple_signals[LAST_SIGNAL] = { 0 };
GtkType
gtk_model_simple_get_type (void)
gtk_tree_model_simple_get_type (void)
{
static GtkType model_simple_type = 0;
......@@ -90,25 +90,25 @@ gtk_model_simple_get_type (void)
{
static const GTypeInfo model_simple_info =
{
sizeof (GtkModelSimpleClass),
sizeof (GtkTreeModelSimpleClass),
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_model_simple_class_init,
(GClassInitFunc) gtk_tree_model_simple_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkModelSimple),
sizeof (GtkTreeModelSimple),
0,
(GInstanceInitFunc) gtk_model_simple_init
(GInstanceInitFunc) gtk_tree_model_simple_init
};
static const GInterfaceInfo tree_model_info =
{
(GInterfaceInitFunc) gtk_model_simple_tree_model_init,
(GInterfaceInitFunc) gtk_tree_model_simple_tree_model_init,
NULL,
NULL
};
model_simple_type = g_type_register_static (GTK_TYPE_OBJECT, "GtkModelSimple", &model_simple_info, 0);
model_simple_type = g_type_register_static (GTK_TYPE_OBJECT, "GtkTreeModelSimple", &model_simple_info, 0);
g_type_add_interface_static (model_simple_type,
GTK_TYPE_TREE_MODEL,
&tree_model_info);
......@@ -117,18 +117,18 @@ gtk_model_simple_get_type (void)
return model_simple_type;
}
GtkModelSimple *
gtk_model_simple_new (void)
GtkTreeModelSimple *
gtk_tree_model_simple_new (void)
{
GtkModelSimple *retval;
GtkTreeModelSimple *retval;
retval = GTK_MODEL_SIMPLE (gtk_type_new (GTK_TYPE_MODEL_SIMPLE));
retval = GTK_TREE_MODEL_SIMPLE (gtk_type_new (GTK_TYPE_MODEL_SIMPLE));
return retval;
}
static void
gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_tree_model_simple_class_init (GtkTreeModelSimpleClass *class)
{
GtkObjectClass *object_class;
......@@ -138,7 +138,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("changed",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, changed),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, changed),
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
G_TYPE_POINTER,
......@@ -147,7 +147,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("inserted",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, inserted),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, inserted),
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
G_TYPE_POINTER,
......@@ -156,7 +156,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("child_toggled",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, child_toggled),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, child_toggled),
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
G_TYPE_POINTER,
......@@ -165,7 +165,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("deleted",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, deleted),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, deleted),
gtk_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
......@@ -174,14 +174,14 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("get_n_columns",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_n_columns),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, get_n_columns),
gtk_marshal_INT__VOID,
G_TYPE_INT, 0);
model_simple_signals[GET_COLUMN_TYPE] =
gtk_signal_new ("get_column_type",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_column_type),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, get_column_type),
gtk_marshal_INT__INT,
G_TYPE_INT, 1,
G_TYPE_INT);
......@@ -189,7 +189,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("get_iter",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_iter),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, get_iter),
gtk_marshal_BOOLEAN__BOXED_BOXED,
G_TYPE_BOOLEAN, 2,
G_TYPE_POINTER,
......@@ -198,7 +198,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("get_path",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_path),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, get_path),
gtk_marshal_BOXED__BOXED,
G_TYPE_POINTER, 1,
G_TYPE_POINTER);
......@@ -206,7 +206,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("get_value",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_value),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, get_value),
gtk_marshal_VOID__BOXED_INT_POINTER,
G_TYPE_NONE, 3,
G_TYPE_POINTER,
......@@ -216,7 +216,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("iter_next",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_next),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, iter_next),
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
G_TYPE_POINTER);
......@@ -224,7 +224,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("iter_children",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_children),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, iter_children),
gtk_marshal_BOOLEAN__BOXED_BOXED,
G_TYPE_BOOLEAN, 2,
G_TYPE_POINTER,
......@@ -233,7 +233,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("iter_has_child",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_has_child),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, iter_has_child),
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
G_TYPE_POINTER);
......@@ -241,7 +241,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("iter_n_children",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_n_children),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, iter_n_children),
gtk_marshal_INT__BOXED,
G_TYPE_INT, 1,
G_TYPE_POINTER);
......@@ -249,7 +249,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("iter_nth_child",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_nth_child),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, iter_nth_child),
gtk_marshal_BOOLEAN__BOXED_BOXED_INT,
GTK_TYPE_BOOL, 3,
G_TYPE_POINTER,
......@@ -259,7 +259,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("iter_parent",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_parent),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, iter_parent),
gtk_marshal_BOOLEAN__BOXED_BOXED,
G_TYPE_BOOLEAN, 2,
G_TYPE_POINTER,
......@@ -268,7 +268,7 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("ref_iter",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, ref_iter),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, ref_iter),
gtk_marshal_NONE__BOXED,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
......@@ -276,14 +276,14 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("unref_iter",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, unref_iter),
GTK_SIGNAL_OFFSET (GtkTreeModelSimpleClass, unref_iter),
gtk_marshal_NONE__BOXED,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
}
static void
gtk_model_simple_tree_model_init (GtkTreeModelIface *iface)
gtk_tree_model_simple_tree_model_init (GtkTreeModelIface *iface)
{
iface->get_n_columns = gtk_real_model_simple_get_n_columns;
iface->get_column_type = gtk_real_model_simple_get_column_type;
......@@ -302,7 +302,7 @@ gtk_model_simple_tree_model_init (GtkTreeModelIface *iface)
static void
gtk_model_simple_init (GtkModelSimple *model_simple)
gtk_tree_model_simple_init (GtkTreeModelSimple *model_simple)
{
model_simple->stamp = 1;
}
......@@ -446,7 +446,7 @@ gtk_real_model_simple_unref_iter (GtkTreeModel *tree_model,
/* Public functions */
void
gtk_model_simple_changed (GtkModelSimple *simple,
gtk_tree_model_simple_changed (GtkTreeModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter)
{
......@@ -458,7 +458,7 @@ gtk_model_simple_changed (GtkModelSimple *simple,
}
void
gtk_model_simple_inserted (GtkModelSimple *simple,
gtk_tree_model_simple_inserted (GtkTreeModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter)
{
......@@ -470,7 +470,7 @@ gtk_model_simple_inserted (GtkModelSimple *simple,
}
void
gtk_model_simple_child_toggled (GtkModelSimple *simple,
gtk_tree_model_simple_child_toggled (GtkTreeModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter)
{
......@@ -482,7 +482,7 @@ gtk_model_simple_child_toggled (GtkModelSimple *simple,
}
void
gtk_model_simple_iter_deleted (GtkModelSimple *simple,
gtk_tree_model_simple_iter_deleted (GtkTreeModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter)
{
......
/* gtkmodelsimple.h
/* gtktreemodelsimple.h
* Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
*
* This library is free software; you can redistribute it and/or
......@@ -17,8 +17,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GTK_MODEL_SIMPLE_H__
#define __GTK_MODEL_SIMPLE_H__
#ifndef __GTK_TREE_MODEL_SIMPLE_H__
#define __GTK_TREE_MODEL_SIMPLE_H__
#include <gtk/gtktreemodel.h>
......@@ -27,23 +27,23 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_MODEL_SIMPLE (gtk_model_simple_get_type ())
#define GTK_MODEL_SIMPLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_MODEL_SIMPLE, GtkModelSimple))
#define GTK_MODEL_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MODEL_SIMPLE, GtkModelSimpleClass))
#define GTK_TYPE_MODEL_SIMPLE (gtk_tree_model_simple_get_type ())
#define GTK_TREE_MODEL_SIMPLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_MODEL_SIMPLE, GtkTreeModelSimple))
#define GTK_TREE_MODEL_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MODEL_SIMPLE, GtkTreeModelSimpleClass))
#define GTK_IS_MODEL_SIMPLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_MODEL_SIMPLE))
#define GTK_IS_MODEL_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GTK_TYPE_MODEL_SIMPLE))
typedef struct _GtkModelSimple GtkModelSimple;
typedef struct _GtkModelSimpleClass GtkModelSimpleClass;
typedef struct _GtkTreeModelSimple GtkTreeModelSimple;
typedef struct _GtkTreeModelSimpleClass GtkTreeModelSimpleClass;
struct _GtkModelSimple
struct _GtkTreeModelSimple
{
GtkObject parent;
gint stamp;
};
struct _GtkModelSimpleClass
struct _GtkTreeModelSimpleClass