/*
* GtkCellRendererMasked widget for GTK+
- * Copyright (C) 2005 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2005-2011 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Boston, MA 02111-1307, USA.
*/
-#include <gtk/gtkprivate.h>
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
#include <gtkmaskedentry.h>
enum
{
- PROP_0,
-
- PROP_MASK
+ PROP_0,
+ PROP_MASK
};
static gpointer parent_class;
GtkWidget *entry;
};
-
-GType
-gtk_cell_renderer_masked_get_type (void)
-{
- static GType cell_masked_type = 0;
-
- if (!cell_masked_type)
- {
- static const GTypeInfo cell_masked_info =
- {
- sizeof (GtkCellRendererMaskedClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) gtk_cell_renderer_masked_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GtkCellRendererMasked),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gtk_cell_renderer_masked_init,
- };
-
- cell_masked_type = g_type_register_static (GTK_TYPE_CELL_RENDERER_TEXT, "GtkCellRendererMasked",
- &cell_masked_info, 0);
- }
-
- return cell_masked_type;
-}
+G_DEFINE_TYPE (GtkCellRendererMasked, gtk_cell_renderer_masked, GTK_TYPE_CELL_RENDERER_TEXT)
static void
gtk_cell_renderer_masked_init (GtkCellRendererMasked *cell)
"Mask",
"Mask",
NULL,
- GTK_PARAM_READWRITE));
+ G_PARAM_READWRITE));
g_type_class_add_private (object_class, sizeof (GtkCellRendererMaskedPrivate));
}
/*
* GtkCellRendererMasked widget for GTK+
- * Copyright (C) 2005 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2005-2011 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#ifndef __GTK_CELL_RENDERER_MASKED_H__
#define __GTK_CELL_RENDERER_MASKED_H__
-#include <gtk/gtkcellrenderertext.h>
+#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GTK_TYPE_CELL_RENDERER_MASKED (gtk_cell_renderer_masked_get_type ())
#define GTK_CELL_RENDERER_MASKED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_RENDERER_MASKED, GtkCellRendererMasked))
-#define GTK_CELL_RENDERER_MASKED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_MASKED, GtkCellRendererMasked))
+#define GTK_CELL_RENDERER_MASKED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_MASKED, GtkCellRendererMaskedClass))
#define GTK_IS_CELL_RENDERER_MASKED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER_MASKED))
#define GTK_IS_CELL_RENDERER_MASKED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_MASKED))
-#define GTK_CELL_RENDERER_MASKED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_MASKED, GtkCellRendererMasked))
+#define GTK_CELL_RENDERER_MASKED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_MASKED, GtkCellRendererMaskedClass))
typedef struct _GtkCellRendererMasked GtkCellRendererMasked;
/*
- * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2011 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
#include <gtk/gtk.h>
#include "gtkmaskedentry.h"
/*
* GtkMaskedEntry widget for GTK+
- * Copyright (C) 2005-2009 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2005-2011 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <ctype.h>
#include <string.h>
-#include <glib/gprintf.h>
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkentry.h>
#include "gtkmaskedentry.h"
/*
* GtkMaskedEntry widget for GTK+
- * Copyright (C) 2005-2007 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2005-2011 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#ifndef __GTK_MASKED_ENTRY_H__
#define __GTK_MASKED_ENTRY_H__
-#include <gdk/gdk.h>
-#include <gtk/gtkentry.h>
+#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GTK_TYPE_MASKED_ENTRY (gtk_masked_entry_get_type ())
#define GTK_MASKED_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MASKED_ENTRY, GtkMaskedEntry))
-#define GTK_MASKED_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MASKED_ENTRY, GtkMaskedEntry))
+#define GTK_MASKED_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MASKED_ENTRY, GtkMaskedEntryClass))
#define GTK_IS_MASKED_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MASKED_ENTRY))
#define GTK_IS_MASKED_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MASKED_ENTRY))
-#define GTK_MASKED_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MASKED_ENTRY, GtkMaskedEntry))
+#define GTK_MASKED_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MASKED_ENTRY, GtkMaskedEntryClass))
typedef struct _GtkMaskedEntry GtkMaskedEntry;