summaryrefslogtreecommitdiffstats
path: root/gobject/pygobject.h
Commit message (Collapse)AuthorAgeFilesLines
* Move maincontext and mainloop over to glib. Update the threadstate api toJohan Dahlin2008-07-201-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add pyg_option_group_new to the public APIJohan Dahlin2007-11-051-1/+3
| | | | | | | | | | | | | 2007-11-05 Johan Dahlin <johan@gnome.org> * gobject/pygobject.h: * gobject/gobjectmodule.c: Add pyg_option_group_new to the public API * configure.ac: Branch, bump version to 2.15.0. svn path=/trunk/; revision=714
* Rename the private struct field to private_flags, because private is a C++Murray Cumming2007-07-041-1/+1
| | | | | | | | | | | 2007-07-04 Murray Cumming <murrayc@murrayc.com> * gobject/pygobject.c: (pygobject_switch_to_toggle_ref): * gobject/pygobject.h: Rename the private struct field to private_flags, because private is a C++ keyword, so this broke builds of some C++ applications, such as Glom. svn path=/trunk/; revision=679
* Bug 447271 – gobject has a weird bug on mac. Involves python, property and ↵Gustavo J. A. M. Carneiro2007-06-171-1/+13
| | | | | | subclassing svn path=/trunk/; revision=677
* Bug 425242 – Add API to convert a gobject.GError exception being raised to ↵Gustavo J. A. M. Carneiro2007-04-141-0/+3
| | | | | | a GError** parameter svn path=/trunk/; revision=645
* Bug 419379 – Modernize init_pygobject: use static inline functions instead ↵Gustavo J. A. M. Carneiro2007-04-141-43/+97
| | | | | | of macros svn path=/trunk/; revision=643
* Bug 320428 – Break PyGObject<->GObject reference cycleGustavo J. A. M. Carneiro2007-04-141-1/+5
| | | | svn path=/trunk/; revision=642
* (init_pygobject_check): Add parentheses "around && within ||" to please gcc.Gustavo J. A. M. Carneiro2006-09-241-1/+1
|
* Declare variables at start of code blockJohn Ehresman2006-09-121-4/+5
| | | | | | | 2006-09-12 John Ehresman <jpe@wingware.com> * gobject/pygobject.h (init_pygobject_check): Declare variables at start of code block
* Improve the version checkPYGOBJECT_2_12_1Johan Dahlin2006-09-041-24/+25
|
* Replace uses of typename with type_name, because that is a reserved C++Murray Cumming2006-08-151-3/+3
| | | | | | | | | | | 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.
* Fix define to point to the correct function pointer field.John Finlay2006-07-301-1/+1
| | | | | * gobject/pygobject.h (pyg_param_gvalue_from_pyobject): Fix define to point to the correct function pointer field.
* Fix 3 ! problems caused by refactoringJohan Dahlin2006-07-251-22/+24
|
* Add a macro to easily check the installed pygobject version.Johan Dahlin2006-07-251-0/+24
| | | | | * gobject/pygobject.h (init_pygobject_check): Add a macro to easily check the installed pygobject version.
* Add infrastructure for lazy type registration, fixes #Johan Dahlin2006-07-131-1/+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 new pyg_add_warning_redirection and pyg_disable_warning_redirections ↵Gustavo J. A. M. Carneiro2006-05-071-0/+6
| | | | APIs (bug #323786 again).
* ABI compatibility fixesGustavo J. A. M. Carneiro2006-04-151-2/+2
|
* typoJohan Dahlin2006-04-111-1/+1
|
* Turn gobject into a package; move _gobject to gobject._gobject andJohan Dahlin2006-04-111-2/+2
| | | | add gobject/__init__.py. Update macros and testsuite.
* Remove pre python 2.3.5 compatibility. Simplifies thread handling.Johan Dahlin2005-07-171-7/+8
| | | | | | | * gobject/pygobject.h: * gobject/gobjectmodule.c (pyg_gil_state_ensure_py23) (pyg_gil_state_release_py23): Remove pre python 2.3.5 compatibility. Simplifies thread handling.
* Bug 161177: Allow creation of python classes from g_object_newGustavo J. A. M. Carneiro2005-07-091-0/+11
|
* Rename pyg_register_boxed_custom to pyg_register_gtype_custom. Add noteJohan Dahlin2005-07-071-3/+8
| | | | | | | | | | | | * 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
* gobject/pygobject.h Use G_STMT_START/END for init_ defines.Manish Singh2005-06-101-2/+2
| | | | | | | 2005-06-09 Manish Singh <yosh@gimp.org> * gobject/pygobject.h * gtk/pygtk.h: Use G_STMT_START/END for init_ defines.
* reviewed by: Johan Dahlin <jdahlin@async.com.br>Benjamin Otte2005-05-171-0/+4
| | | | | | | | | | | | | 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
* Bug 163612: segmentation fault on pygtk-demoGustavo J. A. M. Carneiro2005-01-101-10/+12
|
* misc API additions, threadingGustavo J. A. M. Carneiro2005-01-091-12/+10
|
* #154974: Interface implementation supportGustavo J. A. M. Carneiro2005-01-091-0/+2
|
* [Bug 145314] Overriding GTK+ virtual methodsGustavo J. A. M. Carneiro2005-01-081-0/+5
|
* Change PY_HEXVERSION to PY_VERSION_HEXJohn Ehresman2004-12-101-1/+1
| | | | | | 2004-12-10 John Ehresman <jpe@wingide.com> * gobject/pygobject.h: Change PY_HEXVERSION to PY_VERSION_HEX
* Bug 155304: pygobject.h cannot be included in C++ programsGustavo J. A. M. Carneiro2004-10-131-2/+6
|
* Apply slighly modified fix from bug 149845PYGTK_2_3_97Johan Dahlin2004-09-281-10/+3
| | | | | | 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/+18
| | | | | | | | | | | | * 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-0/+9
|
* make threading runtime optionalGustavo J. A. M. Carneiro2004-08-041-6/+19
|
* Urgh. more threading 'fixes'Johan Dahlin2004-08-031-0/+6
|
* More minor threading fixesJohan Dahlin2004-08-031-6/+0
|
* Call PyEval_InitThreads. Perhaps its something that always should bePYGTK_2_3_95Johan Dahlin2004-08-021-2/+4
| | | | | | | | | | | | | | | | * 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.
* gtk/*.overrideJohan Dahlin2004-07-171-5/+24
| | | | | | | | | | | | | | | | | | | | * 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/+9
| | | | | | | | | | | | | | | | | * 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-0/+7
|
* John Ehresman's patch to improve gunichar parameter handlingGustavo J. A. M. Carneiro2004-07-041-0/+2
|
* ImplJohan Dahlin2004-06-041-1/+2
| | | | | | | | | | | | | | | | | | | | | * 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
* Prevent warnings in Python 2.3PYGTK_2_3_91Gustavo J. A. M. Carneiro2004-04-151-0/+4
|
* This is a function, not a method.PYGTK_2_3_90Johan Dahlin2004-03-271-0/+12
| | | | | | | | | | | | * 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
* same here.James Henstridge2003-07-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-07-24 James Henstridge <james@daa.com.au> * gtk/pygtk.h (init_pygtk): same here. * pygobject.h (init_pygobject): convert fatal errors to normal exceptions. * gtk/gtkglmodule.c (initgl): same here. * gtk/libglademodule.c (initglade): same here. * gtk/gtkmodule.c (init_gtk): same here. * atkmodule.c (initatk): same here. * pangomodule.c (initpango): same here. * gobjectmodule.c (initgobject): don't cause fatal errors if an exception on init. * codegen/codegen.py (write_source): print an error message if it isn't possible to import a particular name from the module. * autogen.sh (DIE): require Automake 1.7. * configure.in (AC_ARG_ENABLE): enable thread support by default.
* the GObject should own a ref to the wrapper. (pygobject_new): get rid ofJames Henstridge2003-03-071-1/+0
| | | | | | | | | | | | | | | | | | | | 2003-03-06 James Henstridge <james@daa.com.au> * pygobject.c (pygobject_register_wrapper): the GObject should own a ref to the wrapper. (pygobject_new): get rid of the hasref code, and make sure that the GObject owns a ref to the wrapper if we create it. (pygobject_dealloc): get rid of the hasref code. If we get this far, the wrapper is dead. (pygobject_traverse): if the GObject's refcount == 1, then traverse to self. (pygobject_clear): clear self->obj and self->inst_dict. (pygobject_register_class): set tp_clear() so that things actually work. Without this, there was no tp_clear method for subclasses of GObject. * pygobject.h: remove hasref member, hopefully not needed if relying on cycle GC.
* don't need to manually sink. (_wrap_gtk_tree_view_column_new): same here.James Henstridge2002-08-181-26/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-18 James Henstridge <james@daa.com.au> * gtk/gtk.override (_wrap_gtk_clist_new_with_titles): don't need to manually sink. (_wrap_gtk_tree_view_column_new): same here. (_wrap_gtk_button_new): same here. (_wrap_gtk_toggle_button_new): same here. (_wrap_gtk_check_button_new): same here. (_wrap_gtk_radio_button_new): same here. (_wrap_gtk_list_item_new): same here. (_wrap_gtk_menu_item_new): same here. (_wrap_gtk_check_menu_item_new): same here. (_wrap_gtk_radio_menu_item_new): same here. (_wrap_gtk_image_menu_item_new): same here. (_wrap_gtk_ctree_new_with_titles): same here. (_wrap_gtk_dialog_new_with_buttons): same here. (_wrap_gtk_message_dialog_new): same here. (_wrap_gtk_progress_bar_new_with_adjustment): same here. * gtk/gtkmodule.c (sink_gtkobject): function to sink a GtkObject if it is floating. (init_gtk): register sink_gtkobject for sinking GtkObjects. * codegen/codegen.py (GObjectWrapper.get_initial_constructor_substdict): get rid of gtkobjectsink bit of code. * pygobject.c (pygobject_register_sinkfunc): new function to register a function to get rid of the floating reference from an object. (sink_object): run a sinkfunc for an object if it has been registered. (pygobject_new): call sink_object (pygobject_register_wrapper): call sink_object.
* Reworking of Arjan Molenaar's (arjanmolenaar@hetnet.nl) patch from bugPYGTK_1_99_11James Henstridge2002-07-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-07-09 James Henstridge <james@daa.com.au> Reworking of Arjan Molenaar's (arjanmolenaar@hetnet.nl) patch from bug 71435. * gtk/libglade.override (connect_one): watch the closure. (connect_many): watch the closure. * gtk/gtk.override (_wrap_gtk_toolbar_append_item): watch closure for signal. (_wrap_gtk_toolbar_prepend_item): same here. (_wrap_gtk_toolbar_insert_item): same here. (_wrap_gtk_toolbar_insert_stock): same here. (_wrap_gtk_toolbar_append_element): same here. (_wrap_gtk_toolbar_prepend_element): same here. (_wrap_gtk_toolbar_insert_element): same here. * pygobject.h (_PyGObject_Functions): add pygobject_watch_closure to the list of exported functions. * pygobject.c (pygobject_watch_closure): new function to watch a closure. We perform cyclic garbage collection on watched closures. The closure will automatically be unwatched when it gets invalidated. (pygobject_traverse): traverse watched closures as well. (pygobject_clear): invalidate all watched closures (pygobject_dealloc): invalidate watched closures on dealloc too. (PyGObject_Type): register the invalidate handler. (pygobject_connect): watch the closure we connect here. (pygobject_connect_after): same here.. (pygobject_connect_object): same here. (pygobject_connect_object_after): same here. * pygtype.c (pyg_closure_new): clean up closure on invalidate, rather than finalize (on invalidate, we break references). * pygobject.h (PyGObject): add closures member to store references to PyGClosures.
* copy boxed arguments.James Henstridge2002-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | 2002-06-23 James Henstridge <james@daa.com.au> * gtk/gtk.override (_wrap_gtk_tree_sortable_get_sort_column_id): copy boxed arguments. * pygobject.h: fix up prototypes. * gobjectmodule.c (pyg_object_set_property): copy boxed arguments. * pygobject.c (pygobject_get_property): copy boxed arguments here. (pygobject_emit): same here. (pygobject_chain_from_overridden): same here. * pygtype.c (pyg_value_as_pyobject): add "copy_boxed" argument to this function. (pyg_closure_marshal): pass FALSE for copy_boxed argument. (pyg_signal_class_closure_marshal): same here.