summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2008-12-04 08:47:03 +0000
committerjoncruz <joncruz@users.sourceforge.net>2008-12-04 08:47:03 +0000
commit0f95656dac0612d4211508e3c975d50db3b4fecc (patch)
tree02e0e548d3195a7e5fbe7bdc74120ce0bea6ba81 /src
parentWhitespace cleanup. (diff)
downloadinkscape-0f95656dac0612d4211508e3c975d50db3b4fecc.tar.gz
inkscape-0f95656dac0612d4211508e3c975d50db3b4fecc.zip
Warning/type cleanup.
(bzr r6941)
Diffstat (limited to 'src')
-rw-r--r--src/widgets/sp-color-preview.cpp40
-rw-r--r--src/widgets/sp-color-preview.h22
2 files changed, 45 insertions, 17 deletions
diff --git a/src/widgets/sp-color-preview.cpp b/src/widgets/sp-color-preview.cpp
index 183877d13..ddeb5d123 100644
--- a/src/widgets/sp-color-preview.cpp
+++ b/src/widgets/sp-color-preview.cpp
@@ -28,20 +28,27 @@ static void sp_color_preview_paint (SPColorPreview *cp, GdkRectangle *area);
static GtkWidgetClass *parent_class;
-GtkType
-sp_color_preview_get_type (void)
+GType sp_color_preview_get_type(void)
{
- static GtkType type = 0;
+ static GType type = 0;
if (!type) {
- GtkTypeInfo info = {
- "SPColorPreview",
- sizeof (SPColorPreview),
- sizeof (SPColorPreviewClass),
- (GtkClassInitFunc) sp_color_preview_class_init,
- (GtkObjectInitFunc) sp_color_preview_init,
- NULL, NULL, NULL
+ static const GTypeInfo info = {
+ sizeof(SPColorPreviewClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) sp_color_preview_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof(SPColorPreview),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) sp_color_preview_init,
+ 0, /* value_table */
};
- type = gtk_type_unique (GTK_TYPE_WIDGET, &info);
+
+ type = g_type_register_static( GTK_TYPE_WIDGET,
+ "SPColorPreview",
+ &info,
+ static_cast< GTypeFlags > (0) );
}
return type;
}
@@ -191,3 +198,14 @@ sp_color_preview_paint (SPColorPreview *cp, GdkRectangle *area)
cp->rgba | 0xff);
}
}
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/widgets/sp-color-preview.h b/src/widgets/sp-color-preview.h
index 84f5456bb..873e59d80 100644
--- a/src/widgets/sp-color-preview.h
+++ b/src/widgets/sp-color-preview.h
@@ -26,20 +26,30 @@
#define SP_IS_COLOR_PREVIEW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_COLOR_PREVIEW))
struct SPColorPreview {
- GtkWidget widget;
+ GtkWidget widget;
- guint32 rgba;
+ guint32 rgba;
};
struct SPColorPreviewClass {
- GtkWidgetClass parent_class;
+ GtkWidgetClass parent_class;
};
-GtkType sp_color_preview_get_type (void);
+GType sp_color_preview_get_type(void);
-GtkWidget *sp_color_preview_new (guint32 rgba);
+GtkWidget *sp_color_preview_new(guint32 rgba);
-void sp_color_preview_set_rgba32 (SPColorPreview *cp, guint32 color);
+void sp_color_preview_set_rgba32(SPColorPreview *cp, guint32 color);
#endif // SEEN_COLOR_PREVIEW_H
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :