python-gtkextra-commits Mailing List for GtkExtra Python Language Bindings (Page 3)
Status: Beta
Brought to you by:
treeves
You can subscribe to this list here.
2002 |
Jan
(13) |
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(18) |
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <pyt...@li...> - 2002-07-11 19:17:47
|
Update of /cvsroot/python-gtkextra/python-gtkextra2/gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv20769/gtkextra Modified Files: .cvsignore Makefile.am gtkextra.defs gtkextra.override gtkextramodule.c Added Files: gtkextra-addons.defs gtkextra-types.defs mycodegen.py Log Message: little bit closer --- NEW FILE: gtkextra-addons.defs --- ;; 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") ) ) --- NEW FILE: gtkextra-types.defs --- ;; -*- scheme -*- ; object definitions ... (define-object CharSelection (in-module "Gtk") (parent "GtkWindow") (c-name "GtkCharSelection") (gtype-id "GTK_TYPE_CHAR_SELECTION") (fields '("GtkFontCombo*" "font_combo") '("GtkTable*" "table") '("gint" "selection") '("GtkWidget*" "ok_button") '("GtkWidget*" "cancel_button") '("GtkWidget*" "action_area") ) ) (define-object CheckItem (in-module "Gtk") (parent "GtkToggleButton") (c-name "GtkCheckItem") (gtype-id "GTK_TYPE_CHECK_ITEM") ) (define-object ComboBox (in-module "Gtk") (parent "GtkHBox") (c-name "GtkComboBox") (gtype-id "GTK_TYPE_COMBO_BOX") ) (define-object ColorCombo (in-module "Gtk") (parent "GtkComboBox") (c-name "GtkColorCombo") (gtype-id "GTK_TYPE_COLOR_COMBO") ) (define-object BorderCombo (in-module "Gtk") (parent "GtkComboBox") (c-name "GtkBorderCombo") (gtype-id "GTK_TYPE_BORDER_COMBO") ) (define-object DirTree (in-module "Gtk") (parent "GtkCTree") (c-name "GtkDirTree") (gtype-id "GTK_TYPE_DIR_TREE") ) (define-object FontCombo (in-module "Gtk") (parent "GtkToolbar") (c-name "GtkFontCombo") (gtype-id "GTK_TYPE_FONT_COMBO") ) (define-object IconFileSel (in-module "Gtk") (parent "GtkWindow") (c-name "GtkIconFileSel") (gtype-id "GTK_TYPE_ICON_FILE_SEL") ) (define-object IconList (in-module "Gtk") (parent "GtkFixed") (c-name "GtkIconList") (gtype-id "GTK_TYPE_ICON_LIST") ) (define-object FileList (in-module "Gtk") (parent "GtkIconList") (c-name "GtkFileList") (gtype-id "GTK_TYPE_FILE_LIST") ) (define-object ItemEntry (in-module "Gtk") (parent "GtkEntry") (c-name "GtkItemEntry") (gtype-id "GTK_TYPE_ITEM_ENTRY") ) ;; Missed by h2def.py (define-object PlotCanvas (in-module "Gtk") (parent "GtkFixed") (c-name "GtkPlotCanvas") (gtype-id "GTK_TYPE_PLOT_CANVAS") (fields '("guint16" "flags") ) ) (define-object Plot (in-module "Gtk") (parent "GtkWidget") (c-name "GtkPlot") (gtype-id "GTK_TYPE_PLOT") ) (define-object Plot3D (in-module "Gtk") (parent "GtkPlot") (c-name "GtkPlot3D") (gtype-id "GTK_TYPE_PLOT3_D") ) (define-object PlotAxis (in-module "Gtk") (parent "GtkObject") (c-name "GtkPlotAxis") (gtype-id "GTK_TYPE_PLOT_AXIS") ) (define-object PlotDT (in-module "Gtk") (parent "GtkObject") (c-name "GtkPlotDT") (gtype-id "GTK_TYPE_PLOT_DT") ) (define-object PlotData (in-module "Gtk") (parent "GtkWidget") (c-name "GtkPlotData") (gtype-id "GTK_TYPE_PLOT_DATA") ) (define-object PlotBox (in-module "Gtk") (parent "GtkPlotData") (c-name "GtkPlotBox") (gtype-id "GTK_TYPE_PLOT_BOX") ) (define-object PlotBar (in-module "Gtk") (parent "GtkPlotData") (c-name "GtkPlotBar") (gtype-id "GTK_TYPE_PLOT_BAR") ) (define-object PlotFlux (in-module "Gtk") (parent "GtkPlotData") (c-name "GtkPlotFlux") (gtype-id "GTK_TYPE_PLOT_FLUX") ) (define-object PlotPC (in-module "Gtk") (parent "GtkObject") (c-name "GtkPlotPC") (gtype-id "GTK_TYPE_PLOT_PC") ) (define-object PlotGdk (in-module "Gtk") (parent "GtkPlotPC") (c-name "GtkPlotGdk") (gtype-id "GTK_TYPE_PLOT_GDK") ) (define-object PlotPS (in-module "Gtk") (parent "GtkPlotPC") (c-name "GtkPlotPS") (gtype-id "GTK_TYPE_PLOT_PS") ) (define-object PlotPixmap (in-module "Gtk") (parent "GtkPlotData") (c-name "GtkPlotPixmap") (gtype-id "GTK_TYPE_PLOT_PIXMAP") ) (define-object PlotPolar (in-module "Gtk") (parent "GtkPlot") (c-name "GtkPlotPolar") (gtype-id "GTK_TYPE_PLOT_POLAR") ) (define-object PlotSurface (in-module "Gtk") (parent "GtkPlotData") (c-name "GtkPlotSurface") (gtype-id "GTK_TYPE_PLOT_SURFACE") ) (define-object PlotCSurface (in-module "Gtk") (parent "GtkPlotSurface") (c-name "GtkPlotCSurface") (gtype-id "GTK_TYPE_PLOT_CSURFACE") ) (define-object Sheet (in-module "Gtk") (parent "GtkContainer") (c-name "GtkSheet") (gtype-id "GTK_TYPE_SHEET") ) (define-object ToggleCombo (in-module "Gtk") (parent "GtkComboBox") (c-name "GtkToggleCombo") (gtype-id "GTK_TYPE_TOGGLE_COMBO") ) ;; Boxed types (define-pointer PSFont (in-module "Gtk") (c-name "GtkPSFont") (gtype-id "GTK_TYPE_PSFONT") (fields '("const-gchar*" "fontname") '("const-gchar*" "psname") '("const-gchar*" "family") '("const-gchar*" "pango_description") '("const-gchar*" "i18n_latinfamily") '("gboolean" "italic") '("gboolean" "bold") '("gboolean" "vertical") ) ) (define-pointer PlotCanvasChild (in-module "Gtk") (c-name "GtkPlotCanvasChild") (gtype-id "GTK_TYPE_PLOT_CANVAS_CHILD") (fields '("gint" "data") ) ) ;; Enumerations and flags ... (define-enum PlotPlane (in-module "Gtk") (c-name "GtkPlotPlane") (gtype-id "GTK_TYPE_PLOT_PLANE") (values '("xy" "GTK_PLOT_PLANE_XY") '("yx" "GTK_PLOT_PLANE_YX") '("xz" "GTK_PLOT_PLANE_XZ") '("zx" "GTK_PLOT_PLANE_ZX") '("yz" "GTK_PLOT_PLANE_YZ") '("zy" "GTK_PLOT_PLANE_ZY") ) ) (define-flags PlotSide (in-module "Gtk") (c-name "GtkPlotSide") (gtype-id "GTK_TYPE_PLOT_SIDE") (values '("xy" "GTK_PLOT_SIDE_XY") '("xz" "GTK_PLOT_SIDE_XZ") '("yx" "GTK_PLOT_SIDE_YX") '("yz" "GTK_PLOT_SIDE_YZ") '("zx" "GTK_PLOT_SIDE_ZX") '("zy" "GTK_PLOT_SIDE_ZY") ) ) (define-enum PlotBarUnits (in-module "Gtk") (c-name "GtkPlotBarUnits") (gtype-id "GTK_TYPE_PLOT_BAR_UNITS") (values '("points" "GTK_PLOT_BAR_POINTS") '("relative" "GTK_PLOT_BAR_RELATIVE") '("absolute" "GTK_PLOT_BAR_ABSOLUTE") ) ) (define-enum PlotCanvasAction (in-module "Gtk") (c-name "GtkPlotCanvasAction") (gtype-id "GTK_TYPE_PLOT_CANVAS_ACTION") (values '("inactive" "GTK_PLOT_CANVAS_ACTION_INACTIVE") '("selection" "GTK_PLOT_CANVAS_ACTION_SELECTION") '("drag" "GTK_PLOT_CANVAS_ACTION_DRAG") '("resize" "GTK_PLOT_CANVAS_ACTION_RESIZE") ) ) (define-flags PlotCanvasFlag (in-module "Gtk") (c-name "GtkPlotCanvasFlag") (gtype-id "GTK_TYPE_PLOT_CANVAS_FLAG") (values '("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") ) ) (define-enum PlotCanvasSelection (in-module "Gtk") (c-name "GtkPlotCanvasSelection") (gtype-id "GTK_TYPE_PLOT_CANVAS_SELECTION") (values '("none" "GTK_PLOT_CANVAS_SELECT_NONE") '("markers" "GTK_PLOT_CANVAS_SELECT_MARKERS") '("target" "GTK_PLOT_CANVAS_SELECT_TARGET") ) ) (define-enum PlotCanvasSelectionMode (in-module "Gtk") (c-name "GtkPlotCanvasSelectionMode") (gtype-id "GTK_TYPE_PLOT_CANVAS_SELECTION_MODE") (values '("1" "GTK_PLOT_CANVAS_SELECT_CLICK_1") '("2" "GTK_PLOT_CANVAS_SELECT_CLICK_2") ) ) (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") '("custom" "GTK_PLOT_CANVAS_CUSTOM") ) ) (define-enum PlotCanvasPos (in-module "Gtk") (c-name "GtkPlotCanvasPos") (gtype-id "GTK_TYPE_PLOT_CANVAS_POS") (values '("out" "GTK_PLOT_CANVAS_OUT") '("in" "GTK_PLOT_CANVAS_IN") '("left" "GTK_PLOT_CANVAS_LEFT") '("right" "GTK_PLOT_CANVAS_RIGHT") '("top" "GTK_PLOT_CANVAS_TOP") '("bottom" "GTK_PLOT_CANVAS_BOTTOM") '("top-left" "GTK_PLOT_CANVAS_TOP_LEFT") '("top-right" "GTK_PLOT_CANVAS_TOP_RIGHT") '("bottom-left" "GTK_PLOT_CANVAS_BOTTOM_LEFT") '("bottom-right" "GTK_PLOT_CANVAS_BOTTOM_RIGHT") ) ) (define-enum PlotScale (in-module "Gtk") (c-name "GtkPlotScale") (gtype-id "GTK_TYPE_PLOT_SCALE") (values '("inear" "GTK_PLOT_SCALE_LINEAR") '("og10" "GTK_PLOT_SCALE_LOG10") ) ) (define-enum PlotSymbolType (in-module "Gtk") (c-name "GtkPlotSymbolType") (gtype-id "GTK_TYPE_PLOT_SYMBOL_TYPE") (values '("none" "GTK_PLOT_SYMBOL_NONE") '("square" "GTK_PLOT_SYMBOL_SQUARE") '("circle" "GTK_PLOT_SYMBOL_CIRCLE") '("up-triangle" "GTK_PLOT_SYMBOL_UP_TRIANGLE") '("down-triangle" "GTK_PLOT_SYMBOL_DOWN_TRIANGLE") '("right-triangle" "GTK_PLOT_SYMBOL_RIGHT_TRIANGLE") '("left-triangle" "GTK_PLOT_SYMBOL_LEFT_TRIANGLE") '("diamond" "GTK_PLOT_SYMBOL_DIAMOND") '("plus" "GTK_PLOT_SYMBOL_PLUS") '("cross" "GTK_PLOT_SYMBOL_CROSS") '("star" "GTK_PLOT_SYMBOL_STAR") '("dot" "GTK_PLOT_SYMBOL_DOT") '("impulse" "GTK_PLOT_SYMBOL_IMPULSE") ) ) (define-enum PlotSymbolStyle (in-module "Gtk") (c-name "GtkPlotSymbolStyle") (gtype-id "GTK_TYPE_PLOT_SYMBOL_STYLE") (values '("empty" "GTK_PLOT_SYMBOL_EMPTY") '("filled" "GTK_PLOT_SYMBOL_FILLED") '("opaque" "GTK_PLOT_SYMBOL_OPAQUE") ) ) (define-enum PlotBorderStyle (in-module "Gtk") (c-name "GtkPlotBorderStyle") (gtype-id "GTK_TYPE_PLOT_BORDER_STYLE") (values '("none" "GTK_PLOT_BORDER_NONE") '("line" "GTK_PLOT_BORDER_LINE") '("shadow" "GTK_PLOT_BORDER_SHADOW") ) ) (define-enum PlotLineStyle (in-module "Gtk") (c-name "GtkPlotLineStyle") (gtype-id "GTK_TYPE_PLOT_LINE_STYLE") (values '("none" "GTK_PLOT_LINE_NONE") '("solid" "GTK_PLOT_LINE_SOLID") '("dotted" "GTK_PLOT_LINE_DOTTED") '("dashed" "GTK_PLOT_LINE_DASHED") '("dot-dash" "GTK_PLOT_LINE_DOT_DASH") '("dot-dot-dash" "GTK_PLOT_LINE_DOT_DOT_DASH") '("dot-dash-dash" "GTK_PLOT_LINE_DOT_DASH_DASH") ) ) (define-enum PlotConnector (in-module "Gtk") (c-name "GtkPlotConnector") (gtype-id "GTK_TYPE_PLOT_CONNECTOR") (values '("none" "GTK_PLOT_CONNECT_NONE") '("straight" "GTK_PLOT_CONNECT_STRAIGHT") '("spline" "GTK_PLOT_CONNECT_SPLINE") '("hv-step" "GTK_PLOT_CONNECT_HV_STEP") '("vh-step" "GTK_PLOT_CONNECT_VH_STEP") '("middle-step" "GTK_PLOT_CONNECT_MIDDLE_STEP") ) ) (define-flags PlotLabelPos (in-module "Gtk") (c-name "GtkPlotLabelPos") (gtype-id "GTK_TYPE_PLOT_LABEL_POS") (values '("none" "GTK_PLOT_LABEL_NONE") '("in" "GTK_PLOT_LABEL_IN") '("out" "GTK_PLOT_LABEL_OUT") ) ) (define-enum PlotError (in-module "Gtk") (c-name "GtkPlotError") (gtype-id "GTK_TYPE_PLOT_ERROR") (values '("div-zero" "GTK_PLOT_ERROR_DIV_ZERO") '("log-neg" "GTK_PLOT_ERROR_LOG_NEG") ) ) (define-enum PlotOrientation (in-module "Gtk") (c-name "GtkPlotOrientation") (gtype-id "GTK_TYPE_PLOT_ORIENTATION") (values '("x" "GTK_PLOT_AXIS_X") '("y" "GTK_PLOT_AXIS_Y") '("z" "GTK_PLOT_AXIS_Z") ) ) (define-enum PlotAxisPos (in-module "Gtk") (c-name "GtkPlotAxisPos") (gtype-id "GTK_TYPE_PLOT_AXIS_POS") (values '("left" "GTK_PLOT_AXIS_LEFT") '("right" "GTK_PLOT_AXIS_RIGHT") '("top" "GTK_PLOT_AXIS_TOP") '("bottom" "GTK_PLOT_AXIS_BOTTOM") ) ) (define-enum PlotLabelStyle (in-module "Gtk") (c-name "GtkPlotLabelStyle") (gtype-id "GTK_TYPE_PLOT_LABEL_STYLE") (values '("float" "GTK_PLOT_LABEL_FLOAT") '("exp" "GTK_PLOT_LABEL_EXP") '("pow" "GTK_PLOT_LABEL_POW") ) ) (define-flags PlotTicksPos (in-module "Gtk") (c-name "GtkPlotTicksPos") (gtype-id "GTK_TYPE_PLOT_TICKS_POS") (values '("none" "GTK_PLOT_TICKS_NONE") '("in" "GTK_PLOT_TICKS_IN") '("out" "GTK_PLOT_TICKS_OUT") ) ) (define-enum SheetAttrType (in-module "Gtk") (c-name "GtkSheetAttrType") (gtype-id "GTK_TYPE_SHEET_ATTR_TYPE") (values '("foreground" "GTK_SHEET_FOREGROUND") '("background" "GTK_SHEET_BACKGROUND") '("font" "GTK_SHEET_FONT") '("justification" "GTK_SHEET_JUSTIFICATION") '("border" "GTK_SHEET_BORDER") '("border-color" "GTK_SHEET_BORDER_COLOR") '("is-editable" "GTK_SHEET_IS_EDITABLE") '("is-visible" "GTK_SHEET_IS_VISIBLE") ) ) --- NEW FILE: mycodegen.py --- #!/bin/env python # This is a temporary hack. import sys sys.path.append('/usr/share/pygtk/2.0/') del sys # Use the PyGtk2 codegen modules from codegen.argtypes import matcher import codegen.codegen matcher.register('GdkWChar', matcher.get('gint32')) codegen.codegen.main() Index: .cvsignore =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 10 Jul 2002 19:26:06 -0000 1.1 --- .cvsignore 11 Jul 2002 19:17:44 -0000 1.2 *************** *** 1,3 **** Makefile.in ! --- 1,8 ---- + gtkextra.c + Makefile Makefile.in ! *.lo ! *.la ! .deps ! .libs Index: Makefile.am =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 10 Jul 2002 19:26:06 -0000 1.2 --- Makefile.am 11 Jul 2002 19:17:44 -0000 1.3 *************** *** 25,38 **** gtkextramodule_la_LIBADD = $(GTKEXTRA_LIBS) $(PYGTK_LIBS) $(GTK_LIBS) gtkextramodule_la_SOURCES = gtkextramodule.c ! gtkextra.c: $(COMMONDEFS) gtkextra.override nodist_gtkextramodule_la_SOURCES = gtkextra.c CLEANFILES += gtkextra.c ! defs_DATA += gtkextra.defs EXTRA_DIST += gtkextra.override .defs.c: (cd $(srcdir) \ ! && $(PYTHON) $(PYGTK_DEFSDIR)/../codegen/codegen.py \ --register $(PYGTK_DEFSDIR)/pango-types.defs \ --register $(PYGTK_DEFSDIR)/gdk-types.defs \ --- 25,41 ---- gtkextramodule_la_LIBADD = $(GTKEXTRA_LIBS) $(PYGTK_LIBS) $(GTK_LIBS) gtkextramodule_la_SOURCES = gtkextramodule.c ! gtkextra.c: $(COMMONDEFS) gtkextra-addons.defs gtkextra-types.defs gtkextra.override nodist_gtkextramodule_la_SOURCES = gtkextra.c CLEANFILES += gtkextra.c ! defs_DATA += gtkextra.defs gtkextra-types.defs EXTRA_DIST += gtkextra.override + #CODEGEN=$(PYGTK_DEFSDIR)/../codegen/codegen.py + CODEGEN=$(srcdir)/mycodegen.py + .defs.c: (cd $(srcdir) \ ! && $(PYTHON) $(CODEGEN) \ --register $(PYGTK_DEFSDIR)/pango-types.defs \ --register $(PYGTK_DEFSDIR)/gdk-types.defs \ Index: gtkextra.defs =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/gtkextra.defs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gtkextra.defs 10 Jul 2002 19:07:02 -0000 1.1.1.1 --- gtkextra.defs 11 Jul 2002 19:17:44 -0000 1.2 *************** *** 5,514 **** ;; Then merge old defs with new defs with mergedefs.py (for fields) ! ; object definitions ... ! (define-object CharSelection ! (in-module "Gtk") ! (parent "GtkWindow") ! (c-name "GtkCharSelection") ! (gtype-id "GTK_TYPE_CHAR_SELECTION") ! (fields ! '("GtkFontCombo*" "font_combo") ! '("GtkTable*" "table") ! ;;GtkToggleButton *button[256]; ! '("gint" "selection") ! '("GtkWidget*" "ok_button") ! '("GtkWidget*" "cancel_button") ! '("GtkWidget*" "action_area") ! ) ! ) ! ! (define-object CheckItem ! (in-module "Gtk") ! (parent "GtkToggleButton") ! (c-name "GtkCheckItem") ! (gtype-id "GTK_TYPE_CHECK_ITEM") ! ) ! ! (define-object ComboBox ! (in-module "Gtk") ! (parent "GtkHBox") ! (c-name "GtkComboBox") ! (gtype-id "GTK_TYPE_COMBO_BOX") ! ) ! ! (define-object ColorCombo ! (in-module "Gtk") ! (parent "GtkComboBox") ! (c-name "GtkColorCombo") ! (gtype-id "GTK_TYPE_COLOR_COMBO") ! ) ! ! (define-object BorderCombo ! (in-module "Gtk") ! (parent "GtkComboBox") ! (c-name "GtkBorderCombo") ! (gtype-id "GTK_TYPE_BORDER_COMBO") ! ) ! ! (define-object DirTree ! (in-module "Gtk") ! (parent "GtkCTree") ! (c-name "GtkDirTree") ! (gtype-id "GTK_TYPE_DIR_TREE") ! ) ! ! (define-object FontCombo ! (in-module "Gtk") ! (parent "GtkToolbar") ! (c-name "GtkFontCombo") ! (gtype-id "GTK_TYPE_FONT_COMBO") ! ) ! ! (define-object IconFileSel ! (in-module "Gtk") ! (parent "GtkWindow") ! (c-name "GtkIconFileSel") ! (gtype-id "GTK_TYPE_ICON_FILE_SEL") ! ) ! ! (define-object IconList ! (in-module "Gtk") ! (parent "GtkFixed") ! (c-name "GtkIconList") ! (gtype-id "GTK_TYPE_ICON_LIST") ! ) ! ! (define-object FileList ! (in-module "Gtk") ! (parent "GtkIconList") ! (c-name "GtkFileList") ! (gtype-id "GTK_TYPE_FILE_LIST") ! ) ! ! (define-object ItemEntry ! (in-module "Gtk") ! (parent "GtkEntry") ! (c-name "GtkItemEntry") ! (gtype-id "GTK_TYPE_ITEM_ENTRY") ! ) ! ! (define-object Plot ! (in-module "Gtk") ! (parent "GtkWidget") ! (c-name "GtkPlot") ! (gtype-id "GTK_TYPE_PLOT") ! ) ! ! (define-object Plot3D ! (in-module "Gtk") ! (parent "GtkPlot") ! (c-name "GtkPlot3D") ! (gtype-id "GTK_TYPE_PLOT3_D") ! ) ! ! (define-object PlotAxis ! (in-module "Gtk") ! (parent "GtkObject") ! (c-name "GtkPlotAxis") ! (gtype-id "GTK_TYPE_PLOT_AXIS") ! ) ! ! (define-object PlotDT ! (in-module "Gtk") ! (parent "GtkObject") ! (c-name "GtkPlotDT") ! (gtype-id "GTK_TYPE_PLOT_DT") ! ) ! ! (define-object PlotData ! (in-module "Gtk") ! (parent "GtkWidget") ! (c-name "GtkPlotData") ! (gtype-id "GTK_TYPE_PLOT_DATA") ! ) ! ! (define-object PlotBox ! (in-module "Gtk") ! (parent "GtkPlotData") ! (c-name "GtkPlotBox") ! (gtype-id "GTK_TYPE_PLOT_BOX") ! ) ! ! (define-object PlotBar ! (in-module "Gtk") ! (parent "GtkPlotData") ! (c-name "GtkPlotBar") ! (gtype-id "GTK_TYPE_PLOT_BAR") ! ) ! ! (define-object PlotFlux ! (in-module "Gtk") ! (parent "GtkPlotData") ! (c-name "GtkPlotFlux") ! (gtype-id "GTK_TYPE_PLOT_FLUX") ! ) ! ! (define-object PlotPC ! (in-module "Gtk") ! (parent "GtkObject") ! (c-name "GtkPlotPC") ! (gtype-id "GTK_TYPE_PLOT_PC") ! ) ! ! (define-object PlotGdk ! (in-module "Gtk") ! (parent "GtkPlotPC") ! (c-name "GtkPlotGdk") ! (gtype-id "GTK_TYPE_PLOT_GDK") ! ) ! ! (define-object PlotPS ! (in-module "Gtk") ! (parent "GtkPlotPC") ! (c-name "GtkPlotPS") ! (gtype-id "GTK_TYPE_PLOT_PS") ! ) ! ! (define-object PlotPixmap ! (in-module "Gtk") ! (parent "GtkPlotData") ! (c-name "GtkPlotPixmap") ! (gtype-id "GTK_TYPE_PLOT_PIXMAP") ! ) ! ! (define-object PlotPolar ! (in-module "Gtk") ! (parent "GtkPlot") ! (c-name "GtkPlotPolar") ! (gtype-id "GTK_TYPE_PLOT_POLAR") ! ) ! ! (define-object PlotSurface ! (in-module "Gtk") ! (parent "GtkPlotData") ! (c-name "GtkPlotSurface") ! (gtype-id "GTK_TYPE_PLOT_SURFACE") ! ) ! ! (define-object PlotCSurface ! (in-module "Gtk") ! (parent "GtkPlotSurface") ! (c-name "GtkPlotCSurface") ! (gtype-id "GTK_TYPE_PLOT_CSURFACE") ! ) ! ! (define-object Sheet ! (in-module "Gtk") ! (parent "GtkContainer") ! (c-name "GtkSheet") ! (gtype-id "GTK_TYPE_SHEET") ! ) ! ! (define-object ToggleCombo ! (in-module "Gtk") ! (parent "GtkComboBox") ! (c-name "GtkToggleCombo") ! (gtype-id "GTK_TYPE_TOGGLE_COMBO") ! ) ! ! ;; Enumerations and flags ... ! ! (define-enum PlotPlane ! (in-module "Gtk") ! (c-name "GtkPlotPlane") ! (gtype-id "GTK_TYPE_PLOT_PLANE") ! (values ! '("xy" "GTK_PLOT_PLANE_XY") ! '("yx" "GTK_PLOT_PLANE_YX") ! '("xz" "GTK_PLOT_PLANE_XZ") ! '("zx" "GTK_PLOT_PLANE_ZX") ! '("yz" "GTK_PLOT_PLANE_YZ") ! '("zy" "GTK_PLOT_PLANE_ZY") ! ) ! ) ! ! (define-flags PlotSide ! (in-module "Gtk") ! (c-name "GtkPlotSide") ! (gtype-id "GTK_TYPE_PLOT_SIDE") ! (values ! '("xy" "GTK_PLOT_SIDE_XY") ! '("xz" "GTK_PLOT_SIDE_XZ") ! '("yx" "GTK_PLOT_SIDE_YX") ! '("yz" "GTK_PLOT_SIDE_YZ") ! '("zx" "GTK_PLOT_SIDE_ZX") ! '("zy" "GTK_PLOT_SIDE_ZY") ! ) ! ) ! ! (define-enum PlotBarUnits ! (in-module "Gtk") ! (c-name "GtkPlotBarUnits") ! (gtype-id "GTK_TYPE_PLOT_BAR_UNITS") ! (values ! '("points" "GTK_PLOT_BAR_POINTS") ! '("relative" "GTK_PLOT_BAR_RELATIVE") ! '("absolute" "GTK_PLOT_BAR_ABSOLUTE") ! ) ! ) ! ! (define-enum PlotCanvasAction ! (in-module "Gtk") ! (c-name "GtkPlotCanvasAction") ! (gtype-id "GTK_TYPE_PLOT_CANVAS_ACTION") ! (values ! '("inactive" "GTK_PLOT_CANVAS_ACTION_INACTIVE") ! '("selection" "GTK_PLOT_CANVAS_ACTION_SELECTION") ! '("drag" "GTK_PLOT_CANVAS_ACTION_DRAG") ! '("resize" "GTK_PLOT_CANVAS_ACTION_RESIZE") ! ) ! ) ! ! (define-flags PlotCanvasFlag ! (in-module "Gtk") ! (c-name "GtkPlotCanvasFlag") ! (gtype-id "GTK_TYPE_PLOT_CANVAS_FLAG") ! (values ! '("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") ! ) ! ) ! ! (define-enum PlotCanvasSelection ! (in-module "Gtk") ! (c-name "GtkPlotCanvasSelection") ! (gtype-id "GTK_TYPE_PLOT_CANVAS_SELECTION") ! (values ! '("none" "GTK_PLOT_CANVAS_SELECT_NONE") ! '("markers" "GTK_PLOT_CANVAS_SELECT_MARKERS") ! '("target" "GTK_PLOT_CANVAS_SELECT_TARGET") ! ) ! ) ! ! (define-enum PlotCanvasSelectionMode ! (in-module "Gtk") ! (c-name "GtkPlotCanvasSelectionMode") ! (gtype-id "GTK_TYPE_PLOT_CANVAS_SELECTION_MODE") ! (values ! '("1" "GTK_PLOT_CANVAS_SELECT_CLICK_1") ! '("2" "GTK_PLOT_CANVAS_SELECT_CLICK_2") ! ) ! ) ! ! (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") ! '("custom" "GTK_PLOT_CANVAS_CUSTOM") ! ) ! ) ! ! (define-enum PlotCanvasPos ! (in-module "Gtk") ! (c-name "GtkPlotCanvasPos") ! (gtype-id "GTK_TYPE_PLOT_CANVAS_POS") ! (values ! '("out" "GTK_PLOT_CANVAS_OUT") ! '("in" "GTK_PLOT_CANVAS_IN") ! '("left" "GTK_PLOT_CANVAS_LEFT") ! '("right" "GTK_PLOT_CANVAS_RIGHT") ! '("top" "GTK_PLOT_CANVAS_TOP") ! '("bottom" "GTK_PLOT_CANVAS_BOTTOM") ! '("top-left" "GTK_PLOT_CANVAS_TOP_LEFT") ! '("top-right" "GTK_PLOT_CANVAS_TOP_RIGHT") ! '("bottom-left" "GTK_PLOT_CANVAS_BOTTOM_LEFT") ! '("bottom-right" "GTK_PLOT_CANVAS_BOTTOM_RIGHT") ! ) ! ) ! ! (define-enum PlotScale ! (in-module "Gtk") ! (c-name "GtkPlotScale") ! (gtype-id "GTK_TYPE_PLOT_SCALE") ! (values ! '("inear" "GTK_PLOT_SCALE_LINEAR") ! '("og10" "GTK_PLOT_SCALE_LOG10") ! ) ! ) ! ! (define-enum PlotSymbolType ! (in-module "Gtk") ! (c-name "GtkPlotSymbolType") ! (gtype-id "GTK_TYPE_PLOT_SYMBOL_TYPE") ! (values ! '("none" "GTK_PLOT_SYMBOL_NONE") ! '("square" "GTK_PLOT_SYMBOL_SQUARE") ! '("circle" "GTK_PLOT_SYMBOL_CIRCLE") ! '("up-triangle" "GTK_PLOT_SYMBOL_UP_TRIANGLE") ! '("down-triangle" "GTK_PLOT_SYMBOL_DOWN_TRIANGLE") ! '("right-triangle" "GTK_PLOT_SYMBOL_RIGHT_TRIANGLE") ! '("left-triangle" "GTK_PLOT_SYMBOL_LEFT_TRIANGLE") ! '("diamond" "GTK_PLOT_SYMBOL_DIAMOND") ! '("plus" "GTK_PLOT_SYMBOL_PLUS") ! '("cross" "GTK_PLOT_SYMBOL_CROSS") ! '("star" "GTK_PLOT_SYMBOL_STAR") ! '("dot" "GTK_PLOT_SYMBOL_DOT") ! '("impulse" "GTK_PLOT_SYMBOL_IMPULSE") ! ) ! ) ! ! (define-enum PlotSymbolStyle ! (in-module "Gtk") ! (c-name "GtkPlotSymbolStyle") ! (gtype-id "GTK_TYPE_PLOT_SYMBOL_STYLE") ! (values ! '("empty" "GTK_PLOT_SYMBOL_EMPTY") ! '("filled" "GTK_PLOT_SYMBOL_FILLED") ! '("opaque" "GTK_PLOT_SYMBOL_OPAQUE") ! ) ! ) ! ! (define-enum PlotBorderStyle ! (in-module "Gtk") ! (c-name "GtkPlotBorderStyle") ! (gtype-id "GTK_TYPE_PLOT_BORDER_STYLE") ! (values ! '("none" "GTK_PLOT_BORDER_NONE") ! '("line" "GTK_PLOT_BORDER_LINE") ! '("shadow" "GTK_PLOT_BORDER_SHADOW") ! ) ! ) ! ! (define-enum PlotLineStyle ! (in-module "Gtk") ! (c-name "GtkPlotLineStyle") ! (gtype-id "GTK_TYPE_PLOT_LINE_STYLE") ! (values ! '("none" "GTK_PLOT_LINE_NONE") ! '("solid" "GTK_PLOT_LINE_SOLID") ! '("dotted" "GTK_PLOT_LINE_DOTTED") ! '("dashed" "GTK_PLOT_LINE_DASHED") ! '("dot-dash" "GTK_PLOT_LINE_DOT_DASH") ! '("dot-dot-dash" "GTK_PLOT_LINE_DOT_DOT_DASH") ! '("dot-dash-dash" "GTK_PLOT_LINE_DOT_DASH_DASH") ! ) ! ) ! ! (define-enum PlotConnector ! (in-module "Gtk") ! (c-name "GtkPlotConnector") ! (gtype-id "GTK_TYPE_PLOT_CONNECTOR") ! (values ! '("none" "GTK_PLOT_CONNECT_NONE") ! '("straight" "GTK_PLOT_CONNECT_STRAIGHT") ! '("spline" "GTK_PLOT_CONNECT_SPLINE") ! '("hv-step" "GTK_PLOT_CONNECT_HV_STEP") ! '("vh-step" "GTK_PLOT_CONNECT_VH_STEP") ! '("middle-step" "GTK_PLOT_CONNECT_MIDDLE_STEP") ! ) ! ) ! ! (define-flags PlotLabelPos ! (in-module "Gtk") ! (c-name "GtkPlotLabelPos") ! (gtype-id "GTK_TYPE_PLOT_LABEL_POS") ! (values ! '("none" "GTK_PLOT_LABEL_NONE") ! '("in" "GTK_PLOT_LABEL_IN") ! '("out" "GTK_PLOT_LABEL_OUT") ! ) ! ) ! ! (define-enum PlotError ! (in-module "Gtk") ! (c-name "GtkPlotError") ! (gtype-id "GTK_TYPE_PLOT_ERROR") ! (values ! '("div-zero" "GTK_PLOT_ERROR_DIV_ZERO") ! '("log-neg" "GTK_PLOT_ERROR_LOG_NEG") ! ) ! ) ! ! (define-enum PlotOrientation ! (in-module "Gtk") ! (c-name "GtkPlotOrientation") ! (gtype-id "GTK_TYPE_PLOT_ORIENTATION") ! (values ! '("x" "GTK_PLOT_AXIS_X") ! '("y" "GTK_PLOT_AXIS_Y") ! '("z" "GTK_PLOT_AXIS_Z") ! ) ! ) ! ! (define-enum PlotAxisPos ! (in-module "Gtk") ! (c-name "GtkPlotAxisPos") ! (gtype-id "GTK_TYPE_PLOT_AXIS_POS") ! (values ! '("left" "GTK_PLOT_AXIS_LEFT") ! '("right" "GTK_PLOT_AXIS_RIGHT") ! '("top" "GTK_PLOT_AXIS_TOP") ! '("bottom" "GTK_PLOT_AXIS_BOTTOM") ! ) ! ) ! ! (define-enum PlotLabelStyle ! (in-module "Gtk") ! (c-name "GtkPlotLabelStyle") ! (gtype-id "GTK_TYPE_PLOT_LABEL_STYLE") ! (values ! '("float" "GTK_PLOT_LABEL_FLOAT") ! '("exp" "GTK_PLOT_LABEL_EXP") ! '("pow" "GTK_PLOT_LABEL_POW") ! ) ! ) ! ! (define-flags PlotTicksPos ! (in-module "Gtk") ! (c-name "GtkPlotTicksPos") ! (gtype-id "GTK_TYPE_PLOT_TICKS_POS") ! (values ! '("none" "GTK_PLOT_TICKS_NONE") ! '("in" "GTK_PLOT_TICKS_IN") ! '("out" "GTK_PLOT_TICKS_OUT") ! ) ! ) ! ! (define-enum SheetAttrType ! (in-module "Gtk") ! (c-name "GtkSheetAttrType") ! (gtype-id "GTK_TYPE_SHEET_ATTR_TYPE") ! (values ! '("foreground" "GTK_SHEET_FOREGROUND") ! '("background" "GTK_SHEET_BACKGROUND") ! '("font" "GTK_SHEET_FONT") ! '("justification" "GTK_SHEET_JUSTIFICATION") ! '("border" "GTK_SHEET_BORDER") ! '("border-color" "GTK_SHEET_BORDER_COLOR") ! '("is-editable" "GTK_SHEET_IS_EDITABLE") ! '("is-visible" "GTK_SHEET_IS_VISIBLE") ! ) ! ) ! ;; From /usr/include/gtk-2.0/gtkextra/gtkbordercombo.h --- 5,10 ---- ;; Then merge old defs with new defs with mergedefs.py (for fields) ! (include "gtkextra-types.defs") ! (include "gtkextra-addons.defs") ;; From /usr/include/gtk-2.0/gtkextra/gtkbordercombo.h *************** *** 2074,2078 **** '("gint" "width") '("gint" "height") ! '("gdouble" "magnification") ) ) --- 1570,1574 ---- '("gint" "width") '("gint" "height") ! '("gdouble" "magnification" (default "1.0")) ) ) *************** *** 2270,2278 **** '("gdouble" "x") '("gdouble" "y") ! '("const-gchar*" "font") '("gint" "height") '("gint" "angle") ! '("const-GdkColor*" "fg") ! '("const-GdkColor*" "bg") '("gboolean" "transparent") '("GtkJustification" "justification") --- 1766,1774 ---- '("gdouble" "x") '("gdouble" "y") ! '("const-gchar*" "font" (null-ok) (default "NULL")) '("gint" "height") '("gint" "angle") ! '("const-GdkColor*" "fg" (null-ok) (default "NULL")) ! '("const-GdkColor*" "bg" (null-ok) (default "NULL")) '("gboolean" "transparent") '("GtkJustification" "justification") *************** *** 3436,3440 **** (return-type "GtkWidget*") (parameters ! '("GdkDrawable*" "drawable") ) ) --- 2932,2936 ---- (return-type "GtkWidget*") (parameters ! '("GdkDrawable*" "drawable" (default "NULL")) ) ) *************** *** 4381,4388 **** (return-type "none") (parameters ! '("const-gchar*" "font") '("gint" "height") ! '("const-GdkColor*" "foreground") ! '("const-GdkColor*" "background") ) ) --- 3877,3884 ---- (return-type "none") (parameters ! '("const-gchar*" "font" (null-ok) (default "NULL")) '("gint" "height") ! '("const-GdkColor*" "foreground" (null-ok) (default "NULL")) ! '("const-GdkColor*" "background" (null-ok) (default "NULL")) ) ) *************** *** 4758,4775 **** ;; From /usr/include/gtk-2.0/gtkextra/gtkplotprint.h - (define-method export_ps_with_size - (of-object "GtkPlot") - (c-name "gtk_plot_export_ps_with_size") - (return-type "gboolean") - (parameters - '("char*" "file_name") - '("gint" "orient") - '("gint" "epsflag") - '("gint" "units") - '("gint" "width") - '("gint" "height") - ) - ) - (define-method export_ps (of-object "GtkPlotCanvas") --- 4254,4257 ---- *************** *** 4789,4798 **** (return-type "gboolean") (parameters ! '("char*" "file_name") ! '("gint" "orient") ! '("gint" "epsflag") ! '("gint" "units") ! '("gint" "width") ! '("gint" "height") ) ) --- 4271,4281 ---- (return-type "gboolean") (parameters ! '("gchar*" "file_name") ! '("gint" "orient" (default "GTK_PLOT_PORTRAIT")) ! '("gint" "eps" (default "FALSE")) ! '("gint" "units" (default "GTK_PLOT_PSPOINTS")) ! '("gint" "width" (default "GTK_PLOT_LETTER_W")) ! '("gint" "height" (default "GTK_PLOT_LETTER_H")) ! ) ) *************** *** 5284,5288 **** (of-object "GtkPSFont") (c-name "gtk_psfont_get_psfontname") ! (return-type "gchar*") ) --- 4767,4772 ---- (of-object "GtkPSFont") (c-name "gtk_psfont_get_psfontname") ! ;;FIXME (return-type "gchar*") ! (return-type "const-gchar*") ) Index: gtkextra.override =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/gtkextra.override,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gtkextra.override 10 Jul 2002 19:07:02 -0000 1.1.1.1 --- gtkextra.override 11 Jul 2002 19:17:44 -0000 1.2 *************** *** 1,3 **** - /* This is top */ /* -*- Mode: C; c-basic-offset: 4 -*- */ %% --- 1,2 ---- *************** *** 18,24 **** --- 17,55 ---- #define GTK_TYPE_TOGGLE_COMBO (gtk_toggle_combo_get_type()) + /* Hack boxed types. Just enought to let code generator compile. Not perfectly correct! */ + //GType gtk_psfont_get_type (void) G_GNUC_CONST; + #define GTK_TYPE_PSFONT (gtk_psfont_get_type ()) + static GType + gtk_psfont_get_type (void) + { + static GType our_type = 0; + + if (our_type == 0) + our_type = g_pointer_type_register_static ("GtkPSFont"); + + return our_type; + } + + #if 0 + //GType gtk_plot_canvas_child_get_type (void) G_GNUC_CONST; + #define GTK_TYPE_PLOT_CANVAS_CHILD (gtk_plot_canvas_child_get_type ()) + static GType + gtk_plot_canvas_child_get_type (void) + { + static GType our_type = 0; + + if (our_type == 0) + our_type = g_pointer_type_register_static ("GtkPlotCanvasChild"); + + return our_type; + } + #endif + /* This one is probably an "error" in h2def.py */ #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); } + %% modulename gtkextra *************** *** 39,45 **** import gtk._gtk.HBox as PyGtkHBox_Type %% ! #ignore-glob *_get_type %% ignore --- 70,106 ---- import gtk._gtk.HBox as PyGtkHBox_Type + %% + override gtk_psfont_get_char_size + static PyObject * + _wrap_gtk_psfont_get_char_size(PyObject *self) + { + PyErr_SetString(PyExc_NotImplementedError, __FUNCTION__ ); + return NULL; + } %% ! override-attr GtkPlotCanvasChild.data ! static PyObject * ! _wrap_gtk_plot_canvas_child__get_data(PyObject *self, void *closure) ! { ! // FIXME ! switch (pyg_pointer_get(self, GtkPlotCanvasChild)->type) { ! case GTK_PLOT_CANVAS_NONE: ! Py_INCREF(Py_None); ! return Py_None; ! #if 0 ! case GTK_PLOT_CANVAS_PLOT: ! case GTK_PLOT_CANVAS_DATA: ! case GTK_PLOT_CANVAS_LEGENDS: ! case GTK_PLOT_CANVAS_TEXT: ! return pygobject_new((GObject *)(pyg_pointer_get(self, GtkPlotCanvasChild)->data)); ! #endif ! default: ! return PyCObject_FromVoidPtr(pyg_pointer_get(self, GtkPlotCanvasChild)->data, NULL); ! } ! } ! ! %% ! ignore-glob *_get_type %% ignore *************** *** 48,53 **** gtkextra_check_version gtk_plot_dt_set_quadtrilateral - - - - --- 109,110 ---- Index: gtkextramodule.c =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/gtkextramodule.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gtkextramodule.c 10 Jul 2002 19:07:02 -0000 1.1.1.1 --- gtkextramodule.c 11 Jul 2002 19:17:44 -0000 1.2 *************** *** 7,12 **** --- 7,15 ---- #include <pygobject.h> #include <pygtk/pygtk.h> + #include <gtkextra/gtkextra.h> void pygtkextra_register_classes(PyObject *d); + void pygtkextra_add_constants(PyObject *module, const gchar *strip_prefix); + extern PyMethodDef pygtkextra_functions[]; *************** *** 24,27 **** --- 27,41 ---- pygtkextra_register_classes(d); + pygtkextra_add_constants(m, "GTK_"); + + PyModule_AddIntConstant(m, "PLOT_LETTER_W", GTK_PLOT_LETTER_W); + PyModule_AddIntConstant(m, "PLOT_LETTER_H", GTK_PLOT_LETTER_H); + PyModule_AddIntConstant(m, "PLOT_LEGAL_W", GTK_PLOT_LEGAL_W); + PyModule_AddIntConstant(m, "PLOT_LEGAL_H", GTK_PLOT_LEGAL_H); + PyModule_AddIntConstant(m, "PLOT_A4_W", GTK_PLOT_A4_W); + PyModule_AddIntConstant(m, "PLOT_A4_H", GTK_PLOT_A4_H); + PyModule_AddIntConstant(m, "PLOT_EXECUTIVE_W", GTK_PLOT_EXECUTIVE_W); + PyModule_AddIntConstant(m, "PLOT_EXECUTIVE_H", GTK_PLOT_EXECUTIVE_H); + PyModule_AddIntConstant(m, "PLOT_CANVAS_DND_FLAGS", GTK_PLOT_CANVAS_DND_FLAGS); if (PyErr_Occurred()) |
From: <pyt...@li...> - 2002-07-10 19:26:11
|
Update of /cvsroot/python-gtkextra/python-gtkextra2/gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv4923/gtkextra Modified Files: Makefile.am Added Files: .cvsignore Log Message: cvsignore's and Makefile.am fix --- NEW FILE: .cvsignore --- Makefile.in Index: Makefile.am =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra2/gtkextra/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 10 Jul 2002 19:06:56 -0000 1.1.1.1 --- Makefile.am 10 Jul 2002 19:26:06 -0000 1.2 *************** *** 11,15 **** pkgincludedir = $(includedir)/pygtkextra-2.0/pygtkextra ! pkginclude_HEADERS = pygtkextra.h INCLUDES = -I$(top_srcdir) $(PYTHON_INCLUDES) -Wall --- 11,15 ---- pkgincludedir = $(includedir)/pygtkextra-2.0/pygtkextra ! pkginclude_HEADERS = INCLUDES = -I$(top_srcdir) $(PYTHON_INCLUDES) -Wall |
From: <pyt...@li...> - 2002-07-10 19:26:09
|
Update of /cvsroot/python-gtkextra/python-gtkextra2 In directory usw-pr-cvs1:/tmp/cvs-serv4923 Added Files: .cvsignore Log Message: cvsignore's and Makefile.am fix --- NEW FILE: .cvsignore --- Makefile.in aclocal.m4 autom4te-2.53.cache config.h.in config.log config.status configure |
From: <pyt...@li...> - 2002-07-10 19:07:06
|
Update of /cvsroot/python-gtkextra/python-gtkextra2 In directory usw-pr-cvs1:/tmp/cvs-serv30792 Log Message: Initial cut for gtk+extra for Gtk 2.0 Status: Vendor Tag: vendor Release Tags: start N python-gtkextra2/acinclude.m4 N python-gtkextra2/AUTHORS N python-gtkextra2/autogen.sh N python-gtkextra2/setup-rh73.sh N python-gtkextra2/configure.in N python-gtkextra2/Makefile.am N python-gtkextra2/python-gtkextra.pc.in N python-gtkextra2/python-gtkextra.spec.in N python-gtkextra2/ChangeLog N python-gtkextra2/README N python-gtkextra2/NEWS N python-gtkextra2/ltihooks.py N python-gtkextra2/examples/icons.py N python-gtkextra2/examples/pixmaps.py N python-gtkextra2/examples/testboxes.py N python-gtkextra2/examples/testbubbles.py N python-gtkextra2/examples/testcharsel.py N python-gtkextra2/examples/testcontour.py N python-gtkextra2/examples/testflux.py N python-gtkextra2/examples/testgtkfilesel.py N python-gtkextra2/examples/testgtkfont.py N python-gtkextra2/examples/testgtkiconlist.py N python-gtkextra2/examples/testgtkplot.py N python-gtkextra2/examples/testgtkplot3d.py N python-gtkextra2/examples/testgtksheet.py N python-gtkextra2/examples/testiterator.py N python-gtkextra2/examples/testpixmap.py N python-gtkextra2/examples/testpolar.py N python-gtkextra2/examples/testrealtime.py N python-gtkextra2/examples/test.sh N python-gtkextra2/examples/simple.py N python-gtkextra2/gtkextra/Makefile.am N python-gtkextra2/gtkextra/gtkextra.defs N python-gtkextra2/gtkextra/gtkextramodule.c N python-gtkextra2/gtkextra/gtkextra.override No conflicts created by this import ***** Bogus filespec: - Imported sources |
From: <pyt...@li...> - 2002-02-23 13:49:35
|
Update of /cvsroot/python-gtkextra/python-gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv32262 Modified Files: README Log Message: Removed my address. Index: README =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 15 Sep 2001 18:50:56 -0000 1.1.1.1 --- README 23 Feb 2002 13:49:32 -0000 1.2 *************** *** 33,40 **** http://python-gtkextra.sourceforge.net/. - If you want to contact the author send electronic mail to - <voe...@us...> or paper mail to Andreas Voegele, - Gartenstr. 13, 71106 Magstadt, Germany. - Local variables: default-justification: full --- 33,36 ---- |
From: <pyt...@li...> - 2002-02-23 13:31:08
|
Update of /cvsroot/python-gtkextra/python-gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv29033 Modified Files: NEWS Log Message: Removed GtkCheckItem. Index: NEWS =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/NEWS,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NEWS 3 Jan 2002 22:44:04 -0000 1.2 --- NEWS 23 Feb 2002 13:31:06 -0000 1.3 *************** *** 5,10 **** * GtkPlotData.set_points() accepts the tuple returned by get_points() as input. ! * GtkCheckItem will be removed in the next version. Please use the ! standard GtkCheckButton instead. New in 0.21: --- 5,9 ---- * GtkPlotData.set_points() accepts the tuple returned by get_points() as input. ! * Removed GtkCheckItem. New in 0.21: |
From: <pyt...@li...> - 2002-02-23 13:29:32
|
Update of /cvsroot/python-gtkextra/python-gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv28613 Modified Files: TODO Log Message: Added an entry for the GtkPlotDT widget. Index: TODO =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TODO 15 Sep 2001 18:50:55 -0000 1.1.1.1 --- TODO 23 Feb 2002 13:29:30 -0000 1.2 *************** *** 5,6 **** --- 5,8 ---- * The GtkPlot signal "tick_label" is not supported since it uses GTK_TYPE_POINTER. + + * Support the GtkPlotDT widget. |
From: <pyt...@li...> - 2002-02-23 13:28:17
|
Update of /cvsroot/python-gtkextra/python-gtkextra/gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv28444 Modified Files: __init__.py Log Message: Removed GtkCheckItem. Index: __init__.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/__init__.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** __init__.py 4 Jan 2002 12:24:13 -0000 1.4 --- __init__.py 23 Feb 2002 13:28:13 -0000 1.5 *************** *** 2166,2171 **** _gtk._name2cls['GtkCharSelection'] = GtkCharSelection - GtkCheckItem = _gtk.GtkCheckButton - GtkSheetRange = _gtkextra.GtkSheetRange GtkPlotLine = _gtkextra.GtkPlotLine --- 2166,2169 ---- |
From: <pyt...@li...> - 2002-02-12 04:29:10
|
Update of /cvsroot/python-gtkextra/python-gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv22041 Modified Files: ChangeLog Log Message: Updated the ChangeLog. Index: ChangeLog =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog 4 Jan 2002 14:03:46 -0000 1.3 --- ChangeLog 12 Feb 2002 04:29:07 -0000 1.4 *************** *** 1,2 **** --- 1,7 ---- + 2002-02-12 Andreas Voegele <voe...@us...> + + * setup.py: gtkextra-config is now called in addition to + gtk-config. + 2002-01-04 Andreas Voegele <voe...@us...> |
From: <pyt...@li...> - 2002-02-12 04:17:06
|
Update of /cvsroot/python-gtkextra/python-gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv20304 Modified Files: THANKS Log Message: Added Charles Waldman to the list of contributors. Index: THANKS =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/THANKS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** THANKS 15 Sep 2001 18:50:56 -0000 1.1.1.1 --- THANKS 12 Feb 2002 04:17:03 -0000 1.2 *************** *** 4,5 **** --- 4,6 ---- Joe Van Andel van...@uc... Alexey Goldin Ale...@jp... + Charles G Waldman cg...@us... |
From: <pyt...@li...> - 2002-02-12 04:11:14
|
Update of /cvsroot/python-gtkextra/python-gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv19362 Modified Files: setup.py Log Message: Applied patch supplied by Charles Waldman. Now gtkextra-config is called in addition to gtk-config. Index: setup.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/setup.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup.py 3 Jan 2002 22:44:04 -0000 1.2 --- setup.py 12 Feb 2002 04:11:11 -0000 1.3 *************** *** 26,31 **** return list ! gtk_cflags = commands.getoutput("gtk-config --cflags") ! gtk_libs = commands.getoutput("gtk-config --libs") (include_dirs, extra_compile_args) = filteropt(gtk_cflags, "I") --- 26,31 ---- return list ! gtk_cflags = commands.getoutput("gtkextra-config --cflags") + " " + commands.getoutput("gtk-config --cflags") ! gtk_libs = commands.getoutput("gtkextra-config --libs") + " " + commands.getoutput("gtk-config --libs") (include_dirs, extra_compile_args) = filteropt(gtk_cflags, "I") |
From: <pyt...@li...> - 2002-01-04 14:03:49
|
Update of /cvsroot/python-gtkextra/python-gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv13289 Modified Files: ChangeLog Log Message: Updated the ChangeLog. Index: ChangeLog =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChangeLog 2002/01/03 22:44:04 1.2 --- ChangeLog 2002/01/04 14:03:46 1.3 *************** *** 1,2 **** --- 1,37 ---- + 2002-01-04 Andreas Voegele <voe...@us...> + + * examples/testiterator.py: + initial checkin + + * gtkextra/gtkplotdata-support.c: + The arguments of the plot functions are now set with standard Python + functions since the hack used before could cause trouble. + + 2002-01-04 Toby D. Reeves <to...@so...> + + * gtkextra/__init__.py: + Fixed two typos where heigth should have been height. + + * codegen/mkgtkextra.py: + Use only Python 1.5.2 functions for making temp name. + + 2002-01-04 Andreas Voegele <voe...@us...> + + * gtkextra/gtkextra.defs, gtkextra/__init__.py: + Fixed GtkPlotData.show_labels(). + + * codegen/definitions.py, codegen/defsparser.py, codegen/scmexpr.py: + Updated to new version from pygtk-1.99.6. + + * gtkextra/gtkextramodule.c: + Removed the wrappers for gtk_sheet_get_entry(), + gtk_sheet_get_entry_widget(), gtk_sheet_get_vadjustment(), + gtk_sheet_get_hadjustment(), gtk_plot_canvas_get_active_plot() and + gtk_plot_canvas_get_active_data() since the updated code generator + now handles NULL returns. + + * codegen/generate.py: + Incorporated the changes from pygtk-0.6.9. + 2002-01-03 Andreas Voegele <voe...@us...> *************** *** 94,98 **** gtk_plot_data_add_marker(), gtk_plot_data_remove_marker(). Updated gtk_plot_data_get_gradient(), gtk_plot_data_set_points(), ! gtk_plot_surface_set_points() gtk_sheet_get_entry_widget(). * gtkextra/gtkextra.override: Added gtk_plot_set_pc(), --- 129,133 ---- gtk_plot_data_add_marker(), gtk_plot_data_remove_marker(). Updated gtk_plot_data_get_gradient(), gtk_plot_data_set_points(), ! gtk_plot_surface_set_points(). * gtkextra/gtkextra.override: Added gtk_plot_set_pc(), |
From: <pyt...@li...> - 2002-01-04 13:34:36
|
Update of /cvsroot/python-gtkextra/python-gtkextra/examples In directory usw-pr-cvs1:/tmp/cvs-serv5616 Added Files: testiterator.py Log Message: initial checkin --- NEW FILE: testiterator.py --- #!/usr/bin/env python from gtk import * from gtkextra import * from random import randint class Application(GtkWindow): def __init__(self): GtkWindow.__init__(self, title="GtkPlot Iterator Demo") self.set_usize(550, 600) self.connect("destroy", mainquit) colormap = self.get_colormap() red = colormap.alloc("red") light_blue = colormap.alloc("light blue") light_yellow = colormap.alloc("light yellow") white = colormap.alloc("white") scrollwin = GtkScrolledWindow() scrollwin.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) self.add(scrollwin) canvas = GtkPlotCanvas(PLOT_LETTER_W, PLOT_LETTER_H) canvas.set_background(light_blue) scrollwin.add_with_viewport(canvas) plot = GtkPlot(width=0.65, height=0.45) plot.set_background(light_yellow) plot.legends_set_attributes(None, 0, None, white) plot.set_range(0.0, 20.0, 0.0, 1.0) plot.axis_set_ticks(PLOT_AXIS_X, 2.0, 1) plot.axis_set_ticks(PLOT_AXIS_Y, 0.1, 1) plot.axis_set_labels_numbers(PLOT_AXIS_TOP, PLOT_LABEL_FLOAT, 0) plot.axis_set_labels_numbers(PLOT_AXIS_BOTTOM, PLOT_LABEL_FLOAT, 0) plot.axis_set_visible(PLOT_AXIS_TOP, TRUE) plot.axis_set_visible(PLOT_AXIS_RIGHT, TRUE) plot.grids_set_visible(TRUE, TRUE, TRUE, TRUE) plot.axis_hide_title(PLOT_AXIS_TOP) plot.axis_hide_title(PLOT_AXIS_RIGHT) plot.axis_set_title(PLOT_AXIS_LEFT, "Intensity") plot.axis_set_title(PLOT_AXIS_BOTTOM, "Point") plot.set_legends_border(PLOT_BORDER_SHADOW, 3) plot.legends_move(0.60, 0.10) canvas.add_plot(plot, 0.15, 0.15) canvas.put_text(0.45, 0.05, "Times-BoldItalic", 20, 0, None, None, TRUE, JUSTIFY_CENTER, "Iterator Demo") mask = PLOT_DATA_X | PLOT_DATA_Y | PLOT_DATA_LABELS data = GtkPlotData((self.iterator, 20, mask)) data.show_labels(TRUE) plot.add_data(data) data.set_legend("Iterator") data.set_symbol(PLOT_SYMBOL_DIAMOND, PLOT_SYMBOL_OPAQUE, 10, 2, red) data.set_line_attributes(PLOT_LINE_SOLID, 1, red) self.show_all() def iterator(self, i, *args): x = i y = randint(0, 9) / 10.0 label = str(i) return (x, y, None, None, None, None, None, None, label) def mainloop(self): mainloop() if __name__ == '__main__': app = Application() app.mainloop() |
From: <pyt...@li...> - 2002-01-04 13:22:01
|
Update of /cvsroot/python-gtkextra/python-gtkextra/gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv2343 Modified Files: gtkplotdata-support.c Log Message: The arguments of the plot functions are now set with standard Python functions since the hack used before could cause trouble. Index: gtkplotdata-support.c =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkplotdata-support.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gtkplotdata-support.c 2002/01/03 22:44:04 1.2 --- gtkplotdata-support.c 2002/01/04 13:21:58 1.3 *************** *** 204,215 **** /* Put the X value into the first item of the argument tuple. */ - /* value = PyFloat_FromDouble(x); if (!value) goto cleanup; PyTuple_SetItem(args, 0, value); - */ - value = PyTuple_GET_ITEM(args, 0); - ((PyFloatObject *) value)->ob_fval = x; /* Call the Python function. */ --- 204,211 ---- *************** *** 271,275 **** /* Put the X and Y value into the first two items of the argument tuple. */ - /* value = PyFloat_FromDouble(x); if (!value) --- 267,270 ---- *************** *** 280,288 **** goto cleanup; PyTuple_SetItem(args, 1, value); - */ - value = PyTuple_GET_ITEM(args, 0); - ((PyFloatObject *) value)->ob_fval = x; - value = PyTuple_GET_ITEM(args, 1); - ((PyFloatObject *) value)->ob_fval = y; /* Call the Python function. */ --- 275,278 ---- *************** *** 350,361 **** /* Put the index into the first item of the argument tuple. */ - /* value = PyInt_FromLong(iter); if (!value) goto cleanup; PyTuple_SetItem(args, 0, value); - */ - value = PyTuple_GET_ITEM(args, 0); - ((PyIntObject *) value)->ob_ival = iter; /* Call the Python function. */ --- 340,347 ---- |
From: <pyt...@li...> - 2002-01-04 12:24:16
|
Update of /cvsroot/python-gtkextra/python-gtkextra/gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv10524/gtkextra Modified Files: __init__.py Log Message: Fixed two typos where heigth should have been height. Index: __init__.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/__init__.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** __init__.py 2002/01/04 12:15:50 1.3 --- __init__.py 2002/01/04 12:24:13 1.4 *************** *** 1195,1199 **** """ _gtkextra.gtk_plot_move(self._o, x, y) ! def resize(self, width, heigth): """Resize the widget. width and height should both be in the range 0.0 .. 1.0, --- 1195,1199 ---- """ _gtkextra.gtk_plot_move(self._o, x, y) ! def resize(self, width, height): """Resize the widget. width and height should both be in the range 0.0 .. 1.0, *************** *** 1202,1206 **** """ _gtkextra.gtk_plot_resize(self._o, width, height) ! def move_resize(self, x, y, width, heigth): """Move and resize the widget in a single operation. This is faster than doing each operation separately. --- 1202,1206 ---- """ _gtkextra.gtk_plot_resize(self._o, width, height) ! def move_resize(self, x, y, width, height): """Move and resize the widget in a single operation. This is faster than doing each operation separately. |
From: <pyt...@li...> - 2002-01-04 12:20:21
|
Update of /cvsroot/python-gtkextra/python-gtkextra/codegen In directory usw-pr-cvs1:/tmp/cvs-serv9786/codegen Modified Files: mkgtkextra.py Log Message: Use only Python 1.5.2 functions for making temp name. Index: mkgtkextra.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/codegen/mkgtkextra.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mkgtkextra.py 2002/01/03 22:44:04 1.2 --- mkgtkextra.py 2002/01/04 12:20:18 1.3 *************** *** 113,121 **** if __name__ == '__main__': # Convert the new defs into old defs. overrides = read_overrides('gtkextramodule.c') parser = defsparser.DefsParser('gtkextra.defs') parser.startParsing() ! defsname = os.tmpnam() defs = open(defsname, "w") write_defs(parser, overrides, defs) --- 113,122 ---- if __name__ == '__main__': + import tempfile # Convert the new defs into old defs. overrides = read_overrides('gtkextramodule.c') parser = defsparser.DefsParser('gtkextra.defs') parser.startParsing() ! defsname = tempfile.mktemp() defs = open(defsname, "w") write_defs(parser, overrides, defs) |
From: <pyt...@li...> - 2002-01-04 12:15:53
|
Update of /cvsroot/python-gtkextra/python-gtkextra/gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv8788 Modified Files: __init__.py gtkextra.defs Log Message: Fixed GtkPlotData.show_labels(). Index: __init__.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** __init__.py 2002/01/03 22:44:04 1.2 --- __init__.py 2002/01/04 12:15:50 1.3 *************** *** 786,791 **** def get_labels(self): return _gtkextra.gtk_plot_data_get_labels(self._o) ! def show_labels(self): ! return _gtkextra.gtk_plot_data_get_labels(self._o) def labels_set_attributes(self, fontname, height, angle, foreground, background): --- 786,791 ---- def get_labels(self): return _gtkextra.gtk_plot_data_get_labels(self._o) ! def show_labels(self, visible): ! return _gtkextra.gtk_plot_data_show_labels(self._o, visible) def labels_set_attributes(self, fontname, height, angle, foreground, background): Index: gtkextra.defs =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkextra.defs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gtkextra.defs 2002/01/03 22:44:04 1.2 --- gtkextra.defs 2002/01/04 12:15:50 1.3 *************** *** 1341,1345 **** (can-return-null #t) (parameters ! '("gboolean*" "out_show_labels") ) ) --- 1341,1345 ---- (can-return-null #t) (parameters ! '("gboolean*" "out_visible") ) ) *************** *** 1350,1354 **** (return-type "none") (parameters ! '("gboolean" "show_labels") ) ) --- 1350,1354 ---- (return-type "none") (parameters ! '("gboolean" "visible") ) ) |
From: <pyt...@li...> - 2002-01-04 10:48:15
|
Update of /cvsroot/python-gtkextra/python-gtkextra/codegen In directory usw-pr-cvs1:/tmp/cvs-serv24561 Modified Files: definitions.py defsparser.py scmexpr.py Log Message: Updated to new version from pygtk-1.99.6. Index: definitions.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/codegen/definitions.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** definitions.py 2001/09/15 18:52:30 1.1.1.1 --- definitions.py 2002/01/04 10:48:13 1.2 *************** *** 181,184 **** --- 181,185 ---- class MethodDef(Definition): def __init__(self, name, *args): + dump = 0 self.name = name self.ret = None *************** *** 188,191 **** --- 189,193 ---- self.params = [] # of form (type, name, default, nullok) self.varargs = 0 + self.deprecated = None for arg in args: if type(arg) != type(()) or len(arg) < 2: *************** *** 213,216 **** --- 215,231 ---- elif arg[0] == 'varargs': self.varargs = arg[1] in ('t', '#t') + elif arg[0] == 'deprecated': + self.deprecated = arg[1] + else: + sys.stderr.write("Warning: %s argument unsupported.\n" + % (arg[0])) + dump = 1 + if dump: + self.write_defs(sys.stderr) + for item in ('c_name', 'of_object'): + if self.__dict__[item] == None: + self.write_defs(sys.stderr) + raise RuntimeError, "definition missing required %s" % (item,) + def merge(self, old): # here we merge extra parameter flags accross to the new object. *************** *** 231,234 **** --- 246,251 ---- if self.ret: fp.write(' (return-type "' + self.ret + '")\n') + if self.deprecated: + fp.write(' (deprecated "' + self.deprecated + '")\n') if self.params: fp.write(' (parameters\n') *************** *** 243,246 **** --- 260,264 ---- class FunctionDef(Definition): def __init__(self, name, *args): + dump = 0 self.name = name self.in_module = None *************** *** 251,254 **** --- 269,273 ---- self.params = [] # of form (type, name, default, nullok) self.varargs = 0 + self.deprecated = None for arg in args: if type(arg) != type(()) or len(arg) < 2: *************** *** 278,282 **** --- 297,315 ---- elif arg[0] == 'varargs': self.varargs = arg[1] in ('t', '#t') + elif arg[0] == 'deprecated': + self.deprecated = arg[1] + else: + sys.stderr.write("Warning: %s argument unsupported\n" + % (arg[0],)) + dump = 1 + if dump: + self.write_defs(sys.stderr) + for item in ('c_name',): + if self.__dict__[item] == None: + self.write_defs(sys.stderr) + raise RuntimeError, "definition missing required %s" % (item,) + _method_write_defs = MethodDef.__dict__['write_defs'] + def merge(self, old): # here we merge extra parameter flags accross to the new object. *************** *** 288,292 **** break if not self.is_constructor_of: ! self.is_constructor_of = old.is_constructor_of if isinstance(old, MethodDef): self.name = old.name --- 321,328 ---- break if not self.is_constructor_of: ! try: ! self.is_constructor_of = old.is_constructor_of ! except AttributeError: ! pass if isinstance(old, MethodDef): self.name = old.name *************** *** 307,310 **** --- 343,348 ---- if self.ret: fp.write(' (return-type "' + self.ret + '")\n') + if self.deprecated: + fp.write(' (deprecated "' + self.deprecated + '")\n') if self.params: fp.write(' (parameters\n') Index: defsparser.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/codegen/defsparser.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** defsparser.py 2001/09/15 18:52:30 1.1.1.1 --- defsparser.py 2002/01/04 10:48:13 1.2 *************** *** 55,66 **** self.functions.append(mdef) self.c_name[mdef.c_name] = mdef - def merge(self, old): for obj in self.objects: ! if old.c_name.has_key(obj.c_name): ! obj.merge(old.c_name[obj.c_name]) for f in self.functions: ! if old.c_name.has_key(f.c_name): ! f.merge(old.c_name[f.c_name]) def write_defs(self, fp=sys.stdout): --- 55,72 ---- self.functions.append(mdef) self.c_name[mdef.c_name] = mdef def merge(self, old): + for obj in self.objects: + if old.c_name.has_key(obj.c_name): + obj.merge(old.c_name[obj.c_name]) + for f in self.functions: + if old.c_name.has_key(f.c_name): + f.merge(old.c_name[f.c_name]) + def printMissing(self, old): for obj in self.objects: ! if not old.c_name.has_key(obj.c_name): ! obj.write_defs() for f in self.functions: ! if not old.c_name.has_key(f.c_name): ! f.write_defs() def write_defs(self, fp=sys.stdout): Index: scmexpr.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/codegen/scmexpr.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** scmexpr.py 2001/09/15 18:52:28 1.1.1.1 --- scmexpr.py 2002/01/04 10:48:13 1.2 *************** *** 72,77 **** else: raise TypeError, 'second arg must be string, tuple or file' ! def startParsing(self, tuples=None): ! if tuples == None: tuples = self.parseTree for tup in tuples: self.handle(tup) --- 72,82 ---- else: raise TypeError, 'second arg must be string, tuple or file' ! def startParsing(self, arg=None): ! if type(arg) == types.StringType: ! tuples = parse(open(arg)) ! elif arg: ! tuples = arg ! else: ! tuples = self.parseTree for tup in tuples: self.handle(tup) |
From: <pyt...@li...> - 2002-01-04 09:51:14
|
Update of /cvsroot/python-gtkextra/python-gtkextra/gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv12026 Modified Files: gtkextramodule.c Log Message: Removed the wrappers for gtk_sheet_get_entry(), gtk_sheet_get_entry_widget(), gtk_sheet_get_vadjustment(), gtk_sheet_get_hadjustment(), gtk_plot_canvas_get_active_plot() and gtk_plot_canvas_get_active_data() since the updated code generator now handles NULL returns. Index: gtkextramodule.c =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkextramodule.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gtkextramodule.c 2002/01/03 22:44:04 1.2 --- gtkextramodule.c 2002/01/04 09:51:11 1.3 *************** *** 70,104 **** static PyObject * - _wrap_gtk_sheet_get_entry(PyObject *self, PyObject *args) - { - PyObject *obj; - GtkWidget *entry_widget; - - if (!PyArg_ParseTuple(args, "O!:gtk_sheet_get_entry", &PyGtk_Type, &obj)) - return NULL; - entry_widget = gtk_sheet_get_entry(GTK_SHEET(PyGtk_Get(obj))); - if (entry_widget) - return PyGtk_New(GTK_OBJECT(entry_widget)); - Py_INCREF(Py_None); - return Py_None; - } - - static PyObject * - _wrap_gtk_sheet_get_entry_widget(PyObject *self, PyObject *args) - { - PyObject *obj; - GtkWidget *entry_widget; - - if (!PyArg_ParseTuple(args, "O!:gtk_sheet_get_entry_widget", - &PyGtk_Type, &obj)) - return NULL; - entry_widget = gtk_sheet_get_entry_widget(GTK_SHEET(PyGtk_Get(obj))); - if (entry_widget) - return PyGtk_New(GTK_OBJECT(entry_widget)); - Py_INCREF(Py_None); - return Py_None; - } - - static PyObject * _wrap_gtk_sheet_get_visible_range(PyObject *self, PyObject *args) { --- 70,73 ---- *************** *** 141,176 **** static PyObject * - _wrap_gtk_sheet_get_vadjustment(PyObject *self, PyObject *args) - { - PyObject *obj; - GtkAdjustment *adjustment; - - if (!PyArg_ParseTuple(args, "O!:gtk_sheet_get_vadjustment", - &PyGtk_Type, &obj)) - return NULL; - adjustment = gtk_sheet_get_vadjustment(GTK_SHEET(PyGtk_Get(obj))); - if (adjustment) - return PyGtk_New(GTK_OBJECT(adjustment)); - Py_INCREF(Py_None); - return Py_None; - } - - static PyObject * - _wrap_gtk_sheet_get_hadjustment(PyObject *self, PyObject *args) - { - PyObject *obj; - GtkAdjustment *adjustment; - - if (!PyArg_ParseTuple(args, "O!:gtk_sheet_get_hadjustment", - &PyGtk_Type, &obj)) - return NULL; - adjustment = gtk_sheet_get_hadjustment(GTK_SHEET(PyGtk_Get(obj))); - if (adjustment) - return PyGtk_New(GTK_OBJECT(adjustment)); - Py_INCREF(Py_None); - return Py_None; - } - - static PyObject * _wrap_gtk_sheet_select_range(PyObject *self, PyObject *args) { --- 110,113 ---- *************** *** 2593,2628 **** static PyObject * - _wrap_gtk_plot_canvas_get_active_plot(PyObject *self, PyObject *args) - { - PyObject *obj; - GtkPlot *plot; - - if (!PyArg_ParseTuple(args, "O!:gtk_plot_canvas_get_active_plot", - &PyGtk_Type, &obj)) - return NULL; - plot = gtk_plot_canvas_get_active_plot(GTK_PLOT_CANVAS(PyGtk_Get(obj))); - if (plot) - return PyGtk_New(GTK_OBJECT(plot)); - Py_INCREF(Py_None); - return Py_None; - } - - static PyObject * - _wrap_gtk_plot_canvas_get_active_data(PyObject *self, PyObject *args) - { - PyObject *obj; - GtkPlotData *data; - - if (!PyArg_ParseTuple(args, "O!:gtk_plot_canvas_get_active_data", - &PyGtk_Type, &obj)) - return NULL; - data = gtk_plot_canvas_get_active_data(GTK_PLOT_CANVAS(PyGtk_Get(obj))); - if (data) - return PyGtk_New(GTK_OBJECT(data)); - Py_INCREF(Py_None); - return Py_None; - } - - static PyObject * _wrap_gtk_plot_canvas_get_active_point(PyObject *self, PyObject *args) { --- 2530,2533 ---- *************** *** 3727,3736 **** { "GtkPlotLine", PyGtkPlotLine_New, 1 }, { "gtk_sheet_new", _wrap_gtk_sheet_new, 1 }, - { "gtk_sheet_get_entry", _wrap_gtk_sheet_get_entry, 1 }, - { "gtk_sheet_get_entry_widget", _wrap_gtk_sheet_get_entry_widget, 1 }, { "gtk_sheet_get_visible_range", _wrap_gtk_sheet_get_visible_range, 1 }, { "gtk_sheet_clip_range", _wrap_gtk_sheet_clip_range, 1 }, - { "gtk_sheet_get_vadjustment", _wrap_gtk_sheet_get_vadjustment, 1 }, - { "gtk_sheet_get_hadjustment", _wrap_gtk_sheet_get_hadjustment, 1 }, { "gtk_sheet_select_range", _wrap_gtk_sheet_select_range, 1 }, { "gtk_sheet_get_active_cell", _wrap_gtk_sheet_get_active_cell, 1 }, --- 3632,3637 ---- *************** *** 3851,3856 **** { "gtk_plot3d_major_zgrid_get_attributes", _wrap_gtk_plot3d_major_zgrid_get_attributes, 1 }, { "gtk_plot3d_minor_zgrid_get_attributes", _wrap_gtk_plot3d_minor_zgrid_get_attributes, 1 }, - { "gtk_plot_canvas_get_active_plot", _wrap_gtk_plot_canvas_get_active_plot, 1 }, - { "gtk_plot_canvas_get_active_data", _wrap_gtk_plot_canvas_get_active_data, 1 }, { "gtk_plot_canvas_get_active_point", _wrap_gtk_plot_canvas_get_active_point, 1 }, { "gtk_plot_canvas_get_active_item", _wrap_gtk_plot_canvas_get_active_item, 1 }, --- 3752,3755 ---- |
From: <pyt...@li...> - 2002-01-04 09:49:17
|
Update of /cvsroot/python-gtkextra/python-gtkextra/codegen In directory usw-pr-cvs1:/tmp/cvs-serv11972 Modified Files: generate.py Log Message: Incorporated the changes from pygtk-0.6.9. Index: generate.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/codegen/generate.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** generate.py 2001/09/15 18:52:32 1.1.1.1 --- generate.py 2002/01/04 09:49:13 1.2 *************** *** 14,18 **** funcDefTmpl = ' { "%s", _wrap_%s, 1 },\n' ! funcLeadTmpl = 'static PyObject *_wrap_%s(PyObject *self, PyObject *args) {\n' enumCodeTmpl = ''' if (PyGtkEnum_get_value(%s, %s, (gint *)&%s)) return NULL;\n''' --- 14,18 ---- funcDefTmpl = ' { "%s", _wrap_%s, 1 },\n' ! funcLeadTmpl = 'static PyObject *\n_wrap_%s(PyObject *self, PyObject *args)\n{\n' enumCodeTmpl = ''' if (PyGtkEnum_get_value(%s, %s, (gint *)&%s)) return NULL;\n''' *************** *** 21,25 **** setVarTmpl = ''' if (py_%s) %s = %s;\n''' ! getTypeTmpl = '''static PyObject *_wrap_%s(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, ":%s")) return NULL; --- 21,25 ---- setVarTmpl = ''' if (py_%s) %s = %s;\n''' ! getTypeTmpl = '''static PyObject *\n_wrap_%s(PyObject *self, PyObject *args)\n{ if (!PyArg_ParseTuple(args, ":%s")) return NULL; *************** *** 205,208 **** --- 205,220 ---- funcName = string.lower(objects[name]) + '_get_' + attrname impl.write(funcLeadTmpl % (funcName,)) + if retType == 'string': + # this is needed so we can free result string + impl.write(' gchar *ret;\n') + impl.write(' PyObject *py_ret;\n') + elif retType == 'static_string': + impl.write(' gchar *ret;\n') + elif retType in objects.keys(): + impl.write(' GtkObject *ret;\n') + elif retType == 'GdkAtom': + impl.write(' GdkAtom ret;\n') + elif retType in boxed.keys(): + impl.write(' %s *ret;\n' % retType) impl.write(' PyObject *obj;\n\n') impl.write(' if (!PyArg_ParseTuple(args, "O!:') *************** *** 233,238 **** if retType == 'string': # this is needed so we can free result string ! varDefs.add('char', '*ret') varDefs.add('PyObject', '*py_ret') for arg in args: argType = arg[0] --- 245,258 ---- if retType == 'string': # this is needed so we can free result string ! varDefs.add('gchar', '*ret') varDefs.add('PyObject', '*py_ret') + elif retType == 'static_string': + varDefs.add('gchar', '*ret') + elif retType in objects.keys(): + varDefs.add('GtkObject', '*ret') + elif retType == 'GdkAtom': + varDefs.add('GdkAtom', 'ret') + elif retType in boxed.keys(): + varDefs.add(retType, '*ret') for arg in args: argType = arg[0] *************** *** 241,245 **** if argName in ('default', 'if', 'then', 'else', 'while', 'for', 'do', 'case', 'select'): ! argName = '_' + argName default = '' nullok = FALSE --- 261,265 ---- if argName in ('default', 'if', 'then', 'else', 'while', 'for', 'do', 'case', 'select'): ! argName = argName + '_' default = '' nullok = FALSE *************** *** 409,431 **** impl.write(';\n Py_INCREF(Py_None);\n return Py_None;\n') elif retType == 'static_string': ! impl.write(' return PyString_FromString(') ! impl.write(funcCall) ! impl.write(');\n') elif retType == 'string': ! if nullok: ! impl.write(' ret = %s;\n' % funcCall) ! impl.write(' if (ret) {\n') ! impl.write(' py_ret = PyString_FromString(ret);\n' ! ' g_free(ret);\n' ! ' return py_ret;\n' ! ' } else {\n' ! ' Py_INCREF(Py_None);\n' ! ' return Py_None;\n' ! ' }\n') ! else: ! impl.write(' ret = %s;\n' % funcCall) ! impl.write(' py_ret = PyString_FromString(ret);\n' ! ' g_free(ret);\n' ! ' return py_ret;\n') elif retType in ('char', 'uchar'): impl.write(' return PyString_fromStringAndSize(*(') --- 429,449 ---- impl.write(';\n Py_INCREF(Py_None);\n return Py_None;\n') elif retType == 'static_string': ! impl.write(' ret = %s;\n' % funcCall) ! impl.write(' if (ret) {\n' ! ' return PyString_FromString(ret);\n' ! ' } else {\n' ! ' Py_INCREF(Py_None);\n' ! ' return Py_None;\n' ! ' }\n') elif retType == 'string': ! impl.write(' ret = %s;\n' % funcCall) ! impl.write(' if (ret) {\n' ! ' py_ret = PyString_FromString(ret);\n' ! ' g_free(ret);\n' ! ' return py_ret;\n' ! ' } else {\n' ! ' Py_INCREF(Py_None);\n' ! ' return Py_None;\n' ! ' }\n') elif retType in ('char', 'uchar'): impl.write(' return PyString_fromStringAndSize(*(') *************** *** 442,472 **** impl.write(');\n') elif retType in boxed.keys(): ! if nullok: ! impl.write(' {\n' ! ' %s *p = %s;\n' % (retType, funcCall)) ! impl.write(' if (p)\n') ! impl.write(' return %s(p);\n' % boxed[retType][2]) ! impl.write(' Py_INCREF(Py_None);\n' ! ' return Py_None;\n' ! ' }\n') ! else: ! impl.write(' return ') ! impl.write(boxed[retType][2]) ! impl.write('(') ! impl.write(funcCall) ! impl.write(');\n') elif retType in objects.keys(): ! if nullok: ! impl.write(' {\n' ! ' GtkObject *p = (GtkObject *) %s;' % funcCall) ! impl.write(' if (p)\n' ! ' return PyGtk_New((GtkObject *) p);\n') ! impl.write(' Py_INCREF(Py_None);\n' ! ' return Py_None;\n' ! ' }\n') ! else: ! impl.write(' return PyGtk_New((GtkObject *)') ! impl.write(funcCall) ! impl.write(');\n') else: print "unknown return type '%s'" % (retType,) --- 460,474 ---- impl.write(');\n') elif retType in boxed.keys(): ! impl.write(' ret = %s;\n' % funcCall) ! impl.write(' if (ret)\n') ! impl.write(' return %s(ret);\n' % boxed[retType][2]) ! impl.write(' Py_INCREF(Py_None);\n' ! ' return Py_None;\n') elif retType in objects.keys(): ! impl.write(' ret = (GtkObject *) %s;\n' % funcCall) ! impl.write(' if (ret)\n' ! ' return PyGtk_New(ret);\n' ! ' Py_INCREF(Py_None);\n' ! ' return Py_None;\n') else: print "unknown return type '%s'" % (retType,) |
From: Andreas V?g. <voe...@us...> - 2002-01-03 22:44:08
|
Update of /cvsroot/python-gtkextra/python-gtkextra/gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv18294/gtkextra Modified Files: __init__.py gtkextra-extrafuncs.defs gtkextra.defs gtkextra.override gtkextramodule.c gtkplotcanvaschild-type.c gtkplotdata-support.c pygtkextra-private.h Log Message: GtkExtra-0.99.17 update Index: __init__.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/__init__.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** __init__.py 2001/09/15 18:52:28 1.1.1.1 --- __init__.py 2002/01/03 22:44:04 1.2 *************** *** 1,5 **** # Python bindings for the GtkExtra widget set # ! # Copyright (C) 2000-2001 Andreas Voegele # # The documentation is based on the GtkAda documentation and used by --- 1,5 ---- # Python bindings for the GtkExtra widget set # ! # Copyright (C) 2000-2002 Andreas Voegele # # The documentation is based on the GtkAda documentation and used by *************** *** 61,64 **** --- 61,75 ---- PLOT_BAR_ABSOLUTE = 2 + # plot data iterator mask + PLOT_DATA_X = 1 << 0 + PLOT_DATA_Y = 1 << 1 + PLOT_DATA_Z = 1 << 2 + PLOT_DATA_A = 1 << 3 + PLOT_DATA_DX = 1 << 4 + PLOT_DATA_DY = 1 << 5 + PLOT_DATA_DZ = 1 << 6 + PLOT_DATA_DA = 1 << 7 + PLOT_DATA_LABELS = 1 << 8 + # plot scale type PLOT_SCALE_LINEAR = 0 *************** *** 203,206 **** --- 214,226 ---- PLOT_ARROW_END = 1 << 1 + # plot canvas selection + PLOT_CANVAS_SELECT_NONE = 0 + PLOT_CANVAS_SELECT_MARKERS = 1 + PLOT_CANVAS_SELECT_TARGET = 2 + + # plot canvas selection mode + PLOT_CANVAS_SELECT_CLICK_1 = 0 + PLOT_CANVAS_SELECT_CLICK_2 = 2 + # plot canvas item type PLOT_CANVAS_NONE = 0 *************** *** 215,219 **** PLOT_CANVAS_ELLIPSE = 9 PLOT_CANVAS_PIXMAP = 10 ! PLOT_CANVAS_CUSTOM = 11 # icon list mode --- 235,240 ---- PLOT_CANVAS_ELLIPSE = 9 PLOT_CANVAS_PIXMAP = 10 ! PLOT_CANVAS_MARKER = 11 ! PLOT_CANVAS_CUSTOM = 12 # icon list mode *************** *** 292,298 **** --- 313,338 ---- entry_widget = _gtk._obj2inst(entry_widget) return entry_widget + def get_entry_widget(self): + """Return the widget used to modify the contents of the cells. + """ + entry_widget = _gtkextra.gtk_sheet_get_entry_widget(self._o) + if entry_widget: + entry_widget = _gtk._obj2inst(entry_widget) + return entry_widget def set_title(self, title): """Change the title of the sheet.""" _gtkextra.gtk_sheet_set_title(self._o, title) + def set_background(self, color): + """Set the sheet's background color.""" + _gtkextra.gtk_sheet_set_background(self._o, color) + def set_grid(self, color): + """Set the sheet's grid color.""" + _gtkextra.gtk_sheet_set_grid(self._o, color) + def show_grid(self, visible): + """Change the visibility of the grid.""" + _gtkextra.gtk_sheet_show_grid(self._o, visible) + def grid_visible(self): + """Check if the grid is visible.""" + return _gtkextra.gtk_sheet_grid_visible(self._o) def freeze(self): """Freeze all visual updates of the sheet until you thaw it. *************** *** 684,695 **** def paint(self): _gtkextra.gtk_plot_data_paint(self._o) def draw_points(self, n): _gtkextra.gtk_plot_data_draw_points(self._o, n) def draw_symbol(self, x, y): _gtkextra.gtk_plot_data_draw_symbol(self._o, x, y) ! def set_points(self, x, y, dx=None, dy=None, n=-1): ! _gtkextra.gtk_plot_data_set_points(self._o, x, y, dx, dy, n) def get_points(self): return _gtkextra.gtk_plot_data_get_points(self._o) def set_numpoints(self, n): _gtkextra.gtk_plot_data_set_numpoints(self._o, n) --- 724,745 ---- def paint(self): _gtkextra.gtk_plot_data_paint(self._o) + def update(self): + _gtkextra.gtk_plot_data_update(self._o) def draw_points(self, n): _gtkextra.gtk_plot_data_draw_points(self._o, n) def draw_symbol(self, x, y): _gtkextra.gtk_plot_data_draw_symbol(self._o, x, y) ! def set_points(self, *args): ! """Set the X, Y, DX and DY arrays and the number of points. ! The arguments can be passed individually or in a 5-tuple. ! """ ! apply(_gtkextra.gtk_plot_data_set_points, (self._o,) + args) def get_points(self): + """Return a 5-tuple that contains the X, Y, DX and DY arrays + and the number of points. + """ return _gtkextra.gtk_plot_data_get_points(self._o) + def get_point(self, i): + return _gtkextra.gtk_plot_data_get_point(self._o, i) def set_numpoints(self, n): _gtkextra.gtk_plot_data_set_numpoints(self._o, n) *************** *** 728,731 **** --- 778,785 ---- def get_da(self): return _gtkextra.gtk_plot_data_get_da(self._o) + def set_a_scale(self, scale): + _gtkextra.gtk_plot_data_set_a_scale(self._o, scale) + def get_a_scale(self): + return _gtkextra.gtk_plot_data_get_a_scale(self._o) def set_labels(self, labels): _gtkextra.gtk_plot_data_set_da(self._o, labels) *************** *** 809,812 **** --- 863,874 ---- def gradient_visible(self): return _gtkextra.gtk_plot_data_gradient_visible(self._o) + def draw_gradient(self, x, y): + _gtkextra.gtk_plot_data_draw_gradient(self._o, x, y) + def gradient_autoscale_a(self): + _gtkextra.gtk_plot_data_gradient_autoscale_a(self._o) + def gradient_autoscale_da(self): + _gtkextra.gtk_plot_data_gradient_autoscale_da(self._o) + def gradient_autoscale_z(self): + _gtkextra.gtk_plot_data_gradient_autoscale_z(self._o) def gradient_get_visible(self): return self.gradient_visible() *************** *** 817,822 **** def get_gradient_colors(self): return _gtkextra.gtk_plot_data_get_gradient_colors(self._o) ! def set_gradient(self, min, max, levels): ! _gtkextra.gtk_plot_data_set_gradient(self._o, min, max, levels) def get_gradient(self): return _gtkextra.gtk_plot_data_get_gradient(self._o) --- 879,885 ---- def get_gradient_colors(self): return _gtkextra.gtk_plot_data_get_gradient_colors(self._o) ! def set_gradient(self, min, max, levels, sublevels=0): ! _gtkextra.gtk_plot_data_set_gradient(self._o, min, max, levels, ! sublevels) def get_gradient(self): return _gtkextra.gtk_plot_data_get_gradient(self._o) *************** *** 830,833 **** --- 893,906 ---- def remove_link(self): _gtkextra.gtk_plot_data_remove_link(self._o); + def add_marker(self, i): + return _gtkextra.gtk_plot_data_add_marker(self._o, i) + def remove_marker(self, marker): + return _gtkextra.gtk_plot_data_remove_marker(self._o, marker) + def remove_markers(self): + _gtkextra.gtk_plot_data_remove_markers(self._o) + def show_markers(self, visible): + _gtkextra.gtk_plot_data_show_markers(self._o, visible) + def markers_visible(self): + return _gtkextra.gtk_plot_data_markers_visible(self._o) _gtk._name2cls['GtkPlotData'] = GtkPlotData *************** *** 903,910 **** def set_ambient(self, ambient): _gtkextra.gtk_plot_surface_set_ambient(self._o, ambient) ! def set_points(self, x, y, z, dx, dy, dz, nx, ny): ! _gtkextra.gtk_plot_surface_set_points(self._o, x, y, z, dx, dy, ! dz, nx, ny) def get_points(self): return _gtkextra.gtk_plot_surface_get_points(self._o) def set_nx(self, nx): --- 976,995 ---- def set_ambient(self, ambient): _gtkextra.gtk_plot_surface_set_ambient(self._o, ambient) ! def use_height_gradient(self, use_gradient): ! _gtkextra.gtk_plot_surface_use_height_gradient(self._o, ! use_gradient) ! def set_transparent(self, transparent): ! _gtkextra.gtk_plot_surface_set_transparent(self._o, ! transparent) ! def set_points(self, *args): ! """Set the X, Y, Z, DX, DY and DY arrays and the number of ! points on the X and the Y axis. The arguments can be passed ! individually or in a 8-tuple. ! """ ! apply(_gtkextra.gtk_plot_surface_set_points, (self._o,) + args) def get_points(self): + """Return a 8-tuple that contains the X, Y, Z, DX, DY and DZ + arrays and the number of points on the X and the Y axis. + """ return _gtkextra.gtk_plot_surface_get_points(self._o) def set_nx(self, nx): *************** *** 948,951 **** --- 1033,1040 ---- def get_ystep(self): _gtkextra.gtk_plot_surface_get_ystep(self._o) + def build_mesh(self): + _gtkextra.gtk_plot_surface_build_mesh(self._o) + def recalc_nodes(self): + _gtkextra.gtk_plot_surface_recalc_nodes(self._o) _gtk._name2cls['GtkPlotSurface'] = GtkPlotSurface *************** *** 1316,1319 **** --- 1405,1413 ---- label_style, precision) + def axis_set_labels_offset(self, axis, offset): + _gtkextra.gtk_plot_axis_set_labels_offset(self._o, axis, + offset) + def axis_get_labels_offset(self, axis): + return _gtkextra.gtk_plot_axis_get_labels_offset(self._o, axis) def axis_labels_set_numbers(self, axis, label_style, precision): """Obsolete, use axis_set_labels_numbers() instead.""" *************** *** 1757,1760 **** --- 1851,1861 ---- def refresh(self): _gtkextra.gtk_plot_canvas_refresh(self._o) + def freeze(self): + """Freeze all visual updates of the canvas until you thaw it. + """ + _gtkextra.gtk_plot_canvas_freeze(self._o) + def thaw(self): + """Thaw the sheet so that visual updates occur again. + """ def remove_child(self, child): return _gtkextra.gtk_plot_canvas_remove_child(self._o, child) *************** *** 1919,1922 **** --- 2020,2024 ---- 'dir_tree': _gtkextra.gtk_icon_file_selection_get_dir_tree, 'file_list': _gtkextra.gtk_icon_file_selection_get_file_list, + 'history_combo': _gtkextra.gtk_icon_file_selection_get_history_combo, 'file_entry': _gtkextra.gtk_icon_file_selection_get_file_entry, 'filter_entry': _gtkextra.gtk_icon_file_selection_get_filter_entry, Index: gtkextra-extrafuncs.defs =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkextra-extrafuncs.defs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gtkextra-extrafuncs.defs 2001/09/15 18:52:02 1.1.1.1 --- gtkextra-extrafuncs.defs 2002/01/03 22:44:04 1.2 *************** *** 87,94 **** (of-object "GtkItemEntry") (c-name "gtk_item_entry_get_justification") ! (return-type "int") ) ! (define-enum "TODO" (in-module "GtkExtra") (c-name "TODO") --- 87,94 ---- (of-object "GtkItemEntry") (c-name "gtk_item_entry_get_justification") ! (return-type "GtkJustification") ) ! (define-enum TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 102,106 **** ) ! (define-flags "TODO" (in-module "GtkExtra") (c-name "TODO") --- 102,106 ---- ) ! (define-flags TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 114,118 **** ) ! (define-flags "TODO" (in-module "GtkExtra") (c-name "TODO") --- 114,118 ---- ) ! (define-flags TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 137,140 **** --- 137,157 ---- ) + (define-flags TODO + (in-module "GtkExtra") + (c-name "TODO") + (gtype-id "TODO") + (values + '("x" "GTK_PLOT_DATA_X") + '("y" "GTK_PLOT_DATA_Y") + '("z" "GTK_PLOT_DATA_Z") + '("a" "GTK_PLOT_DATA_A") + '("dx" "GTK_PLOT_DATA_DX") + '("dy" "GTK_PLOT_DATA_DY") + '("dz" "GTK_PLOT_DATA_DZ") + '("da" "GTK_PLOT_DATA_DA") + '("labels" "GTK_PLOT_DATA_LABELS") + ) + ) + (define-enum PlotScale (in-module "GtkExtra") *************** *** 275,279 **** ) ! (define-flags "TODO" (in-module "GtkExtra") (c-name "TODO") --- 292,296 ---- ) ! (define-flags TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 314,318 **** ) ! (define-enum "TODO" (in-module "GtkExtra") (c-name "TODO") --- 331,335 ---- ) ! (define-enum TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 327,331 **** ) ! (define-enum "TODO" (in-module "GtkExtra") (c-name "TODO") --- 344,348 ---- ) ! (define-enum TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 343,347 **** ) ! (define-enum "TODO" (in-module "GtkExtra") (c-name "TODO") --- 360,364 ---- ) ! (define-enum TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 353,357 **** ) ! (define-enum "TODO" (in-module "GtkExtra") (c-name "TODO") --- 370,374 ---- ) ! (define-enum TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 365,369 **** ) ! (define-flags "TODO" (in-module "GtkExtra") (c-name "TODO") --- 382,386 ---- ) ! (define-flags TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 379,383 **** ) ! (define-flags "TODO" (in-module "GtkExtra") (c-name "TODO") --- 396,400 ---- ) ! (define-flags TODO (in-module "GtkExtra") (c-name "TODO") *************** *** 418,426 **** '("ellipse" "GTK_PLOT_CANVAS_ELLIPSE") '("pixmap" "GTK_PLOT_CANVAS_PIXMAP") '("custom" "GTK_PLOT_CANVAS_CUSTOM") ) ) ! (define-enum "TODO" (in-module "GtkExtra") (c-name "TODO") --- 435,465 ---- '("ellipse" "GTK_PLOT_CANVAS_ELLIPSE") '("pixmap" "GTK_PLOT_CANVAS_PIXMAP") + '("marker" "GTK_PLOT_CANVAS_MARKER") '("custom" "GTK_PLOT_CANVAS_CUSTOM") ) ) ! (define-enum PlotCanvasSelection ! (in-module "GtkExtra") ! (c-name "GtkPlotCanvasSelection") ! (gtype-id "TODO") ! (values ! '("none" "GTK_PLOT_CANVAS_SELECT_NONE") ! '("markers" "GTK_PLOT_CANVAS_SELECT_MARKERS") ! '("target" "GTK_PLOT_CANVAS_SELECT_TARGET") ! ) ! ) ! ! (define-enum PlotCanvasSelectionMode ! (in-module "GtkExtra") ! (c-name "GtkPlotCanvasSelectionMode") ! (gtype-id "TODO") ! (values ! '("click-1" "GTK_PLOT_CANVAS_SELECT_CLICK_1") ! '("click-2" "GTK_PLOT_CANVAS_SELECT_CLICK_2") ! ) ! ) ! ! (define-enum TODO (in-module "GtkExtra") (c-name "TODO") Index: gtkextra.defs =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkextra.defs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gtkextra.defs 2001/09/15 18:52:00 1.1.1.1 --- gtkextra.defs 2002/01/03 22:44:04 1.2 *************** *** 130,133 **** --- 130,134 ---- '("GtkWidget*" "dir_tree") '("GtkWidget*" "file_list") + '("GtkWidget*" "history_combo") '("GtkWidget*" "file_entry") '("GtkWidget*" "filter_entry") *************** *** 246,250 **** '("guint" "columns") '("const-gchar*" "title" (null-ok)) [...1577 lines suppressed...] ) --- 4450,4454 ---- (parameters '("const-gchar*" "string") ! '("GtkJustification" "justification") ) ) *************** *** 4219,4223 **** (return-type "none") (parameters ! '("int" "justification") ) ) --- 4459,4463 ---- (return-type "none") (parameters ! '("GtkJustification" "justification") ) ) Index: gtkextra.override =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkextra.override,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gtkextra.override 2001/09/15 18:52:17 1.1.1.1 --- gtkextra.override 2002/01/03 22:44:04 1.2 *************** *** 823,826 **** --- 823,849 ---- function, extra); Py_DECREF(extra); + } else if (PyTuple_Check(function)) { + PyObject *extra, *iterator; + int n, mask; + + if (!PyArg_ParseTuple(function, "Oii:gtk_plot_data_new", &iterator, + &n, &mask)) { + return NULL; + } + if (!PyCallable_Check(iterator)) { + PyErr_SetString(PyExc_TypeError, "iterator must be callable"); + return NULL; + } + extra = PyTuple_GetSlice(args, 1, num_args); + if (!extra) + return NULL; + widget = + gtk_plot_data_new_iterator((GtkPlotIterator) + pygtkextra_plot_data_call_plot_iterator, + n, mask); + if (widget) + pygtkextra_plot_data_register_plot_iterator(GTK_PLOT_DATA(widget), + iterator, extra); + Py_DECREF(extra); } else if (PyCObject_Check(function)) { if (num_args > 1) { *************** *** 861,868 **** int n = -1; ! if (!PyArg_ParseTupleAndKeywords(args, kwargs, ! "OO|OOi:GtkPlotData.set_points", kwlist, ! &x, &y, &dx, &dy, &n)) ! return NULL; return pygtkextra_plot_data_set_points(GTK_PLOT_DATA(self->obj), x, y, dx, dy, n); --- 884,895 ---- int n = -1; ! if (!PyArg_ParseTuple(args, "(OOOOi):GtkPlotData.set_points", ! &x, &y, &dx, &dy, &n)) { ! PyErr_Clear(); ! if (!PyArg_ParseTupleAndKeywords(args, kwargs, ! "OO|OOi:GtkPlotData.set_points", ! kwlist, &x, &y, &dx, &dy, &n)) ! return NULL; ! } return pygtkextra_plot_data_set_points(GTK_PLOT_DATA(self->obj), x, y, dx, dy, n); *************** *** 878,881 **** --- 905,931 ---- } %% + override gtk_plot_data_get_point + static PyObject * + _wrap_gtk_plot_data_get_point(PyObject *self, PyObject *args) + { + int i; + gdouble x = 0.0, y = 0.0, z = 0.0, a = 0.0, dx = 0.0, dy = 0.0, + dz = 0.0, da = 0.0; + gchar *label = NULL; + gboolean error; + + if (!PyArg_ParseTuple(args, "i:GtkPlotData.get_point", &i)) + return NULL; + gtk_plot_data_get_point(GTK_PLOT_DATA(self->obj), i, &x, &y, &z, &a, + &dx, &dy, &dz, &da, &label, &error); + if (error) { + Py_INCREF(Py_None); + return Py_None; + } + return Py_BuildValue("(dddddddds)", (double) x, (double) y, (double) z, + (double) a, (double) dx, (double) dy, (double) dz, + (double) da, label); + } + %% override gtk_plot_data_set_numpoints kwargs static PyObject * *************** *** 1174,1183 **** { gdouble min, max; ! gint levels; if (!PyArg_ParseTuple(args, ":GtkPlotData.get_gradient")) return NULL; ! gtk_plot_data_get_gradient(GTK_PLOT_DATA(self->obj), &min, &max, &levels); ! return Py_BuildValue("(ddi)", (double) min, (double) max, (int) levels); } %% --- 1224,1235 ---- { gdouble min, max; ! gint levels, sublevels; if (!PyArg_ParseTuple(args, ":GtkPlotData.get_gradient")) return NULL; ! gtk_plot_data_get_gradient(GTK_PLOT_DATA(self->obj), &min, &max, &levels, ! &sublevels); ! return Py_BuildValue("(ddii)", (double) min, (double) max, (int) levels, ! (int) sublevels); } %% *************** *** 1258,1261 **** --- 1310,1345 ---- } %% + override gtk_plot_data_add_marker + static PyObject * + _wrap_gtk_plot_data_add_marker(PyObject *self, PyObject *args) + { + int i; + GtkPlotMarker *marker; + + if (!PyArg_ParseTuple(args, "i:GtkPlotData.add_marker", &i)) + return NULL; + marker = gtk_plot_data_add_marker(GTK_PLOT_DATA(self->obj), i); + if (marker) + return PyCObject_FromVoidPtr(marker, NULL); + Py_INCREF(Py_None); + return Py_None; + } + %% + override gtk_plot_data_remove_marker + static PyObject * + _wrap_gtk_plot_data_remove_marker(PyObject *self, PyObject *args) + { + PyObject *py_marker; + GtkPlotMarker *marker; + gboolean ok; + + if (!PyArg_ParseTuple(args, "O!:gtk_plot_data_remove_marker", + &PyCObject_Type, &py_marker)) + return NULL; + marker = PyCObject_AsVoidPtr(py_marker); + ok = gtk_plot_data_remove_marker(GTK_PLOT_DATA(self->obj), marker); + return PyInt_FromLong(ok); + } + %% override gtk_plot_bar_new kwargs static PyObject * *************** *** 1409,1417 **** int nx, ny; ! if (!PyArg_ParseTupleAndKeywords(args, kwargs, ! "OOOOOOii:GtkPlotSurface.set_points", ! kwlist, &x, &y, &z, &dx, &dy, &dz, &nx, ! &ny)) ! return NULL; return pygtkextra_plot_surface_set_points(GTK_PLOT_SURFACE(self->obj), x, y, z, dx, dy, dz, nx, ny); --- 1493,1505 ---- int nx, ny; ! if (!PyArg_ParseTuple(args, "(OOOOOOii):GtkPlotSurface.set_points", ! &x, &y, &z, &dx, &dy, &dz, &nx, &ny)) { ! PyErr_Clear(); ! if (!PyArg_ParseTupleAndKeywords(args, kwargs, ! "OOOOOOii:GtkPlotSurface.set_points", ! kwlist, &x, &y, &z, &dx, &dy, &dz, ! &nx, &ny)) ! return NULL; ! } return pygtkextra_plot_surface_set_points(GTK_PLOT_SURFACE(self->obj), x, y, z, dx, dy, dz, nx, ny); *************** *** 1747,1750 **** --- 1835,1840 ---- ignore gtk_plot_new_with_size %% + ignore gtk_plot_set_pc + %% override gtk_plot_get_position static PyObject * *************** *** 2454,2457 **** --- 2544,2549 ---- return pygtkextra_plot_line_new(line_style, line_width, &line_color); } + %% + ignore gtk_plot_canvas_set_pc %% override gtk_plot_canvas_get_active_point Index: gtkextramodule.c =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkextramodule.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gtkextramodule.c 2001/09/15 18:51:16 1.1.1.1 --- gtkextramodule.c 2002/01/03 22:44:04 1.2 *************** *** 3,7 **** * Python bindings for the GtkExtra widget set * ! * Copyright (C) 2000-2001 Andreas Voegele * * This library is free software; you can redistribute it and/or --- 3,7 ---- * Python bindings for the GtkExtra widget set * ! * Copyright (C) 2000-2002 Andreas Voegele * * This library is free software; you can redistribute it and/or *************** *** 22,26 **** /* ! * Don't forget to add your wrapper functions to the table at the end * of this file! */ --- 22,26 ---- /* ! * Don't forget to add your wrapper functions to the array at the end * of this file! */ *************** *** 85,88 **** --- 85,104 ---- static PyObject * + _wrap_gtk_sheet_get_entry_widget(PyObject *self, PyObject *args) + { + PyObject *obj; + GtkWidget *entry_widget; + + if (!PyArg_ParseTuple(args, "O!:gtk_sheet_get_entry_widget", + &PyGtk_Type, &obj)) + return NULL; + entry_widget = gtk_sheet_get_entry_widget(GTK_SHEET(PyGtk_Get(obj))); + if (entry_widget) + return PyGtk_New(GTK_OBJECT(entry_widget)); + Py_INCREF(Py_None); + return Py_None; + } + + static PyObject * _wrap_gtk_sheet_get_visible_range(PyObject *self, PyObject *args) { *************** *** 850,853 **** --- 866,887 ---- pygtkextra_plot_data_register_plot_function(GTK_PLOT_DATA(widget), function, extra); + } else if (PyTuple_Check(function)) { + PyObject *iterator; + int n, mask; + + if (!PyArg_ParseTuple(function, "Oii:gtk_plot_data_new", &iterator, + &n, &mask)) + return NULL; + if (!PyCallable_Check(iterator)) { + PyErr_SetString(PyExc_TypeError, "iterator must be callable"); + return NULL; + } + widget = + gtk_plot_data_new_iterator((GtkPlotIterator) + pygtkextra_plot_data_call_plot_iterator, + n, mask); + if (widget) + pygtkextra_plot_data_register_plot_iterator(GTK_PLOT_DATA(widget), + iterator, extra); } else if (PyCObject_Check(function)) { if (extra && PyTuple_Size(extra) > 0) { *************** *** 881,887 **** int n = -1; ! if (!PyArg_ParseTuple(args, "O!OO|OOi:gtk_plot_data_set_points", ! &PyGtk_Type, &obj, &x, &y, &dx, &dy, &n)) ! return NULL; return pygtkextra_plot_data_set_points(GTK_PLOT_DATA(PyGtk_Get(obj)), x, y, dx, dy, n); --- 915,925 ---- int n = -1; ! if (!PyArg_ParseTuple(args, "O!(OOOOi):gtk_plot_data_set_points", ! &PyGtk_Type, &obj, &x, &y, &dx, &dy, &n)) { ! PyErr_Clear(); ! if (!PyArg_ParseTuple(args, "O!OO|OOi:gtk_plot_data_set_points", ! &PyGtk_Type, &obj, &x, &y, &dx, &dy, &n)) ! return NULL; ! } return pygtkextra_plot_data_set_points(GTK_PLOT_DATA(PyGtk_Get(obj)), x, y, dx, dy, n); *************** *** 900,903 **** --- 938,965 ---- static PyObject * + _wrap_gtk_plot_data_get_point(PyObject *self, PyObject *args) + { + PyObject *obj; + int i; + gdouble x = 0.0, y = 0.0, z = 0.0, a = 0.0, dx = 0.0, dy = 0.0, + dz = 0.0, da = 0.0; + gchar *label = NULL; + gboolean error; + + if (!PyArg_ParseTuple(args, "O!i:gtk_plot_data_get_point", + &PyGtk_Type, &obj, &i)) + return NULL; + gtk_plot_data_get_point(GTK_PLOT_DATA(PyGtk_Get(obj)), i, &x, &y, &z, &a, + &dx, &dy, &dz, &da, &label, &error); + if (error) { + Py_INCREF(Py_None); + return Py_None; + } + return Py_BuildValue("(dddddddds)", (double) x, (double) y, (double) z, + (double) a, (double) dx, (double) dy, (double) dz, + (double) da, label); + } + + static PyObject * _wrap_gtk_plot_data_set_numpoints(PyObject *self, PyObject *args) { *************** *** 1204,1208 **** PyObject *obj; gdouble min, max; ! gint levels; if (!PyArg_ParseTuple(args, "O!:gtk_plot_data_get_gradient", --- 1266,1270 ---- PyObject *obj; gdouble min, max; ! gint levels, sublevels; if (!PyArg_ParseTuple(args, "O!:gtk_plot_data_get_gradient", *************** *** 1210,1216 **** return NULL; gtk_plot_data_get_gradient(GTK_PLOT_DATA(PyGtk_Get(obj)), &min, &max, ! &levels); ! return Py_BuildValue("(ddi)", (double) min, (double) max, ! (int) levels); } --- 1272,1278 ---- return NULL; gtk_plot_data_get_gradient(GTK_PLOT_DATA(PyGtk_Get(obj)), &min, &max, ! &levels, &sublevels); ! return Py_BuildValue("(ddii)", (double) min, (double) max, ! (int) levels, (int) sublevels); } *************** *** 1292,1296 **** --- 1354,1391 ---- } + static PyObject * + _wrap_gtk_plot_data_add_marker(PyObject *self, PyObject *args) + { + PyObject *obj; + int i; + GtkPlotMarker *marker; + + if (!PyArg_ParseTuple(args, "O!i:gtk_plot_data_add_marker", + &PyGtk_Type, &obj, &i)) + return NULL; + marker = gtk_plot_data_add_marker(GTK_PLOT_DATA(PyGtk_Get(obj)), i); + if (marker) + return PyCObject_FromVoidPtr(marker, NULL); + Py_INCREF(Py_None); + return Py_None; + } + static PyObject * + _wrap_gtk_plot_data_remove_marker(PyObject *self, PyObject *args) + { + PyObject *obj; + PyObject *py_marker; + GtkPlotMarker *marker; + gboolean ok; + + if (!PyArg_ParseTuple(args, "O!O!:gtk_plot_data_remove_marker", + &PyGtk_Type, &obj, &PyCObject_Type, &py_marker)) + return NULL; + marker = PyCObject_AsVoidPtr(py_marker); + ok = gtk_plot_data_remove_marker(GTK_PLOT_DATA(PyGtk_Get(obj)), marker); + return PyInt_FromLong(ok); + } + + /* * GtkPlotBar *************** *** 1430,1437 **** int nx, ny; ! if (!PyArg_ParseTuple(args, "O!OOOOOOii:gtk_plot_surface_set_points", ! &PyGtk_Type, &obj, &x, &y, &z, &dx, &dy, &dz, &nx, ! &ny)) ! return NULL; return pygtkextra_plot_surface_set_points(GTK_PLOT_SURFACE(PyGtk_Get(obj)), x, y, z, dx, dy, dz, nx, ny); --- 1525,1537 ---- int nx, ny; ! if (!PyArg_ParseTuple(args, "O!(OOOOOOii):gtk_plot_surface_set_points", ! &PyGtk_Type, &obj, &x, &y, &z, &dx, &dy, &dz, ! &nx, &ny)) { ! PyErr_Clear(); ! if (!PyArg_ParseTuple(args, "O!OOOOOOii:gtk_plot_surface_set_points", ! &PyGtk_Type, &obj, &x, &y, &z, &dx, &dy, &dz, ! &nx, &ny)) ! return NULL; ! } return pygtkextra_plot_surface_set_points(GTK_PLOT_SURFACE(PyGtk_Get(obj)), x, y, z, dx, dy, dz, nx, ny); *************** *** 3628,3631 **** --- 3728,3732 ---- { "gtk_sheet_new", _wrap_gtk_sheet_new, 1 }, { "gtk_sheet_get_entry", _wrap_gtk_sheet_get_entry, 1 }, + { "gtk_sheet_get_entry_widget", _wrap_gtk_sheet_get_entry_widget, 1 }, { "gtk_sheet_get_visible_range", _wrap_gtk_sheet_get_visible_range, 1 }, { "gtk_sheet_clip_range", _wrap_gtk_sheet_clip_range, 1 }, *************** *** 3679,3682 **** --- 3780,3784 ---- { "gtk_plot_data_set_points", _wrap_gtk_plot_data_set_points, 1 }, { "gtk_plot_data_get_points", _wrap_gtk_plot_data_get_points, 1 }, + { "gtk_plot_data_get_point", _wrap_gtk_plot_data_get_point, 1 }, { "gtk_plot_data_set_labels", _wrap_gtk_plot_data_set_labels, 1 }, { "gtk_plot_data_get_labels", _wrap_gtk_plot_data_get_labels, 1 }, *************** *** 3690,3693 **** --- 3792,3797 ---- { "gtk_plot_data_get_link", _wrap_gtk_plot_data_get_link, 1 }, { "gtk_plot_data_remove_link", _wrap_gtk_plot_data_remove_link, 1 }, + { "gtk_plot_data_add_marker", _wrap_gtk_plot_data_add_marker, 1 }, + { "gtk_plot_data_remove_marker", _wrap_gtk_plot_data_remove_marker, 1 }, { "gtk_plot_bar_new", _wrap_gtk_plot_bar_new, 1 }, { "gtk_plot_box_new", _wrap_gtk_plot_box_new, 1 }, Index: gtkplotcanvaschild-type.c =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkplotcanvaschild-type.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gtkplotcanvaschild-type.c 2001/09/15 18:51:18 1.1.1.1 --- gtkplotcanvaschild-type.c 2002/01/03 22:44:04 1.2 *************** *** 35,38 **** --- 35,73 ---- } + static PyObject * + PyGtkPlotCanvasChild_set_selection(PyGtkPlotCanvasChild_Object *self, + PyObject *args) + { + int selection; + + if (!PyArg_ParseTuple(args, "i:GtkPlotCanvasChild.set_selection", + &selection)) + return NULL; + gtk_plot_canvas_child_set_selection(self->child, selection); + Py_INCREF(Py_None); + return Py_None; + } + + static PyObject * + PyGtkPlotCanvasChild_set_selection_mode(PyGtkPlotCanvasChild_Object *self, + PyObject *args) + { + int mode; + + if (!PyArg_ParseTuple(args, "i:GtkPlotCanvasChild.set_selection_mode", + &mode)) + return NULL; + gtk_plot_canvas_child_set_selection_mode(self->child, mode); + Py_INCREF(Py_None); + return Py_None; + } + + static PyMethodDef PyGtkPlotCanvasChild_methods[] = + { + { "set_selection", (PyCFunction) PyGtkPlotCanvasChild_set_selection, METH_VARARGS }, + { "set_selection_mode", (PyCFunction) PyGtkPlotCanvasChild_set_selection_mode, METH_VARARGS }, + { NULL, NULL, 0 } + }; + static struct memberlist PyGtkPlotCanvasChild_members[] = { *************** *** 40,43 **** --- 75,80 ---- { "type", T_INT, offsetof(GtkPlotCanvasChild, type), RO }, { "flags",T_INT, offsetof(GtkPlotCanvasChild, flags), 0 }, + { "selection",T_INT, offsetof(GtkPlotCanvasChild, selection), 0 }, + { "mode",T_INT, offsetof(GtkPlotCanvasChild, mode), 0 }, { "state", T_UINT, offsetof(GtkPlotCanvasChild, state), RO }, { "data", -1, 0, RO }, *************** *** 48,51 **** --- 85,90 ---- PyGtkPlotCanvasChild_GetAttr(PyGtkPlotCanvasChild_Object *self, char *attr) { + PyObject *value; + if (strcmp(attr, "allocation") == 0) { return Py_BuildValue("(iiii)", *************** *** 70,75 **** } } ! return PyMember_Get((char *) self->child, PyGtkPlotCanvasChild_members, ! attr); } --- 109,122 ---- } } ! value = PyMember_Get((char *) self->child, PyGtkPlotCanvasChild_members, ! attr); ! if (!value) { ! if (PyErr_ExceptionMatches(PyExc_AttributeError)) { ! PyErr_Clear(); ! value = Py_FindMethod(PyGtkPlotCanvasChild_methods, ! (PyObject *) self, attr); ! } ! } ! return value; } Index: gtkplotdata-support.c =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkplotdata-support.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gtkplotdata-support.c 2001/09/15 18:51:23 1.1.1.1 --- gtkplotdata-support.c 2002/01/03 22:44:04 1.2 *************** *** 36,42 **** --- 36,62 ---- "DX", "DY", "DZ", "DA" }; + #define PLOT_FUNCTION_TYPE_PLOT 0 + #define PLOT_FUNCTION_TYPE_PLOT3D 1 + #define PLOT_FUNCTION_TYPE_ITERATOR 2 + + static char * + get_ordinal_suffix(int i) + { + switch (i % 10) { + case 1: + return "st"; + case 2: + return "nd"; + case 3: + return "rd"; + default: + return "th"; + } + } + /* * pygtkextra_plot_data_register_plot_function * pygtkextra_plot_data_register_plot3d_function + * pygtkextra_plot_data_register_plot_iterator * * Associates a Python plot function and its arguments with a *************** *** 49,57 **** PyObject *function, PyObject *extra, ! int num_values) { ! int i, len; ! PyObject *args, **vector; ! /* Create a tuple for the plot function's arguments. */ len = (extra) ? PyTuple_Size(extra) : 0; --- 69,87 ---- PyObject *function, PyObject *extra, ! int type) { ! int i, len, num_values; ! PyObject *args, *value, **vector; ! ! switch (type) { ! case PLOT_FUNCTION_TYPE_PLOT: ! case PLOT_FUNCTION_TYPE_ITERATOR: ! num_values = 1; ! break; ! case PLOT_FUNCTION_TYPE_PLOT3D: ! num_values = 2; ! break; ! } ! /* Create a tuple for the plot function's arguments. */ len = (extra) ? PyTuple_Size(extra) : 0; *************** *** 59,65 **** if (!args) return FALSE; ! /* Create the X and Y values. */ ! for (i = 0; i < num_values; ++i) { ! PyObject *value = PyFloat_FromDouble(0.0); if (!value) { Py_DECREF(args); --- 89,106 ---- if (!args) return FALSE; ! switch (type) { ! case PLOT_FUNCTION_TYPE_PLOT: ! case PLOT_FUNCTION_TYPE_PLOT3D: ! for (i = 0; i < num_values; ++i) { ! value = PyFloat_FromDouble(0.0); ! if (!value) { ! Py_DECREF(args); ! return FALSE; ! } ! PyTuple_SET_ITEM(args, i, value); ! } ! break; ! case PLOT_FUNCTION_TYPE_ITERATOR: ! value = PyInt_FromLong(0); if (!value) { Py_DECREF(args); *************** *** 67,70 **** --- 108,112 ---- } PyTuple_SET_ITEM(args, i, value); + break; } /* Copy the extra arguments. */ *************** *** 93,97 **** { return pygtkextra_plot_data_register_plot_function_real(data, function, ! extra, 1); } --- 135,140 ---- { return pygtkextra_plot_data_register_plot_function_real(data, function, ! extra, ! PLOT_FUNCTION_TYPE_PLOT); } *************** *** 102,106 **** { return pygtkextra_plot_data_register_plot_function_real(data, function, ! extra, 2); } --- 145,160 ---- { return pygtkextra_plot_data_register_plot_function_real(data, function, ! extra, ! PLOT_FUNCTION_TYPE_PLOT3D); ! } ! ! gboolean ! pygtkextra_plot_data_register_plot_iterator(GtkPlotData *data, ! PyObject *function, ! PyObject *extra) ! { ! return pygtkextra_plot_data_register_plot_function_real(data, function, ! extra, ! PLOT_FUNCTION_TYPE_ITERATOR); } *************** *** 109,112 **** --- 163,167 ---- * pygtkextra_plot_data_call_plot_function * pygtkextra_plot_data_call_plot3d_function + * pygtkextra_plot_data_call_plot_iterator * * Calls the Python plot function belonging to a GtkPlotData instance. This *************** *** 114,133 **** * created with GtkPlotData.__init__(), GtkPlot.add_function() etc. * ! * 2-D Python plot functions get an X value and all the extra arguments that ! * were passed to GtkPlotData.__init__() or GtkPlot.add_function(). The plot ! * function should return the Y value or None, if it isn't possible to ! * calculate the Y value. ! * ! * 3-D Python plot functions get two values and should return the Z value or ! * None. * ! * Example: * ! * def tangent(x, factor, summand): ! * try: ! * return factor * math.tan(x) + summand ! * except: ! * return None ! * plot.add_function(tangent, 0.5, 1.0) */ gdouble --- 169,181 ---- * created with GtkPlotData.__init__(), GtkPlot.add_function() etc. * ! * 2-D plot functions get an X value and all the extra arguments that ! * were passed to GtkPlotData.__init__() or GtkPlot.add_function(). ! * The plot function should return the Y value or None, if it isn't ! * possible to calculate the Y value. * ! * 3-D plot functions get X and Y and return Z or None. * ! * Iterators get the number of the point and return a tuple of 8 or 9 ! * values, ie. (X, Y, Z, A, DX, DY, DZ, DA[, LABEL]) or None. */ gdouble *************** *** 162,166 **** PyTuple_SetItem(args, 0, value); */ - /* The following code is faster than the commented code above. */ value = PyTuple_GET_ITEM(args, 0); ((PyFloatObject *) value)->ob_fval = x; --- 210,213 ---- *************** *** 234,238 **** PyTuple_SetItem(args, 1, value); */ - /* The following code is faster than the commented code above. */ value = PyTuple_GET_ITEM(args, 0); ((PyFloatObject *) value)->ob_fval = x; --- 281,284 ---- *************** *** 270,273 **** --- 316,432 ---- return z; + } + + void + pygtkextra_plot_data_call_plot_iterator(GtkPlot *plot, GtkPlotData *data, + gint iter, + gdouble *out_x, + gdouble *out_y, + gdouble *out_z, + gdouble *out_a, + gdouble *out_dx, + gdouble *out_dy, + gdouble *out_dz, + gdouble *out_da, + gchar **out_label, + gboolean *out_error) + { + PyObject **vector, *function, *args, *value, *result; + + PyGtk_BlockThreads(); + + *out_error = TRUE; + + /* Get the Python function and the argument tuple that belong to + the given GtkPlotData instance. */ + vector = (PyObject **) gtk_object_get_data(GTK_OBJECT(data), + plot_function_key); + if (!vector) { + PyErr_SetString(PyExc_RuntimeError, "cannot find plot function"); + goto cleanup; + } + function = vector[0]; + args = vector[1]; + + /* Put the index into the first item of the argument tuple. */ + /* + value = PyInt_FromLong(iter); + if (!value) + goto cleanup; + PyTuple_SetItem(args, 0, value); + */ + value = PyTuple_GET_ITEM(args, 0); + ((PyIntObject *) value)->ob_ival = iter; + + /* Call the Python function. */ + result = PyEval_CallObject(function, args); + if (!result) + goto cleanup; + + if (PySequence_Check(result)) { + int n = PySequence_Length(result); + if (n < 8 || n > 9) { + PyErr_SetString(PyExc_TypeError, + "plot iterator must return 9-sequence or None"); + } else { + int i; + gdouble *v[8]; + PyObject *item; + + v[0] = out_x; v[1] = out_y; v[2] = out_z; v[3] = out_a; + v[4] = out_dx; v[5] = out_dy; v[6] = out_dz; v[7] = out_da; + *out_error = FALSE; + for (i = 0; i < 8; ++i) { + item = PySequence_GetItem(result, i); + if (item == Py_None) { + *v[i] = 0.0; + } else if (PyFloat_Check(item)) { + *v[i] = PyFloat_AS_DOUBLE(item); + } else if (PyNumber_Check(item) + && (value = PyNumber_Float(item))) { + *v[i] = PyFloat_AS_DOUBLE(value); + Py_DECREF(value); + } else { + gchar buf[256]; + + *out_error = TRUE; + g_snprintf(buf, sizeof(buf), + "%d%s item must be number or None", + i + 1, get_ordinal_suffix(i + 1)); + PyErr_SetString(PyExc_TypeError, buf); + Py_XDECREF(item); + Py_DECREF(result); + goto cleanup; + } + Py_XDECREF(item); + } + *out_label = NULL; + if (n >= 9) { + item = PySequence_GetItem(result, 8); + if (PyString_Check(item)) { + *out_label = PyString_AS_STRING(item); + } else if (item != Py_None) { + *out_error = TRUE; + PyErr_SetString(PyExc_TypeError, + "last item must be string or None"); + } + Py_XDECREF(item); + } + } + } else if (result != Py_None) { + PyErr_SetString(PyExc_TypeError, + "plot iterator must return sequence or None"); + } + + Py_DECREF(result); + + cleanup: + + if (PyErr_Occurred()) { + PyErr_Print(); + PyErr_Clear(); + } + + PyGtk_UnblockThreads(); } Index: pygtkextra-private.h =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/pygtkextra-private.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** pygtkextra-private.h 2001/09/15 18:51:48 1.1.1.1 --- pygtkextra-private.h 2002/01/03 22:44:04 1.2 *************** *** 162,165 **** --- 162,168 ---- PyObject *, PyObject *); + extern gboolean pygtkextra_plot_data_register_plot_iterator(GtkPlotData *, + PyObject *, + PyObject *); extern gdouble pygtkextra_plot_data_call_plot_function(GtkPlot *, GtkPlotData *, *************** *** 169,172 **** --- 172,183 ---- gdouble, gdouble, gboolean *); + extern void pygtkextra_plot_data_call_plot_iterator(GtkPlot *, + GtkPlotData *, + gint, gdouble *, + gdouble *, gdouble *, + gdouble *, gdouble *, + gdouble *, gdouble *, + gdouble *, gchar **, + gboolean *); extern PyObject *pygtkextra_plot_data_set_points(GtkPlotData *, PyObject *, PyObject *, PyObject *, |
From: Andreas V?g. <voe...@us...> - 2002-01-03 22:44:07
|
Update of /cvsroot/python-gtkextra/python-gtkextra/codegen In directory usw-pr-cvs1:/tmp/cvs-serv18294/codegen Modified Files: mkgtkextra.py Log Message: GtkExtra-0.99.17 update Index: mkgtkextra.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/codegen/mkgtkextra.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** mkgtkextra.py 2001/09/15 18:52:33 1.1.1.1 --- mkgtkextra.py 2002/01/03 22:44:04 1.2 *************** *** 20,26 **** --- 20,46 ---- "gtk_sheet_new_browser", "gtk_sheet_new_with_custom_entry", + "gtk_plot_set_pc", + "gtk_plot_canvas_set_pc", + "gtk_plot_data_new_iterator", ] types = { + "GtkJustification": "int", + "GtkOrientation": "int", + "GtkPlotAxisPos": "int", + "GtkPlotBorderStyle": "int", + "GtkPlotCanvasArrow": "int", + "GtkPlotCanvasSelection": "int", + "GtkPlotCanvasSelectionMode": "int", + "GtkPlotConnector": "int", + "GtkPlotLineStyle": "int", + "GtkPlotOrientation": "int", + "GtkPlotPlane": "int", + "GtkPlotScale": "int", + "GtkPlotSide": "int", + "GtkPlotSymbolStyle": "int", + "GtkPlotSymbolType": "int", + "GtkStateType": "int", + "GtkType": "uint", "const-GdkColor*": "GdkColor", "const-gchar*": "string", |
From: Andreas V?g. <voe...@us...> - 2002-01-03 22:44:07
|
Update of /cvsroot/python-gtkextra/python-gtkextra/examples In directory usw-pr-cvs1:/tmp/cvs-serv18294/examples Modified Files: testboxes.py testcontour.py testgtkplot.py testgtksheet.py Log Message: GtkExtra-0.99.17 update Index: testboxes.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/examples/testboxes.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** testboxes.py 2001/09/15 18:52:40 1.1.1.1 --- testboxes.py 2002/01/03 22:44:04 1.2 *************** *** 37,41 **** def build_example1(self, plot): px1 = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0] ! py1 = [0.2, 0.4, 0.5, 0.35, 0.30, 0.40] pz1 = [0.12, 0.22, 0.27, 0.12, 0.052, 0.42] dz1 = [0.0243, 0.045, 0.075, 0.0213, 0.05, 0.0324] --- 37,41 ---- def build_example1(self, plot): px1 = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0] ! py1 = [0.56, 0.12, 0.123, 0.5, 0.2, 0.21] pz1 = [0.12, 0.22, 0.27, 0.12, 0.052, 0.42] dz1 = [0.0243, 0.045, 0.075, 0.0213, 0.05, 0.0324] *************** *** 51,55 **** data.set_dz(dz1) data.show_zerrbars() ! data.set_symbol(PLOT_SYMBOL_NONE, PLOT_SYMBOL_FILLED, 10, 2, yellow, red) data.set_line_attributes(PLOT_LINE_NONE, 1, red) --- 51,55 ---- data.set_dz(dz1) data.show_zerrbars() ! data.set_symbol(PLOT_SYMBOL_CIRCLE, PLOT_SYMBOL_FILLED, 10, 2, yellow, red) data.set_line_attributes(PLOT_LINE_NONE, 1, red) Index: testcontour.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/examples/testcontour.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** testcontour.py 2001/09/15 18:52:36 1.1.1.1 --- testcontour.py 2002/01/03 22:44:04 1.2 *************** *** 30,34 **** surface.set_ystep(0.025) surface.set_legend("cos ((r-r\\s0\\N)\\S2\\N)") ! surface.set_gradient(0.2, 0.8, 6) plot.add_data(surface) --- 30,35 ---- surface.set_ystep(0.025) surface.set_legend("cos ((r-r\\s0\\N)\\S2\\N)") ! surface.set_gradient(0.2, 0.8, 6, 3) ! surface.set_lines_visible(FALSE) plot.add_data(surface) *************** *** 42,46 **** surface.set_ystep(0.025) surface.set_legend("cos ((r-r\\s0\\N)\\S2\\N)") ! surface.set_gradient(0.2, 0.8, 6) surface.set_grid_visible(FALSE) surface.set_lines_only(TRUE) --- 43,47 ---- surface.set_ystep(0.025) surface.set_legend("cos ((r-r\\s0\\N)\\S2\\N)") ! surface.set_gradient(0.2, 0.8, 6, 0) surface.set_grid_visible(FALSE) surface.set_lines_only(TRUE) Index: testgtkplot.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/examples/testgtkplot.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** testgtkplot.py 2001/09/15 18:52:41 1.1.1.1 --- testgtkplot.py 2002/01/03 22:44:04 1.2 *************** *** 63,66 **** --- 63,67 ---- canvas.add_plot(plot, 0.15, 0.4) self.build_example2(plot) + canvas.connect("move_item", self.move_item) canvas.connect("select_item", self.select_item) *************** *** 85,88 **** --- 86,101 ---- pass + def move_item(self, canvas, item, new_x, new_y, *args): + if item.type == PLOT_CANVAS_DATA: + print "MOVING DATA" + (i, old_x, old_y) = canvas.get_active_point() + print "Active point: %d -> %f %f" % (i, new_x, new_y) + data = canvas.get_active_data() + points = data.get_points() + points[0][i] = new_x + points[1][i] = new_y + data.set_points(points) + return TRUE + def select_item(self, canvas, event, item, *args): if item.type == PLOT_CANVAS_TEXT: *************** *** 100,103 **** --- 113,122 ---- elif item.type == PLOT_CANVAS_DATA: print "Item selected: DATA" + (i, x, y) = canvas.get_active_point() + print "Active point: %d -> %f %f" % (i, x, y) + #canvas.get_active_data().add_marker(i) + #canvas.get_active_plot().queue_draw() + elif item.type == PLOT_CANVAS_MARKER: + print "Item selected: MARKER" elif item.type == PLOT_CANVAS_NONE: print "Item selected: NONE" Index: testgtksheet.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/examples/testgtksheet.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** testgtksheet.py 2001/09/15 18:52:40 1.1.1.1 --- testgtksheet.py 2002/01/03 22:44:04 1.2 *************** *** 26,30 **** colormap = self.get_colormap() ! for column in xrange(self.get_columns_count()): name = chr(ord("A") + column) --- 26,33 ---- colormap = self.get_colormap() ! ! self.set_background(colormap.alloc("light yellow")) ! self.set_grid(colormap.alloc("light blue")) ! for column in xrange(self.get_columns_count()): name = chr(ord("A") + column) *************** *** 251,254 **** --- 254,259 ---- def __init__(self): GtkSheet.__init__(self, 1000, 26, "Example 3") + + self.show_grid(FALSE) colormap = self.get_colormap() |
From: Andreas V?g. <voe...@us...> - 2002-01-03 22:44:07
|
Update of /cvsroot/python-gtkextra/python-gtkextra In directory usw-pr-cvs1:/tmp/cvs-serv18294 Modified Files: ChangeLog INSTALL NEWS setup.py Log Message: GtkExtra-0.99.17 update Index: ChangeLog =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ChangeLog 2001/09/15 18:50:55 1.1.1.1 --- ChangeLog 2002/01/03 22:44:04 1.2 *************** *** 1,2 **** --- 1,116 ---- + 2002-01-03 Andreas Voegele <voe...@us...> + + * gtkextra/__init__.py: Added PLOT_CANVAS_MARKER. Updated + PLOT_CANVAS_CUSTOM. + + Added selections PLOT_CANVAS_SELECT_NONE, + PLOT_CANVAS_SELECT_MARKERS, PLOT_CANVAS_SELECT_TARGET. + + Added selection modes PLOT_CANVAS_SELECT_CLICK_1, + PLOT_CANVAS_SELECT_CLICK_2. + + Added iterator masks PLOT_DATA_X, PLOT_DATA_Y, PLOT_DATA_Z, + PLOT_DATA_A, PLOT_DATA_DX, PLOT_DATA_DY, PLOT_DATA_DZ, + PLOT_DATA_DA, PLOT_DATA_LABELS. + + Added GtkPlot.axis_set_labels_offset(), axis_get_labels_offset(). + + Added GtkPlotCanvas.freeze(), thaw(). + + Added GtkPlotData.update(), get_point(), set_a_scale(), + get_a_scale(), draw_gradient(), gradient_autoscale_a(), + gradient_autoscale_da(), gradient_autoscale_z(), add_marker(), + remove_marker(), remove_markers(), show_markers(), + markers_visible(). + + Updated GtkPlotData.set_gradient(), get_gradient(). + + Added GtkPlotSurface.use_height_gradient(), set_transparent(), + build_mesh() and recalc_nodes(). + + Added GtkSheet.get_entry_widget(), set_background(), set_grid(), + show_grid() and grid_visible(). + + Added history_combo to GtkIconFileSelection. + + * examples/testboxes.py: Updated the array py1 and the arguments + of set_symbol(). + + * examples/testcontour.py: Added an additional argument to + set_gradient(). Added surface.set_lines_visible(FALSE). + + * examples/testgtkplot.py: Added move_item(). + + * examples/testgtksheet.py: Added self.set_background(), + self.set_grid() and self.show_grid(). + + * gtkextra/gtkextra.defs: Added gtk_plot_set_pc(), + gtk_plot_axis_set_labels_offset(), + gtk_plot_axis_get_labels_offset(). + + Added gtk_plot_canvas_set_pc(), gtk_plot_canvas_freeze(), + gtk_plot_canvas_thaw(). Updated gtk_plot_canvas_grid_set_step(). + + Added gtk_plot_data_new_iterator(), gtk_plot_data_update(), + gtk_plot_data_get_point(), gtk_plot_data_set_a_scale(), + gtk_plot_data_get_a_scale(), gtk_plot_data_draw_gradient(), + gtk_plot_data_gradient_autoscale_a(), + gtk_plot_data_gradient_autoscale_da(), + gtk_plot_data_gradient_autoscale_z(), gtk_plot_data_add_marker(), + gtk_plot_data_remove_marker(), gtk_plot_data_remove_markers(), + gtk_plot_data_show_markers(), gtk_plot_data_markers_visible(). + + Updated gtk_plot_data_set_gradient(), + gtk_plot_data_get_gradient(). + + Added gtk_plot_surface_use_height_gradient(), + gtk_plot_surface_set_transparent(), gtk_plot_surface_build_mesh() + and gtk_plot_surface_recalc_nodes(). + + Added gtk_sheet_get_entry_widget(), gtk_sheet_set_background(), + gtk_sheet_set_grid(), gtk_sheet_show_grid() and + gtk_sheet_grid_visible(). + + Added history_combo to IconFileSelection. + + Replaced "int" and "uint" with the correct types. + + * gtkextra/gtkextra-extrafuncs.defs: Added GTK_PLOT_CANVAS_MARKER. + Added PlotCanvasSelection. Added PlotCanvasSelectionMode. Added + GTK_PLOT_DATA_X etc. Replaced "int" with "GtkJustification". + + * gtkextra/pygtkextra-private.h: Added + pygtkextra_plot_data_register_plot_iterator() and + pygtkextra_plot_data_call_plot_iterator(). + + * gtkextra/gtkplotdata-support.c: Added + pygtkextra_plot_data_register_plot_iterator() and + pygtkextra_plot_data_call_plot_iterator(). + + * gtkextra/gtkplotcanvaschild-type.c: Added + GtkPlotCanvasChild.set_selection(), set_selection_mode(). + + * gtkextra/gtkextramodule.c: Added gtk_plot_data_get_point(), + gtk_plot_data_add_marker(), gtk_plot_data_remove_marker(). + Updated gtk_plot_data_get_gradient(), gtk_plot_data_set_points(), + gtk_plot_surface_set_points() gtk_sheet_get_entry_widget(). + + * gtkextra/gtkextra.override: Added gtk_plot_set_pc(), + gtk_plot_canvas_set_pc() to the list of ignored functions. Added + gtk_plot_data_get_point(), gtk_plot_data_add_marker(), + gtk_plot_data_remove_marker(). Updated + gtk_plot_data_get_gradient(), gtk_plot_data_set_points(), + gtk_plot_surface_set_points(). + + * codegen/mkgtkextra.py: Added gtk_plot_set_pc(), + gtk_plot_canvas_set_pc(), gtk_plot_data_new_iterator(). + Added several types that are mapped to "int" or "uint". + + * setup.py: Updated the version number. + + * NEWS: Added a new entry. Modified several old entries. + + * INSTALL: Minor changes. + 2001-09-15 Andreas Voegele <voe...@us...> Index: INSTALL =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/INSTALL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** INSTALL 2001/09/15 18:50:56 1.1.1.1 --- INSTALL 2002/01/03 22:44:04 1.2 *************** *** 12,17 **** python setup.py install ! You can build RPM packages with: python setup.py bdist_rpm --- 12,18 ---- python setup.py install ! You can build Tar and RPM archives with: + python setup.py bdist python setup.py bdist_rpm *************** *** 22,36 **** cd examples ! ./testgtksheet.py ! ./testgtkplot.py ! ./testboxes.py ! ./testbubbles.py ! ./testflux.py ! ./testpolar.py ! ./testgtkplot3d.py ! ./testcontour.py ! ./testrealtime.py ! ./testgtkiconlist.py ! ./testgtkfilesel.py ! ./testgtkfont.py cd .. --- 23,37 ---- cd examples ! python testgtksheet.py ! python testgtkplot.py ! python testboxes.py ! python testbubbles.py ! python testflux.py ! python testpolar.py ! python testgtkplot3d.py ! python testcontour.py ! python testrealtime.py ! python testgtkiconlist.py ! python testgtkfilesel.py ! python testgtkfont.py cd .. Index: NEWS =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/NEWS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** NEWS 2001/09/15 18:50:55 1.1.1.1 --- NEWS 2002/01/03 22:44:04 1.2 *************** *** 1,6 **** New in 0.21: ! * The bindings are now a package, ie gtkextra/__init__.py is used ! instead of gtkextra.py. Please remove the old files before the ! the new files are installed. New in 0.20: --- 1,15 ---- + New in 0.22: + * Requires gtk+extra-0.99.17. + * GtkPlotData.set_gradient() and get_gradient() now get/return the number + of sublevels as an additional parameter. + * GtkPlotData.set_points() accepts the tuple returned by get_points() as + input. + * GtkCheckItem will be removed in the next version. Please use the + standard GtkCheckButton instead. + New in 0.21: ! * The bindings are now a package, ie. gtkextra/__init__.py is used ! instead of gtkextra.py. Please remove the old bindings before ! installing the new version. New in 0.20: *************** *** 23,43 **** * Removed GtkPlot.plot_set_flags(), plot_unset_flags() and PLOT_TRANSPARENT. Use GtkPlot.set_transparent() instead. - * Added GtkPlot.grids_set_on_top() and grids_on_top(). - * Added PLOT_BAR_POINTS, PLOT_BAR_RELATIVE, PLOT_BAR_ABSOLUTE. - * Added GtkPlotCSurface.set_lines_only(), lines_only(), - set_labels_visible() and labels_visible(). - * Added GtkPlotFlux.center() and is_centered(). - * Added GtkPlotText.set_border(). - * Added GtkPlotCanvas.put_pixmap() and PLOT_CANVAS_PIXMAP. * GtkFileList.open_dir() now returns a boolean value indicating success or failure. - * Added GtkFileList.get_filetype(), add_type() and add_type_filter(). * Added GtkIconFileSelection.show_tree(). Note: Use show() instead of show_all() to manage a GtkIconFileSelection dialog. If the dialog is managed with show_all() the tree widget, that is now disabled by default, will be shown and the GtkExtra code won't work correctly. - * Added GtkIconList.add_from_pixmap(). - * Added the attributes GtkPSFont.i18n_latinfamily and vertical. - * Added the function psfont_add_i18n_font(). * Applied a patch from Joe Van Andel that fixes a Numerical Python problem. --- 32,41 ---- *************** *** 69,84 **** axis_set_labels_numbers(). * Removed GtkPlot.axis_set_tick_labels(). Custom labels are now set ! with the signal "tick_label". Note: This signal is not supported by ! the Python bindings since the signal "tick_label" uses ! GTK_TYPE_POINTER. ! * Added GtkPlot.axis_set_labels_suffix(), axis_set_labels_prefix(), ! axis_get_labels_suffix() and axis_get_labels_prefix(). * Updated GtkPlot3D.corner_set_attributes(), corner_get_attributes(), frame_set_attributes(), frame_get_attributes() and axis_set_ticks_width(). The width is now a floating point value. - * Added GtkIconFileSelection.show_hidden() and set_filter(). - * Added GtkIconList.set_mode(), get_mode(), set_editable(), - is_editable(), set_row_spacing(), get_row_spacing(), - set_col_spacing(), get_col_spacing(), set_text_space(), - get_text_space(), set_icon_border(), get_icon_border(), - set_icon_width() and get_icon_width(). --- 67,73 ---- axis_set_labels_numbers(). * Removed GtkPlot.axis_set_tick_labels(). Custom labels are now set ! with the signal "tick_label". This signal is not supported by the ! Python bindings. * Updated GtkPlot3D.corner_set_attributes(), corner_get_attributes(), frame_set_attributes(), frame_get_attributes() and axis_set_ticks_width(). The width is now a floating point value. Index: setup.py =================================================================== RCS file: /cvsroot/python-gtkextra/python-gtkextra/setup.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** setup.py 2001/09/15 18:50:55 1.1.1.1 --- setup.py 2002/01/03 22:44:04 1.2 *************** *** 37,41 **** setup (name = "python-gtkextra", ! version = "0.21", description = "Python bindings for the GtkExtra widget set", long_description = "This package contains modules that allow "\ --- 37,41 ---- setup (name = "python-gtkextra", ! version = "0.22", description = "Python bindings for the GtkExtra widget set", long_description = "This package contains modules that allow "\ |