summaryrefslogtreecommitdiffstats
path: root/gobject/pygobject-private.h
Commit message (Collapse)AuthorAgeFilesLines
* Use _PyLong macros.Johan Dahlin2008-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-27 Johan Dahlin <johan@gnome.org> * gobject/gobjectmodule.c (pyg_param_spec_from_object), (add_properties), (pyg_signal_new), (pyg_signal_list_ids), (pyg_signal_lookup), (pyg_signal_query): * gobject/pygenum.c (pyg_enum_richcompare), (pyg_enum_new), (pyg_enum_from_gtype), (pyg_enum_add), (pyg_enum_reduce), (pygobject_enum_register_types): * gobject/pygflags.c (pyg_flags_richcompare), (pyg_flags_new), (pyg_flags_from_gtype), (pyg_flags_add), (pyg_flags_and), (pyg_flags_or), (pyg_flags_xor), (pygobject_flags_register_types): * gobject/pygobject-private.h: * gobject/pygobject.c (pygobject_disconnect_by_func), (pygobject_handler_block_by_func), (pygobject_handler_unblock_by_func), (pygobject_get_refcount): * gobject/pygparamspec.c (pyg_param_spec_getattr): * gobject/pygtype.c (_wrap_g_type_wrapper__get_depth), (pyg_type_from_object), (pyg_enum_get_value), (pyg_flags_get_value), (pyg_value_from_pyobject), (pyg_value_as_pyobject): Use _PyLong macros. svn path=/trunk/; revision=884
* Use glib macros to define the module, update export regexp.Johan Dahlin2008-07-271-0/+2
| | | | | | | | | | | | 2008-07-27 Johan Dahlin <johan@gnome.org> * gobject/Makefile.am: * gobject/gobjectmodule.c (PYGLIB_MODULE_START): * gobject/pygobject-private.h: Use glib macros to define the module, update export regexp. svn path=/trunk/; revision=881
* Move off a bit more to separate functions, cleaning up the init_glib a bitJohan Dahlin2008-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | 2008-07-27 Johan Dahlin <johan@gnome.org> * gobject/Makefile.am: * gobject/gobjectmodule.c (pygobject_register_api), (pygobject_register_constants), (pygobject_register_features), (pygobject_register_version_tuples), (pygobject_register_warnings), (init_gobject): * gobject/pygobject-private.h: * gobject/pygobject.c (pyobject_copy), (pyobject_free), (pygobject_object_register_types): * gobject/pygtype.c (_pyg_strv_from_gvalue), (_pyg_strv_to_gvalue), (pygobject_type_register_types): * gobject/pygtype.h: Move off a bit more to separate functions, cleaning up the init_glib a bit more. svn path=/trunk/; revision=879
* Move paramspec registration to a separate file, add a header for theJohan Dahlin2008-07-261-5/+0
| | | | | | | | | | | | | | | | | 2008-07-27 Johan Dahlin <johan@gnome.org> * gobject/Makefile.am: * gobject/gobjectmodule.c (init_gobject): * gobject/pygobject-private.h: * gobject/pygobject.c: * gobject/pygparamspec.c (pygobject_paramspec_register_types): * gobject/pygparamspec.h: * gobject/pygtype.c: Move paramspec registration to a separate file, add a header for the internal API. svn path=/trunk/; revision=878
* reviewed by: <delete if not using a buddy>Johan Dahlin2008-07-261-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | 2008-07-26 Johan Dahlin <johan@gnome.org> reviewed by: <delete if not using a buddy> * glib/pyglib-python-compat.h: * glib/pyglib.h: Make a few macros public * gobject/Makefile.am: * gobject/gobjectmodule.c (init_gobject): * gobject/pyginterface.c (pyg_interface_init), (pyg_interface_free), (pyg_register_interface), (pyg_register_interface_info), (pyg_lookup_interface_info), (pygobject_interface_register_types): * gobject/pyginterface.h: * gobject/pygobject-private.h: * gobject/pygobject.c: Move GInterface wrapper into its own file svn path=/trunk/; revision=875
* Move option over from gobject to glib.Johan Dahlin2008-07-261-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-26 Johan Dahlin <johan@gnome.org> * glib/Makefile.am: * glib/glibmodule.c (pyglib_register_constants), (init_glib): * glib/option.py: * glib/pyglib.c (pyglib_init), (pyglib_option_group_transfer_group), (pyglib_option_group_new), (pyglib_option_context_new): * glib/pyglib.h: * glib/pygoptioncontext.c (pyg_option_context_parse), (pyg_option_context_set_main_group), (pyg_option_context_add_group), (pyglib_option_context_register_types): * glib/pygoptioncontext.h: * glib/pygoptiongroup.c (arg_func), (pyglib_option_group_register_types): * glib/pygoptiongroup.h: * gobject/Makefile.am: * gobject/__init__.py: * gobject/gobjectmodule.c (init_gobject): * gobject/option.py: * gobject/pygobject-private.h: * gobject/pygoptioncontext.c: * gobject/pygoptiongroup.c: Move option over from gobject to glib. svn path=/trunk/; revision=860
* Remove private structures which moved to pyglib.Johan Dahlin2008-07-251-21/+0
| | | | | | | | | | | 2008-07-25 Johan Dahlin <johan@gnome.org> * gobject/gobjectmodule.c (init_gobject): * gobject/pygobject-private.h: Remove private structures which moved to pyglib. svn path=/trunk/; revision=853
* Move over Source, IOChannel, Idle, Timeout and PollFD to glib fromJohan Dahlin2008-07-211-22/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-21 Johan Dahlin <johan@gnome.org> * glib/Makefile.am: * glib/glibmodule.c (pyg_idle_add), (pyg_timeout_add), (pyg_timeout_add_seconds), (pyg_io_add_watch), (pyglib_register_api), (pyglib_register_error), (pyglib_register_version_tuples), (init_glib): * glib/pygiochannel.c (py_io_channel_next), (py_io_channel_shutdown), (py_io_channel_set_encoding), (py_io_channel_read_chars), (py_io_channel_write_chars), (py_io_channel_write_lines), (py_io_channel_flush), (py_io_channel_set_flags), (py_io_channel_read_line), (py_io_channel_read_lines), (py_io_channel_seek), (py_io_channel_init), (pyglib_iochannel_register_types): * glib/pygiochannel.h: * glib/pyglib-private.h: * glib/pyglib.c (pyglib_threads_enabled), (pyglib_gil_state_ensure), (pyglib_gil_state_release), (pyglib_enable_threads), (pyglib_block_threads), (pyglib_unblock_threads), (pyglib_set_thread_block_funcs), (pyglib_handler_marshal), (pyglib_destroy_notify): * glib/pyglib.h: * glib/pygsource.c (pyg_source_set_callback), (pyglib_source_register_types): * glib/pygsource.h: * glib/pygspawn.c (pyglib_spawn_register_types): * glib/pygspawn.h: * gobject/Makefile.am: * gobject/__init__.py: * gobject/gobjectmodule.c (pyg_set_thread_block_funcs), (init_gobject): * gobject/pygiochannel.c: * gobject/pygobject-private.h: * gobject/pygsource.c: Move over Source, IOChannel, Idle, Timeout and PollFD to glib from gobject. Clean up and add a bit of new api for glib. svn path=/trunk/; revision=846
* Move maincontext and mainloop over to glib. Update the threadstate api toJohan Dahlin2008-07-201-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-20 Johan Dahlin <johan@gnome.org> * glib/Makefile.am: * glib/glibmodule.c (pyglib_main_context_default), (init_glib): * glib/pyglib.c (pyglib_init), (pyglib_threads_enabled), (pyglib_main_context_new): * glib/pyglib.h: * glib/pygmaincontext.c (_wrap_g_main_context_iteration), (pyglib_maincontext_register_types): * glib/pygmaincontext.h: * glib/pygmainloop.c (pyg_signal_watch_prepare), (pyg_signal_watch_check), (pyg_main_loop_new), (_wrap_g_main_loop_get_context), (_wrap_g_main_loop_run), (pyglib_mainloop_register_types): * glib/pygmainloop.h: * gobject/Makefile.am: * gobject/__init__.py: * gobject/gobjectmodule.c (pyg_destroy_notify), (pyobject_free), (pyg_object_set_property), (pyg_object_get_property), (_pyg_signal_accumulator), (pygobject__g_instance_init), (pyg_handler_marshal), (pygobject_gil_state_ensure), (pygobject_gil_state_release), (marshal_emission_hook), (_log_func), (init_gobject): * gobject/pygboxed.c (pyg_boxed_dealloc), (pyg_boxed_new): * gobject/pygenum.c (pyg_enum_add): * gobject/pygflags.c (pyg_flags_add): * gobject/pygiochannel.c (pyg_iowatch_marshal): * gobject/pygmaincontext.c: * gobject/pygmainloop.c: * gobject/pygobject-private.h: * gobject/pygobject.c (pygobject_data_free), (pyg_toggle_notify), (pygobject_new_with_interfaces), (pygobject_weak_ref_notify): * gobject/pygobject.h: * gobject/pygoptiongroup.c (destroy_g_group), (arg_func): * gobject/pygpointer.c (pyg_pointer_new): * gobject/pygsource.c (pyg_source_get_context), (pyg_source_prepare), (pyg_source_check), (pyg_source_dispatch), (pyg_source_finalize): * gobject/pygtype.c (pyg_closure_invalidate), (pyg_closure_marshal), (pyg_signal_class_closure_marshal): * tests/common.py: Move maincontext and mainloop over to glib. Update the threadstate api to use the variant in glib. svn path=/trunk/; revision=843
* Bug 342948 – Add exception handling to GOptionGustavo J. A. M. Carneiro2007-07-071-0/+2
| | | | svn path=/trunk/; revision=681
* Bug 320428 – Break PyGObject<->GObject reference cycleGustavo J. A. M. Carneiro2007-04-141-1/+29
| | | | svn path=/trunk/; revision=642
* Py_ssize_t postfixGustavo J. A. M. Carneiro2006-10-031-0/+1
|
* Python 2.5, int vs ssize_tGustavo J. A. M. Carneiro2006-10-031-0/+7
|
* Replace uses of typename with type_name, because that is a reserved C++Murray Cumming2006-08-151-4/+4
| | | | | | | | | | | 2006-08-15 Murray Cumming <murrayc@murrayc.com> * gobject/pygobject-private.h: * gobject/pygobject.h: Replace uses of typename with type_name, because that is a reserved C++ keyword. This was breaking compilation of Glom due its use in the new type_register_custom function pointer in pygobject.h.
* Add infrastructure for lazy type registration, fixes #Johan Dahlin2006-07-131-0/+7
| | | | | | | | | | | | | * gobject/gobjectmodule.c: (pyg_type_from_name), (get_type_name_for_class): * gobject/pygobject-private.h: * gobject/pygobject.c: (pygobject_new_with_interfaces), (pygobject_lookup_class), (pygobject_emit): * gobject/pygobject.h: * gobject/pygtype.c: (_wrap_g_type_from_name), (pyg_type_from_object), (pyg_type_register_custom_callback), (pyg_type_get_custom), (_pyg_type_from_name): Add infrastructure for lazy type registration, fixes #
* Bindings for g_filename_display_basename and g_filename_display_name;Gustavo J. A. M. Carneiro2006-06-241-1/+1
| | | | Add support for G_TYPE_GSTRING, at least in signals.
* Add Py_CLEAR macro for 2.3 compatibilityJohan Dahlin2006-06-051-0/+12
|
* gobject.new fix for 'subsubtype' caseGustavo J. A. M. Carneiro2006-05-281-1/+1
|
* reviewed by: Johan Dahlin <jdahlin@async.com.br>Johannes Hölzl2006-04-291-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-04-29 Johannes Hölzl <johannes.hoelzl@gmx.de> reviewed by: Johan Dahlin <jdahlin@async.com.br> * examples/Makefile.am: * examples/option.py: * gobject/Makefile.am: * gobject/gobjectmodule.c: (init_gobject): * gobject/option.py: * gobject/pygobject-private.h: * gobject/pygoptioncontext.c: (pyg_option_context_init), (pyg_option_context_dealloc), (pyg_option_context_parse), (pyg_option_context_set_help_enabled), (pyg_option_context_get_help_enabled), (pyg_option_context_set_ignore_unknown_options), (pyg_option_context_get_ignore_unknown_options), (pyg_option_context_set_main_group), (pyg_option_context_get_main_group), (pyg_option_context_add_group), (pyg_option_context_compare), (pyg_option_context_new): * gobject/pygoptiongroup.c: (check_if_owned), (destroy_g_group), (pyg_option_group_init), (pyg_option_group_dealloc), (arg_func), (pyg_option_group_add_entries), (pyg_option_group_set_translation_domain), (pyg_option_group_compare), (pyg_option_group_transfer_group), (pyg_option_group_new): * tests/test_option.py: Add support for GOption, fixes #163645
* Forgot thisJohan Dahlin2006-04-291-0/+1
|
* Move GObjectMeta from C to python-landGustavo J. A. M. Carneiro2006-04-111-1/+1
|
* plug leak; add glade test; fix warning messageGustavo J. A. M. Carneiro2005-11-091-3/+3
|
* reviewed by: Johan Dahlin <jdahlin@async.com.br>Manish Singh2005-11-031-0/+4
| | | | | | | | | | | | 2005-11-03 Manish Singh <yosh@gimp.org> reviewed by: Johan Dahlin <jdahlin@async.com.br> * gobject/gobjectmodule.c: (pyg_integer_richcompare): * gobject/pygenum.c: (pyg_enum_richcompare): * gobject/pygflags.c: (pyg_flags_richcompare): * gobject/pygobject-private.h: Prepare for Python 2.5 richcompare changes, fixes #320455.
* some memory fixes in type registrationGustavo J. A. M. Carneiro2005-08-251-1/+1
|
* gobject/pygobject-private.h Add a convenience functionManish Singh2005-08-011-0/+1
| | | | | | | | | | | | | | | 2005-08-01 Manish Singh <yosh@gimp.org> * gobject/pygobject-private.h * gobject/pygmaincontext.c: Add a convenience function (pyg_main_context_new) to create a PyGMainContext from a GMainContext. Takes care of refing the supplied GMainContext as well. * gobject/gobjectmodule.c (pyg_main_context_default) * gobject/pygmainloop.c (_wrap_g_main_loop_get_context) * gobject/pygsource.c (pyg_source_get_context): use the new convenience function here. This fixes bug #312259.
* Fix reference count of gtk.Window's from gobject.newGustavo J. A. M. Carneiro2005-07-311-0/+1
|
* make iochannel api use new PyGPollFD type instead of tuplesGustavo J. A. M. Carneiro2005-07-101-0/+7
|
* gobject/pygobject-private.h gobject/gobjectmodule.c gobject/Makefile.amManish Singh2005-07-101-0/+7
| | | | | | | | | | | | | | | | | | * gobject/pygobject-private.h * gobject/gobjectmodule.c * gobject/Makefile.am * gobject/pygsource.c: GSource wrapper, allows for pure python GSource implementations, as well as objectifying Idle and Timeout sources. * tests/Makefile.am * tests/test_source.py: Add test for the above. * gobject/gobjectmodule.c: timeout_add should take an explicit unsigned value. Also wrap g_get_current_time and g_main_depth. * gobject/pygiochannel.c (py_io_channel_write_chars): fix thread unblock/block logic.
* Bug 161177: Allow creation of python classes from g_object_newGustavo J. A. M. Carneiro2005-07-091-3/+12
|
* Add GObject support, patch mostly based on Iñaki and Gustavos work.Johan Dahlin2005-07-081-0/+3
| | | | | | | | | | | | | * 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-3/+3
| | | | | | | | | | | | * 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 support for specifying name for a GObject subclass, usingJohan Dahlin2005-07-051-1/+2
| | | | | | | | | | | * 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
* Sort quark names. Rename pyg_boxed_marshal_key to pygboxed_marshal_key.Johan Dahlin2005-05-281-5/+5
| | | | | | | | * 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-1/+11
|
* Bug 128765: GObject metaclassGustavo J. A. M. Carneiro2005-05-221-0/+3
|
* Bug 139176: GIOChannel wrapperGustavo J. A. M. Carneiro2005-05-221-0/+3
|
* reviewed by: Johan Dahlin <jdahlin@async.com.br>Benjamin Otte2005-05-171-0/+2
| | | | | | | | | | | | | 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 #154779 - Python signal handlers don't get executed whileMark McLoughlin2005-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-02-09 Mark McLoughlin <mark@skynet.ie> Fix for bug #154779 - Python signal handlers don't get executed while you're sitting in the main loop. * gobject/pygmainloop.c: (pyg_save_current_main_loop), (pyg_restore_current_main_loop), (pyg_get_current_main_loop): functions for keeping track of the currently running main loop. A version using TLS and another using a global variable, depending on whether DISABLE_THREADING is defined (pyg_signal_watch_prepare), (pyg_signal_watch_check), (pyg_signal_watch_dispatch), (pyg_signal_watch_new): a GSource which runs the python signal handlers whenever the mainloop is interrupted by signal delivery. (pyg_main_loop_new), (pyg_main_loop_dealloc): add and remove the source. (_wrap_g_main_loop_run): push/pop the currently running main loop. * gobject/pygobject-private.h: add a pointer for the source to PyGMainLoop. * gobject/Makefile.am: add -DPLATFORM_WIN32 to cflags if building on Windows.
* Bug 163612: segmentation fault on pygtk-demoGustavo J. A. M. Carneiro2005-01-101-10/+14
|
* misc API additions, threadingGustavo J. A. M. Carneiro2005-01-091-14/+10
|
* Apply slighly modified fix from bug 149845PYGTK_2_3_97Johan Dahlin2004-09-281-9/+1
| | | | | | 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-0/+11
| | | | | | | | | | | | * 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
* Make PyGClosure semi-publicGustavo J. A. M. Carneiro2004-09-261-8/+0
|
* make threading runtime optionalGustavo J. A. M. Carneiro2004-08-041-0/+17
|
* Update, why do I even bother to update 3 different build systems?Johan Dahlin2004-07-191-14/+58
| | | | | | | | | | | * 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)
* gtk/*.overrideJohan Dahlin2004-07-171-1/+2
| | | | | | | | | | | | | | | | | | | | * 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
* New conversion functions that use GParamSpec's declarations of new paramJohn Ehresman2004-07-051-0/+6
| | | | | | | | | | | | | | | | | * 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
* John Ehresman's patch to improve gunichar parameter handlingGustavo J. A. M. Carneiro2004-07-041-0/+1
|
* New function. (pygobject_lookup_class): Modify so we're not traversingJohan Dahlin2004-04-101-0/+2
| | | | | | | | | | | | | | * pygobject.c (pygobject_new_with_interfaces): New function. (pygobject_lookup_class): Modify so we're not traversing parents for unknown types but instead creating new types when they're not registered. We're also using pygobject_new_with_interfaces so interfaces gets attached correctly. Partial fix for bug 129032 * gobjectmodule.c: Add quark and attach the PyTypeObject for GInterfaces. * pygobject-private.h: Make PyGInterface_Type and pyginterface_type_key public
* This is a function, not a method.PYGTK_2_3_90Johan Dahlin2004-03-271-10/+3
| | | | | | | | | | | | * 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