mirror of https://github.com/GNOME/gimp.git
modules/gimpinputdevicestore.h modules/gimpinputdevicestore-hal.c use
2008-01-11 Michael Natterer <mitch@gimp.org> * modules/gimpinputdevicestore.h * modules/gimpinputdevicestore-hal.c * modules/gimpinputdevicestore-dx.c: use G_DEFINE_DYNAMIC_TYPE(). * modules/controller_dx_dinput.c * modules/controller_linux_input.c: changed accordingly. svn path=/trunk/; revision=24603
This commit is contained in:
parent
9639688e38
commit
e1202941d5
|
@ -1,3 +1,12 @@
|
|||
2008-01-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* modules/gimpinputdevicestore.h
|
||||
* modules/gimpinputdevicestore-hal.c
|
||||
* modules/gimpinputdevicestore-dx.c: use G_DEFINE_DYNAMIC_TYPE().
|
||||
|
||||
* modules/controller_dx_dinput.c
|
||||
* modules/controller_linux_input.c: changed accordingly.
|
||||
|
||||
2008-01-10 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* plug-ins/pygimp/pygimp-pdb.c (pdb_getattro): Handle __members__
|
||||
|
|
|
@ -174,7 +174,7 @@ gimp_module_query (GTypeModule *module)
|
|||
G_MODULE_EXPORT gboolean
|
||||
gimp_module_register (GTypeModule *module)
|
||||
{
|
||||
gimp_input_device_store_get_type (module);
|
||||
gimp_input_device_store_register_types (module);
|
||||
controller_dx_dinput_register_type (module);
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -196,7 +196,7 @@ gimp_module_query (GTypeModule *module)
|
|||
G_MODULE_EXPORT gboolean
|
||||
gimp_module_register (GTypeModule *module)
|
||||
{
|
||||
gimp_input_device_store_get_type (module);
|
||||
gimp_input_device_store_register_types (module);
|
||||
controller_linux_input_register_type (module);
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -76,62 +76,38 @@ struct _GimpInputDeviceStoreClass
|
|||
{
|
||||
GtkListStoreClass parent_class;
|
||||
|
||||
void (*device_added) (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
void (*device_removed) (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
void (* device_added) (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
void (* device_removed) (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
};
|
||||
|
||||
|
||||
static void gimp_input_device_store_class_init (GimpInputDeviceStoreClass *klass);
|
||||
static void gimp_input_device_store_init (GimpInputDeviceStore *store);
|
||||
static void gimp_input_device_store_finalize (GObject *object);
|
||||
static gboolean gimp_input_device_store_add (GimpInputDeviceStore *store,
|
||||
const GUID *guid);
|
||||
static gboolean gimp_input_device_store_remove (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
static void gimp_input_device_store_finalize (GObject *object);
|
||||
|
||||
static gboolean gimp_input_device_store_add (GimpInputDeviceStore *store,
|
||||
const GUID *guid);
|
||||
static gboolean gimp_input_device_store_remove (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
|
||||
|
||||
GType gimp_input_device_store_type = 0;
|
||||
static GtkListStoreClass *parent_class = NULL;
|
||||
static guint store_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_DYNAMIC_TYPE (GimpInputDeviceStore, gimp_input_device_store,
|
||||
GTK_TYPE_LIST_STORE)
|
||||
|
||||
static guint store_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
||||
GType
|
||||
gimp_input_device_store_get_type (GTypeModule *module)
|
||||
void
|
||||
gimp_input_device_store_register_types (GTypeModule *module)
|
||||
{
|
||||
if (! gimp_input_device_store_type)
|
||||
{
|
||||
const GTypeInfo info =
|
||||
{
|
||||
sizeof (GimpInputDeviceStoreClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_input_device_store_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpInputDeviceStore),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_input_device_store_init
|
||||
};
|
||||
|
||||
gimp_input_device_store_type =
|
||||
g_type_module_register_type (module, GTK_TYPE_LIST_STORE,
|
||||
"GimpInputDeviceStore",
|
||||
&info, 0);
|
||||
}
|
||||
|
||||
return gimp_input_device_store_type;
|
||||
gimp_input_device_store_register_type (module);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gimp_input_device_store_class_init (GimpInputDeviceStoreClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
store_signals[DEVICE_ADDED] =
|
||||
g_signal_new ("device-added",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -156,6 +132,11 @@ gimp_input_device_store_class_init (GimpInputDeviceStoreClass *klass)
|
|||
klass->device_removed = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_input_device_store_class_finalize (GimpInputDeviceStoreClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static GdkFilterReturn
|
||||
aux_window_filter (GdkXEvent *xevent,
|
||||
GdkEvent *event,
|
||||
|
@ -283,7 +264,7 @@ gimp_input_device_store_finalize (GObject *object)
|
|||
store->error = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (gimp_input_device_store_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -71,16 +71,15 @@ struct _GimpInputDeviceStoreClass
|
|||
{
|
||||
GtkListStoreClass parent_class;
|
||||
|
||||
void (*device_added) (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
void (*device_removed) (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
void (* device_added) (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
void (* device_removed) (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
};
|
||||
|
||||
|
||||
static void gimp_input_device_store_class_init (GimpInputDeviceStoreClass *klass);
|
||||
static void gimp_input_device_store_init (GimpInputDeviceStore *store);
|
||||
static void gimp_input_device_store_finalize (GObject *object);
|
||||
|
||||
static gboolean gimp_input_device_store_add (GimpInputDeviceStore *store,
|
||||
const gchar *udi);
|
||||
static gboolean gimp_input_device_store_remove (GimpInputDeviceStore *store,
|
||||
|
@ -92,46 +91,23 @@ static void gimp_input_device_store_device_removed (LibHalContext *ctx,
|
|||
const char *udi);
|
||||
|
||||
|
||||
GType gimp_input_device_store_type = 0;
|
||||
static GtkListStoreClass *parent_class = NULL;
|
||||
static guint store_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_DYNAMIC_TYPE (GimpInputDeviceStore, gimp_input_device_store,
|
||||
GTK_TYPE_LIST_STORE)
|
||||
|
||||
static guint store_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
||||
GType
|
||||
gimp_input_device_store_get_type (GTypeModule *module)
|
||||
void
|
||||
gimp_input_device_store_register_types (GTypeModule *module)
|
||||
{
|
||||
if (! gimp_input_device_store_type)
|
||||
{
|
||||
const GTypeInfo info =
|
||||
{
|
||||
sizeof (GimpInputDeviceStoreClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_input_device_store_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpInputDeviceStore),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_input_device_store_init
|
||||
};
|
||||
|
||||
gimp_input_device_store_type =
|
||||
g_type_module_register_type (module, GTK_TYPE_LIST_STORE,
|
||||
"GimpInputDeviceStore",
|
||||
&info, 0);
|
||||
}
|
||||
|
||||
return gimp_input_device_store_type;
|
||||
gimp_input_device_store_register_type (module);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gimp_input_device_store_class_init (GimpInputDeviceStoreClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
store_signals[DEVICE_ADDED] =
|
||||
g_signal_new ("device-added",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -156,6 +132,11 @@ gimp_input_device_store_class_init (GimpInputDeviceStoreClass *klass)
|
|||
klass->device_removed = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_input_device_store_class_finalize (GimpInputDeviceStoreClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_input_device_store_init (GimpInputDeviceStore *store)
|
||||
{
|
||||
|
@ -234,7 +215,7 @@ gimp_input_device_store_finalize (GObject *object)
|
|||
store->error = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (gimp_input_device_store_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -443,10 +424,13 @@ gimp_input_device_store_get_error (GimpInputDeviceStore *store)
|
|||
|
||||
#else /* HAVE_LIBHAL */
|
||||
|
||||
GType gimp_input_device_store_type = G_TYPE_NONE;
|
||||
void
|
||||
gimp_input_device_store_register_types (GTypeModule *module)
|
||||
{
|
||||
}
|
||||
|
||||
GType
|
||||
gimp_input_device_store_get_type (GTypeModule *module)
|
||||
gimp_input_device_store_get_type (void)
|
||||
{
|
||||
return G_TYPE_NONE;
|
||||
}
|
||||
|
@ -470,5 +454,4 @@ gimp_input_device_store_get_error (GimpInputDeviceStore *store)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#endif /* HAVE_LIBHAL */
|
||||
|
|
|
@ -23,17 +23,16 @@
|
|||
#define __GIMP_INPUT_DEVICE_STORE_H__
|
||||
|
||||
|
||||
#define GIMP_TYPE_INPUT_DEVICE_STORE (gimp_input_device_store_type)
|
||||
#define GIMP_TYPE_INPUT_DEVICE_STORE (gimp_input_device_store_get_type ())
|
||||
#define GIMP_INPUT_DEVICE_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_INPUT_DEVICE_STORE, GimpInputDeviceStore))
|
||||
#define GIMP_IS_INPUT_DEVICE_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_INPUT_DEVICE_STORE))
|
||||
|
||||
typedef struct _GimpInputDeviceStore GimpInputDeviceStore;
|
||||
|
||||
|
||||
extern GType gimp_input_device_store_type;
|
||||
|
||||
GType gimp_input_device_store_get_type (GTypeModule *module);
|
||||
void gimp_input_device_store_register_types (GTypeModule *module);
|
||||
|
||||
GType gimp_input_device_store_get_type (void);
|
||||
|
||||
GimpInputDeviceStore * gimp_input_device_store_new (void);
|
||||
gchar * gimp_input_device_store_get_device_file (GimpInputDeviceStore *store,
|
||||
|
|
Loading…
Reference in New Issue