Commit 34ea48f9 authored by Naba Kumar's avatar Naba Kumar

Fixed bug #377903 (improve message color defaults).

	* plugins/message-view/anjuta-message-manager-plugin.glade:
	Fixed bug #377903 (improve message color defaults).

	* TODO.tasks: Completed Bounty bug #359862, Improve class wizard.
	
	* plugins/symbol-browser/test-class.h: Fixed block ends.

	* libanjuta/anjuta-plugin.c: Changed a C++-style-//-comment to a
	C-style-block comment.

	* plugins/project-wizard/autogen.c: (Hopefully) temporary hack to
	allow lists when writing autogen definition files. This is required
	for the new class generator. Also fixed a wrong return value in
	npw_autogen_write_definition_file and set a GError in
	npw_autogen_execute when the output file could not be opened.

	* plugins/class-gen/anjuta-class-gen-plugin.glade: New class generator
	user interface.

	* plugins/class-gen/Makefile.am: Added templates subdir, removed
	goc_template_header and goc_template_source, added top_srcdir to
	includes, link against project wizard (also hopefully temporarily),
	removed class_gen.h, class_gen.c, action-callbacks.h,
	action-callbacks.c.

	* libanjuta/anjuta-marshal.list: Added VOID:BOXED marshaller.

	* plugins/class-gen/cell-renderer-flags.h:
	* plugins/class-gen/cell-renderer-flags.c:
	* plugins/class-gen/combo-flags.h:
	* plugins/class-gen/combo-flags.c:
	* plugins/class-gen/element-editor.c:
	* plugins/class-gen/element-editor.h:
	* plugins/class-gen/generator.c:
	* plugins/class-gen/generator.h:
	* plugins/class-gen/plugin.h:
	* plugins/class-gen/plugin.c:
	* plugins/class-gen/transform.c:
	* plugins/class-gen/transform.h:
	* plugins/class-gen/validator.c:
	* plugins/class-gen/validator.h:
	* plugins/class-gen/window.c:
	* plugins/class-gen/window.h: Rewrote class generator, it now allows
	adding of several class elements and uses autogen.

	* plugins/class-gen/templates/cc-header.tpl:
	* plugins/class-gen/templates/cc-source.tpl:
	* plugins/class-gen/templates/go-header.tpl:
	* plugins/class-gen/templates/go-source.tpl:
	* plugins/class-gen/templates/Makefile.am: Added Autogen templates
	for the class generator.

	* configure.in: Added plugins/class-gen/templates/Makefile to output.


svn path=/trunk/; revision=2717
parent 0783a762
2007-01-05 Adam Dingle <adam@medovina.org>
Reviewed by Naba Kumar <naba@gnome.org>:
* plugins/message-view/anjuta-message-manager-plugin.glade:
Fixed bug #377903 (improve message color defaults).
2007-01-05 Naba Kumar <naba@gnome.org>
* TODO.tasks: Completed Bounty bug #359862, Improve class wizard.
2007-01-03 Armin Burgmeier <armin@arbur.net>
Reviewed by Naba Kumar <naba@gnome.org>:
* plugins/symbol-browser/test-class.h: Fixed block ends.
* libanjuta/anjuta-plugin.c: Changed a C++-style-//-comment to a
C-style-block comment.
* plugins/project-wizard/autogen.c: (Hopefully) temporary hack to
allow lists when writing autogen definition files. This is required
for the new class generator. Also fixed a wrong return value in
npw_autogen_write_definition_file and set a GError in
npw_autogen_execute when the output file could not be opened.
* plugins/class-gen/anjuta-class-gen-plugin.glade: New class generator
user interface.
* plugins/class-gen/Makefile.am: Added templates subdir, removed
goc_template_header and goc_template_source, added top_srcdir to
includes, link against project wizard (also hopefully temporarily),
removed class_gen.h, class_gen.c, action-callbacks.h,
action-callbacks.c.
* libanjuta/anjuta-marshal.list: Added VOID:BOXED marshaller.
* plugins/class-gen/cell-renderer-flags.h:
* plugins/class-gen/cell-renderer-flags.c:
* plugins/class-gen/combo-flags.h:
* plugins/class-gen/combo-flags.c:
* plugins/class-gen/element-editor.c:
* plugins/class-gen/element-editor.h:
* plugins/class-gen/generator.c:
* plugins/class-gen/generator.h:
* plugins/class-gen/plugin.h:
* plugins/class-gen/plugin.c:
* plugins/class-gen/transform.c:
* plugins/class-gen/transform.h:
* plugins/class-gen/validator.c:
* plugins/class-gen/validator.h:
* plugins/class-gen/window.c:
* plugins/class-gen/window.h: Rewrote class generator, it now allows
adding of several class elements and uses autogen.
* plugins/class-gen/templates/cc-header.tpl:
* plugins/class-gen/templates/cc-source.tpl:
* plugins/class-gen/templates/go-header.tpl:
* plugins/class-gen/templates/go-source.tpl:
* plugins/class-gen/templates/Makefile.am: Added Autogen templates
for the class generator.
* configure.in: Added plugins/class-gen/templates/Makefile to output.
2007-01-04 Naba Kumar <naba@gnome.org>
Patch from Nick Treleaven:
......
......@@ -585,9 +585,9 @@ Also, the the glade widget editor should be embed in Anjuta (glade-3 already has
</category>
<category title="Pluing: Class wizard" place="20">
<item>
<attribute id="1159534023" priority="1" done="0" start_date="732583" enddate="99999999" notify="0" endtime="-60" last_edited="1160076729"/>
<attribute id="1159534023" priority="1" done="0" start_date="732583" enddate="99999999" notify="0" endtime="-60" last_edited="1167998401"/>
<summary>Improve class wizard</summary>
<comment>[Skill: Medium, Work: 20hrs, Bounty: $200, Status: Assigned, Bug: #359862]
<comment>[Skill: Medium, Work: 20hrs, Bounty: $200, Status: Completed, Bug: #359862]
Fix c++/gobject class generator to allow adding members, methods, signals, properties and other class elements.</comment>
</item>
......
......@@ -1071,6 +1071,7 @@ plugins/Makefile
plugins/sample1/Makefile
plugins/gtodo/Makefile
plugins/class-gen/Makefile
plugins/class-gen/templates/Makefile
plugins/patch/Makefile
plugins/editor/Makefile
plugins/document-manager/Makefile
......
......@@ -33,3 +33,4 @@ VOID:STRING,INT,STRING
VOID:STRING,BOXED
VOID:POINTER
VOID:OBJECT
VOID:BOXED
......@@ -175,7 +175,7 @@ anjuta_plugin_class_init (AnjutaPluginClass *class)
_("Anjuta Shell"),
_("Anjuta shell that will contain the plugin"),
ANJUTA_TYPE_SHELL,
G_PARAM_READWRITE/* | G_PARAM_CONSTRUCT_ONLY*/)); // Construct only does not work with libanjutamm
G_PARAM_READWRITE/* | G_PARAM_CONSTRUCT_ONLY*/)); /* Construct only does not work with libanjutamm */
plugin_signals[ACTIVATED_SIGNAL] =
g_signal_new ("activated",
G_TYPE_FROM_CLASS (object_class),
......
......@@ -3,10 +3,7 @@ clsgen_gladedir = $(anjuta_glade_dir)
clsgen_glade_DATA = anjuta-class-gen-plugin.glade
# Templates
clsgen_appdatadir = "$(datadir)/anjuta/class-templates/"
clsgen_appdata_DATA = \
goc_template_header \
goc_template_source
SUBDIRS = templates
# Plugin Icon file
plugin_in_files = anjuta-class-gen.plugin.in
......@@ -26,25 +23,36 @@ plugindir = $(anjuta_plugin_dir)
plugin_LTLIBRARIES = libanjuta-class-gen.la
INCLUDES = \
-I${top_srcdir} \
$(WARN_CFLAGS) \
$(DEPRECATED_FLAGS) \
$(LIBANJUTA_CFLAGS)
libanjuta_class_gen_la_LIBADD = \
${top_srcdir}/plugins/project-wizard/libanjuta-project-wizard.la \
$(LIBANJUTA_LIBS)
libanjuta_class_gen_la_SOURCES= \
cell-renderer-flags.h \
cell-renderer-flags.c \
combo-flags.h \
combo-flags.c \
element-editor.c \
element-editor.h \
generator.c \
generator.h \
plugin.c \
plugin.h \
class_gen.c \
class_gen.h \
action-callbacks.c \
action-callbacks.h
transform.c \
transform.h \
validator.c \
validator.h \
window.c \
window.h
EXTRA_DIST = \
$(plugin_in_files) \
$(clsgen_pixmaps_DATA) \
$(clsgen_glade_DATA) \
$(clsgen_appdata_DATA) \
$(clsgen_plugin_DATA)
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/* cell-renderer-flags.c
* Copyright (C) 2006 Armin Burgmeier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "cell-renderer-flags.h"
#include "combo-flags.h"
#include <gtk/gtkcombobox.h>
#include <gtk/gtktreemodel.h>
#include <gtk/gtkcelllayout.h>
#include <gtk/gtkcellrenderertext.h>
#include <gtk/gtkcellrenderertoggle.h>
#include <gtk/gtkcellrenderer.h>
typedef struct _CgCellRendererFlagsPrivate CgCellRendererFlagsPrivate;
struct _CgCellRendererFlagsPrivate
{
GtkTreeModel *model;
gint text_column;
gint abbr_column;
GHashTable *edit_status;
guint focus_out_id;
};
#define CG_CELL_RENDERER_FLAGS_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE( \
(o), \
CG_TYPE_CELL_RENDERER_FLAGS, \
CgCellRendererFlagsPrivate \
))
enum {
PROP_0,
PROP_MODEL,
PROP_TEXT_COLUMN,
PROP_ABBR_COLUMN
};
#define CG_CELL_RENDERER_FLAGS_PATH "cg-cell-renderer-flags-path"
static GtkCellRendererTextClass *parent_class = NULL;
static void
cg_cell_renderer_flags_init (CgCellRendererFlags *cell_renderer_flags)
{
CgCellRendererFlagsPrivate *priv;
priv = CG_CELL_RENDERER_FLAGS_PRIVATE (cell_renderer_flags);
priv->model = NULL;
priv->text_column = -1;
priv->abbr_column = -1;
priv->edit_status = NULL;
priv->focus_out_id = 0;
}
static void
cg_cell_renderer_flags_finalize (GObject *object)
{
CgCellRendererFlags *cell_renderer_flags;
CgCellRendererFlagsPrivate *priv;
cell_renderer_flags = CG_CELL_RENDERER_FLAGS (object);
priv = CG_CELL_RENDERER_FLAGS_PRIVATE (cell_renderer_flags);
if (priv->edit_status != NULL)
{
g_hash_table_destroy (priv->edit_status);
priv->edit_status = NULL;
}
if (priv->model != NULL)
{
g_object_unref (G_OBJECT(priv->model));
priv->model = NULL;
}
G_OBJECT_CLASS (parent_class)-> finalize(object);
}
static void
cg_cell_renderer_flags_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
CgCellRendererFlags *renderer;
CgCellRendererFlagsPrivate *priv;
g_return_if_fail (CG_IS_CELL_RENDERER_FLAGS (object));
renderer = CG_CELL_RENDERER_FLAGS (object);
priv = CG_CELL_RENDERER_FLAGS_PRIVATE (renderer);
switch (prop_id)
{
case PROP_MODEL:
if(priv->model != NULL) g_object_unref (G_OBJECT (priv->model));
priv->model = GTK_TREE_MODEL (g_value_dup_object (value));
break;
case PROP_TEXT_COLUMN:
priv->text_column = g_value_get_int (value);
break;
case PROP_ABBR_COLUMN:
priv->abbr_column = g_value_get_int (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
cg_cell_renderer_flags_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
CgCellRendererFlags *renderer;
CgCellRendererFlagsPrivate *priv;
g_return_if_fail (CG_IS_CELL_RENDERER_FLAGS (object));
renderer = CG_CELL_RENDERER_FLAGS (object);
priv = CG_CELL_RENDERER_FLAGS_PRIVATE (renderer);
switch(prop_id)
{
case PROP_MODEL:
g_value_set_object (value, G_OBJECT (priv->model));
break;
case PROP_TEXT_COLUMN:
g_value_set_int (value, priv->text_column);
break;
case PROP_ABBR_COLUMN:
g_value_set_int (value, priv->abbr_column);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
cg_cell_renderer_flags_editing_done (GtkCellEditable *editable,
G_GNUC_UNUSED gpointer data)
{
CgCellRendererFlags *cell_flags;
CgCellRendererFlagsPrivate *priv;
const gchar *path;
GString *str;
gchar *abbr;
GtkTreeIter iter;
gboolean result;
gboolean canceled;
cell_flags = CG_CELL_RENDERER_FLAGS (data);
priv = CG_CELL_RENDERER_FLAGS_PRIVATE (cell_flags);
g_assert (priv->edit_status != NULL);
if (priv->focus_out_id > 0)
{
g_signal_handler_disconnect (G_OBJECT (editable), priv->focus_out_id);
priv->focus_out_id = 0;
}
canceled = cg_combo_flags_editing_canceled (CG_COMBO_FLAGS (editable));
gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER(cell_flags), canceled);
if (canceled == FALSE)
{
str = g_string_sized_new (128);
/* We do not just call g_hash_table_foreach to get the flags
* in the correct order. */
for (result = gtk_tree_model_get_iter_first (priv->model, &iter);
result != FALSE;
result = gtk_tree_model_iter_next (priv->model, &iter))
{
gtk_tree_model_get (priv->model, &iter,
priv->abbr_column, &abbr, -1);
if (g_hash_table_lookup (priv->edit_status, abbr) != NULL)
{
if (str->len > 0) g_string_append_c (str, '|');
g_string_append (str, abbr);
}
g_free (abbr);
}
path = g_object_get_data (G_OBJECT (editable),
CG_CELL_RENDERER_FLAGS_PATH);
g_signal_emit_by_name (G_OBJECT (cell_flags), "edited",
path, str->str);
g_string_free (str, TRUE);
}
g_hash_table_destroy (priv->edit_status);
priv->edit_status = NULL;
}
static void
cg_cell_renderer_flags_selected (CgComboFlags *combo,
GtkTreeIter *iter,
gpointer user_data)
{
CgCellRendererFlags *cell_flags;
CgCellRendererFlagsPrivate *priv;
gchar *name;
gchar *abbr;
cell_flags = CG_CELL_RENDERER_FLAGS (user_data);
priv = CG_CELL_RENDERER_FLAGS_PRIVATE (cell_flags);
gtk_tree_model_get (priv->model, iter, priv->text_column, &name,
priv->abbr_column, &abbr, -1);
g_assert (priv->edit_status != NULL);
if (GPOINTER_TO_INT (g_hash_table_lookup (priv->edit_status, abbr)) == 1)
{
g_hash_table_remove (priv->edit_status, abbr);
g_free (abbr);
}
else
{
g_hash_table_insert (priv->edit_status, abbr, GINT_TO_POINTER (1));
/* Don't free abbr here because we gave ownership to the hash
* table - note that we did not g_strdup it above. */
}
/* This is done to get GTK+ to re-render this row with the changed flag
* status that is set via the cell data func, but GTK+ does not call it
* again because it does not know that the hash table changed. There are
* probably better means to achieve this, but I am not aware of those. */
gtk_list_store_set (GTK_LIST_STORE (priv->model), iter,
priv->text_column, name, -1);
g_free (name);
}
static gboolean
cg_cell_renderer_flags_focus_out_event (GtkWidget *widget,
G_GNUC_UNUSED GdkEvent *event,
gpointer data)
{
cg_cell_renderer_flags_editing_done (GTK_CELL_EDITABLE (widget), data);
return FALSE;
}
static void
cg_cell_renderer_flags_set_data_func (G_GNUC_UNUSED GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data)
{
CgCellRendererFlags *cell_flags;
CgCellRendererFlagsPrivate *priv;
gchar *abbr;
cell_flags = CG_CELL_RENDERER_FLAGS (data);
priv = CG_CELL_RENDERER_FLAGS_PRIVATE (cell_flags);
gtk_tree_model_get (model, iter, priv->abbr_column, &abbr, -1);
if (g_hash_table_lookup (priv->edit_status, abbr) != NULL)
g_object_set (G_OBJECT (cell), "active", TRUE, NULL);
else
g_object_set (G_OBJECT (cell), "active", FALSE, NULL);
g_free (abbr);
}
static GtkCellEditable *
cg_cell_renderer_flags_start_editing (GtkCellRenderer *cell,
G_GNUC_UNUSED GdkEvent *event,
G_GNUC_UNUSED GtkWidget *widget,
const gchar *path,
G_GNUC_UNUSED GdkRectangle
*background_area,
G_GNUC_UNUSED GdkRectangle *cell_area,
G_GNUC_UNUSED GtkCellRendererState flags)
{
CgCellRendererFlags *cell_flags;
CgCellRendererFlagsPrivate *priv;
GtkCellRendererText *cell_text;
const gchar *prev;
const gchar *pos;
GtkWidget *combo;
GtkCellRenderer *cell_combo_set;
GtkCellRenderer *cell_combo_text;
cell_flags = CG_CELL_RENDERER_FLAGS (cell);
priv = CG_CELL_RENDERER_FLAGS_PRIVATE (cell_flags);
cell_text = GTK_CELL_RENDERER_TEXT (cell);
if (cell_text->editable == FALSE) return NULL;
if (priv->model == NULL || priv->text_column < 0 || priv->abbr_column < 0)
return NULL;
cell_combo_set = gtk_cell_renderer_toggle_new ();
cell_combo_text = gtk_cell_renderer_text_new ();
combo = cg_combo_flags_new_with_model (priv->model);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo),
cell_combo_set, FALSE);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo),
cell_combo_text, TRUE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo),
cell_combo_text, "text", priv->text_column);
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
cell_combo_set,
cg_cell_renderer_flags_set_data_func,
cell_flags, NULL);
g_object_set (G_OBJECT (cell_combo_set), "activatable", FALSE, NULL);
/* Create hash table with current status. We could also operate
* directly on a string here, but a hash table is probably more
* efficient. */
g_assert (priv->edit_status == NULL);
priv->edit_status = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify) g_free, NULL);
pos = cell_text->text;
prev = cell_text->text;
while (prev != NULL && *prev != '\0')
{
while (*pos != '|' && *pos != '\0') ++ pos;
g_hash_table_insert (priv->edit_status, g_strndup(prev, pos - prev),
GINT_TO_POINTER(1));
if(*pos != '\0') ++ pos;
prev = pos;
}
g_object_set_data_full (G_OBJECT (combo), CG_CELL_RENDERER_FLAGS_PATH,
g_strdup (path), g_free);
gtk_widget_show (combo);
g_signal_connect (G_OBJECT (combo), "editing_done",
G_CALLBACK (cg_cell_renderer_flags_editing_done),
cell_flags);
g_signal_connect (G_OBJECT (combo), "selected",
G_CALLBACK (cg_cell_renderer_flags_selected),
cell_flags);
priv->focus_out_id =
g_signal_connect (G_OBJECT (combo), "focus_out_event",
G_CALLBACK (cg_cell_renderer_flags_focus_out_event),
cell_flags);
return GTK_CELL_EDITABLE (combo);
}
static void
cg_cell_renderer_flags_class_init (CgCellRendererFlagsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (CgCellRendererFlagsPrivate));
object_class->finalize = cg_cell_renderer_flags_finalize;
object_class->set_property = cg_cell_renderer_flags_set_property;
object_class->get_property = cg_cell_renderer_flags_get_property;
cell_class->start_editing = cg_cell_renderer_flags_start_editing;
g_object_class_install_property (object_class,
PROP_MODEL,
g_param_spec_object ("model",
"Model",
"Model holding the available flags",
GTK_TYPE_TREE_MODEL,
G_PARAM_READWRITE));
g_object_class_install_property (object_class,
PROP_TEXT_COLUMN,
g_param_spec_int ("text-column",
"Text column",
"Column in the model holding the text for a flag",
-1,
G_MAXINT,
-1,
G_PARAM_READWRITE));
g_object_class_install_property (object_class,
PROP_ABBR_COLUMN,
g_param_spec_int ("abbrevation-column",
"Abbrevation column",
"Column in the model holding the abbrevation for a flag",
-1,
G_MAXINT,
-1,
G_PARAM_READWRITE));
}
GType
cg_cell_renderer_flags_get_type (void)
{
static GType our_type = 0;
if(our_type == 0)
{
static const GTypeInfo our_info =
{
sizeof (CgCellRendererFlagsClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) cg_cell_renderer_flags_class_init,
NULL,
NULL,
sizeof (CgCellRendererFlags),
0,
(GInstanceInitFunc) cg_cell_renderer_flags_init,
NULL
};
our_type = g_type_register_static (GTK_TYPE_CELL_RENDERER_TEXT,
"CgCellRendererFlags",
&our_info, 0);
}
return our_type;
}
GtkCellRenderer *
cg_cell_renderer_flags_new (void)
{
GObject *object;
object = g_object_new (CG_TYPE_CELL_RENDERER_FLAGS, NULL);
return GTK_CELL_RENDERER (object);
}
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/* cell-renderer-flags.h
* Copyright (C) 2006 Armin Burgmeier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __CLASSGEN_CELL_RENDERER_FLAGS_H__
#define __CLASSGEN_CELL_RENDERER_FLAGS_H__
#include <gtk/gtkcellrenderertext.h>
#include <glib-object.h>
G_BEGIN_DECLS
#define CG_TYPE_CELL_RENDERER_FLAGS (cg_cell_renderer_flags_get_type ())
#define CG_CELL_RENDERER_FLAGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CG_TYPE_CELL_RENDERER_FLAGS, CgCellRendererFlags))
#define CG_CELL_RENDERER_FLAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CG_TYPE_CELL_RENDERER_FLAGS, CgCellRendererFlagsClass))
#define CG_IS_CELL_RENDERER_FLAGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CG_TYPE_CELL_RENDERER_FLAGS))
#define CG_IS_CELL_RENDERER_FLAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CG_TYPE_CELL_RENDERER_FLAGS))
#define CG_CELL_RENDERER_FLAGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CG_TYPE_CELL_RENDERER_FLAGS, CgCellRendererFlagsClass))
typedef struct _CgCellRendererFlagsClass CgCellRendererFlagsClass;
typedef struct _CgCellRendererFlags CgCellRendererFlags;
struct _CgCellRendererFlagsClass {
GtkCellRendererTextClass parent_class;
};
struct _CgCellRendererFlags {
GtkCellRendererText parent_instance;
};
GType cg_cell_renderer_flags_get_type (void) G_GNUC_CONST;
GtkCellRenderer *cg_cell_renderer_flags_new (void);
G_END_DECLS
#endif /* __CLASSGEN_CELL_RENDERER_FLAGS_H__ */
This diff is collapsed.
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/* combo-flags.h
* Copyright (C) 2006 Armin Burgmeier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __CLASSGEN_COMBO_FLAGS_H__
#define __CLASSGEN_COMBO_FLAGS_H__