summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* mask out G_SIGNAL_TYPE_STATIC_SCOPE to fix signal emission.Matt Wilson2001-10-051-3/+4
| | | | | | | 2001-10-05 Matt Wilson <msw@redhat.com> * gobjectmodule.c (pygobject_emit): mask out G_SIGNAL_TYPE_STATIC_SCOPE to fix signal emission.
* Handle non-Tuple parameters.Johan Dahlin2001-10-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-05 Johan Dahlin <zilch.am@home.se> * gobjectmodule.c (pyg_closure_new): Handle non-Tuple parameters. * gtk/gtk.override (_wrap_gtk_window_list_toplevels): Bound (_wrap_gtk_toolbar_insert_stock): Bound. * gtk/gtk.defs (binding_entry_clear): rename from gtk_bindings_entry_clear (color_selection_palette_from_string): rename from gtk_color_selection_palette_from_string (set_border_width): Added (set_resize_mode): Added (get_children): Added (children): Mark as deprecated (get_focus_chain): Added (get_focus_vadjustment): Added (get_focus_hadjustment): Added (gtk_container_add_child_arg_type): Removed (gtk_container_query_child_args): Removed (gtk_containerchild_getv): Removed (gtk_container_child_setv): Removed (gtk_container_add_with_args): Removed (gtk_container_addv): Removed (gtk_container_add_set): Removed (gtk_container_add_get): Removed (GtkContainer.child_set): Added (GtkContainer.child_get): Added (gtk_container_child_args_collect): Removed (gtk_container_child_arg_get_info): Removed (GtkDrawingArea.size): Mark as deprecated (GtkEditable.get_editable): Added (GtkEntry.new_with_max_length): Mark as deprecated (GtkEntry.get_visibility): Added (GtkEntry.get_invisible_char): Added (GtkEntry.get_max_length): Added (GtkFontSelection.get_font): Mark as deprecated (GtkFontSelectionDialog.get_font): Mark as deprecated (GtkFrame.get_label_widget): Added (GtkFrame.get_label_align): Added (GtkFrame.get_shadow_type): Added (GtkGC.gc_get): Added (gtk.gc_release): Rename from gtk_gc_release (GtkHandleBox.get_shadow_type): Added (GtkHandleBox.get_handle_position): Added (GtkHandleBox.get_snap_edge): Added (GtkHscale.new_with_range): Added (GtkLayout.freeze): Mark as deprecated (GtkLayout.thaw): Mark as deprecated (GtkListStore.new): Fix parameters (GtkListStore.newv): Added (needed?) (GtkListStore.set): Added (GtkListStore.clear): Added (gtk_init_abi_check): Remove (gtk_init_check_abi_check): Remove (gtk_exit): Remove (gtk.get_current_event_state): Added (GtkMenu.get_tearoff_state): Added (GtkMenu.get_title): Added (gtk_rc_*): Rename to rc_* (GtkToolbar.insert_stock): Added (GtkToolbar.set_icon_size): Added (GtkToolbar.unset_style): Added (GtkToolbar.unset_icon_size): Added (GtkToolbar.get_orientation): Added (GtkToolbar.get_style): Added (GtkToolbar.get_icon_size): Added (GtkToolbar.get_tooltips): Added (gtk_type_unique): Remove (gtk_type_class): Remove (gtk_type_new): Remove (gtk_enum_get_values): Remove (gtk_flags_get_values): Remove (gtk_enum_find_value): Remove (gtk_flags_find_value): Remove (GtkViewport.get_shadow_type): Added (GtkVscale.new_with_range): Added
* tweak the repr such that calling it on an uninitialized PyGObject won'tMatt Wilson2001-10-031-3/+6
| | | | | | | | 2001-10-03 Matt Wilson <msw@redhat.com> * gobjectmodule.c (pygobject_repr): tweak the repr such that calling it on an uninitialized PyGObject won't segfault. Also print the python class name.
* remove debugging message James checked in.Matt Wilson2001-10-021-1/+0
| | | | | | | | | | 2001-10-02 Matt Wilson <msw@redhat.com> * gobjectmodule.c (pygobject_dealloc): remove debugging message James checked in. * gtk/gtk.override (_wrap_gtk_text_buffer_set_text): override GtkBuffer.set_text so that you don't have to pass in the length.
* (pyg_object_new): rewrote function to use g_object_newv and instantiateMatt Wilson2001-10-021-27/+36
| | | | | | | | | | 2001-10-02 Matt Wilson <msw@redhat.com> (pyg_object_new): rewrote function to use g_object_newv and instantiate the object after we check to make sure the class handles all the properties passed. This solves the problem of trying to destroy a GtkObject after creating it, which can be a little tricky.
* added a new gobject.new function to create an object of any registeredMatt Wilson2001-10-021-0/+63
| | | | | | | | 2001-10-02 Matt Wilson <msw@redhat.com> * gobjectmodule.c (pyg_object_new): added a new gobject.new function to create an object of any registered type with kwargs property setting.
* fix bug where we were INCREFing the saved widget even in the hasref caseJames Henstridge2001-10-021-2/+3
| | | | | | | | 2001-10-02 James Henstridge <james@daa.com.au> * gobjectmodule.c (pygobject_new): fix bug where we were INCREFing the saved widget even in the hasref case (where we should be passing ownership of the last reference).
* (pygobject_new): GC track wrappers created through pygobject_new.James Henstridge2001-09-301-0/+2
| | | | | | 2001-09-30 James Henstridge <james@daa.com.au> (pygobject_new): GC track wrappers created through pygobject_new.
* use plain old PyObject_GC_Del, as the overridden tp_free seems to ignoreJames Henstridge2001-09-301-1/+3
| | | | | | | | 2001-09-30 James Henstridge <james@daa.com.au> * gobjectmodule.c (pygobject_dealloc): use plain old PyObject_GC_Del, as the overridden tp_free seems to ignore the GC header.
* increment version number, and require gtk 1.3.9 (we already required itJames Henstridge2001-09-301-2/+4
| | | | | | | | | | 2001-09-30 James Henstridge <james@daa.com.au> * configure.in: increment version number, and require gtk 1.3.9 (we already required it before). * gobjectmodule.c (pygobject_new): initialise extra members. Problem found by msw.
* small typoPYGTK_1_99_2James Henstridge2001-09-291-1/+1
|
* add a wrapper for a GParamSpec. Currently it only exposes the baseJames Henstridge2001-09-291-2/+127
| | | | | | | | | | | 2001-09-29 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_param_spec_new): add a wrapper for a GParamSpec. Currently it only exposes the base parameter info; none of the extra info provided by derived param specs. (pyg_object_class_list_properties): return a list of GParamSpec objects, rather than just strings. (pyg_value_as_pyobject): catch NULL strings.
* use pyg_type_from_object instead. Based on patch from Elliot.James Henstridge2001-09-282-304/+249
| | | | | | | | | | | | 2001-09-29 James Henstridge <james@daa.com.au> * gtk/pygtktreemodel.c (pygtk_tree_model_get_column_type): use pyg_type_from_object instead. Based on patch from Elliot. * gtk/gtk.override (_wrap_gtk_selection_data__get_data): convert getter to a function to match codegen changes. * : merge in python22-branch (see changelog entries below).
* uncomment this now it has a boxed type.python22-branch-anchorJames Henstridge2001-09-201-1/+1
| | | | | | | | | | 2001-09-20 James Henstridge <james@daa.com.au> * pango.defs (FontMetrics): uncomment this now it has a boxed type. * gtk/Makefile.am (EXTRA_DIST): add gdk.override to dist. * configure.in: update version number.
* rename from new, so that the header is includable in C++ programs.PYGTK_1_99_1James Henstridge2001-09-201-2/+2
| | | | | | | 2001-09-20 James Henstridge <james@daa.com.au> * pygobject.h (_PyGObject_Functions.newgobj): rename from new, so that the header is includable in C++ programs.
* rename to gobject.list_properties.James Henstridge2001-09-181-2/+2
| | | | | | | 2001-09-18 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_object_class_list_properties): rename to gobject.list_properties.
* export this function.James Henstridge2001-09-182-185/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-18 James Henstridge <james@daa.com.au> * pygobject.h (pyg_type_wrapper_new): export this function. * codegen/argtypes.py (GTypeArg.write_return): wrap GType return values as PyGTypeWrappers rather than ints. * codegen/codegen.py (write_source): pass the typecode macros to pygobject_register_class and pyg_register_interface rather than references to the get_type functions. * pygobject.h (_PyGObject_Functions): fix up prototypes. * gobjectmodule.c (check_bases): check if the base class is an extensionclass before poking around in class->bases. (pyg_type_*): don't bother storing the _get_type() function for lazy initialisation. Instead, just store the GType. Also, remove code for coercing them into numbers. (pygobject_register_class): take the type, rather that get_type routine as an argument. (pyg_register_interface): same here. (pyg_type_from_object): don't accept types that convert to ints as being equivalent to GTypes. (pyg_register_boxed): set the __gtype__ attribute to a PyGTypeWrapper. (pyg_type_register): set __gtype__ to a PyGTypeWrapper. (pyg_type_name): use pyg_type_from_name (pyg_type_from_name): return a PyGTypeWrapper object. (pyg_type_parent): update. (pyg_type_is_a): update. (pyg_type_children): update. (pyg_type_interfaces): update. (initgobject): set __gtype__ attributes to PyGTypeWrapper objects. (initgobject): make type constants PyGTypeWrapper objects.
* check if the base class is an extensionclass before poking around inJames Henstridge2001-09-181-1/+1
| | | | | | | 2001-09-18 James Henstridge <james@daa.com.au> * gobjectmodule.c (check_bases): check if the base class is an extensionclass before poking around in class->bases.
* allow '_' as start of constant name. (pyg_flags_add_constants): same here.James Henstridge2001-09-151-2/+2
| | | | | | | | 2001-09-15 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_enum_add_constants): allow '_' as start of constant name. (pyg_flags_add_constants): same here.
* don't import GTK.James Henstridge2001-09-151-2/+10
| | | | | | | | | | | | | | | 2001-09-15 James Henstridge <james@daa.com.au> * gtk/__init__.py (TRUE): don't import GTK. * gtk/gtkmodule.c (init_gtk): same here. * pangomodule.c (initpango): add constants to the pango module. * codegen/codegen.py (write_enums): new function that writes a function to add constants for all the enums and flags in the parser. (write_source): call write_enums().
* add test use of add_constants.James Henstridge2001-09-142-0/+77
| | | | | | | | | | | | | 2001-09-15 James Henstridge <james@daa.com.au> * gtk/gtkmodule.c (init_gtk): add test use of add_constants. * pygobject.h (_PyGObject_Functions): add new functions to header. * gobjectmodule.c (pyg_enum_add_constants): new function for adding constants to a module dictionary from a particular GType. (pyg_flags_add_constants): similar for flag types. (functions): add to export function vtable.
* same change.James Henstridge2001-09-142-6/+6
| | | | | | | | | 2001-09-14 James Henstridge <james@daa.com.au> * pygobject.h (pyg_register_boxed_custom): same change. * gobjectmodule.c (pyg_register_boxed_custom): rename from pyg_boxed_register to avoid confusion.
* merge from short-class-names-branchJames Henstridge2001-09-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-14 James Henstridge <james@daa.com.au> merge from short-class-names-branch 2001-09-12 James Henstridge <james@daa.com.au> * codegen/codegen.py (write_class, write_interface): set the short name as the class name here. * gobjectmodule.c (pygobject_register_class): pass ec->tp_name as the name for the class passed to PyExtensionClass_Export*. * codegen/codegen.py (write_source): pass the C name to pygobject_register_class again. 2001-09-11 James Henstridge <james@daa.com.au> * gtk/__init__.py (create_pixmap): few fixups to get things to import correctly. * gtk/gtkmodule.c (init_gtk): there is no _pygdk_register_boxed(). * gtk/libglade.override (init): same here. * gtk/gtk.override (init): same here. * gtk/gdk.override (init): use short class names here. * gtk/gtkmodule.c (init_gtk): initialise both the gtk._gtk and gtk.gdk modules. * gtk/gtk.defs: don't include gdk.defs * gtk/gtk.override: remove all GDK override wrappers. * gtk/gdk.override: new file taking the overrides for GDK functions. * codegen/codegen.py (write_source): register only the short name of the GObject, interface or boxed type.
* removed. (gtk_cell_renderer_text_pixbuf_get_type): removed.Johan Dahlin2001-09-131-3/+1
| | | | | | | | | | | | | | | | | | | 2001-09-13 Johan Dahlin <zilch.am@home.se> * gtk/gtk.defs (CellRendererTextPixbuf): removed. (gtk_cell_renderer_text_pixbuf_get_type): removed. (gtk_cell_renderer_text_pixbuf_new): removed. (gtk_cell_renderer_text_iter_spew): removed. (row_changed): Renamed. (row_inserted): Renamed. (row_has_child_toggled): Renamed. (row_deleted): Renamed. (rows_reordered): Renamed, and fixed. (set_fixed_width): Renamed. (get_fixed_width): Added. * gobjectmodule.c (initgobject): Adjust g_boxed_type_register_static to compile under latest cvs.
* fix up enums.sigc1_1_before_patchshort-class-names-branch-anchorPYGTK_1_99James Henstridge2001-09-061-2/+4
| | | | | | | | | | 2001-09-06 James Henstridge <james@daa.com.au> * gtk/GTK.py: fix up enums. * gobjectmodule.c (pyg_closure_marshal): if return_value is NULL, don't set it. (pyg_signal_class_closure_marshal): same here.
* various updates to make it compile.James Henstridge2001-09-061-69/+106
| | | | | | | | | | | | | | | | | | | 2001-09-06 James Henstridge <james@daa.com.au> * gtk/gtk.defs: various updates to make it compile. * gtk/gtk-types.c (pygdk_atom_str): fallback to returning the repr of the atom if we can't resolve its name, rather than returning NULL. Patch from Skip. * gobjectmodule.c (pyg_value_from_pyobject): look at the fundamental type in this function so we can use a switch statement that catches the fundamental types easily, reducing the number of type checks. (pyg_value_as_pyobject): similar here. Also handle boolean types using patch from Skip. * gtk/GDK.py: add extra constants from Skip.
* update for autoconf 2.52James Henstridge2001-08-211-0/+1
| | | | | | | | | | | | | | 2001-08-21 James Henstridge <james@daa.com.au> * configure.in: update for autoconf 2.52 * gtk/gtk.defs: make GtkAccelGroup a GObject rather than a boxed type. remove the gtk_tree_model_get_first function. 2001-07-09 James Henstridge <james@daa.com.au> * gobjectmodule.c (initgobject): add a gobject.TYPE_PYOBJECT constant for the PyObject boxed typecode.
* register a "PyObject" boxed type with glib.. (pyg_value_from_pyobject): ifJames Henstridge2001-07-081-3/+35
| | | | | | | | | * gobjectmodule.c: (initgobject): register a "PyObject" boxed type with glib.. (pyg_value_from_pyobject): if the value holds a PY_TYPE_OBJECT, set the value directly. (pyg_value_as_pyobject): special case the PY_TYPE_OBJECT case again.
* fix argument type for return_type.James Henstridge2001-07-081-1/+1
| | | | | | | 2001-07-08 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_signal_new): fix argument type for return_type.
* function to list the signals of an object type. From patch by SkipJames Henstridge2001-07-011-0/+89
| | | | | | | | | 2001-07-01 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_signal_list_names): function to list the signals of an object type. From patch by Skip Montanaro (pyg_object_class_list_properties): function to list the properties of a GObject. Also from Skip.
* remove g_type_init() argument.James Henstridge2001-06-301-1/+1
| | | | | | | | | | | | | | 2001-06-30 James Henstridge <james@daa.com.au> * gobjectmodule.c (initgobject): remove g_type_init() argument. * gtk/gdk.defs (Visual): make GdkVisual a boxed. * gtk/gtk.override (GdkDragContext.targets): override getter for this attribute. (_wrap_gtk_list_store_new): comment out most of this function as there is no way to construct a GtkListStore without C varargs as of the last GtkTree related commit.
* remove dead code for GtkArg handling, etc. (also tidied up references toJames Henstridge2001-06-252-1/+5
| | | | | | | | | | | | | 2001-06-25 James Henstridge <james@daa.com.au> * gtk/gtkobject-support.c: remove dead code for GtkArg handling, etc. (also tidied up references to it in other files). 2001-06-24 James Henstridge <james@daa.com.au> * gtk/gtk-types.c: removed all traces of GdkFont. * gtk/gdk.defs (Font): add boxed type for font.
* more fixups to use pyg_type_from_object.James Henstridge2001-06-232-5/+12
| | | | | | | | | | | | | | | | | | | | | | 2001-06-23 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_signal_new): more fixups to use pyg_type_from_object. * gtk/gtk.override (_wrap_gtk_accel_group_new): don't use PyGtkAccelGroup_New (not sure why I am fixing this -- will change soon anyway). (_wrap_gtk_tree_store_set_value): use pyg_type_from_object here. (_wrap_gtk_list_store_set_value): same here. * codegen/argtypes.py (CustomBoxedArg): rename from BoxedArg. (BoxedArg): new code for standardised PyGBoxed handling. (ArgMatcher.register_custom_boxed): rename from register_boxed (ArgMatcher.register_boxed): new function for PyGBoxed types. (arg): use ArgMatcher.register_boxed to register GtkAccelGroup. * pygobject.h (pyg_boxed_check): change macro to check against the typecode, rather than python wrapper type.
* new arg type for GType and GtkType args that uses pyg_type_from_object.James Henstridge2001-06-222-48/+83
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-22 James Henstridge <james@daa.com.au> * codegen/argtypes.py (GTypeArg.write_param): new arg type for GType and GtkType args that uses pyg_type_from_object. * gobjectmodule.c (pyg_type_from_object): new function to get a type code from various types of python objects (currently, integer like objects, strings and other objects that have a __gtype__ attribute). (pygobject__init__): use pyg_type_from_object to get the object type. (pyg_signal_new): same here. 2001-06-21 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_boxed_getattro): allow getattr to work on PyGBoxed types (while not overloading tp_getattr). We fall back to tp_getattr if provided by the boxed type. (pyg_register_boxed): make sure tp_getattro is set correctly. * gtk/gtk-types.c (_pygtk_register_boxed_types): convert GtkAccelGroup to a PyGBoxed type.
* comment out, as container args have been switched to properties now.James Henstridge2001-06-211-5/+9
| | | | | | | | | | | | | | | | | | 2001-06-21 James Henstridge <james@daa.com.au> * gtk/gtkobject-support.c (pygtk_dict_as_container_args): comment out, as container args have been switched to properties now. 2001-06-19 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_value_from_pyobject): handle PyGBoxed types. (pyg_value_as_pyobject): pass out PyGBoxed types if no custom handler is found, rather than straight CObjects. Will need to do something about cases where we want mutable values (ie. don't copy the boxed type). * configure.in: require glib/gtk+ 1.3.6
* remove the constructor from interfaces. It is now provided by GInterface.James Henstridge2001-06-091-1/+68
| | | | | | | | | | | | 2001-06-09 James Henstridge <james@daa.com.au> * codegen/codegen.py (write_interface): remove the constructor from interfaces. It is now provided by GInterface. (write_source): use pyg_register_interface to register interfaces. * gobjectmodule.c (PyGInterface_Type): add a GInterface class that is the base of all interfaces. It prevents subclassing of interface objects, etc.
* function to register a new boxed type ExtensionClass. (pyg_boxed_new): newJames Henstridge2001-06-082-1/+207
| | | | | | | | | | | | | | | | | | | | | 2001-06-08 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_register_boxed): function to register a new boxed type ExtensionClass. (pyg_boxed_new): new function to create wrapper instances for a particular boxed type (given its typecode). 2001-06-07 James Henstridge <james@daa.com.au> * pygobject.h (pyg_boxed_get): add prototypes for a PyGBoxed type that will be used for all boxed types in pygtk (well, I can hope :) * gobjectmodule.c (pyg_register_interface): new function to register interfaces with. Makes sure I don't accidentally give the interface a parent class :). Also adds a __gtype__ class attribute similar to GObject classes. May also make interfaces subclasses of GInterface at some point.
* 2001-05-06 James Henstridge <james@daa.com.au>James Henstridge2001-05-062-5/+109
| | | | | | | | | | | | | | | | | | | | 2001-05-07 James Henstridge <james@daa.com.au> * examples/gobject/signal.py: 2001-05-06 James Henstridge <james@daa.com.au> * gobjectmodule.c (pygobject__init__): make the __init__ function choose what GType to pass to g_object_new based on the __gtype__ attribute. (pygobject_methods): make __gobject_init__ an alias for GObject.__init__. (pyg_type_register): new function for registering new GTypes. (pyg_type_register): register the type as "module+class" rather than "module.class", as the second form is considered bad (would like to use the second form though. * configure.in: require 1.3.5 versions of glib and gtk+.
* moved rewritten testgtk demo hereJames Henstridge2001-03-302-3/+10
| | | | | | | | | | | | | | | | | | | | 2001-03-30 James Henstridge <james@daa.com.au> * examples/pygtk-demo: moved rewritten testgtk demo here * gobjectmodule.c (pygobject_set_property): initialise the GValue to { 0, }, so set_property actually works. (pygobject_get_property): same here. * gtk/gtk.defs: updated enum/flag defs. * gtk/gdk.defs: updated enum/flag defs. * examples/gobject/signal.py (D.do_my_signal): add small example of overriding class closure for a signal introduced from python code. * codegen/h2def.py: add --onlyenums flag to only output enum defs.
* simple example program that adds a signal to a class, connects a handlerJames Henstridge2001-03-272-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-27 James Henstridge <james@daa.com.au> * examples/gobject/signal.py: simple example program that adds a signal to a class, connects a handler to an instance of that class, and finally emits that signal. Messages are printed by both the signal handler and class method closure. * gobjectmodule.c (pyg_signal_class_closure_marshal): convert dashes in signal name to underscores. Why does g_siganl_name use dashes? (pyg_signal_class_closure_marshal): fix off by one error when setting up the python argument tuple. The first element was getting left uninitialised. Signals introduced in python now work. * gtk/gtk.defs (GtkFileSelection.get_filename): return value is const. * gtk/gtk.override (_wrap_gtk_list_store_set_value): change name. (_wrap_gtk_tree_store_insert): change name. * gtk/gtk.defs (GtkListStore.set_value): change from set_cell to set_value. (GtkListStore.set_value): same here.
* (pyg_signal_new): new function to create new signals. Doesn'tJames Henstridge2001-03-271-0/+80
| | | | work right yet.
* new function to get the closure used as the `class closure' for signals.James Henstridge2001-03-271-0/+93
| | | | | | | | | 2001-03-27 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_signal_class_closure_get): new function to get the closure used as the `class closure' for signals. We only need one, as we can get all the information we need from the invocation hint.
* add some comments about creating new GTypes here.James Henstridge2001-03-261-4/+130
| | | | | | | | | 2001-03-26 James Henstridge <james@daa.com.au> * gobjectmodule.c (pygobject__class_init__): add some comments about creating new GTypes here. * gobjectmodule.c: add type info functions to module.
* s/is_last/is_end/James Henstridge2001-03-241-1/+1
| | | | | | | | | | | | 2001-03-24 James Henstridge <james@daa.com.au> * gtk/gtk-types.c (pygtk_text_iter_is_end): s/is_last/is_end/ * gobjectmodule.c (pyg_closure_new): s/add_fnotify/add_finalize_notifier/ * gtk/gdk.defs, gtk/gtk.defs, gtk/gtk.override: various changes to make it compile again.
* Still broken. Needs more updatingJames Henstridge2001-03-182-33/+219
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-18 James Henstridge <james@daa.com.au> * gtk/pygtktreemodel.c (pygtk_tree_model_class_init): signals are now created in the gtktreemodel.c, so we don't need to. * gtk/gtk.defs (Adjustment): make parent GtkObject, as GtkData is gone. (GtkText): remove from binding. * codegen/codegen.py (write_source): pass in the get_type function when registering classes. (gettypetmpl): remove template. (write_class): remove get_type method generator. Handled by __gtype__ * gobjectmodule.c (initgobject): add argument to g_type_init call. (pyg_value_from_pyobject): use G_VALUE_HOLDS_* rather than G_IS_VALUE_*. (pyg_value_as_pyobject): same here. (pygobject_register_class): add an argument that takes the get_type function for the GObject. This is used to add a __gtype__ attribute to the class (the get_type function is not actually called until __gtype__ is accessed).
* destroy window on button's clicked signal rather than destroy signal.PYGTK_0_6_7GNOME_PYTHON_1_4_0James Henstridge2000-12-141-35/+64
| | | | | | | | | | | | | | | | | | | | | 2000-12-14 James Henstridge <james@daa.com.au> * examples/testgtk/demos/menu.py (main): destroy window on button's clicked signal rather than destroy signal. * gtk/gtk.defs: remove gtk_object_default_construct and gtk_object_constructed. * gobjectmodule.c: change over to new notification functions. * gtk/gtk-types.c: rename functions. * gobjectmodule.c (pygobject_get_property): (pygobject_set_property): change function names to match changes in glib. (...connect|emit): use g_signal_parse_name instead of g_signal_lookup, so we can parse the detail out of the signal name string.
* start of a revamped testgtk example, similar to the new one in gtk.James Henstridge2000-11-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | 2000-11-11 James Henstridge <james@daa.com.au> * examples/testgtk/testgtk.py: start of a revamped testgtk example, similar to the new one in gtk. * gtk/gtk-types.c (PyGdkEvent_New): guard against a NULL axes member in the GdkEvent structure. * gtk/gtk.override (_wrap_gtk_tree_view_get_path_at_pos): implementation of this function. * codegen/argtypes.py (GtkTreePathArg): add an arg matcher for GtkTreePath objects, that represents them as tuples of integers. * gtk/gtk-types.c (_pygtk_register_boxed_types): add marshalers for GtkTreeIter and GtkTreePath so they can be used from signal handlers now. * gtk/gtk.override, gtk/gtk.defs: make name change for GtkTreeStore constructor.
* change code generator to pass bases in as a tuple rather than a singleJames Henstridge2000-11-092-5/+5
| | | | | | | | | | | | | 2000-11-09 James Henstridge <james@daa.com.au> * codegen/codegen.py (write_source): change code generator to pass bases in as a tuple rather than a single PyExtensionClass structure. * pygobject.h: change prototype. * gobjectmodule.c (pygobject_register_class): allow for registerin a type with multiple base classes.
* add a special case for converting GObject -> G_OBJECT.James Henstridge2000-11-081-4/+4
| | | | | | | | | | | | | | | 2000-11-08 James Henstridge <james@daa.com.au> * codegen/argtypes.py (_conv_special_cases): add a special case for converting GObject -> G_OBJECT. * gobjectmodule.c (pygobject_connect*): g_signal_connect_closure renaming. * codegen/argtypes.py (arg): add GtkTreeIter support. * gtk/gtk-types.c, gtk/pygtk.h, gtk/pygtk-private.h: add a skeleton for the GtkTreeIter wrapper.
* reorder parameters to make it work with latest glib. (pygobject_connect*):James Henstridge2000-10-301-7/+7
| | | | | | | | | | | 2000-10-30 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_closure_marshal): reorder parameters to make it work with latest glib. (pygobject_connect*): pass 0 for the new detail parameter. Don't know what it is for. (pygobject_emit): pass 0 for detail parameter. (pygobject_stop_emission): pass 0 for detail parameter.