diff options
author | Johan Dahlin <zilch@src.gnome.org> | 2004-03-27 17:55:47 +0000 |
---|---|---|
committer | Johan Dahlin <zilch@src.gnome.org> | 2004-03-27 17:55:47 +0000 |
commit | b6696cc7e9b29a7a0b1d2a14472c8ee74dfbb6ce (patch) | |
tree | 9f14192f47e6bb702685f1eff35898ff5b3d2c00 | |
parent | 59ebacbe8eba4d29fa963128a045625e15e84b3a (diff) | |
download | pygobject-b6696cc7e9b29a7a0b1d2a14472c8ee74dfbb6ce.tar.gz pygobject-b6696cc7e9b29a7a0b1d2a14472c8ee74dfbb6ce.tar.xz pygobject-b6696cc7e9b29a7a0b1d2a14472c8ee74dfbb6ce.zip |
This is a function, not a method.PYGTK_2_3_90
* gtk/gtk.defs (widget_list_style_properties): This is a function,
not a method.
* pygobject-private.h, pygobject.h, gobjectmodule.c:
Make PyGParamSpec_Type and pyg_param_spec_new part of the public API.
* gtk/gtkwidget.override (_wrap_gtk_widget_style_get_property)
(_wrap_gtk_widget_class_list_style_properties): Impl. Fixes
bug 138104
-rw-r--r-- | gobject/gobjectmodule.c | 3 | ||||
-rw-r--r-- | gobject/pygobject-private.h | 13 | ||||
-rw-r--r-- | gobject/pygobject.h | 12 |
3 files changed, 18 insertions, 10 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index d780923..068e823 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -1941,6 +1941,9 @@ struct _PyGObject_Functions pygobject_api_functions = { pyg_set_thread_block_funcs, (PyGThreadBlockFunc)0, /* block_threads */ (PyGThreadBlockFunc)0, /* unblock_threads */ + + &PyGParamSpec_Type, + pyg_param_spec_new, }; DL_EXPORT(void) diff --git a/gobject/pygobject-private.h b/gobject/pygobject-private.h index 130305a..42509e1 100644 --- a/gobject/pygobject-private.h +++ b/gobject/pygobject-private.h @@ -26,16 +26,6 @@ void pyg_destroy_notify (gpointer user_data); typedef struct { PyObject_HEAD - GParamSpec *pspec; -} PyGParamSpec; -extern PyTypeObject PyGParamSpec_Type; -PyObject *pyg_param_spec_new(GParamSpec *pspec); - -#define PyGParamSpec_Check(v) (PyObject_TypeCheck(v, &PyGParamSpec_Type)) -#define PyGParamSpec_Get(v) (((PyGParamSpec *)v)->pspec) - -typedef struct { - PyObject_HEAD GMainLoop *loop; } PyGMainLoop; extern PyTypeObject PyGMainLoop_Type; @@ -106,4 +96,7 @@ void pyg_register_pointer (PyObject *dict, const gchar *class_name, GType pointer_type, PyTypeObject *type); PyObject * pyg_pointer_new (GType pointer_type, gpointer pointer); +extern PyTypeObject PyGParamSpec_Type; +PyObject *pyg_param_spec_new (GParamSpec *pspec); + #endif diff --git a/gobject/pygobject.h b/gobject/pygobject.h index 62c4cd2..d6c681c 100644 --- a/gobject/pygobject.h +++ b/gobject/pygobject.h @@ -40,6 +40,14 @@ typedef struct { typedef void (*PyGFatalExceptionFunc) (void); typedef void (*PyGThreadBlockFunc) (void); +typedef struct { + PyObject_HEAD + GParamSpec *pspec; +} PyGParamSpec; + +#define PyGParamSpec_Get(v) (((PyGParamSpec *)v)->pspec) +#define PyGParamSpec_Check(v) (PyObject_TypeCheck(v, &PyGParamSpec_Type)) + struct _PyGObject_Functions { void (* register_class)(PyObject *dict, const gchar *class_name, GType gtype, PyTypeObject *type, PyObject *bases); @@ -95,6 +103,8 @@ struct _PyGObject_Functions { PyGThreadBlockFunc unblock_threads_func); PyGThreadBlockFunc block_threads; PyGThreadBlockFunc unblock_threads; + PyTypeObject *paramspec_type; + PyObject *(* paramspec_new)(GParamSpec *spec); }; #ifndef _INSIDE_PYGOBJECT_ @@ -132,6 +142,8 @@ struct _PyGObject_Functions *_PyGObject_API; #define pyg_constant_strip_prefix (_PyGObject_API->constant_strip_prefix) #define pyg_error_check (_PyGObject_API->error_check) #define pyg_set_thread_block_funcs (_PyGObject_API->set_thread_block_funcs) +#define PyGParamSpec_Type (*_PyGObject_API->paramspec_type) +#define pyg_param_spec_new (_PyGObject_API->paramspec_new) #define pyg_block_threads() G_STMT_START { \ if (_PyGObject_API->block_threads != NULL) \ |