summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* mingw32 patches from Cedric Gustin <cgustin@ibelgique.com>:James Henstridge2002-08-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | 2002-08-24 James Henstridge <james@daa.com.au> mingw32 patches from Cedric Gustin <cgustin@ibelgique.com>: * gtk/gtk.override: ignore more socket/plug functions on win32. * gtk/gdk.override: gdk_pixmap_lookup is not implemented on win32. * gtk/Makefile.am (common_ldflags): and here. * pango.override (PyPangoAttribute_Type): initialise tp_alloc and tp_new in the init() function, rather than in the structure definition itself. * Makefile.am (common_ldflags): pass -no-undefined if we are on windows. * configure.in: turn on win32 DLL support, and add OS_WIN32 and PLATFORM_WIN32 conditionals for use in makefiles.
* fix small typo.James Henstridge2002-08-191-4/+12
| | | | | | | | 2002-08-19 James Henstridge <james@daa.com.au> * codegen/codegen.py (GObjectWrapper.get_initial_constructor_substdict): fix small typo.
* update to use this function. (ArgMatcher.register_boxed): short circuit ifJames Henstridge2002-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-07-07 James Henstridge <james@daa.com.au> * codegen/argtypes.py (GtkTreePathArg.write_return): update to use this function. (ArgMatcher.register_boxed): short circuit if there is already a handler for the boxed type (helps with setting custom handlers for boxed types). * gtk/gtk-types.c (pygdk_rectangle_from_pyobject): new function to parse a GdkRectangle from a PyObject. * gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_path): print a warning if the return value could not be converted to a GtkTreePath. * gtk/gtk.override (_wrap_gtk_tree_model_get_value): don't assume tree paths are tuples. * codegen/argtypes.py (GtkTreePathArg.write_param): fix up code generator to get rid of assumption that tree paths are tuples, and catch case where pygtk_tree_path_from_pyobject() returns NULL. * gtk/gtk-types.c (pygtk_tree_path_from_pyobject): change so that we treat an integer PyObject as a tree path with a single index. * pygtype.c (pyg_closure_marshal): apply patch from Arjan Molenaar <arjanmolenaar@hetnet.nl> that fixes a reference leak for the argument tuple passed to the callback. (pyg_signal_class_closure_marshal): apply similar fix here.
* fix definition, as reported by Thomas Leonard <tal00r@ecs.soton.ac.uk>James Henstridge2002-06-241-3/+4
| | | | | | | 2002-06-24 James Henstridge <james@daa.com.au> * gtk/gtk.defs (drag_source_set_icon_pixbuf): fix definition, as reported by Thomas Leonard <tal00r@ecs.soton.ac.uk>
* small updates to some examples.James Henstridge2002-06-234-6/+7
|
* update example to work with current PyGTK.James Henstridge2002-06-231-29/+28
| | | | | | | 2002-06-23 James Henstridge <james@daa.com.au> * examples/simple/scribble.py: update example to work with current PyGTK.
* implement (code mostly from jrb@redhat.com, minor fixups from me)Matt Wilson2002-06-041-3/+5
| | | | | | | | | | | | 2002-06-03 Matt Wilson <msw@redhat.com> * gtk/gtk.override (_wrap_gtk_tree_view_insert_column_with_attributes): implement (code mostly from jrb@redhat.com, minor fixups from me) * gtk/gdk-types.defs (EventExpose): added to make the code generator write GdkEventExpose * for _wrap_gtk_container_propagate_expose (gets rid of a warning)
* the path argument must be a tuple. Ints are not automatically converted toMatt Wilson2002-05-311-1/+1
| | | | | | | | | | | | 2002-05-31 Matt Wilson <msw@redhat.com> * examples/pygtk-demo/demos/list_store.py (fixed_toggled): the path argument must be a tuple. Ints are not automatically converted to tuples any more. * pygtype.c (pyg_value_as_pyobject): change the behavior of G_TYPE_UINT to match the code generator's output on 32 bit systems.
* added parameter --errorfilename to allow redirection of stderr even withHans Breuer2002-04-211-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-04-21 Hans Breuer <hans@breuer.org> * codegen/codegen.py : added parameter --errorfilename to allow redirection of stderr even with clumsy windoze shell * codegen/override.py : extended to allow 'sys.platform' specific ignores * examples/pygtk-demo/demos/colorsel.py : use color = gtk.gdk.color_parse("blue") to get the initial color * examples/pygtk-demo/demos/draw.py : (new file) demonstrating some simple drawing operations. It is using the gtk.GC interface additions below. * gtk/gdk.override : implement GdkGC.tp_getattr, GdkGC.tp_setattr and gdk_gc_set_dashes (ported from #if 0'ed code in gtk/gtk-types.c (should be removed there ?) * gtk/gtk.override : ignore-win32 GTK_TYPE_PLUG GTK_TYPE_SOCKET gtk_socket_new (the TYPE ignores do not work yet) * config.h.win32 makefile.msc pygtk/makefile.msc : new files to build pygtk on windoze using the established glib/build/win32 infrastructure * pygtk/gtk/gtk-fake-win32.c : (new file) implementing gtk_plug_get_type() and gtk_socket_get_type(). It could vanish if codegen/codegen.py has learned something like 'ignore-class-$(sys.platform) or my GtkPlug/GtkSocket patch gets accepted with Gtk. * gtk/gtkmodule.c : added a g_assert() to ensure importing pygobject did work.
* Added the gtk.gl module.Xavier Ordoquy2002-04-123-40/+41
| | | | | | | | | | | | | | | | | | | | 2002-04-12 Xavier Ordoquy <mcarkan@user.sourceforge.net> * configure.in: * gtk/Makefile.am: Added the gtk.gl module. * gtk/gtkgl.defs: * gtk/gtkgl.override: * gtk/gtkglmodule.c: (initgl): Updated the gtkgl module and changed the name to gtk.gl * examples/gl/dots.py: Updated example but still needs some work. * examples/gl/cone.py: * examples/gl/gears.py: Updated working examples.
* clean up a bit and add broken stock icon registrationJohan Dahlin2002-02-252-20/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-02-25 Johan Dahlin <jdahlin@telia.com> * examples/pygtk-demo/demos/appwindow.py: clean up a bit and add broken stock icon registration * examples/pygtk-demo/pygtk-demo.py: Use set_size_request instead of set_usize * gtk/gtk.override (_wrap_gtk_widget_translate_coordinates): Impl (_wrap_gtk_editable_get_selection_bounds): Impl (_wrap_gtk_entry_get_layout_offsets): Impl * gtk/gtk.defs: Add GtkTreeView.columns_autosize * gtk/gtk-types.defs: Add a few fields 2002-02-21 Johan Dahlin <jdahlin@telia.com> * gtk/gtk.defs: Removed gtk_tree_view_column_cell_render, gtk_tree_view_column_cell_focus, gtk_tree_view_column_cell_draw_focus and gtk_tree_view_column_cell_set_dirty since they're now private in gtk.
* add toggle for the check box column. VS:Johan Dahlin2002-02-051-0/+14
| | | | | | | | 2002-02-05 Johan Dahlin <jdahlin@telia.com> * examples/pygtk-demo/demos/list_store.py: add toggle for the check box column. VS: ----------------------------------------------------------------------
* add examples translated by Michelle Campeotto.James Henstridge2002-01-244-0/+439
| | | | | | | | | | 2002-01-24 James Henstridge <james@daa.com.au> * examples/pygtk-demo/demos/colorsel.py: * examples/pygtk-demo/demos/dialogs.py: * examples/pygtk-demo/demos/panes.py: * examples/pygtk-demo/demos/sizegroup.py: add examples translated by Michelle Campeotto.
* add gtk.stock_add() function from Skip (bug 68363).James Henstridge2002-01-241-26/+0
| | | | | | | 2002-01-24 James Henstridge <james@daa.com.au> * gtk/gtk.override (_wrap_gtk_stock_add): add gtk.stock_add() function from Skip (bug 68363).
* updated to use gobject.new().James Henstridge2002-01-246-103/+65
| | | | | | | | 2002-01-24 James Henstridge <james@daa.com.au> * examples/simple/simple.py: updated to use gobject.new(). * examples/simple/hello.py: updated version from Steve George.
* use g_string_append_printf(). (add_property_docs): same here.James Henstridge2002-01-243-75/+46
| | | | | | | | | 2002-01-24 James Henstridge <james@daa.com.au> * pygtype.c (add_signal_docs): use g_string_append_printf(). (add_property_docs): same here. * examples/simple/tooltip.py: updated version from Steve George.
* added appwindow.pyMatt Wilson2002-01-111-0/+154
| | | | | | | | 2002-01-11 Matt Wilson <msw@redhat.com> * Makefile.am (EXTRA_DIST): added appwindow.py * examples/pygtk-demo/demos/appwindow.py: added demo
* added missing newlineMatt Wilson2002-01-111-2/+2
| | | | | | | | | | | | | | | | | | 2002-01-11 Matt Wilson <msw@redhat.com> * codegen/argtypes.py (GtkTreePathArg.normal): added missing newline * gtk/gtk.defs (item_factory_path_from_widget): the return here should be gconst-gchar*. The header in gtk is wrong, filed #68527 against gtk. * gtk/gtk.override (pygtk_item_factory_cb): if the user passed data to GtkItemFactory.create_items, call the callable with the function data as the first parameter. (_wrap_gtk_item_factory_create_items): take an optional callback_data argument. Use PyGtkCustomNotify and g_object_weak_ref to free up the reference to the callable and data after the item factory is freed.
* the F10 key is used to start navigating the menu -- not alt.James Henstridge2002-01-071-1/+1
| | | | | | | | | | | | | | | | | | 2002-01-07 James Henstridge <james@daa.com.au> * examples/pygtk-demo/demos/itemfactory.py (main): the F10 key is used to start navigating the menu -- not alt. * gtk/gtk-types.c (PyGtkStyleHelper_Dealloc): use PyObject_DEL. (PyGtkStyle_Dealloc): same here. (PyGdkWindow_Dealloc): same here. (PyGdkGC_Dealloc): same here. (PyGdkColormap_Dealloc): same here. (pygdk_atom_dealloc): same here. * gobjectmodule.c (pyg_type_wrapper_dealloc): use PyObject_DEL to prevent segfaults with pymalloc. (pyg_param_spec_dealloc): same here.
* added demoMatt Wilson2002-01-031-0/+80
| | | | | | 2002-01-03 Matt Wilson <msw@redhat.com> * examples/pygtk-demo/demos/itemfactory.py: added demo
* remove -1 from store.set call.Matt Wilson2002-01-031-1/+1
| | | | | | | | | | | | | | | | | 2002-01-03 Matt Wilson <msw@redhat.com> * examples/pygtk-demo/demos/list_store.py (create_model): remove -1 from store.set call. * gtk/gtk.defs (GtkMenuBar.append, GtkMenuBar.prepend, GtkMenuBar.insert): uncomment, just ignore these in gtk.override * gtk/gtk.override (ignore): ignore gtk_menu_bar_append, gtk_menu_bar_insert, and gtk_menu_bar_prepend. * gtk/gtkmodule.c (init_gtk): remove unused v variable. * gtk/gtk-types.defs (DialogFlags): s/define-enum/define-flags/
* add new example to dist.James Henstridge2001-12-181-0/+43
| | | | | | | | | | | | | | | | | | | 2001-12-18 James Henstridge <james@daa.com.au> * Makefile.am (EXTRA_DIST): add new example to dist. * examples/gobject/properties.py: test program that implements a few properties. * gobjectmodule.c (add_properties): new function for parsing the __gproperties__ class attribute. (create_property): helper routine for creating and installing the new pspecs. (pyg_type_register): add code to call add_properties if a __gproperties__ attribute is found. (pyg_object_class_init): set set_property/get_property methods in vtable, and get rid of debug message. (initgobject): add G_PARAM_* constants.
* use __gsignals__ notation here.James Henstridge2001-12-141-3/+4
| | | | | | | | | | | 2001-12-14 James Henstridge <james@daa.com.au> * examples/gobject/signal.py: use __gsignals__ notation here. * gobjectmodule.c (create_signal, add_signals): helper routines for handling __gsignals__ attribute of classes. (pyg_type_register): add support for creating signals as part of type registration.
* use new GtkListStore.set method.Matt Wilson2001-12-051-5/+4
| | | | | | | | | | | | 2001-12-05 Matt Wilson <msw@redhat.com> * examples/pygtk-demo/demos/list_store.py (create_model): use new GtkListStore.set method. 2001-12-04 Matt Wilson <msw@redhat.com> * gtk/gtk.override (_wrap_gtk_list_store_set, _wrap_gtk_tree_store_set): added.
* fname is actually required. Added default to NULL for all arguments thatMatt Wilson2001-11-291-1/+1
| | | | | | | | | | 2001-11-29 Matt Wilson <msw@redhat.com> * gtk/libglade.defs (glade_xml_new): fname is actually required. Added default to NULL for all arguments that are null-ok. * gtk/libglademodule.c: added missing #include pygobject.h. Why does pygtk.h define NO_IMPORT_PYGOBJECT?
* rework glade demo and demo files to be glade2Matt Wilson2001-11-295-2302/+141
|
* minor tweaks to actually use the api rightMatt Wilson2001-11-281-5/+7
|
* fixed the constructor so it actually worksMatt Wilson2001-11-281-0/+27
| | | | | | | | | | | | | 2001-11-28 Matt Wilson <msw@redhat.com> * atk.override (_wrap_atk_relation_new): fixed the constructor so it actually works * gtk/Makefile.am ($(srcdir)/gtk.c): get the atk types * gtk/gtk.override: import atk.Object as PyAtkObject_Type * Makefile.am (EXTRA_DIST): added examples/atk/atk-demo.py
* *** empty log message ***Johan Dahlin2001-11-141-0/+115
|
* fix up c-name.sigc1_1_before_patchJames Henstridge2001-10-091-2/+2
| | | | | | | | | | | 2001-10-09 James Henstridge <james@daa.com.au> * gtk/gtk-extrafuncs.defs (GenericTreeModel): fix up c-name. * examples/pygtk-demo/demos/treemodel.py (MyTreeModel): subclass from gtk.GenericTreeModel. * pygtk.spec.in (Requires): add new files to spec file.
* use gobject.TYPE_STRING instead of hard coded valuesMatthew Wilson2001-10-011-2/+2
| | | | | | | | 2001-10-01 Matthew Wilson <msw@redhat.com> * examples/pygtk-demo/demos/treemodel.py (MyTreeModel.on_get_column_type): use gobject.TYPE_STRING instead of hard coded values
* port to new namespaceMatthew Wilson2001-09-291-5/+5
| | | | | | 2001-09-29 Matthew Wilson <msw@redhat.com> * examples/pygtk-demo/demos/dnd.py: port to new namespace
* fixed to work with new namespaceMatt Wilson2001-09-181-10/+10
| | | | | | | 2001-09-18 Matt Wilson <msw@redhat.com> * examples/pygtk-demo/demos/treemodel.py: fixed to work with new namespace
* merge from short-class-names-branchJames Henstridge2001-09-145-62/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix up toolbar constructor.James Henstridge2001-06-272-2/+10
| | | | | | | | | | | | | 2001-06-27 James Henstridge <james@daa.com.au> * examples/pygtk-demo/demos/toolbar.py (main): fix up toolbar constructor. * examples/pygtk-demo/demos/treemodel.py: add on_get_iter() method, and put tree view in a scrolled window. * gtk/pygtktreemodel.c (pygtk_tree_model_get_iter): add missing function to GtkTreeModel implementation.
* more fixups to use pyg_type_from_object.James Henstridge2001-06-232-4/+6
| | | | | | | | | | | | | | | | | | | | | | 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.
* correct signal name.James Henstridge2001-06-111-1/+1
| | | | | | | | | 2001-06-12 James Henstridge <james@daa.com.au> * examples/pygtk-demo/pygtk-demo.py (create_list): correct signal name. * gtk/gtk.defs: update for changes made to gtk.
* 2001-05-06 James Henstridge <james@daa.com.au>James Henstridge2001-05-061-3/+5
| | | | | | | | | | | | | | | | | | | | 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+.
* remove buttons that called set_space_size method.James Henstridge2001-04-281-12/+0
| | | | | | | | | | | | | | | | 2001-04-28 James Henstridge <james@daa.com.au> * examples/pygtk-demo/demos/toolbar.py (main): remove buttons that called set_space_size method. * gtk/__init__.py: remove __all__ definition. It causes problems with python 2.1. * gtk/gtk.override: updated GtkColorSelection method overrides (ignore): remove gtk_entry_new from ignore list, as other entry constructor is gone. * gtk/gtk.defs: updates to make it work with current gtk+
* toolbar demo.James Henstridge2001-03-304-9/+204
| | | | | | | | | 2001-03-30 James Henstridge <james@daa.com.au> * examples/pygtk-demo/demos/toolbar.py (main): toolbar demo. * examples/pygtk-demo/demos/buttonbox.py (main): add button box demo.
* moved rewritten testgtk demo hereJames Henstridge2001-03-3013-226/+17
| | | | | | | | | | | | | | | | | | | | 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-271-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* add some comments about creating new GTypes here.James Henstridge2001-03-261-4/+3
| | | | | | | | | 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.
* destroy window on button's clicked signal rather than destroy signal.PYGTK_0_6_7GNOME_PYTHON_1_4_0James Henstridge2000-12-142-2/+2
| | | | | | | | | | | | | | | | | | | | | 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.
* fix PyObject_CallMethod calls to add parentheses around argument typeJames Henstridge2000-12-061-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-06 James Henstridge <james@daa.com.au> * gtk/pygtktreemodel.c: fix PyObject_CallMethod calls to add parentheses around argument type list. (pygtk_tree_model_get_flags): decref py_ret -- not Py_None (pygtk_tree_model_get_n_columns): same here. (pygtk_tree_model_get_column_type): same here. (*): conditionally print out debugging messages. * examples/testgtk/demos/treemodel.py: simple test of PyGtkTreeModel. * gtk/pygtktreemodel.c: set iter->tree_node to NULL when returning FALSE, as GTK sometimes ignores the return value :( * codegen/codegen.py (interfacetypetmpl): don't set the interface type as having an instance dictionary. (write_interface): actually use interfacetypetmpl when writing out the interface type def. * codegen/argtypes.py (_conv_special_cases): add a special case for the underscore version of PyGtkTreeModel. * gtk/gtk.override: include pygtktreemodel.h * gtk/__init__.py: don't error out if we can't import ltihooks. * gtk/gtk-extrafuncs.defs: include defs for PyGtkTreeModel type. * gtk/Makefile.am (_gtkmodule_la_SOURCES): compile PyGtkTreeModel into pygtk. * gtk/pygtktreemodel.c: fix errors.
* fix bug where mod.__file__ is the .pyc file rather than the .py file.James Henstridge2000-11-291-1/+3
| | | | | | | | | | | | | 2000-11-29 James Henstridge <james@daa.com.au> * examples/testgtk/testgtk.py (load_module): fix bug where mod.__file__ is the .pyc file rather than the .py file. * gtk/gtk.defs: change parent type for some classes to GtkDialog to match changes in gtk+. * gtk/Makefile.am (pysitedir, pyexecdir): fix up directory names. It wasn't installing these files in a gtk/ subdirectory :(
* make changes to make GtkEditable into an interface.James Henstridge2000-11-163-6/+20
| | | | | | | | | | | 2000-11-16 James Henstridge <james@daa.com.au> * gtk/gtk.defs: make changes to make GtkEditable into an interface. * examples/testgtk/demos/__init__.py (demos): create the list of example modules on the fly, rather than having them hard coded into a list.
* start of a revamped testgtk example, similar to the new one in gtk.James Henstridge2000-11-116-1596/+647
| | | | | | | | | | | | | | | | | | | | | | | 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.
* init as module gtk._gtk. Using just _gtk doesn't seem to work with pythonJames Henstridge2000-10-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-30 James Henstridge <james@daa.com.au> * gtk/gtkmodule.c (init_gtk): init as module gtk._gtk. Using just _gtk doesn't seem to work with python 2.0 2000-10-29 James Henstridge <james@james.daa.com.au> * examples/ide/gtkcons.py: small changes to make example run. * gtk/gtk-types.c: add GtkTextIter.forward_search implementation. * gtk/gtk.override: more override functions. * gtk/gtkobject-support.c: remove some of the unused functions from this file. 2000-10-28 James Henstridge <james@james.daa.com.au> * gtk/gtk.override: override the functions used to initialise GtkTextIter objects so that they return the iterator rather than setting up an static GtkTextIter structure. * gtk/gtk.defs (TextMark): add missing GtkTextMark object. Don't know why h2defs missed it. ("gtk-extrafuncs.defs"): include gtk-extrafuncs.defs. * codegen/argtypes.py: add GdkDevice and GtkTextIter to list of recognised boxed types. * gtk/gtk-types.c: add skeleton implementation of GtkTextIter. * gtk/pygtk.h, gtk/pygtk-private.h: add prototypes for GtkTextIter wrapper. * gtk/gtk.override: ref and sink GtkObjects which have their constructors listed in the overrides file. This should get rid of the last few warnings on exit related to reference counting. * codegen/codegen.py: use the keyword module to check for method and argument names that conflict with the python keywords. By using this module, we shouldn't have problems with new keywords in future versions of python. 2000-10-27 James Henstridge <james@james.daa.com.au> * gobjectmodule.c (pygobject_emit): support for emiting signals on GObjects from python. * codegen/codegen.py (write_constructor): sink GtkObjects. This prevents us losing our reference to the object if it is sunk. * codegen/argtypes.py (ArgMatcher.object_is_a): function to check if one object type is another type. * codegen/codegen.py (register_types): pass the parent type when registering a new GObject type. * gtk/gtk-types.c (_pygtk_register_boxed_types): register marshalers for the various boxed types, so that they work as expected inside the signal handlers. * gobjectmodule.c (pygobject_repr): small change to match style of other repr functions in python. * gtk/gtkmodule.c (init_gtk): only call g_thread_init() if pygtk threading support is enabled. * configure.in (enable_thread): add configure checks so that threading support can be disabled even if python was compiled with it. It defaults to off for now because GSignal has some mutex deadlocks at the moment.
* Oops ... forgot to save a file before the last commitJames Henstridge2000-07-031-13/+10
|