[Python-gtkextra-commits] CVS: python-gtkextra2/gtkextra Makefile.am,1.9,1.10 gtkextra-addons.defs,1
Status: Beta
Brought to you by:
treeves
Update of /cvsroot/python-gtkextra/python-gtkextra2/gtkextra In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8776/gtkextra Modified Files: Makefile.am gtkextra-addons.defs gtkextra-types.defs gtkextra.defs gtkextra.override mycodegen.py Log Message: First cut at building with Python-2.4.1, gtk+-2.6.7, pygtk-2.6.2. Test programs testgtkplot.py and testrealtime.py run but not exactly as the C version yet. Index: Makefile.am =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.am 4 Mar 2004 11:39:19 -0000 1.9 --- Makefile.am 26 May 2005 15:12:24 -0000 1.10 *************** *** 30,34 **** pygtkextraexec_LTLIBRARIES = _gtkextramodule.la _gtkextramodule_la_CFLAGS = $(PYGTK_CFLAGS) $(GTK_CFLAGS) $(GTKEXTRA_CFLAGS) ! _gtkextramodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gtkextra _gtkextramodule_la_LIBADD = $(GTKEXTRA_LIBS) $(PYGTK_LIBS) $(GTK_LIBS) _gtkextramodule_la_SOURCES = gtkextramodule.c --- 30,35 ---- pygtkextraexec_LTLIBRARIES = _gtkextramodule.la _gtkextramodule_la_CFLAGS = $(PYGTK_CFLAGS) $(GTK_CFLAGS) $(GTKEXTRA_CFLAGS) ! #_gtkextramodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gtkextra ! _gtkextramodule_la_LDFLAGS = -module -avoid-version _gtkextramodule_la_LIBADD = $(GTKEXTRA_LIBS) $(PYGTK_LIBS) $(GTK_LIBS) _gtkextramodule_la_SOURCES = gtkextramodule.c Index: gtkextra-addons.defs =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/gtkextra-addons.defs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gtkextra-addons.defs 2 Jan 2003 22:00:53 -0000 1.4 --- gtkextra-addons.defs 26 May 2005 15:12:24 -0000 1.5 *************** *** 1,28 **** ;; Not from any header file - ;; Careful not to clash with GtkWindow.set_flags() - (define-method plot_canvas_set_flags - (of-object "GtkPlotCanvas") - (c-name "gtk_plot_canvas_set_flags") - (return-type "guint16") - (parameters - '("guint16" "flags") - ) - ) - - (define-method plot_canvas_unset_flags - (of-object "GtkPlotCanvas") - (c-name "gtk_plot_canvas_unset_flags") - (return-type "guint16") - (parameters - '("guint16" "flags") - ) - ) - (define-function _set_data_from_pyobject_callback (c-name "_set_data_from_pyobject_callback") ) - (define-function gtk_sheet_range_new (is-constructor-of "GtkSheetRange") --- 1,8 ---- Index: gtkextra-types.defs =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/gtkextra-types.defs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gtkextra-types.defs 4 Mar 2004 11:39:19 -0000 1.11 --- gtkextra-types.defs 26 May 2005 15:12:24 -0000 1.12 *************** *** 28,36 **** ) ! (define-object ComboBox (in-module "Gtk") (parent "GtkHBox") ! (c-name "GtkComboBox") ! (gtype-id "GTK_TYPE_COMBO_BOX") (fields '("GtkWidget*" "button") --- 28,36 ---- ) ! (define-object ComboButton (in-module "Gtk") (parent "GtkHBox") ! (c-name "GtkComboButton") ! (gtype-id "GTK_TYPE_COMBO_BUTTON") (fields '("GtkWidget*" "button") *************** *** 44,48 **** (define-object ColorCombo (in-module "Gtk") ! (parent "GtkComboBox") (c-name "GtkColorCombo") (gtype-id "GTK_TYPE_COLOR_COMBO") --- 44,48 ---- (define-object ColorCombo (in-module "Gtk") ! (parent "GtkComboButton") (c-name "GtkColorCombo") (gtype-id "GTK_TYPE_COLOR_COMBO") *************** *** 51,55 **** (define-object BorderCombo (in-module "Gtk") ! (parent "GtkComboBox") (c-name "GtkBorderCombo") (gtype-id "GTK_TYPE_BORDER_COMBO") --- 51,55 ---- (define-object BorderCombo (in-module "Gtk") ! (parent "GtkComboButton") (c-name "GtkBorderCombo") (gtype-id "GTK_TYPE_BORDER_COMBO") *************** *** 106,109 **** --- 106,112 ---- '("GtkWidget*" "file_list") '("GtkWidget*" "history_combo") + '("GtkWidget*" "up_button") + '("GtkWidget*" "refresh_button") + '("GtkWidget*" "home_button") '("GtkWidget*" "file_entry") '("GtkWidget*" "filter_entry") *************** *** 159,167 **** ) ! (define-object Plot3D (in-module "Gtk") ! (parent "GtkPlot") ! (c-name "GtkPlot3D") ! (gtype-id "GTK_TYPE_PLOT3_D") ) --- 162,179 ---- ) ! ;new ! (define-object PlotArray (in-module "Gtk") ! (parent "GObject") ! (c-name "GtkPlotArray") ! (gtype-id "GTK_TYPE_PLOT_ARRAY") ! ) ! ! ;new ! (define-object PlotArrayList ! (in-module "Gtk") ! (parent "GObject") ! (c-name "GtkPlotArrayList") ! (gtype-id "GTK_TYPE_PLOT_ARRAY_LIST") ) *************** *** 179,183 **** '("GtkPlotTicks" "ticks") '("GtkPlotOrientation" "orientation") - '("GtkPlotScale" "scale") '("GtkPlotLine" "line") '("GtkPlotLine" "major_grid") --- 191,194 ---- *************** *** 197,203 **** --- 208,294 ---- '("gint" "label_style") '("gint" "label_mask") + '("GtkPlotArray*" "tick_labels") ) ) + (define-object PlotCanvasChild + (in-module "Gtk") + (parent "GtkObject") + (c-name "GtkPlotCanvasChild") + (gtype-id "GTK_TYPE_PLOT_CANVAS_CHILD") + (fields + '("gdouble" "rx1") + '("gdouble" "rx2") + '("gdouble" "ry1") + '("gdouble" "ry2") + '("gint" "min_width") + '("gint" "min_height") + '("GdkRectangle" "allocation") + '("guint" "state") + '("GtkPlotCanvasType" "type") + '("GtkPlotCanvasFlag" "flags") + '("GtkPlotCanvasSelection" "selection") + '("GtkPlotCanvasSelectionMode" "mode") + '("gpointer" "data") + ) + ) + + (define-object PlotCanvasEllipse + (in-module "Gtk") + (parent "GtkPlotCanvasChild") + (c-name "GtkPlotCanvasEllipse") + (gtype-id "GTK_TYPE_PLOT_CANVAS_ELLIPSE") + ) + + (define-object PlotCanvasLine + (in-module "Gtk") + (parent "GtkPlotCanvasChild") + (c-name "GtkPlotCanvasLine") + (gtype-id "GTK_TYPE_PLOT_CANVAS_LINE") + ) + + (define-object PlotCanvasPixmap + (in-module "Gtk") + (parent "GtkPlotCanvasChild") + (c-name "GtkPlotCanvasPixmap") + (gtype-id "GTK_TYPE_PLOT_CANVAS_PIXMAP") + ) + + (define-object PlotCanvasPlot + (in-module "Gtk") + (parent "GtkPlotCanvasChild") + (c-name "GtkPlotCanvasPlot") + (gtype-id "GTK_TYPE_PLOT_CANVAS_PLOT") + (fields + ("GtkPlotCanvasPlotPos" "pos") + ("gint" "datapoint") + ("guint" "flags") + ) + ) + + (define-object PlotCanvasRectangle + (in-module "Gtk") + (parent "GtkPlotCanvasChild") + (c-name "GtkPlotCanvasRectangle") + (gtype-id "GTK_TYPE_PLOT_CANVAS_RECTANGLE") + ) + + (define-object PlotCanvasText + (in-module "Gtk") + (parent "GtkPlotCanvasChild") + (c-name "GtkPlotCanvasText") + (gtype-id "GTK_TYPE_PLOT_CANVAS_TEXT") + (fields + ("GtkPlotText" "text") + ) + ) + + (define-object Plot3D + (in-module "Gtk") + (parent "GtkPlot") + (c-name "GtkPlot3D") + (gtype-id "GTK_TYPE_PLOT3_D") + ) + (define-object PlotDT (in-module "Gtk") *************** *** 224,227 **** --- 315,332 ---- ) + (define-object PlotCandle + (in-module "Gtk") + (parent "GtkPlotData") + (c-name "GtkPlotCandle") + (gtype-id "GTK_TYPE_PLOT_CANDLE") + ) + + (define-object PlotBubble + (in-module "Gtk") + (parent "GtkPlotData") + (c-name "GtkPlotBubble") + (gtype-id "GTK_TYPE_PLOT_BUBBLE") + ) + (define-object PlotBox (in-module "Gtk") *************** *** 303,307 **** (define-object ToggleCombo (in-module "Gtk") ! (parent "GtkComboBox") (c-name "GtkToggleCombo") (gtype-id "GTK_TYPE_TOGGLE_COMBO") --- 408,412 ---- (define-object ToggleCombo (in-module "Gtk") ! (parent "GtkComboButton") (c-name "GtkToggleCombo") (gtype-id "GTK_TYPE_TOGGLE_COMBO") *************** *** 309,312 **** --- 414,418 ---- ;; Boxed types + ;; These need to be fixed up in gtkextra code. (define-pointer PSFont *************** *** 326,349 **** ) - ; Lot more to do from gtkplot.h. Also compare fields to accessor functions. - ; Also gtkextra code needs all of those boxed fixed up with types and macros. - - (define-boxed PlotLine - (in-module "Gtk") - (c-name "GtkPlotLine") - (gtype-id "GTK_TYPE_PLOT_LINE") - (fields - '("GtkPlotLineStyle" "line_style") - '("GdkCapStyle" "cap_style") - '("GdkJoinStyle" "join_style") - ) - ) - - (define-boxed PlotMarker - (in-module "Gtk") - (c-name "GtkPlotMarker") - (gtype-id "GTK_TYPE_PLOT_MARKER") - ) - (define-boxed PlotText (in-module "Gtk") --- 432,435 ---- *************** *** 368,395 **** ) ! (define-boxed PlotCanvasChild (in-module "Gtk") ! (c-name "GtkPlotCanvasChild") ! (gtype-id "GTK_TYPE_PLOT_CANVAS_CHILD") (fields ! '("gdouble" "rx1") ! '("gdouble" "rx2") ! '("gdouble" "ry1") ! '("gdouble" "ry2") ! '("gint" "min_width") ! '("gint" "min_height") ! '("GdkRectangle" "allocation") ! '("guint" "state") ! '("GtkPlotCanvasType" "type") ! '("GtkPlotCanvasFlag" "flags") ! '("GtkPlotCanvasSelection" "selection") ! '("GtkPlotCanvasSelectionMode" "mode") ! '("gpointer" "data") ) - ;(fields - ; '("gint" "data") - ; '("gint" "type") - ;) ) --- 454,538 ---- ) ! (define-boxed PlotLine (in-module "Gtk") ! (c-name "GtkPlotLine") ! (gtype-id "GTK_TYPE_PLOT_LINE") ! (fields ! '("GtkPlotLineStyle" "line_style") ! '("GdkCapStyle" "cap_style") ! '("GdkJoinStyle" "join_style") ! '("gfloat" "line_width") ! '("GdkColor" "color") ! ) ! ) + ; (define-boxed PlotSymbol + ; (in-module "Gtk") + ; (c-name "GtkPlotSymbol") + ; (gtype-id "GTK_TYPE_PLOT_SYMBOL") + ; (fields + ; '("GtkPlotSymbolType" "symbol_type") + ; '("GtkPlotSymbolStyle" "symbol_style") + ; '("gint" "size") + ; '("GdkColor" "color") + ; '("GtkPlotLine" "border") + ; ) + ; ) + + ; (define-boxed PlotVector + ; (in-module "Gtk") + ; (c-name "GtkPlotVector") + ; (gtype-id "GTK_TYPE_PLOT_VECTOR") + ; (fields + ; '("gdouble" "x") + ; '("gdouble" "y") + ; '("gdouble" "z") + ; ) + ; ) + + ; (define-boxed PlotTick + ; (in-module "Gtk") + ; (c-name "GtkPlotTick") + ; (gtype-id "GTK_TYPE_PLOT_TICK") + ; (fields + ; '("gdouble" "value") + ; '("gbooleanb" "minor") + ; ) + ; ) + + ; (define-boxed PlotTicks + ; (in-module "Gtk") + ; (c-name "GtkPlotTicks") + ; (gtype-id "GTK_TYPE_PLOT_TICKS") + ; (fields + ; ("gdouble" "min") + ; ("gdouble" "max") + ; ("GtkPlotScale" "scale") + ; ("gint" "nmajorticks") + ; ("gint" "nminorticks") + ; ("gint" "nticks") + ; ("gdouble" "step") + ; ("gint" "nminor") + ; ("gboolean" "apply_break") + ; ("GtkPlotScale " "break_scale") + ; ("gdouble" "break_step") + ; ("gint" "break_nminor") + ; ("gdouble" "break_min") + ; ("gdouble" "break_max") + ; ("gdouble" "break_position") + ; ("GtkPlotTick*" "values") + ; ("gboolean" "set_limits") + ; ("gdouble" "begin") + ; ("gdouble" "end") + ; ) + ; ) + + (define-boxed PlotMarker + (in-module "Gtk") + (c-name "GtkPlotMarker") + (gtype-id "GTK_TYPE_PLOT_MARKER") (fields ! '("gint" "point") ) ) *************** *** 513,529 **** '("frozen" "GTK_PLOT_CANVAS_FROZEN") '("can-move" "GTK_PLOT_CANVAS_CAN_MOVE") ! '("can-x-resize" "GTK_PLOT_CANVAS_CAN_X_RESIZE") ! '("can-y-resize" "GTK_PLOT_CANVAS_CAN_Y_RESIZE") ! ) ! ) ! ! (define-flags PlotCanvasArrow ! (in-module "Gtk") ! (c-name "GtkPlotCanvasArrow") ! (gtype-id "GTK_TYPE_PLOT_CANVAS_ARROW") ! (values ! '("none" "GTK_PLOT_ARROW_NONE") ! '("origin" "GTK_PLOT_ARROW_ORIGIN") ! '("end" "GTK_PLOT_ARROW_END") ) ) --- 656,660 ---- '("frozen" "GTK_PLOT_CANVAS_FROZEN") '("can-move" "GTK_PLOT_CANVAS_CAN_MOVE") ! '("can-resize" "GTK_PLOT_CANVAS_CAN_RESIZE") ) ) *************** *** 550,575 **** ) - (define-enum PlotCanvasType - (in-module "Gtk") - (c-name "GtkPlotCanvasType") - (gtype-id "GTK_TYPE_PLOT_CANVAS_TYPE") - (values - '("none" "GTK_PLOT_CANVAS_NONE") - '("plot" "GTK_PLOT_CANVAS_PLOT") - '("axis" "GTK_PLOT_CANVAS_AXIS") - '("legends" "GTK_PLOT_CANVAS_LEGENDS") - '("title" "GTK_PLOT_CANVAS_TITLE") - '("text" "GTK_PLOT_CANVAS_TEXT") - '("data" "GTK_PLOT_CANVAS_DATA") - '("line" "GTK_PLOT_CANVAS_LINE") - '("rectangle" "GTK_PLOT_CANVAS_RECTANGLE") - '("ellipse" "GTK_PLOT_CANVAS_ELLIPSE") - '("pixmap" "GTK_PLOT_CANVAS_PIXMAP") - '("marker" "GTK_PLOT_CANVAS_MARKER") - '("polygon" "GTK_PLOT_CANVAS_POLYGON") - '("custom" "GTK_PLOT_CANVAS_CUSTOM") - ) - ) - (define-enum PlotCanvasPos (in-module "Gtk") --- 681,684 ---- *************** *** 590,593 **** --- 699,739 ---- ) + (define-flags PlotCanvasArrow + (in-module "Gtk") + (c-name "GtkPlotCanvasArrow") + (gtype-id "GTK_TYPE_PLOT_CANVAS_ARROW") + (values + '("none" "GTK_PLOT_CANVAS_ARROW_NONE") + '("origin" "GTK_PLOT_CANVAS_ARROW_ORIGIN") + '("end" "GTK_PLOT_CANVAS_ARROW_END") + ) + ) + + (define-enum PlotCanvasPlotPos + (in-module "Gtk") + (c-name "GtkPlotCanvasPlotPos") + (gtype-id "GTK_TYPE_PLOT_CANVAS_PLOT_POS") + (values + '("out" "GTK_PLOT_CANVAS_PLOT_OUT") + '("in-plot" "GTK_PLOT_CANVAS_PLOT_IN_PLOT") + '("in-legends" "GTK_PLOT_CANVAS_PLOT_IN_LEGENDS") + '("in-title" "GTK_PLOT_CANVAS_PLOT_IN_TITLE") + '("in-axis" "GTK_PLOT_CANVAS_PLOT_IN_AXIS") + '("in-data" "GTK_PLOT_CANVAS_PLOT_IN_DATA") + '("in-gradient" "GTK_PLOT_CANVAS_PLOT_IN_GRADIENT") + '("in-marker" "GTK_PLOT_CANVAS_PLOT_IN_MARKER") + ) + ) + + ;(define-flags PlotCanvasPlotFlag + ; (in-module "Gtk") + ; (c-name "GtkPlotCanvasPlotFlag") + ; (gtype-id "GTK_TYPE_PLOT_CANVAS_PLOT_FLAG") + ; (values + ; '("select_point" "GTK_PLOT_CANVAS_PLOT_SELECT_POINT") + ; '("dnd_point" "GTK_PLOT_CANVAS_PLOT_DND_POINT") + ; ) + ;) + (define-enum PlotProjection (in-module "Gtk") *************** *** 784,787 **** --- 930,944 ---- ) + (define-flags PlotArrow + (in-module "Gtk") + (c-name "GtkPlotArrow") + (gtype-id "GTK_TYPE_PLOT_ARROW") + (values + '("none" "GTK_PLOT_ARROW_NONE") + '("origin" "GTK_PLOT_ARROW_ORIGIN") + '("end" "GTK_PLOT_ARROW_END") + ) + ) + (define-enum SheetAttrType (in-module "Gtk") Index: gtkextra.defs =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/gtkextra.defs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** gtkextra.defs 31 Mar 2004 20:56:47 -0000 1.13 --- gtkextra.defs 26 May 2005 15:12:24 -0000 1.14 *************** *** 142,159 **** ) ! (define-function gtk_combobox_get_type ! (c-name "gtk_combobox_get_type") (return-type "GtkType") ) ! (define-function gtk_combobox_new ! (is-constructor-of "GtkCombobox") ! (c-name "gtk_combobox_new") [...1816 lines suppressed...] ! (define-method ticks_inverse ! (of-object "GtkPlotAxis") ! (c-name "gtk_plot_axis_ticks_inverse") ! (return-type "gdouble") ! (parameters ! '("gdouble" "x") ! ) ! ) ! ! (define-method parse_label ! (of-object "GtkPlotAxis") ! (c-name "gtk_plot_axis_parse_label") ! (return-type "none") ! (parameters ! '("gdouble" "val") ! '("gint" "precision") ! '("gint" "style") ! '("gchar*" "label") ) ) Index: gtkextra.override =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/gtkextra.override,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** gtkextra.override 9 Mar 2004 11:43:15 -0000 1.20 --- gtkextra.override 26 May 2005 15:12:24 -0000 1.21 *************** *** 24,27 **** --- 24,29 ---- */ + //#define _DEBUG + #define NO_IMPORT_PYGOBJECT #include <pygobject.h> *************** *** 42,70 **** }; - /* - This exists in pygtk/gtk/gtk-types.c. It is not static there, but - is exported for our use. Especially since dlopen is now not done - with RTLD_GLOBAL flags by default. Might wish to ask James if it - could be published or if there is another way. - */ - - static gboolean - pygdk_rectangle_from_pyobject(PyObject *object, GdkRectangle *rectangle) - { - g_return_val_if_fail(rectangle != NULL, FALSE); - - if (pyg_boxed_check(object, GDK_TYPE_RECTANGLE)) { - *rectangle = *pyg_boxed_get(object, GdkRectangle); - return TRUE; - } - if (PyArg_ParseTuple(object, "iiii", &rectangle->x, &rectangle->y, - &rectangle->width, &rectangle->height)) { - return TRUE; - } - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, "could not convert to GdkRectangle"); - return FALSE; - } - /* ---------------------------------------------------------------------- Fixup boo-boo's or ommissions. Probably should be fixed in gtkextra. --- 44,47 ---- *************** *** 72,76 **** #define GTK_ICON_FILE_SEL GTK_ICON_FILESEL #define GTK_TYPE_ICON_FILE_SEL (gtk_icon_file_selection_get_type()) ! #define GTK_TYPE_COMBO_BOX (gtk_combobox_get_type()) #define GTK_TYPE_COLOR_COMBO (gtk_color_combo_get_type()) #define GTK_TYPE_BORDER_COMBO (gtk_border_combo_get_type()) --- 49,53 ---- #define GTK_ICON_FILE_SEL GTK_ICON_FILESEL #define GTK_TYPE_ICON_FILE_SEL (gtk_icon_file_selection_get_type()) ! #define GTK_TYPE_COMBO_BUTTON (gtk_combo_button_get_type()) #define GTK_TYPE_COLOR_COMBO (gtk_color_combo_get_type()) #define GTK_TYPE_BORDER_COMBO (gtk_border_combo_get_type()) *************** *** 78,81 **** --- 55,59 ---- #define GTK_TYPE_PLOT3_D (gtk_plot3d_get_type()) #define GTK_TYPE_TOGGLE_COMBO (gtk_toggle_combo_get_type()) + #define GTK_TYPE_PLOT_CANDLE (gtk_plot_candle_get_type()) /* Hack boxed types. Just enough to let code generator compile. Not correct! *************** *** 253,259 **** #define GTK_PLOT3_D GTK_PLOT3D - guint16 gtk_plot_canvas_set_flags(GtkPlotCanvas *canvas, guint16 flags) { return GTK_PLOT_CANVAS_SET_FLAGS(canvas, flags); } - guint16 gtk_plot_canvas_unset_flags(GtkPlotCanvas *canvas, guint16 flags) { return GTK_PLOT_CANVAS_UNSET_FLAGS(canvas, flags); } - /* cpp abuse */ #define _GET_ONE_DOUBLE(_f, _c) static PyObject * \ --- 231,234 ---- *************** *** 650,701 **** } %% - override-attr GtkPlotCanvasChild.data - static PyObject * - _wrap_gtk_plot_canvas_child__get_data(PyObject *self, void *closure) - { - /* - The GtkPlotCanvasType's are: - - GTK_PLOT_CANVAS_NONE - GTK_PLOT_CANVAS_PLOT - GTK_PLOT_CANVAS_AXIS - GTK_PLOT_CANVAS_LEGENDS - GTK_PLOT_CANVAS_TITLE - GTK_PLOT_CANVAS_TEXT - GTK_PLOT_CANVAS_DATA - GTK_PLOT_CANVAS_LINE - GTK_PLOT_CANVAS_RECTANGLE - GTK_PLOT_CANVAS_ELLIPSE - GTK_PLOT_CANVAS_PIXMAP - GTK_PLOT_CANVAS_MARKER - GTK_PLOT_CANVAS_CUSTOM - */ - switch (pyg_boxed_get(self, GtkPlotCanvasChild)->type) { - case GTK_PLOT_CANVAS_NONE: - Py_INCREF(Py_None); - return Py_None; - - case GTK_PLOT_CANVAS_TEXT: - #if 0 // When boxed correctly - return pyg_boxed_new(GTK_TYPE_PLOT_TEXT, pyg_boxed_get(self, GtkPlotCanvasChild)->data, TRUE, TRUE); - #else // Might also be ok when boxed correctly. - return pyg_boxed_new(GTK_TYPE_PLOT_TEXT, pyg_boxed_get(self, GtkPlotCanvasChild)->data, FALSE, FALSE); - #endif - - case GTK_PLOT_CANVAS_PLOT: - case GTK_PLOT_CANVAS_AXIS: - case GTK_PLOT_CANVAS_LEGENDS: - case GTK_PLOT_CANVAS_TITLE: - case GTK_PLOT_CANVAS_DATA: - case GTK_PLOT_CANVAS_LINE: - case GTK_PLOT_CANVAS_RECTANGLE: - case GTK_PLOT_CANVAS_ELLIPSE: - case GTK_PLOT_CANVAS_PIXMAP: - case GTK_PLOT_CANVAS_MARKER: - default: - return PyCObject_FromVoidPtr(pyg_pointer_get(self, GtkPlotCanvasChild)->data, NULL); - } - } - %% override gtk_plot_data_new kwargs static int --- 625,628 ---- *************** *** 853,857 **** pygtkextra_plot_data_set(PyGObject *self, PyObject *value, const char *key, ! void (*func) (GtkPlotData *plot_data, gdouble *pd)) { gdouble *pd = NULL; --- 780,784 ---- pygtkextra_plot_data_set(PyGObject *self, PyObject *value, const char *key, ! GtkPlotArray * (*func) (GtkPlotData *plot_data, gdouble *pd)) { gdouble *pd = NULL; *************** *** 1005,1017 **** return NULL; ! if ( (plot_data -> x && pygtkextra_dict_set_item_double(py_ret, "x", x)) ! || (plot_data -> y && pygtkextra_dict_set_item_double(py_ret, "y", y)) ! || (plot_data -> z && pygtkextra_dict_set_item_double(py_ret, "z", z)) ! || (plot_data -> a && pygtkextra_dict_set_item_double(py_ret, "a", a)) ! || (plot_data -> dx && pygtkextra_dict_set_item_double(py_ret, "dx", dx)) ! || (plot_data -> dy && pygtkextra_dict_set_item_double(py_ret, "dy", dy)) ! || (plot_data -> dz && pygtkextra_dict_set_item_double(py_ret, "dz", dz)) ! || (plot_data -> da && pygtkextra_dict_set_item_double(py_ret, "da", da)) ! || (plot_data -> labels && pygtkextra_dict_set_item_string(py_ret, "label", label)) ) { Py_DECREF(py_ret); return NULL; --- 932,944 ---- return NULL; ! if ( (gtk_plot_data_find_dimension(plot_data, "x") && pygtkextra_dict_set_item_double(py_ret, "x", x)) ! || (gtk_plot_data_find_dimension(plot_data, "y") && pygtkextra_dict_set_item_double(py_ret, "y", y)) ! || (gtk_plot_data_find_dimension(plot_data, "z") && pygtkextra_dict_set_item_double(py_ret, "z", z)) ! || (gtk_plot_data_find_dimension(plot_data, "a") && pygtkextra_dict_set_item_double(py_ret, "a", a)) ! || (gtk_plot_data_find_dimension(plot_data, "dx") && pygtkextra_dict_set_item_double(py_ret, "dx", dx)) ! || (gtk_plot_data_find_dimension(plot_data, "dy") && pygtkextra_dict_set_item_double(py_ret, "dy", dy)) ! || (gtk_plot_data_find_dimension(plot_data, "dz") && pygtkextra_dict_set_item_double(py_ret, "dz", dz)) ! || (gtk_plot_data_find_dimension(plot_data, "da") && pygtkextra_dict_set_item_double(py_ret, "da", da)) ! || (gtk_plot_data_find_dimension(plot_data, "labels") && pygtkextra_dict_set_item_string(py_ret, "label", label)) ) { Py_DECREF(py_ret); return NULL; *************** *** 1427,1444 **** _GET_TWO_DOUBLE(gtk_plot_get_size, GTK_PLOT) %% ! override gtk_plot_axis_get_attributes kwargs static PyObject * ! _wrap_gtk_plot_axis_get_attributes(PyGObject *self, PyObject *args, PyObject *kwargs) { - static char *kwlist[] = { "axis", NULL }; - PyObject *py_axis = NULL; gfloat width; GdkColor color = {0, }; ! GtkPlotAxisPos axis; ! if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkPlot.axis_get_attributes", kwlist, &py_axis)) ! return NULL; ! if (pyg_enum_get_value(GTK_TYPE_PLOT_AXIS_POS, py_axis, (gint *)&axis)) ! return NULL; ! gtk_plot_axis_get_attributes(GTK_PLOT(self->obj), axis, &width, &color); return Py_BuildValue("(dN)", (double)width, pyg_boxed_new(GDK_TYPE_COLOR, &color, TRUE, TRUE)); } --- 1354,1364 ---- _GET_TWO_DOUBLE(gtk_plot_get_size, GTK_PLOT) %% ! override gtk_plot_axis_get_attributes noargs static PyObject * ! _wrap_gtk_plot_axis_get_attributes(PyGObject *self) { gfloat width; GdkColor color = {0, }; ! gtk_plot_axis_get_attributes(GTK_PLOT_AXIS(self->obj), &width, &color); return Py_BuildValue("(dN)", (double)width, pyg_boxed_new(GDK_TYPE_COLOR, &color, TRUE, TRUE)); } Index: mycodegen.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/mycodegen.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mycodegen.py 30 Dec 2002 20:42:13 -0000 1.2 --- mycodegen.py 26 May 2005 15:12:24 -0000 1.3 *************** *** 14,17 **** matcher.register('GdkWChar', matcher.get('gint32')) ! codegen.codegen.main() ! --- 14,16 ---- matcher.register('GdkWChar', matcher.get('gint32')) ! codegen.codegen.main(sys.argv) |