M
Mike Manilone
Hi there,
I often write app with GObject.
Well, of course, GObject is hard to use.
So I thought about making a set of macros to make this job easier.
Just like this (assume the class is 'GtkButton'):
#define NAME GTK
#define SPACE BUTTON
#define Type GtkButton
#define name_space gtk_button
static void
name_space ## _init (Type *self)
{
/* do something */
}
Well, GObject always needs some macros to do something usual. So can I
write these macros like this?
#define NAME##_IS_##SPACE ...
#define NAME##_IS_##SPACE##CLASS ...
Maybe I need a try. But my laptop is broken these days.
So, could someone please tell me what happens?
Best Regards,
Mike Manilone
I often write app with GObject.
Well, of course, GObject is hard to use.
So I thought about making a set of macros to make this job easier.
Just like this (assume the class is 'GtkButton'):
#define NAME GTK
#define SPACE BUTTON
#define Type GtkButton
#define name_space gtk_button
static void
name_space ## _init (Type *self)
{
/* do something */
}
Well, GObject always needs some macros to do something usual. So can I
write these macros like this?
#define NAME##_IS_##SPACE ...
#define NAME##_IS_##SPACE##CLASS ...
Maybe I need a try. But my laptop is broken these days.
So, could someone please tell me what happens?
Best Regards,
Mike Manilone