Permalink
Browse files

Move new RG_DEF_METHOD to rbgutil.h

  • Loading branch information...
1 parent ce0748b commit b51f7287ce9db9572bb0f7ccc1beed597e7f4eab @masaakiaoyagi masaakiaoyagi committed Feb 18, 2012
@@ -11,14 +11,6 @@
# define G_VALUE_INIT { 0, { { 0 } } }
#endif
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
G_BEGIN_DECLS
G_GNUC_INTERNAL void Init_atk_action(VALUE mAtk);
@@ -50,14 +50,6 @@
# define CAIRO_AVAILABLE 0
#endif
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
extern ID id_call;
G_GNUC_INTERNAL void Init_gdk(void);
@@ -23,14 +23,6 @@
#include "rbgdk-pixbuf.h"
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
G_GNUC_INTERNAL void Init_gdk_pixbuf_animation(VALUE mGLib);
G_GNUC_INTERNAL void Init_gdk_pixbuf_animation_iter(VALUE mGLib);
G_GNUC_INTERNAL void Init_gdk_pixbuf_format(VALUE mGLib);
@@ -27,14 +27,6 @@
#include <rbgobject.h>
#include "rbgio2.h"
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
#define CSTR2RVAL_TAINTED(string, length) \
rbgio_cstr_to_rval_tainted((string), (length))
#define CSTR2RVAL_TAINTED_FREE(string, length) \
@@ -25,14 +25,6 @@
#include "rbgobject.h"
#include "glib-enum-types.h"
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
#ifndef HAVE_RB_ERRINFO
# define rb_errinfo() (ruby_errinfo)
#endif
@@ -42,15 +42,15 @@ extern "C" {
#define RG_DEF_MODFUNC_OPERATOR(ope, func, argc) \
rb_define_module_function(RG_TARGET_NAMESPACE, ope, rg_m_operator_ ## func, argc)
#define RG_DEF_SMETHOD(method, argc) \
- rb_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
+ rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
#define RG_DEF_SMETHOD_P(method, argc) \
rb_define_singleton_method(RG_TARGET_NAMESPACE, #method"?", rg_s_ ## method ## _p, argc)
#define RG_DEF_SMETHOD_BANG(method, argc) \
rb_define_singleton_method(RG_TARGET_NAMESPACE, #method"!", rg_s_ ## method ## _bang, argc)
#define RG_DEF_SMETHOD_OPERATOR(ope, func, argc) \
rb_define_singleton_method(RG_TARGET_NAMESPACE, ope, rg_s_operator_ ## func, argc)
#define RG_DEF_METHOD(method, argc) \
- rb_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
+ rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
#define RG_DEF_METHOD_P(method, argc) \
rb_define_method(RG_TARGET_NAMESPACE, #method"?", rg_ ## method ## _p, argc)
#define RG_DEF_METHOD_BANG(method, argc) \
@@ -24,14 +24,6 @@
#include <rbgdk-pixbuf.h>
#include "rbgoocanvas.h"
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
void Init_goocanvas(void); /* Goo::Canvas */
G_GNUC_INTERNAL void Init_goocanvasitem(VALUE mGoo); /* Goo::CanvasItem */
G_GNUC_INTERNAL void Init_goocanvastext(VALUE mGoo); /* Goo::CanvasText */
@@ -24,14 +24,6 @@
#include "rbgst.h"
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
#ifndef G_VALUE_INIT
# define G_VALUE_INIT { 0, { { 0 } } }
#endif
View
@@ -32,6 +32,13 @@
# include <st.h>
#endif
+#undef RG_DEF_METHOD
+#define RG_DEF_METHOD(method, argc) \
+ rb_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
+#undef RG_DEF_SMETHOD
+#define RG_DEF_SMETHOD(method, argc) \
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
+
#ifndef HAVE_RB_ERRINFO
# define rb_errinfo() (ruby_errinfo)
#endif
@@ -54,14 +54,6 @@
# define CAIRO_AVAILABLE 0
#endif
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
extern ID id_relative_callbacks;
extern ID id_call;
@@ -39,4 +39,11 @@
#include "rbgtk.h"
#include "rbgtksourceview2version.h"
+#undef RG_DEF_METHOD
+#define RG_DEF_METHOD(method, argc) \
+ rb_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
+#undef RG_DEF_SMETHOD
+#define RG_DEF_SMETHOD(method, argc) \
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
+
#endif /* __RBGTKSOURCEVIEWMAIN_H_ */
@@ -33,14 +33,6 @@
#include "rbgtksourceview3conversions.h"
#include "rbgtksourceview3version.h"
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
extern void Init_gtksourceview3(void);
G_GNUC_INTERNAL void Init_gtksource_view (VALUE mGtkSource);
@@ -27,14 +27,6 @@
#include "rbvlcconversions.h"
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
G_BEGIN_DECLS
#define ZEROBOOL2RVAL(bool) ((bool == 0) ? Qtrue : Qfalse)
@@ -3,14 +3,6 @@
#include "rbpango.h"
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
#ifndef HAVE_RB_ERRINFO
# define rb_errinfo() (ruby_errinfo)
#endif
@@ -7,14 +7,6 @@
# include <rbgdk.h>
#endif
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
#define RVAL2GDKPIXBUF(o) (GDK_PIXBUF(RVAL2GOBJ(o)))
G_GNUC_INTERNAL void Init_poppler_indexiter(VALUE mPoppler);
View
@@ -51,14 +51,6 @@ extern "C" {
#include <librsvg/librsvg-features.h>
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
#define LIBRSVG_CHECK_VERSION(major, minor, micro) \
(LIBRSVG_MAJOR_VERSION > (major) || \
(LIBRSVG_MAJOR_VERSION == (major) && LIBRSVG_MINOR_VERSION > (minor)) || \
View
@@ -12,6 +12,13 @@
# include "rbvteversion.h"
#endif
+#undef RG_DEF_METHOD
+#define RG_DEF_METHOD(method, argc) \
+ rb_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
+#undef RG_DEF_SMETHOD
+#define RG_DEF_SMETHOD(method, argc) \
+ rb_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
+
#define RVAL2TERM(obj) (RVAL2GOBJ(obj))
#define RVAL2COLOR(obj) ((GdkColor *)RVAL2BOXED(obj, GDK_TYPE_COLOR))
#define COLOR2RVAL(obj) (BOXED2RVAL(obj, GDK_TYPE_COLOR))
@@ -15,14 +15,6 @@
# include "rbvteversion.h"
#endif
-/* TODO: move to rbgutil.h */
-#undef RG_DEF_METHOD
-#define RG_DEF_METHOD(method, argc) \
- rbg_define_method(RG_TARGET_NAMESPACE, #method, rg_ ## method, argc)
-#undef RG_DEF_SMETHOD
-#define RG_DEF_SMETHOD(method, argc) \
- rbg_define_singleton_method(RG_TARGET_NAMESPACE, #method, rg_s_ ## method, argc)
-
G_GNUC_INTERNAL void Init_vte_access(VALUE mVte);
G_GNUC_INTERNAL void Init_vte_reaper(VALUE mVte);
G_GNUC_INTERNAL void Init_vte_terminal(VALUE mVte);

0 comments on commit b51f728

Please sign in to comment.