| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
2001-09-25 James Henstridge <james@daa.com.au>
* gobjectmodule.c (pygobject_get_dict): getter for __dict__ on
GObject wrappers.
(PyGObject_Type): include getsets list.
* codegen/codegen.py (write_getsets): change "struct getsets" to
PyGetSetDef to match recent changes in python.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-09-25 James Henstridge <james@daa.com.au>
* gtk/gdk.override (_wrap_gdk_device__get_axes): change to getter.
(_wrap_gdk_device__get_keys): turn into a getter.
(_wrap_gdk_drag_context__get_targets): same here.
* gtk/gtk.override (_wrap_gtk_clist__get_selection): turn into a
getter.
(_wrap_gtk_ctree__get_selection): turn into a getter.
* codegen/codegen.py (write_getsets): rename to write_getsets, and
don't allow overriding the whole routine, as it is implemented as
a number of smaller routines now.
(gettertmpl): rename from getattrtmpl. Refactor for handling
single attribute.
(write_getsets): finish conversion over to using getsets.
(write_class): call write_getsets instead.
(typetmpl): substitute %(getsets)s rather than %(getattr)s.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-09-23 James Henstridge <james@daa.com.au>
* gtk/__init__.py: don't import ExtensionClass.
* gobjectmodule.c (object_gc_free): new function to free an GC
managed object.
(PyGObject_Type): use object_gc_free for the tp_free slot.
* codegen/codegen.py (write_class): don't write getattr routine.
This is a temporary hack to see if things work.
* gobjectmodule.c (pygobject_dealloc): handle case of destruction
when self->obj == NULL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-09-23 James Henstridge <james@daa.com.au>
* gtk/gtk.override (_wrap_gtk_clist_new_with_titles): return an
int.
(_wrap_gtk_tree_view_get_path_at_pos): 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_ctree_new_with_titles): same here.
(_wrap_gtk_dialog_new_with_buttons): same here.
(_wrap_gtk_message_dialog_new): same here.
(_wrap_gtk_message_dialog_new): same here.
* gtk/gdk.override (_wrap_gdk_cursor_new): return an int.
* pango.override (_wrap_pango_font_description_new): constructors
return ints.
* codegen/codegen.py (write_constructor): small hack to convert
"return NULL;" to "return -1;" in constructors, as they should
return ints.
(write_boxed_constructor): same here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-09-22 James Henstridge <james@daa.com.au>
* pango.override: s/PyExtensionClass/PyTypeObject/
* codegen/codegen.py (consttmpl): constructor template returns an
int.
(noconstructor): return int rather than PyObject.
(typetmpl): change def to be a PyTypeObject, with extra fields.
(interfacetypetmpl): same here.
(boxedconsttmpl): return int rather than pyobject.
(boxedtmpl): change def to PyTypeObject.
(write_class): put the constructor in the right place.
(write_boxed): put the constructor in the right place.
(write_source): don't include ExtensionClass.h, forward declare
type objects as PyTypeObjects, rather than PyExtensionClasses.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-09-15 James Henstridge <james@daa.com.au>
* gtk/libglademodule.c (initglade): fix name of init function.
* codegen/codegen.py (write_enums): don't write out the
add_constants fucntion if there are no enums/flags.
* gtk/libglade.override (connect_many): fix small bug in
connection function.
* gtk/Makefile.am (pygtk_PYTHON): don't install the GTK.py header.
(glademodule_la_SOURCES): rename the libglade module to gtk.glade.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-07-08 James Henstridge <james@daa.com.au>
* gtk/gdk.defs, gtk/gtk-extrafuncs.defs, gtk/gtk.defs: update to
new format.
* pango.defs: update to new format.
* codegen/codegen.py: various fixes to make it work with the new
defs format.
* codegen/argtypes.py (ObjectArg.__init__): take the typecode as
an argument, and use it to deduce the cast macro (s/_TYPE_/_/).
(BoxedArg.__init__): take typecode as argument explicitly.
(EnumArg.__init__): take typecode as argument explicitly.
(FlagsArg.__init__): take typecode as argument explicitly.
(ArgMatcher.register_enum): pass typecode argument.
(ArgMatcher.register_flag): same here.
(ArgMatcher.register_object): same here.
(ArgMatcher.register_boxed): same here.
* codegen/definitions.py (ObjectDef): update parser for new format.
(InterfaceDef): same here.
(EnumDef): same here.
(BoxedDef): same here.
(MethodDef): same here.
(FunctionDef): same here.
* codegen/defsparser.py (DefsParser): add define- prefix to the
defs we look for.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-07-08 James Henstridge <james@daa.com.au>
* codegen/defsconvert.py (convert): new program to convert v2 defs
to v3 defs. It will probably only work with files in the style
created by the h2def.py program.
2001-07-07 James Henstridge <james@daa.com.au>
* codegen/h2def.py (to_upper_str): add function to convert a type
name to upper case with underscores using the same algorithm as
gtk+ (with an extra rule to catch cases like GObject.
(typecode): function to create a typecode like GTK_TYPE_WIDGET
from the type name.
(write_obj_defs): output v3 defs.
(write_enum_defs): output v3 defs.
(define_func): replace 'G_CONST_RETURN ' to 'const-' for return
value.
(write_func): output v3 defs.
* codegen/scmexpr.py (parse): make the parser ignore single
quotes, which are used in the new defs format.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-07-03 James Henstridge <james@daa.com.au>
* configure.in (AC_OUTPUT): add pygtk-codegen-2.0 to list of files
to be processed.
* codegen/codegen.py (register_types): fix typo s/parser/defsparser/
* gtk/Makefile.am ($(srcdir)/gtk.c): register types from
pango.defs.
* gtk/gtk.override (init): import the PangoContext and PangoLayout
classes from the pango module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-07-03 James Henstridge <james@daa.com.au>
* pango.defs: add is-constructor-of arguments to some defs, and
add fields to some object and boxed defs.
* pango.override: add more overrides.
* pango.defs: add more boxed type defs.
* gtk/gtk.defs (dequeue_resize_handler): remove removed function.
* codegen/override.py (Overrides.__parse_override): fix bug here.
string.find returns negative value on error -- not zero.
* codegen/argtypes.py (GTypeArg.write_param): fix up arg handler.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-06-30 James Henstridge <james@daa.com.au>
* gtk/gtk-types.c: remove GdkDevice stuff from this file.
* gtk/gtk.override: add attribute getters for some GdkDevice
attributes, and overrides for some GdkDevice methods.
(_wrap_gdk_event_getattr): change stuff for GdkDevices, as they
are now GObjects.
* gtk/gdk.defs (Device): add device boxed type here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-06-30 James Henstridge <james@daa.com.au>
* gtk/gtk.override (_wrap_gtk_selection_add_targets): fix up to
use PyGBoxed version of GdkEvent.
* gtk/gtk-types.c: remove GdkEvent stuff from here. Also delete
the commented out GdkDragContext code, as the current GObject
implementation has the same features now.
* gtk/gtk.override (_wrap_gdk_event_getattr): implement the
getattr method for GdkEvents.
* gtk/gdk.defs (Event): add boxed type here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-06-30 James Henstridge <james@daa.com.au>
* gtk/gtk-types.c: remove uses of GtkSelectionData.
* gtk/gtk.override (GtkSelectionData.data): override the data
attribute for GtkSelectionData types.
(_wrap_gtk_selection_data_set): override method.
* gtk/gtk.defs (SelectionData): add GtkSelectionData boxed type
here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-06-29 James Henstridge <james@daa.com.au>
* codegen/codegen.py (write_getattr): add code to allow overriding
the getter for a single attribute.
(write_boxed_getattr): same here.
* codegen/override.py (Overrides): add code to handle
"override_attr" statements in an overrides file.
* codegen/codegen.py (write_getattr): add support for overriding
the complete getattr method for a GObject class.
(write_boxed_getattr): similar change here.
* configure.in: require 1.3.7 versions of glib and gtk+.
(AC_ARG_ENABLE): fix --disable-thread argument. It was actually
looking for --disable-numpy, which causes all kinds of weirdness.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-06-27 James Henstridge <james@daa.com.au>
* codegen/argtypes.py (arg): don't register a boxed handler for
GtkTextIter here.
* gtk/gtk.override: add overrides for various GtkTextIter methods.
* codegen/argtypes.py (BoxedArg.write_param): fix up variable type.
* gtk/gtk.override (_wrap_gtk_text_iter_copy): implement text iter
copy function, and ignore the gtk_text_iter_free function (it
could cause troubles).
(*): replace function calls using the old GtkTextIter wrapper.
* gtk/gtk.defs: update defs for GtkTextIter.
(TextIter): add text iter boxed type here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-06-27 James Henstridge <james@daa.com.au>
* codegen/argtypes.py (arg): remove registrations for `custom'
boxed types for objects converted to PyGBoxed.
* gtk/gtk.override: use PyGBoxed calls fro GtkTreeIters.
* gtk/gtk-types.c: remove GtkTreeIter stuff from here.
* gtk/gtk.defs (TreeIter): add boxed type here.
2001-06-26 James Henstridge <james@daa.com.au>
* gtk/gtk-types.c: remove traces of GdkColor from this file.
* gtk/gtk.override: convert occurences of PyGdkColor_* with
correct PyGBoxed calls.
* gtk/gdk.defs (Color): add GdkColor boxed type here.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
2001-06-24 James Henstridge <james@daa.com.au>
* gtk/gtk-types.c: removed all traces of GdkVisual.
* gtk/gdk.defs (Visual): add boxed type for visual.
|
|
|
|
|
|
|
|
|
| |
2001-06-24 James Henstridge <james@daa.com.au>
* gtk/gtk-types.c: remove all traces of GtkAccelGroup from this
file -- GtkAccelGroup is now generated code.
* gtk/gtk.defs (AccelGroup): add boxed type here.
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-06-23 James Henstridge <james@daa.com.au>
* codegen/codegen.py: generate wrappers for boxed types as well.
* codegen/defsparser.py (DefsParser.boxed): handle (boxed ...)
lines.
* codegen/definitions.py (BoxedDef): add a class for holding a
Boxed definition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-05-29 James Henstridge <james@daa.com.au>
* codegen/Makefile.am: install the code generator
* gtk/Makefile.am: install the pygtk.h header
* Makefile.am: install the pygobject.h header
* gtk/gdk.defs, gtk/gtk.defs, gtk/gtk-types.c: changes to make
things compile.
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-05-27 James Henstridge <james@daa.com.au>
* codegen/codegen.py (write_source): interfaces don't have
parents.
* codegen/definitions.py (InterfaceDef.write_defs): don't look for
(parent ...) sections in interface definitions.
* gtk/gtk.defs (Editable): interfaces don't have parents.
|
|
|
|
|
|
|
|
| |
2001-05-05 James Henstridge <james@daa.com.au>
* codegen/docgen.py (DocbookDocWriter.output_toc): Produce kind of
nice docbook documentation. Example output available at
http://www.gnome.org/~james/pygtk-docs/.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-05-03 James Henstridge <james@daa.com.au>
* codegen/docgen.py (DocWriter): handle output of constructor and
method docs. Use overrides file so as not to output info about
methods we don't actually wrap.
* codegen/Makefile.am (noinst_PYTHON): update file list.
* codegen/__init__.py (__all__): update module list.
* codegen/mergedefs.py: same here.
* codegen/docgen.py (DocWriter.__init__): same here.
* codegen/codegen.py: import defsparser instead.
* codegen/defsparser.py: rename from parser.py.
|
|
|
|
|
|
|
| |
2001-04-21 James Henstridge <james@daa.com.au>
* codegen/docgen.py, codegen/docextract.py: start of automatic
documentation generator.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2001-04-08 James Henstridge <james@daa.com.au>
* gtk/gtk.override: same here.
* gtk/gtk-types.c (_pygtk_register_boxed_types): more fixups
* gtk/gtkobject-support.c: lots of similar fixups.
* codegen/argtypes.py (_enum_name): gdk type codes now seem to be
named GDK_TYPE_... and not GTK_TYPE_GDK_...
2001-04-07 James Henstridge <james@daa.com.au>
* gtk/gtk.defs: lots of defs file updates.
2001-04-06 James Henstridge <james@daa.com.au>
* codegen/h2def.py: add --onlyobjdefs flag to script.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
2000-11-29 James Henstridge <james@daa.com.au>
* codegen/h2def.py (write_enum_defs): Havoc's enum handling patch.
* TODO: add todo item about creating real GObject subclasses, and
add some info on the GInterface stuff.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2000-11-10 James Henstridge <james@daa.com.au>
* gtk/gtk.override: add gtk_tree_model_get_{iter,path,value}
functions.
(_wrap_gtk_list_store_*): add constructor and set_cell
implementations, and impls of the insertion functions that return
the new GtkTreeIter, rather than treating it as an out argument.
(_wrap_gtk_list_store_set_cell): allow string versions of type
codes for convenience.
(_wrap_gtk_list_store_insert): directly access column_headers
structure member as the get_column_type method doesn't exist.
(_wrap_gtk_tree_store_*): constructor, set_cell and tree iter
creation methods added. Ignore [gs]et{,v}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2000-11-09 James Henstridge <james@daa.com.au>
* codegen/codegen.py (register_types): register interfaces into
the argument type matcher.
(write_source): write out interface source. Register interface
class types before object types, as they may be used by objects.
(write_source): set multiple base classes if an object implements
an interface.
(write_interface): function to write out the code for an
interface. It is really a simplified version of write_class.
* codegen/parser.py (DefsParser.interface): handle interface
clauses.
* codegen/definitions.py (InterfaceDef): add a class for interface
definitions.
(ObjectDef): add support for an implements keyword.
* codegen/codegen.py (write_source): change code generator to pass
bases in as a tuple rather than a single PyExtensionClass
structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
2000-10-24 James Henstridge <james@daa.com.au>
* gtk/gtk.override: small updates.
* gtk/gtk.defs: update with defs from all of gtk.
* codegen/h2def.py (find_enum_defs): small fix to enums parsing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2000-10-24 James Henstridge <james@daa.com.au>
* gtk/gtk-types.c: add support for GdkDevice and convert function
names to lowercase.
* gtk/gtkmodule.c: add GdkDevice stuff to PyGtk_API.
* gtk/pygtk.h, gtk/pygtk-private.h: add GdkDevice to list of boxed
types.
2000-10-23 James Henstridge <james@daa.com.au>
* gobjectmodule.c: don't set the getattr method on objects if it
isn't already set. Also, install a getattro handler that will
perform the usual method/attribute lookup and then call the
getattr method for all base classes to allow specifying of class
specific attributes
|
|
|
|
|
|
|
|
|
|
|
|
| |
2000-07-03 James Henstridge <james@daa.com.au>
* pygobject.h (pygobject_check): call the correct ExtensionClass
check macro.
* codegen/codegen.py (consttmpl): use pygobject_register_wrapper.
(getattrtmpl): make the getattr function raise an exception on
unhandled attributes. I will use a tp_getattro function to bind
all the getattr functions of base classes together.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2000-07-03 James Henstridge <james@daa.com.au>
* codegen/codegen.py (noconstructor): handle the null constructor
better.
* gtk/gtk-types.c (_pygtk_register_boxed_types): commented out the
object implementations for types that have been converted to
GObjects.
* gtk/gtkobject-support.c: commented out some of this code to get
it to compile again. Also converted some functions over to GObject.
* codegen/argtypes.py (EnumArg,FlagsArg): use the version from gobject.
* gtk/gtkmodule.c: update
* gtk/gtk.override: fix up the overrides for the new gdk.defs stuff.
(GTK_TYPE_GDK_*): add some dummy defines to make things compile until
the gdk-pixbuf enums are added to
* codegen/argtypes.py (ObjectArg.write_param): use PyGObject
rather than PyGtk_Object.
* pygobject.h (pygobject_check): add check function. Just a wrapper
around ExtensionClassSubclassInstance.
* codegen/codegen.py: updated to use PyGObject rather than
PyGtk_Object.
* gtk/gtk.defs: removed most of the stuff here so I can test out
the gdk stuff.
|