summaryrefslogtreecommitdiffstats
path: root/gobject/gobjectmodule.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Add GObject support, patch mostly based on Iņaki and Gustavos work.Johan Dahlin2005-07-081-1/+12
| | | | | | | | | | | | | * gobject/gobjectmodule.c: (initgobject): * gobject/pygobject-private.h: * gobject/pygobject.c: (pyg_props_iter_dealloc), (pygobject_props_iter_next), (PyGProps_dealloc), (build_parameter_list), (PyGProps_getattro), (PyGProps_setattro), (pygobject_props_traverse), (pygobject_props_get_iter), (PyGProps_length), (pyg_props_descr_descr_get): * tests/Makefile.am: Add GObject support, patch mostly based on Iņaki and Gustavos work. Unittests added, fixes #81879
* Rename pyg_register_boxed_custom to pyg_register_gtype_custom. Add noteJohan Dahlin2005-07-071-2/+2
| | | | | | | | | | | | * gobject/gobjectmodule.c: (initgobject): * gobject/pygobject-private.h: * gobject/pygobject.h: * gobject/pygtype.c: (pyg_type_lookup), (pyg_register_gtype_custom), (pyg_value_from_pyobject), (pyg_value_as_pyobject): Rename pyg_register_boxed_custom to pyg_register_gtype_custom. Add note about private fields in exported API structure. Based on patch by Edward Hervey, fixes #309625
* Add GType.is_a and deprecate gobject.type_* Update tests and makeJohan Dahlin2005-07-051-6/+33
| | | | | | | | | | | | | * gobject/gobjectmodule.c: (pyg_type_name), (pyg_type_from_name), (pyg_type_parent), (pyg_type_is_a), (pyg_type_children), (pyg_type_interfaces), (get_type_name_for_class), (initgobject): * gobject/pygtype.c: (_wrap_g_type_is_a), (pyg_type_wrapper_init): * tests/test_enum.py: * tests/test_gtype.py: * tests/test_unknown.py: Add GType.is_a and deprecate gobject.type_* Update tests and make GType.is_a/gobject.type_is_a return a bool instead of int
* Add support for specifying name for a GObject subclass, usingJohan Dahlin2005-07-051-37/+49
| | | | | | | | | | | * gobject/gobjectmodule.c: (_wrap_pyg_type_register), (get_type_name_for_class), (pyg_type_register): * gobject/pygobject-private.h: * gobject/pygobject.c: (pygobjectmeta_register), (pygobjectmeta_init): * tests/test_gtype.py: Add support for specifying name for a GObject subclass, using __gtype_name__. Add a unittest. Fixes #169498
* Add GType to gobject namespace Wrap a number of GType utility functionsJohan Dahlin2005-07-041-0/+1
| | | | | | | | | | | | | | | | | | * gobject/gobjectmodule.c: (initgobject): Add GType to gobject namespace * gobject/pygtype.c: (_wrap_g_type_wrapper__get_pytype), (_wrap_g_type_wrapper__get_name), (_wrap_g_type_wrapper__get_parent), (_wrap_g_type_wrapper__get_fundamental), (_wrap_g_type_wrapper__get_children), (_wrap_g_type_wrapper__get_interfaces), (_wrap_g_type_wrapper__get_depth), (_wrap_g_type_is_interface), (_wrap_g_type_is_classed), (_wrap_g_type_is_instantiatable), (_wrap_g_type_is_derivable), (_wrap_g_type_is_deep_derivable), (_wrap_g_type_is_abstract), (_wrap_g_type_is_value_abstract), (_wrap_g_type_is_value_type), (_wrap_g_type_has_value_table), (_wrap_g_type_from_name): Wrap a number of GType utility functions
* Use pyg_param_gvalue_from_pyobject in gobject.new, fixes unicharJohan Dahlin2005-07-041-1/+2
| | | | | | | | * gobject/gobjectmodule.c: (pyg_object_new): * tests/test_conversion.py: Use pyg_param_gvalue_from_pyobject in gobject.new, fixes unichar parameters specified from the constructor. Added unittests.
* Extend to add some new fields, add a getter for GType.type, which pointsJohan Dahlin2005-07-011-0/+2
| | | | | | | | | * gobject/pygtype.c: Extend to add some new fields, add a getter for GType.type, which points to the python registered type of a PyGTypeWrapper. * gobject/gobjectmodule.c (initgobject): And register PyGTypeWrapper, a side effect is that dir(gtype) also works now.
* Bug 308097: Overriden realize gets called twiceGustavo J. A. M. Carneiro2005-06-201-8/+32
|
* blahJohan Dahlin2005-05-281-1/+1
|
* Sort quark names. Rename pyg_boxed_marshal_key to pygboxed_marshal_key.Johan Dahlin2005-05-281-8/+6
| | | | | | | | * gobject/gobjectmodule.c: (initgobject): * gobject/pygobject-private.h: * gobject/pygtype.c: (pyg_register_boxed_custom): Sort quark names. Rename pyg_boxed_marshal_key to pygboxed_marshal_key. Don't set the keys twice
* gquark initialization cleanupGustavo J. A. M. Carneiro2005-05-281-11/+24
|
* Bug fixesJohn Finlay2005-05-221-2/+2
| | | | * Bug fixes
* Bug 128765: GObject metaclassGustavo J. A. M. Carneiro2005-05-221-19/+48
|
* Bug 164665: g_markup_escape_text needs bindingGustavo J. A. M. Carneiro2005-05-221-0/+20
|
* Bug 139176: GIOChannel wrapperGustavo J. A. M. Carneiro2005-05-221-2/+21
|
* reviewed by: Johan Dahlin <jdahlin@async.com.br>Benjamin Otte2005-05-171-5/+17
| | | | | | | | | | 2005-05-17 Benjamin Otte <in7y118@public.uni-hamburg.de> reviewed by: Johan Dahlin <jdahlin@async.com.br> * gobject/gobjectmodule.c: (pyg_register_class_init), (pyg_run_class_init): Allow multiple calls to pyg_register_class_init, fixes #304353
* reviewed by: Johan Dahlin <jdahlin@async.com.br>Benjamin Otte2005-05-171-1/+3
| | | | | | | | | | | | | 2005-05-17 Benjamin Otte <in7y118@public.uni-hamburg.de> reviewed by: Johan Dahlin <jdahlin@async.com.br> * gobject/gobjectmodule.c: * gobject/pygobject-private.h: * gobject/pygobject.h: * gobject/pygtype.c: (pyg_closure_marshal), (pyg_closure_set_exception_handler): Adds exception handling support to closures, fixes #304357
* Fix for bug #303573 - "exceptions raised in a child watch handler areMark McLoughlin2005-05-091-2/+10
| | | | | | | | | | | | | | | | | | 2005-05-09 Mark McLoughlin <mark@skynet.ie> Fix for bug #303573 - "exceptions raised in a child watch handler are silently swallowed" * gobject/gobjectmodule.c: (child_watch_func), (_pyg_spawn_async_callback): if PyObject_CallFunction() returns NULL, print a traceback of the exception. * tests/test_mainloop.py: add testcase. * tests/Makefile.am: add test_mainloop.py Reviewed by Johan Dahlin <johan@gnome.org>
* Bug 164441: leak in gobject.type_register(); patch by Mark McLoughlinGustavo J. A. M. Carneiro2005-01-221-1/+4
|
* interface implementation fixesGustavo J. A. M. Carneiro2005-01-161-1/+1
|
* interface implementation fixesGustavo J. A. M. Carneiro2005-01-161-4/+8
|
* gobject.child_add_watch and gobject.spawn_asyncGustavo J. A. M. Carneiro2005-01-091-1/+240
|
* misc API additions, threadingGustavo J. A. M. Carneiro2005-01-091-2/+2
|
* #154974: Interface implementation supportGustavo J. A. M. Carneiro2005-01-091-0/+41
|
* [Bug 145314] Overriding GTK+ virtual methodsGustavo J. A. M. Carneiro2005-01-081-1/+38
|
* Add signal introspection functionsJohn Finlay2004-11-121-3/+190
| | | | | | * gobject/gobjectmodule.c (pyg_signal_list_ids) (pyg_signal_lookup, pyg_signal_name, pyg_signal_query): Add signal introspection functions
* gobject/gobjectmodule.c (_pyg_strv_from_gvalue) Avoid segfault when argvJohn Finlay2004-11-081-2/+5
| | | | | * gobject/gobjectmodule.c (_pyg_strv_from_gvalue) Avoid segfault when argv is NULL.
* Allow gtk_main to be invoked from a thread created by the threading modulePYGTK_2_4_0John Ehresman2004-09-291-1/+3
| | | | | | * gobject/gobjectmodule.c (pyg_enable_threads): Allow gtk_main to be invoked from a thread created by the threading module by requiring the GIL be held when pyg_enable_threads is invoked.
* Apply slighly modified fix from bug 149845PYGTK_2_3_97Johan Dahlin2004-09-281-31/+34
| | | | | | This is make threading usable for both users of the threading module and users that requires interaction with threads from other extension modules.
* New functions exposed through _PyGObject_Functions to work around bugs inJohn Ehresman2004-09-271-5/+73
| | | | | | | | | | | | * gobject/gobjectmodule.c: New functions exposed through _PyGObject_Functions to work around bugs in the PyGILState api's * gobject/pygobject.h: idem * gobject/pygobject-private.h: idem * gtk/gtk.override (_wrap_gtk_main): add pyg_enable_threads() call to ensure thread state for thread invoking this function is remembered. Only call pyg_enable_threads() here if threads were previously enabled
* Bug 153718: exception in overriden gsignals causes ref count problemsGustavo J. A. M. Carneiro2004-09-251-4/+0
|
* make threading runtime optionalGustavo J. A. M. Carneiro2004-08-041-24/+46
|
* Urgh. more threading 'fixes'Johan Dahlin2004-08-031-20/+11
|
* More minor threading fixesJohan Dahlin2004-08-031-6/+1
|
* Add better support for boolean type now when we can require 2.3. Fixes bugJohan Dahlin2004-08-031-4/+1
| | | | | | | | | | | | | | | | | * codegen/argtypes.py: * gobject/gobjectmodule.c: (pyg_source_remove): * gobject/pygmaincontext.c: (_wrap_g_main_context_iteration), (_wrap_g_main_context_pending): * gobject/pygmainloop.c: (_wrap_g_main_loop_is_running): * gobject/pygobject.c: (pygobject_handler_is_connected): * gobject/pygparamspec.c: (pyg_param_spec_getattr): * gobject/pygtype.c: (pyg_value_as_pyobject): * gtk/gdk.override: * gtk/gtk.override: * gtk/gtktextview.override: * gtk/gtkwidget.override: * pango.override: Add better support for boolean type now when we can require 2.3. Fixes bug 149121
* Clean up most functions here to have only one return path.Johan Dahlin2004-08-031-20/+27
| | | | | | | | | | | | | | | | | | * gtk/pygtktreemodel.c: Clean up most functions here to have only one return path. * gobject/pygobject.c (pygobject_emit): Protect g_value_unset by UNBLOCK/BLOCK_THREADS since it might call pygobject_free which will result in a deadlock. * gobject/gobjectmodule.c (pyg_thread_init): New function, move thread initalization stuff in here. * All over the place: Kill pyg_block/unblock_threads and use PyGILState and Py_BEGIN/END_ALLOW_THREADS. unblock [code] block calls are replaced by Py_BEGIN/END and block [code] unblock calls are replaced by PyGILState.
* Call PyEval_InitThreads. Perhaps its something that always should bePYGTK_2_3_95Johan Dahlin2004-08-021-0/+18
| | | | | | | | | | | | | | | | * gobject/gobjectmodule.c (initgobject): Call PyEval_InitThreads. Perhaps its something that always should be called. * README (Author): Add a requirements section * configure.in: Require Python 2.3 * setup.py (version): Ditto * gobject/pygtype.c, gobject/pygobject.h: Remove 2.2 compat. * All over the place: Add support for PyGILState.
* Simplify, fix name in exceptions and remove warning.Johan Dahlin2004-07-201-2/+2
| | | | | | | | | | | | * gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Simplify, fix name in exceptions and remove warning. * gobject/pygenum.c (pyg_enum_from_gtype): Fall back to int for unregistered enums. * gobject/pygflags.c (pyg_flags_from_gtype): Ditto * gobject/gobjectmodule.c (initgobject): Rename back to MainLoop, MainContext
* Update, why do I even bother to update 3 different build systems?Johan Dahlin2004-07-191-431/+15
| | | | | | | | | | | * gobject/Makefile.am: * setup.py: * makefile.msc: Update, why do I even bother to update 3 different build systems? * gobject/: Split out GParamSpec, GMainLoop, GMainContext and GPointer to separate files. Also remove *.h files and go back to the old scheme (everything in pygobject.h)
* Remove references to &PyInt_Type from static type struct initializationJohn Ehresman2004-07-191-2/+2
| | | | | | | | | * gobject/pygflags.c, gobject/pygenum.c, gobject/gobjectmodule.c (initgobject): Remove references to &PyInt_Type from static type struct initialization and manually set it before PyType_Ready calls * makefile.msc, gtk/makefile.msc, gobject/makefile.msc: VC++ makefile changes for new directory layout
* New gettersJohan Dahlin2004-07-181-0/+23
| | | | | | | | | | | * gobject/pygflags.c (pyg_flags_get_value_nicks) (pyg_flags_get_value_names): New getters * gobject/pygenum.c (pyg_enum_get_value_nick) (pyg_enum_get_value_name): New getters * gobject/gobjectmodule.c (pyg_param_spec_getattr): add enum_class and flags_class properties.
* gtk/*.overrideJohan Dahlin2004-07-171-45/+39
| | | | | | | | | | | | | | | | | | | | * gtk/*.override * codegen/codegen.py: * codegen/argtypes.py: Update for enums * pygtype.c (pyg_value_as_pyobject): Use new enum/flag functions * pygenum.[ch]: Handle GFlag * pygflags.[ch]: Handle GFlag * atk-types.defs: Fix gtype-id for all enums * gobjectmodule.c (initgobject): Clean up and add convinience macros * tests/enum.py: New file * tests/common.py: New file, also stole from gst-python
* Back out changes that should not have been committed (oops)John Ehresman2004-07-061-2/+1
|
* New conversion functions that use GParamSpec's declarations of new paramJohn Ehresman2004-07-051-3/+7
| | | | | | | | | | | | | | | | | * pygtype.c (pyg_param_gvalue_from_pyobject, pyg_param_gvalue_as_pyobject): New conversion functions that use GParamSpec's * pygobject.h, pygobject-private.h: declarations of new param conversion functions * pygobject.c (pygobject_get_property, pygobject_set_property): Use param conversion functions * gobjectmodule.c (pyg_parse_constructor_args): reorder local variable declaration so it will compile with VC++ * tests/testconversion.py: tests for above
* property based constructorsGustavo J. A. M. Carneiro2004-07-041-1/+54
|
* John Ehresman's patch to improve gunichar parameter handlingGustavo J. A. M. Carneiro2004-07-041-1/+2
|
* Fixed UNICHAR support since we don't have G_TYPE_UNICHAR but G_TYPE_UINTLorenzo Gil Sanchez2004-06-041-1/+1
|
* Add support for paramspec.default_value for GParamSpec types that supportJohan Dahlin2004-06-041-0/+43
| | | | | * gobjectmodule.c (pyg_param_spec_getattr): Add support for paramspec.default_value for GParamSpec types that support it
* added gobject.TYPE_UNICHARLorenzo Gil Sanchez2004-06-041-0/+1
| | | | | | 2004-06-04 Lorenzo Gil Sanchez <lgst@cvs.gnome.org> * gobjectmodule.c (initgobject): added gobject.TYPE_UNICHAR
* ImplJohan Dahlin2004-06-041-29/+90
| | | | | | | | | | | | | | | | | | | | | * gtk/gtkwidget.override (_wrap_gtk_widget_class_install_style_property): Impl * gtk/gtkcontainer.override (_wrap_gtk_container_class_list_child_properties): Rename first kwlist argument to klass (from widget), class should be a GObjectClass and not a GtkWidgetClass (_wrap_gtk_container_class_install_child_property): Impl. * gtk/gtk.defs: Change a couple of methods to functions and set correct class * pygobject.h: Add pyg_param_spec_from_object * gobjectmodule.c (create_property): Don't install the property here, return it instead. And don't require a GObjectClass as argument (pyg_param_spec_from_object): New function (add_properties): Update to new create_property (pygobject_api_functions): Export pyg_param_spec_from_object