From c368d904fc27d35ae1e533155e2154dc496432e4 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 30 Oct 2000 21:08:42 +0000 Subject: [PATCH] Merged wxPython 2.2.2 over to the main branch git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/.cvsignore | 5 + wxPython/BUILD.txt | 168 -- wxPython/BUILD.unix.txt | 268 ++ wxPython/BUILD.win32.txt | 281 +++ wxPython/CHANGES.txt | 51 + wxPython/MANIFEST.in | 92 + wxPython/README.txt | 21 +- wxPython/SWIG/README.txt | 6 + wxPython/SWIG/pyexp.swg | 29 + wxPython/SWIG/typemaps.i | 561 +++++ wxPython/b | 53 + wxPython/b.bat | 56 + wxPython/buildall | 11 - wxPython/buildall.bat | 10 - wxPython/contrib/buildall.py | 31 - wxPython/contrib/glcanvas/build.cfg | 25 - wxPython/contrib/glcanvas/glcanvas.i | 22 +- wxPython/contrib/glcanvas/glcanvasc.def | 2 - wxPython/contrib/glcanvas/gtk/glcanvas.cpp | 84 +- wxPython/contrib/glcanvas/msw/glcanvas.cpp | 86 +- wxPython/contrib/glcanvas/stub.cpp | 24 + wxPython/contrib/ogl/.cvsignore | 1 + .../contrib/ogl/{_extras.py => _oglextras.py} | 0 wxPython/contrib/ogl/build.cfg | 52 - wxPython/contrib/ogl/ogl.cpp | 128 +- wxPython/contrib/ogl/ogl.i | 10 +- wxPython/contrib/ogl/ogl.py | 6 + wxPython/contrib/ogl/oglbasic.cpp | 122 +- wxPython/contrib/ogl/oglbasic.py | 6 + wxPython/contrib/ogl/oglc.def | 2 - wxPython/contrib/ogl/oglcanvas.cpp | 110 +- wxPython/contrib/ogl/oglcanvas.py | 6 + wxPython/contrib/ogl/oglshapes.cpp | 124 +- wxPython/contrib/ogl/oglshapes.py | 6 + wxPython/contrib/ogl/oglshapes2.cpp | 122 +- wxPython/contrib/ogl/oglshapes2.py | 6 + wxPython/contrib/ogl/stub.cpp | 24 + wxPython/demo/.cvsignore | 1 + wxPython/demo/About.py | 26 +- wxPython/demo/ActiveXWrapper_IE.py | 2 +- wxPython/demo/GridSimple.py | 37 +- wxPython/demo/Main.py | 86 +- wxPython/demo/OldSizers.py | 403 --- wxPython/demo/PyShell.py | 20 - wxPython/demo/XMLtreeview.py | 20 +- wxPython/demo/data/echo.py | 27 + wxPython/demo/data/grid.i | 33 +- wxPython/demo/data/stc.h | 1589 ++++++++---- wxPython/demo/data/stc.h.html | 1405 +++++++++++ wxPython/demo/widgetTest.py | 7 +- wxPython/demo/wxFloatBar.py | 2 +- wxPython/demo/wxGLCanvas.py | 7 +- wxPython/demo/wxGauge.py | 15 +- wxPython/demo/wxHtmlWindow.py | 6 + wxPython/demo/wxListCtrl.py | 23 +- wxPython/demo/wxProcess.py | 157 ++ wxPython/demo/wxScrolledWindow.py | 3 + wxPython/demo/wxSplitterWindow.py | 10 +- wxPython/demo/wxStatusBar.py | 52 +- wxPython/demo/wxStyledTextCtrl_1.py | 22 +- wxPython/demo/wxStyledTextCtrl_2.py | 53 +- wxPython/demo/wxTextCtrl.py | 9 +- wxPython/demo/wxToolBar.py | 12 +- wxPython/demo/wxTreeCtrl.py | 20 +- wxPython/distrib/README.dbg.txt | 20 +- wxPython/distrib/autobuild.py | 6 +- wxPython/distrib/build.py | 860 ------- wxPython/distrib/makedbg.bat | 23 +- wxPython/distrib/makedemo | 36 + wxPython/distrib/wxPython.WSM | Bin 33 -> 33 bytes wxPython/distrib/wxPython.rsp | 4 + wxPython/distrib/wxPython.spec | 101 - wxPython/distrib/wxPython.wse | 124 +- wxPython/distrib/zipit.bat | 33 +- wxPython/my_distutils.py | 278 +++ wxPython/my_install_data.py | 167 ++ wxPython/setup.cfg | 14 + wxPython/setup.py | 627 +++++ wxPython/src/.cvsignore | 4 + wxPython/src/__version__.py | 2 +- wxPython/src/_defs.i | 3 + wxPython/src/_extras.py | 11 +- wxPython/src/build.cfg | 153 -- wxPython/src/clip_dnd.i | 1 + wxPython/src/controls.i | 8 + wxPython/src/controls2.i | 36 +- wxPython/src/events.i | 18 + wxPython/src/filesys.i | 274 +++ wxPython/src/grid.i | 22 +- wxPython/src/gtk/calendar.cpp | 46 +- wxPython/src/gtk/clip_dnd.cpp | 44 +- wxPython/src/gtk/cmndlgs.cpp | 46 +- wxPython/src/gtk/controls.cpp | 187 +- wxPython/src/gtk/controls.py | 15 + wxPython/src/gtk/controls2.cpp | 94 +- wxPython/src/gtk/controls2.py | 6 +- wxPython/src/gtk/events.cpp | 1301 ++++++++-- wxPython/src/gtk/events.py | 93 + wxPython/src/gtk/filesys.cpp | 2149 ++++++++++++++++ wxPython/src/gtk/filesys.py | 240 ++ wxPython/src/gtk/frames.cpp | 44 +- wxPython/src/gtk/gdi.cpp | 44 +- wxPython/src/gtk/grid.cpp | 61 +- wxPython/src/gtk/html.cpp | 95 +- wxPython/src/gtk/html.py | 7 + wxPython/src/gtk/htmlhelp.cpp | 58 +- wxPython/src/gtk/image.cpp | 44 +- wxPython/src/gtk/mdi.cpp | 44 +- wxPython/src/gtk/misc.cpp | 546 ++++- wxPython/src/gtk/misc.py | 47 +- wxPython/src/gtk/misc2.cpp | 812 ++++++- wxPython/src/gtk/misc2.py | 103 + wxPython/src/gtk/printfw.cpp | 44 +- wxPython/src/gtk/sizers.cpp | 46 +- wxPython/src/gtk/sizers.py | 4 +- wxPython/src/gtk/stattool.cpp | 72 +- wxPython/src/gtk/streams.cpp | 855 +++++++ wxPython/src/gtk/streams.py | 66 + wxPython/src/gtk/utils.cpp | 150 +- wxPython/src/gtk/windows.cpp | 110 +- wxPython/src/gtk/windows.py | 61 +- wxPython/src/gtk/windows2.cpp | 171 +- wxPython/src/gtk/windows2.py | 9 + wxPython/src/gtk/windows3.cpp | 46 +- wxPython/src/gtk/wx.cpp | 144 +- wxPython/src/gtk/wx.py | 23 +- wxPython/src/helpers.cpp | 12 +- wxPython/src/helpers.h | 143 +- wxPython/src/html.i | 13 +- wxPython/src/misc.i | 50 +- wxPython/src/misc2.i | 70 + wxPython/src/msw/calendar.cpp | 46 +- wxPython/src/msw/clip_dnd.cpp | 46 +- wxPython/src/msw/cmndlgs.cpp | 46 +- wxPython/src/msw/controls.cpp | 189 +- wxPython/src/msw/controls.py | 15 + wxPython/src/msw/controls2.cpp | 94 +- wxPython/src/msw/controls2.py | 6 +- wxPython/src/msw/events.cpp | 1303 ++++++++-- wxPython/src/msw/events.py | 93 + wxPython/src/msw/filesys.cpp | 2151 +++++++++++++++++ wxPython/src/msw/filesys.py | 240 ++ wxPython/src/msw/frames.cpp | 46 +- wxPython/src/msw/gdi.cpp | 46 +- wxPython/src/msw/grid.cpp | 61 +- wxPython/src/msw/html.cpp | 93 +- wxPython/src/msw/html.py | 7 + wxPython/src/msw/htmlhelp.cpp | 82 +- wxPython/src/msw/htmlhelp.py | 6 + wxPython/src/msw/image.cpp | 46 +- wxPython/src/msw/mdi.cpp | 46 +- wxPython/src/msw/misc.cpp | 546 ++++- wxPython/src/msw/misc.py | 47 +- wxPython/src/msw/misc2.cpp | 812 ++++++- wxPython/src/msw/misc2.py | 103 + wxPython/src/msw/printfw.cpp | 46 +- wxPython/src/msw/sizers.cpp | 46 +- wxPython/src/msw/sizers.py | 4 +- wxPython/src/msw/stattool.cpp | 70 +- wxPython/src/msw/streams.cpp | 855 +++++++ wxPython/src/msw/streams.py | 66 + wxPython/src/msw/utils.cpp | 150 +- wxPython/src/msw/windows.cpp | 81 +- wxPython/src/msw/windows.py | 54 +- wxPython/src/msw/windows2.cpp | 174 +- wxPython/src/msw/windows2.py | 12 + wxPython/src/msw/windows3.cpp | 46 +- wxPython/src/msw/wx.cpp | 142 +- wxPython/src/msw/wx.py | 31 +- wxPython/src/sizers.i | 4 +- wxPython/src/stattool.i | 16 +- wxPython/src/streams.i | 503 ++++ wxPython/src/utils.i | 5 +- wxPython/src/windows.i | 99 +- wxPython/src/windows2.i | 10 +- wxPython/src/wx.i | 20 +- wxPython/src/wxc.def | 6 - wxPython/tests/fs_test.py | 41 + wxPython/tests/test2.py | 4 +- wxPython/tests/test3.py | 4 +- wxPython/tests/test4.py | 4 +- wxPython/wxPython/lib/activexwrapper.py | 2 +- wxPython/wxPython/lib/editor/tokenizer.py | 2 +- wxPython/wxPython/lib/filebrowsebutton.py | 24 +- wxPython/wxPython/lib/mvctree.py | 4 +- wxPython/wxPython/lib/pyshell.py | 39 +- wxPython/wxPython/lib/sizers/.cvsignore | 2 - wxPython/wxPython/lib/sizers/__init__.py | 45 - wxPython/wxPython/lib/sizers/border.py | 109 - wxPython/wxPython/lib/sizers/box.py | 137 -- wxPython/wxPython/lib/sizers/shape.py | 97 - wxPython/wxPython/lib/sizers/sizer.py | 112 - wxPython/wxPython/lib/wxPlotCanvas.py | 4 +- 193 files changed, 22282 insertions(+), 4656 deletions(-) delete mode 100644 wxPython/BUILD.txt create mode 100644 wxPython/BUILD.unix.txt create mode 100644 wxPython/BUILD.win32.txt create mode 100644 wxPython/MANIFEST.in create mode 100644 wxPython/SWIG/README.txt create mode 100644 wxPython/SWIG/pyexp.swg create mode 100644 wxPython/SWIG/typemaps.i create mode 100755 wxPython/b create mode 100755 wxPython/b.bat delete mode 100755 wxPython/buildall delete mode 100755 wxPython/buildall.bat delete mode 100755 wxPython/contrib/buildall.py delete mode 100644 wxPython/contrib/glcanvas/build.cfg delete mode 100644 wxPython/contrib/glcanvas/glcanvasc.def create mode 100644 wxPython/contrib/glcanvas/stub.cpp rename wxPython/contrib/ogl/{_extras.py => _oglextras.py} (100%) delete mode 100644 wxPython/contrib/ogl/build.cfg delete mode 100644 wxPython/contrib/ogl/oglc.def create mode 100644 wxPython/contrib/ogl/stub.cpp delete mode 100644 wxPython/demo/OldSizers.py delete mode 100644 wxPython/demo/PyShell.py create mode 100644 wxPython/demo/data/echo.py create mode 100644 wxPython/demo/data/stc.h.html create mode 100644 wxPython/demo/wxProcess.py delete mode 100755 wxPython/distrib/build.py create mode 100755 wxPython/distrib/makedemo delete mode 100644 wxPython/distrib/wxPython.spec create mode 100644 wxPython/my_distutils.py create mode 100644 wxPython/my_install_data.py create mode 100644 wxPython/setup.cfg create mode 100755 wxPython/setup.py delete mode 100644 wxPython/src/build.cfg create mode 100644 wxPython/src/filesys.i create mode 100644 wxPython/src/gtk/filesys.cpp create mode 100644 wxPython/src/gtk/filesys.py create mode 100644 wxPython/src/gtk/streams.cpp create mode 100644 wxPython/src/gtk/streams.py create mode 100644 wxPython/src/msw/filesys.cpp create mode 100644 wxPython/src/msw/filesys.py create mode 100644 wxPython/src/msw/streams.cpp create mode 100644 wxPython/src/msw/streams.py create mode 100644 wxPython/src/streams.i delete mode 100644 wxPython/src/wxc.def create mode 100644 wxPython/tests/fs_test.py delete mode 100644 wxPython/wxPython/lib/sizers/.cvsignore delete mode 100644 wxPython/wxPython/lib/sizers/__init__.py delete mode 100644 wxPython/wxPython/lib/sizers/border.py delete mode 100644 wxPython/wxPython/lib/sizers/box.py delete mode 100644 wxPython/wxPython/lib/sizers/shape.py delete mode 100644 wxPython/wxPython/lib/sizers/sizer.py diff --git a/wxPython/.cvsignore b/wxPython/.cvsignore index 8886a1a7b1..bf3bcde0de 100644 --- a/wxPython/.cvsignore +++ b/wxPython/.cvsignore @@ -1,3 +1,8 @@ .emacs.desktop +MANIFEST +build build.local +dist +licence +temp update.log diff --git a/wxPython/BUILD.txt b/wxPython/BUILD.txt deleted file mode 100644 index 52a401e42f..0000000000 --- a/wxPython/BUILD.txt +++ /dev/null @@ -1,168 +0,0 @@ -Build Instructions ------------------- -I used SWIG (http://www.swig.org) to create the source code for the -extension module. This enabled me to only have to deal with a small -amount of code and only have to bother with the exceptional issues. -SWIG takes care of the rest and generates all the repetative code for -me. You don't need SWIG to build the extension module as all the -generated C++ code is included under the src directory. - -I added a few minor features to SWIG to control some of the code -generation. If you want to play around with this you will need to get -a recent version of SWIG from their CVS or from a daily build. See -http://www.swig.org/ for details. - -wxPython is organized as a Python package. This means that the -directory containing the results of the build process should be a -subdirectory of a directory on the PYTHONPATH. (And preferably should -be named wxPython.) You can control where the build process will dump -wxPython by setting the TARGETDIR variable for the build utility, (see -below.) - - - -1. Build and install wxWindows as described in its BuildCVS.txt or - INSTALL.txt file. - -1a. Building wxWindows on Unix/Linux/Etc. - - For *nix systems I run configure with these flags: - - --with-gtk - --with-libjpeg - --with-opengl - --without-odbc - --enable-unicode=no - --enable-threads=yes - --enable-socket=yes - --enable-static=no - --enable-shared=yes - --disable-std_iostreams - --enable-newgrid - - You can use whatever flags you want, but these work for me. If you - want debug libraries, then you should add the "--enable-debug - --enable-mem_tracing" flags. I reccommend creating an empty build - directory, and then running make and configure from there. This - makes it easy to experiment with different configure options - without losing old builds. - - Be sure to run "make install" to install the wxWindows headers and - shared library. You can check where the wxPython build will expect - to find them by running "wx-config --cflags" and "wx-config --libs" - - -1b. Building wxWindows on Win32. - - For Win32 systems I use Visual C++ 6.0, but 5.0 should work. The - wxPython build utility currently does not support any other win32 - compilers. Be sure to copy include/wx/msw/setup0.h to - include/wx/msw/setup.h and edit it for the options you want. At a - minimum you should set the following: - - wxUSE_NEW_GRID 1 - wxUSE_GLOBAL_MEMORY_OPERATORS 0 - wxUSE_LIBTIFF 1 - wxUSE_GLCANVAS 1 - - I also change these: - - wxUSE_DIALUP_MANAGER 0 - wxUSE_DYNLIB_CLASS 0 - wxUSE_DOC_VIEW_ARCHITECTURE 0 - wxUSE_MDI_ARCHITECTURE 0 - wxUSE_PLOT 0 - wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0 - - - There are probably other flags that can be disabled to remove - things not being used in wxPython, but I havn't investigated all - the potential configurations yet. - - I find it easiest to build wxWindows using the makefiles, that way - I don't have to worry about what the IDE might be doing behind the - scenes that might screw things up. Simply go to the src/msw - directory and run: - - nmake -f makefile.vc CRTFLAG=/MD EXTRAFLAGS=-D__NO_VC_CRTDBG__ dll pch - - If you want to make a release build, add FINAL=1 to the nmake - command, as well as to build.local for wxPython, (see below.) - - -2. For the win32 platform you should be sure to set an environment - variable named WXWIN to be the path to the top of the wxWindows - source tree. - - -3. If you are working from a copy of the code retrieved from CVS, then - you will find wxPython in $WXWIN/wxPython. If you are working from - the tar.gz or .zip files then you will probably want to unpack - wxPython in the $WXWIN directory and rename the new directory to - wxPython (or use a symlink.) If you want to keep it in a separate - directory then you can change where the build.py tool expects to - find it by creating a file named build.local (see step 7 for more - examples about build.local,) containing something like this: - - WXPSRCDIR = "~/MyStuff/wxPython-2.1.15/src" - - If your wxPython sources are not under $WXWIN then you'll need to - adjust the remainder of these instructions accordingly. - - -4. At this point you may want to make an alias, symlink, script, - batch file, or whatever on the PATH that invokes - $WXWIN/wxPython/distrib/build.py to help simplify matters somewhat. - For example, on my win32 system I have a file named build.bat in a - directory on the PATH that contains: - - python %WXWIN%/wxPython/distrib/build.py %1 %2 %3 %4 %5 %6 - - -5. Change into the $(WXWIN)/wxPython/src directory. - - -6. If you don't use SWIG, or don't have a new enough version - installed, you may have to update the timestamps of the files it - generates so the make utility won't think they are out of date and - try to run SWIG to update them. The standard touch utility can do - this for you: - - touch gtk/*.cpp gtk/*.py - or - touch msw\*.cpp msw\*.py - - -7. Type "build -b" to build wxPython and "build -i" to install it. - - The build.py script actually generates a Makefile based on what it - finds on your system and information found in the build.cfg file. - If you have troubles building or you want it built or installed in - a different way, take a look at the doc-string in build.py. You may - be able to override configuration options in a file named - build.local. For example, you can set a new TARGETDIR (the - installation directory) just by creating a file named build.local - in your wxPython source directory and assign a value to it, like - this: - - TARGETDIR = "/usr/local/lib/python1.5/site-packages/wxPython" - - The build.local file is executed as Python code so you can do very - creative things there if you need to. - - -8. To build and install the add-on modules, change to the appropriate - directory under $WXWIN/wxPython/contrib and run the build utility - again. - - -9. Change to the $WXWIN/wxPython/demo directory. - - -10. Try executing the demo program. For example: - - python demo.py - - To run it without requiring a console on win32, you can use the - pythonw.exe version of Python either from the command line or from - a shortcut. diff --git a/wxPython/BUILD.unix.txt b/wxPython/BUILD.unix.txt new file mode 100644 index 0000000000..e1409e4e9f --- /dev/null +++ b/wxPython/BUILD.unix.txt @@ -0,0 +1,268 @@ +Building wxPython on Unix or Unix-like Systems +---------------------------------------------- + +The basic steps for building wxPython for Unix or Unix-like systems +are: + + 1. Compile and/or install glib and gtk+ + 2. Compile and/or install wxGTK + 3. Compile and install wxPython + +We'll go into more detail of each of these steps below, but first a +few bits of background information on tools. + +I use a tool called SWIG (http://www.swig.org) to help generate the +C++ sources used in the wxPython extension module. However you don't +need to have SWIG unless you want to modify the *.i files. If you do +you'll want to have version 1.1-883 of SWIG and you'll need to change +a flag in the setup.py script as described below. + +I use the new Python Distutils tool to build wxPython. It is included +with Python 2.0, but if you want to use Python 1.5.2 or 1.6 then +you'll need to download and install Distutils 1.0 from +http://www.python.org/sigs/distutils-sig/ + +I usually use RedHat Linux when working on the wxGTK version of +wxPython, but I occasionally build and test on Solaris and I hope to +be able to add some other platforms soon. The compiler I use is +whatever comes with the current version of RedHat I am using. I find +that there are less portability problems with the RPMs if I don't try +using the latest and greatest compilers all the time. On the other +platforms I usually stick with as recent a version of GCC that I can +find pre-built for that platform. + +Okay, now on the the fun stuff... + + +1. Compile and/or install glib and gtk+ +--------------------------------------- + +A. First of all, check and see if you've already got glib/gtk+ on your + system, all the Linux distributions I know of come with it, at + least as an option. Look for libglib.* and libgtk.* in your system's + standard library directories. You'll also need the headers and + config scripts in order to build things that use glib/gtk. Try + running gtk-config: + + gtk-config --version + + If you have version 1.2.5 or better then you're all set. You can + skip to step #2. + +B. If your system has a binary package mechanism, (RPMs, debs, + whatever...) check and see if binaries for glib abd gtk+ are + available. Be sure to get the runtime library package as well as + the development package, if they are separate. Install them with + your package tool, and skip to step #2. + +C. If all else fails, you can get the source code for glib and gtk+ at + http://www.gtk.org/. Fetch the latest of each in the 1.2.x + series. Compile and install each of them like this: + + gzip -d [package].tar.gz | tar xvf - + cd [package] + ./configure + make + make install + + The last step will probably have to be done as root. Also, if your + system needs anything done to update the dynamic loader for shared + libraries, (such as running ldconfig on Linux) then do it after + each library is installed. + + + +2. Compile and/or install wxGTK +------------------------------- + +A. You can find the sources and RPMs for wxGTK at + ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/, or + just follow the download links from http://wxwindows.org/. You can + also check out a current snapshot of the sources from the CVS + server. (Some information about annonymous CVS access is at + http://wxwindows.org/cvs.htm.) The advantage of using CVS is that + you can easily update as soon as the developers check in new + sources or fixes. The advantage of using a released version is + that it usually has had more testing done. You can decide which + method is best for you. + +B. You'll usually want to use a version of wxGTK that has the same + version number as the wxPython sources you are using. (Another + advantage of using CVS is that you'll get both at the same time.) + +C. If using the RPMs be sure to get both the wxGTK and wxGTK-devel + RPMs (at a minimum) and then install them as root. + + rpm -Uhv wxGTK-2.2.2-0.i386.rpm wxGTK-devel-2.2.2-0.i386.rpm + +D. If using the sources (either from the tarball or from CVS) then + configure it like this: + + cd wxWindows # or whatever your top-level directory is called + mkdir build + cd build + ../configure --with-gtk + + There are gobs and gobs of options for the configure script, run + ../configure --help to see them all. I'll describe some that I find + useful here. + + If you have OpenGL or compatible libraries installed, then add the + --with-opengl flag. + + If you are on Solaris and are using a recent version of GCC, then + you'll probably want to add the --enable-permissive flag so the + compiler won't barf on your broken X11 header files. + + To make a debugging version of wxGTK, add the --enable-debug flag. + This sets the -g flag for the compiler and also activates some + special debugging code in wxWindows by defining the __WXDEBUG__ + macro. You'll get some extra asserts, failure logging, etc. + +E. Now just compile and install. You need to use GNU make, so if your + system has something else get GNU make and build and install it and + use it instead of your system's default make command. + + make + make install + + The last step will probably have to be done as root. Also, if your + system needs anything done to update the dynamic loader for shared + libraries, (such as running ldconfig on Linux) then do it now. + +F. You can test your build by changing to one of the directories under + build/samples or build/demos, running make and then running the + executable that is built. + + + +3. Compile and install wxPython +------------------------------- + +A. You have the same options (and same advantages/disadvantages) for + getting the wxPython source, either a released snapshot or from + CVS. The released version file is named wxPython-[version].tar.gz + and is available at http://wxpython.org/download.php. If you want + to use CVS you'll find wxPython in the wxWindows CVS tree (see + above) in the wxWindows/wxPython directory. + +B. As mentioned previouslly, wxPython is built with the standard + Python Distutils tool. If you are using Python 2.0 or later you + are all set, otherwise you need to download and install Distutils + 1.0 from http://www.python.org/sigs/distutils-sig/. + + On Unix systems Distutils figures out what commands and flags to + use for the compiler and linker by looking in the Makefile that was + used to build Python itself. Most of the time this works okay. If + it doesn't, there doesn't seem to be a way to override the values + that Distutils uses without hacking either Distutils itself, or + Python's Makefile. (Complain to the distutils-sig about this + please.) For example, on my Solaris system I had to edit + /usr/local/lib/python1.5/config/Makefile and replace + + LDSHARED=ld -G + + with + + LDSHARED=gcc -G + + This particular problem has been fixed in Python 1.6 and beyond, + but there may be similar issues on other platforms. + + While we're on the subject of how Python was built... Since + wxPython is a C++ extension some platforms and/or compilers will + require that the Python executable was linked with the C++ linker + in order for everything to work correctly. If you build and + install Python yourself then this is easy to take care of, + otherwise you may have to mess with binary packages or bribe your + system administrator... + + In my case on Solaris wxPython applications would core dump on + exit. The core file indicated that the fault happened after + _exit() was called and the run-time was trying to execute cleanup + code. After relinking the Python executable the problem went away. + To build Python to link with the C++ linker do this: + + cd Python-2.0 # wherever the root of the source tree is + rm python # in case it's still there from an old build + make LINKCC=g++ # or whatever your C++ command is + make install + + +C. Change to the root wxPython directory and look at the setup.py + file. This is the script that configures and defines all the + information that Distutils needs to build wxPython. There are some + options near the begining of the script that you may want or need + to change based on your system and what options you have selected + up to this point, (sources from tar.gz or from CVS, etc.) You can + either change these flags directly in setup.py or supply them on + the command-line. + + BUILD_GLCANVAS Set to zero if you don't want to build the + Open GL canvas extension module. If you don't + have OpenGL or compatible libraries then you'll + need to set this to zero. + + BUILD_OGL Set to zero if you don't want to build the + Object Graphics Library extension module. + + BUILD_STC Set to zero if you don't want to build the + wxStyledTextCtrl (the Scintilla wrapper) + extension module. + + USE_SWIG If you have edited any of the *.i files you + will need to set this flag to non-zero so SWIG + will be executed to regenerate the wrapper C++ + and shadow python files. + + IN_CVS_TREE If you are using the CVS version of the + wxWindows and wxPython sources then you will + need to set this flag to non-zero. This is + needed because some source files from the + wxWindows tree are copied to be under the + wxPython tree in order to keep Distutils happy. + With this flag set then setup.py will + automatically keep these copied sources up to + date if the original version is ever updated. + If you are using the tar.gz version of the + Python sources then these copied sources are + already present in your source tree. + + +D. To build and install wxPython you simply need to execute the + setup.py script. If you have more than one version of Python + installed, be sure to execute setup.py with the version you want to + build wxPython for. Depending on the permissions on your + site-packages directory you may need to be root to run the install + command. + + python setup.py build + python setup.py install + +E. At this point you should be able to change into the wxPython/demo + directory and run the demo: + + python demo.py + +F. If you would like to make a test build that doesn't overwrite the + installed version of wxPython you can do so with this command + instead of the install command above: + + python setup.py build_ext --inplace + + This will build the wxPython package in the local wxPython + directory instead of installing it under your Python installation. + To run using this test version just add the base wxPython source + directory to the PYTHONPATH: + + export PYTHONPATH=~/projects/wxWindows/wxPython + # or whatever is required for your shell + cd ~/projects/wxWindows/wxPython/demo + python demo.py + + +That's all folks! + + +----------------- +robin@alldunn.com diff --git a/wxPython/BUILD.win32.txt b/wxPython/BUILD.win32.txt new file mode 100644 index 0000000000..4944ecebe2 --- /dev/null +++ b/wxPython/BUILD.win32.txt @@ -0,0 +1,281 @@ +Building wxPython on Win32 +-------------------------- + + +Building wxPython for use on win32 systems is a fairly simple process +consisting of just a few steps. However depending on where you get +your sources from and what your desired end result is, there are +several permutations of those steps. At a high level the basic steps +are: + + 1. Get the wxWindows sources + 2. Build the wxWindows DLL + 3. Get the wxPython sources + 4. Build and Install wxPython + +We'll go into more detail of each of these steps below, but first a +few bits of background information on tools. + +I use a tool called SWIG (http://www.swig.org) to help generate the +C++ sources used in the wxPython extension module. However you don't +need to have SWIG unless you want to modify the *.i files. If you do +you'll want to have version 1.1-883 of SWIG and you'll need to change +a flag in the setup.py script as described below. + +I use the new Python Distutils tool to build wxPython. It is included +with Python 2.0, but if you want to use Python 1.5.2 or 1.6 then +you'll need to download and install Distutils 1.0 from +http://www.python.org/sigs/distutils-sig/ + +I use Microsoft Visual C++ 6.0 (5.0 with the service packs should work +also) to compile the wxPython C++ sources. Since I am using Distutils +it should be easier now to build with other win32 compilers such as +the free mingw32 or Borland compilers, but I havn't tried them yet. +If anybody wants to try it I'll take any required patches for the +setup script and for these instructions. + +And now on to the fun stuff... + + + +1. Get the wxWindows sources +---------------------------- + +A. There are a few possible ways to get sources for wxWindows. You + can download a released version from http://wxwindows.org/ or you + can get current development sources from the CVS server. (Some + information about annonymous CVS access is at + http://wxwindows.org/cvs.htm.) The advantage of using CVS is that + you can easily update as soon as the developers check in new + sources or fixes. The advantage of using a released version is + that it usually has had more testing done. You can decide which + method is best for you. + +B. You'll usually want to use wxWindows sources that have the same + version number as the wxPython sources you are using. (Another + advantage of using CVS is that you'll get both at the same time.) + + NOTE: There probably isn't going to be an official 2.2.2 release + for wxMSW so I have taken a snapshot of my workspace and made it + available at http://alldunn.com/wxPython/dist/others/ + +C. Once you get the sources be sure to put them in a path without a + space in it (i.e., NOT c:\Program Files\wx) and set an environment + variable named WXWIN to this directory. For example: + + mkdir \wx2 + cd \wx2 + unzip wxMSW-2.2.2.zip + set WXWIN=c:\wx2 + + You'll probably want to add that last line to your autoexec.bat or + System Properties depending on the type of system you are on. + +D. Change to the wx2\include\wx\msw directory and copy setup0.h to + setup.h and then edit setup.h. This is how you control which parts + of wxWindows are compiled into or left out of the build, simply by + turning options on or off. At a minimum you should set the + following: + + wxUSE_NEW_GRID 1 + wxUSE_GLOBAL_MEMORY_OPERATORS 0 + wxUSE_LIBTIFF 1 + wxUSE_GLCANVAS 1 + wxDIALOG_UNIT_COMPATIBILITY 0 + + I also turn off the following as they are not currently used in + wxPython. There are probably others that can be turned off to + help save space, but I havn't investigated all the potential + configurations yet. Please note that wxPython doesn't (yet) check + these flags for its own build, so if you turn off something that + wxPython expects then you'll get link errors later on. + + wxUSE_DIALUP_MANAGER 0 + wxUSE_DYNLIB_CLASS 0 + wxUSE_DOC_VIEW_ARCHITECTURE 0 + wxUSE_MDI_ARCHITECTURE 0 + wxUSE_PLOT 0 + wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0 + + + + +2. Build the wxWindows DLL +--------------------------- + +A. Although MSVC project files are provided I always use the makefiles + to build wxWindows because by default the flags are compatible with + Python, (and I make sure they stay that way.) You would have to + edit the project files a bit to make it work otherwise. + +B. There are three different types of wxWindows DLLs that can be + produced by the VC makefile simply by providing a flag on the nmake + command-line, I call the three types DEBUG, FINAL, and HYBRID. + (The last one is brand new, you'll need my version of the 2.2.2 + sources to get the HYBRID capability.) Here are some more details: + + DEBUG Specified with "FINAL=0" and produces a DLL named + wx[version]d.dll. This DLL is compiled with full + debugging information and with the __WXDEBUG__ set which + enables some debugging-only code in wxWindows such as + assertions and failure log messages. The /MDd flag is + used which means that it is linked with the debugging + version of the C runtime library and also that you must + use the debugging version of Python, (python_d.exe and + pythonXX_d.dll) which also means that all extensions + loaded by Python should also have the _d in the name. + With this option you can use the MSVC debugger to trace + though the Python interpreter, as well as the code for the + wxPython extension and the wxWindows DLL. + + FINAL Specified with "FINAL=1" and produces a DLL named + wx[version].dll. This DLL is compiled with optimizations + turned on and without debugging information and without + __WXDEBUG__. The /MD flag is used which means that you + can use this version with the standard python.exe. This + is the version that I use when making the binary installer + for win32. + + HYBRID Specified with "FINAL=hybrid" and produces a DLL named + wx[version]h.dll. This DLL is almost the same as the + DEBUG version except the /MD flag is used which means that + you can use the standard python.exe but you still get the + debugging info and the __WXDEBUG__ code enabled. With the + debugger you can trace through the the code for the + wxPython extension and the wxWindows DLL, but not the + Python interpreter. You might use this version when you + want to deploy a wxPython app with the __WXDEBUG__ code + enabled. I use this mode most of the time during + development simply because it's easier than having to + remember to type python_d all the time. + + Since different DLL names and object file directories are used you + can build all three types if you like. + +C. Change to the wx2\src\msw directory and type the following command, + using the value for FINAL that you want: + + nmake -f makefile.vc dll pch USE_GLCANVAS=1 FINAL=hybrid + + Your machine will then crunch away for possibly a long time, + depending on your hardware, and when it's done you should have a + DLL and some library files in \wx2\lib. + +D. You'll either need to add \wx2\lib to the PATH or copy the DLL file + to a directory already on the PATH so the DLL can be found at runtime. + +E. You can test your build by changing to one of the directories under + \wx2\samples or \wx2\demos and typing (using the right FINAL flag): + + nmake -f makefile.vc FINAL=hybrid WXUSINGDLL=1 + + and then executing the resulting .exe file. + + + +3. Get the wxPython sources +--------------------------- + +A. You have the same options (and same advantages/disadvantages) for + getting the wxPython source, either a released snapshot or from + CVS. The released version file is named wxPython-[version].tar.gz + and is available at http://wxpython.org/download.php. You can use + WinZip to unpack it if you don't have tar and gzip. If you want to + use CVS you'll find wxPython in the wxWindows CVS tree (see above) + in the wxWindows/wxPython directory. + + + +4. Build and Install wxPython +----------------------------- + +A. As mentioned previouslly, wxPython is built with the standard + Python Distutils tool. If you are using Python 2.0c1 or later you + are all set, otherwise you need to download and install Distutils + 1.0 from http://www.python.org/sigs/distutils-sig/. + +B. Change to the root wxPython directory and look at the setup.py + file. This is the script that configures and defines all the + information that Distutils needs to build wxPython. There are some + options near the begining of the script that you may want or need + to change based on what options you have selected up to this point, + (type of DLL built, sources from tar.gz or from CVS, etc.) You can + either change these flags directly in setup.py or supply them on + the command-line. + + BUILD_GLCANVAS Set to zero if you don't want to build the + Open GL canvas extension module. + + BUILD_OGL Set to zero if you don't want to build the + Object Graphics Library extension module. + + BUILD_STC Set to zero if you don't want to build the + wxStyledTextCtrl (the Scintilla wrapper) + extension module. + + USE_SWIG If you have edited any of the *.i files you + will need to set this flag to non-zero so SWIG + will be executed to regenerate the wrapper C++ + and shadow python files. + + IN_CVS_TREE If you are using the CVS version of the + wxWindows and wxPython sources then you will + need to set this flag to non-zero. This is + needed because some source files from the + wxWindows tree are copied to be under the + wxPython tree in order to keep Distutils happy. + With this flag set then setup.py will + automatically keep these copied sources up to + date if the original version is ever updated. + If you are using the tar.gz version of the + Python sources then these copied sources are + already present in your source tree. + + +C. To build and install wxPython you simply need to execute the + setup.py script. If you have more than one version of Python + installed, be sure to execute setup.py with the version you want to + build wxPython for. + + Depending on what kind of wxWindows DLL you built there are + different command-line parameters you'll want to pass to setup (in + addition to possibly one or more of the above): + + FINAL: python setup.py install + + DEBUG: python setup.py build --debug install + + HYBRID: python setup.py HYBRID=1 install + + +D. At this point you should be able to change into the wxPython\demo + directory and run the demo: + + python demo.py + +E. If you would like to make a test build that doesn't overwrite the + installed version of wxPython you can do so with one of these + commands instead of the install command above: + + FINAL: python setup.py build_ext --inplace + + DEBUG: python setup.py build_ext --debug --inplace + + HYBRID: python setup.py HYBRID=1 build_ext --inplace + + This will build the wxPython package in the local wxPython + directory instead of installing it under your Python installation. + To run using this test version just add the base wxPython source + directory to the PYTHONPATH: + + set PYTHONPATH=c:\wx2\wxPython + cd c:\wx2\wxPython\demo + python demo.py + + +That's all folks! + + +----------------- +robin@alldunn.com + diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index a64317d078..3eb11fdc7f 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -2,11 +2,62 @@ CHANGES.txt for wxPython ---------------------------------------------------------------------- +New in 2.2.2 +------------ + +Significantly changed how the wxStyledtextCtrl code that wraps +Scintilla is implemented. Most of it is now automatically generated +from an interface definition file provided by Scintilla. This means +that it will be much easier to stay in sync with new Scintilla +releases, but also means that some of the method and identifier names +have changed. See wxPython/demo/data/stc.h for a copy of the C++ +interface from which the Python interface is generated. There is now +some inline documentation in that file that should really help explain +how things work. + +I am now using the Python Distutils to build wxPython and to make some +of the distribution files. (See http://www.python.org/sigs/distutils-sig/) +This means no more messing with my kludgy build.py/Makefile hack, +builds will be more consistent with other Python extensions that also +use Distutils, and will hopefully make wxPython easier to build for +platforms where there have been troubles before. If you are building +wxPython for Python 1.5.2 or for 1.6, then you will need to get and +install version 1.0 of Distutils from the website above. If you are +using Python 2.0 then you already have it. + +Added wxInputStream and the wxFileSystem family of classes, +contributed by Joerg Baumann. + +Added wxProcess and support for it to wxExecute. wxProcess lets you +get notified when an asyncronous child process terminates, and also to +get input/output streams for the child process's stdout, stderr and +stdin. + +Removed the old python sizers. + +Added __add__, __sub__ and __cmp__ (equality check only) for wxPoint +and wxRealPoint. + +Changed the build to make one big extension module instead of one for +the core and each contrib. This allowed me to do away with the +libwxPyHelpers.so on unix systems. + +Lots of little fixes here and there. + +Some hacks on wxGTK to try and make the AutoComplete listbox in the +wxStyledTextCtrl to behave better. It's still not as nice as on +wxMSW, but at least it's a bit more usable now. + + + + New in 2.2.1 ------------ Various tweaks, fixes, missing methods, etc. +Added example use of wxTaskBarIcon to the demo. + New in 2.2.0 diff --git a/wxPython/MANIFEST.in b/wxPython/MANIFEST.in new file mode 100644 index 0000000000..eaffe899e6 --- /dev/null +++ b/wxPython/MANIFEST.in @@ -0,0 +1,92 @@ +include *.txt +include my_distutils.py +## include my_install_data.py +include licence/*.txt + +include demo/*.py +include demo/bitmaps/*.bmp +include demo/bitmaps/*.ico +include demo/bitmaps/*.gif +include demo/bitmaps/*.png +include demo/bitmaps/*.jpg +include demo/README.txt +include demo/*.xml +include demo/data/*.png +include demo/data/*.htm +include demo/data/*.html +include demo/data/*.bmp +include demo/data/*.txt +include demo/data/*.i +include demo/data/*.h +include demo/data/*.py + +include wxPython/lib/*.py +include wxPython/lib/*.txt +include wxPython/lib/editor/*.py +include wxPython/lib/editor/*.txt + +exclude wxPython/* +exclude tests +exclude SWIG + +include src/*.i +include src/*.py +include src/*.cpp +include src/*.c +include src/*.h +include src/*.ico +include src/*.rc + +include src/msw/*.cpp +include src/msw/*.h +include src/msw/*.py + +include src/gtk/*.cpp +include src/gtk/*.h +include src/gtk/*.py + +# src/motif/*.cpp +# src/motif/*.h +# src/motif/*.py + + +include contrib/glcanvas/*.i +include contrib/glcanvas/*.py +include contrib/glcanvas/*.cpp +include contrib/glcanvas/*.c +include contrib/glcanvas/*.h +include contrib/glcanvas/msw/*.cpp +include contrib/glcanvas/msw/*.h +include contrib/glcanvas/msw/*.py +include contrib/glcanvas/gtk/*.cpp +include contrib/glcanvas/gtk/*.h +include contrib/glcanvas/gtk/*.py + +include contrib/ogl/*.txt +include contrib/ogl/*.i +include contrib/ogl/*.py +include contrib/ogl/*.cpp +include contrib/ogl/*.c +include contrib/ogl/*.h +include contrib/ogl/contrib/include/wx/ogl/*.h +include contrib/ogl/contrib/src/ogl/*.cpp + +include contrib/stc/*.txt +include contrib/stc/*.i +include contrib/stc/*.py +include contrib/stc/*.cpp +include contrib/stc/*.c +include contrib/stc/*.h +include contrib/stc/*.cpp +include contrib/stc/*.py +include contrib/stc/contrib/include/wx/stc/*.h +include contrib/stc/contrib/src/stc/*.h +include contrib/stc/contrib/src/stc/*.cpp +include contrib/stc/contrib/src/stc/*.txt +include contrib/stc/contrib/src/stc/*.py +include contrib/stc/contrib/src/stc/*.in +include contrib/stc/contrib/src/stc/scintilla/include/*.h +include contrib/stc/contrib/src/stc/scintilla/include/*.iface +include contrib/stc/contrib/src/stc/scintilla/src/*.h +include contrib/stc/contrib/src/stc/scintilla/src/*.cxx + diff --git a/wxPython/README.txt b/wxPython/README.txt index 0f9c572cdb..cbdb711319 100644 --- a/wxPython/README.txt +++ b/wxPython/README.txt @@ -46,16 +46,15 @@ Getting Help ------------ Since wxPython is a blending of multiple technologies, help comes from -multiple sources. See the http://alldunn.com/wxPython for details on -various sources of help, but probably the best source is the -wxPython-users mail list. You can view the archive or subscribe by -going to +multiple sources. See the http://wxPython.org/ for details on various +sources of help, but probably the best source is the wxPython-users +mail list. You can view the archive or subscribe by going to - http://wxwindows.org/mailman/listinfo/wxpython-users + http://lists.sourceforge.net/mailman/listinfo/wxpython-users Or you can send mail directly to the list using this address: - wxpython-users@wxwindows.org + wxpython-users@lists.sourceforge.net Other Info @@ -66,13 +65,15 @@ Please also see the following files in this directory: CHANGES.txt Information about new features, fixes, etc. in each release. - BUILD.txt Instructions for building wxPython on various - platforms. + BUILD.unix.txt Instructions for building wxPython on various + Unix-like platforms. - licence.txt Text of the wxWindows license. + BUILD.win32.txt Instructions for building wxPython on Windows. + licence/* Text of the wxWindows license. ----------------- + +----------------- Robin Dunn robin@alldunn.com diff --git a/wxPython/SWIG/README.txt b/wxPython/SWIG/README.txt new file mode 100644 index 0000000000..2343c669bb --- /dev/null +++ b/wxPython/SWIG/README.txt @@ -0,0 +1,6 @@ + +Some minor tweaks were made to these files to allow wxPython to build +with Python 1.6. Just put these in your swig_lib/python dir and +you'll be all set. These are from SWIG 1.1-810, (yes, I am a bit +behind.) + diff --git a/wxPython/SWIG/pyexp.swg b/wxPython/SWIG/pyexp.swg new file mode 100644 index 0000000000..ab6ecf5400 --- /dev/null +++ b/wxPython/SWIG/pyexp.swg @@ -0,0 +1,29 @@ +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif diff --git a/wxPython/SWIG/typemaps.i b/wxPython/SWIG/typemaps.i new file mode 100644 index 0000000000..041a00a818 --- /dev/null +++ b/wxPython/SWIG/typemaps.i @@ -0,0 +1,561 @@ +// +// SWIG Typemap library +// Dave Beazley +// May 5, 1997 +// +// Python implementation +// +// This library provides standard typemaps for modifying SWIG's behavior. +// With enough entries in this file, I hope that very few people actually +// ever need to write a typemap. +// +// Disclaimer : Unless you really understand how typemaps work, this file +// probably isn't going to make much sense. +// +#ifdef AUTODOC +%section "Typemap Library (Python)",info,after,pre,nosort,skip=1,chop_left=3,chop_right=0,chop_top=0,chop_bottom=0 +%text %{ +%include typemaps.i + +The SWIG typemap library provides a language independent mechanism for +supporting output arguments, input values, and other C function +calling mechanisms. The primary use of the library is to provide a +better interface to certain C function--especially those involving +pointers. +%} + +#endif + +// ------------------------------------------------------------------------ +// Pointer handling +// +// These mappings provide support for input/output arguments and common +// uses for C/C++ pointers. +// ------------------------------------------------------------------------ + +// INPUT typemaps. +// These remap a C pointer to be an "INPUT" value which is passed by value +// instead of reference. + + +#ifdef AUTODOC +%subsection "Input Methods" + +%text %{ +The following methods can be applied to turn a pointer into a simple +"input" value. That is, instead of passing a pointer to an object, +you would use a real value instead. + + int *INPUT + short *INPUT + long *INPUT + unsigned int *INPUT + unsigned short *INPUT + unsigned long *INPUT + unsigned char *INPUT + float *INPUT + double *INPUT + +To use these, suppose you had a C function like this : + + double fadd(double *a, double *b) { + return *a+*b; + } + +You could wrap it with SWIG as follows : + + %include typemaps.i + double fadd(double *INPUT, double *INPUT); + +or you can use the %apply directive : + + %include typemaps.i + %apply double *INPUT { double *a, double *b }; + double fadd(double *a, double *b); + +%} +#endif + +%typemap(python,in) double *INPUT(double temp) +{ + temp = PyFloat_AsDouble($source); + $target = &temp; +} + +%typemap(python,in) float *INPUT(float temp) +{ + temp = (float) PyFloat_AsDouble($source); + $target = &temp; +} + +%typemap(python,in) int *INPUT(int temp) +{ + temp = (int) PyInt_AsLong($source); + $target = &temp; +} + +%typemap(python,in) short *INPUT(short temp) +{ + temp = (short) PyInt_AsLong($source); + $target = &temp; +} + +%typemap(python,in) long *INPUT(long temp) +{ + temp = (long) PyInt_AsLong($source); + $target = &temp; +} +%typemap(python,in) unsigned int *INPUT(unsigned int temp) +{ + temp = (unsigned int) PyInt_AsLong($source); + $target = &temp; +} +%typemap(python,in) unsigned short *INPUT(unsigned short temp) +{ + temp = (unsigned short) PyInt_AsLong($source); + $target = &temp; +} +%typemap(python,in) unsigned long *INPUT(unsigned long temp) +{ + temp = (unsigned long) PyInt_AsLong($source); + $target = &temp; +} +%typemap(python,in) unsigned char *INPUT(unsigned char temp) +{ + temp = (unsigned char) PyInt_AsLong($source); + $target = &temp; +} + +%typemap(python,in) signed char *INPUT(signed char temp) +{ + temp = (unsigned char) PyInt_AsLong($source); + $target = &temp; +} + +// OUTPUT typemaps. These typemaps are used for parameters that +// are output only. The output value is appended to the result as +// a list element. + +#ifdef AUTODOC +%subsection "Output Methods" + +%text %{ +The following methods can be applied to turn a pointer into an "output" +value. When calling a function, no input value would be given for +a parameter, but an output value would be returned. In the case of +multiple output values, they are returned in the form of a Python tuple. + + int *OUTPUT + short *OUTPUT + long *OUTPUT + unsigned int *OUTPUT + unsigned short *OUTPUT + unsigned long *OUTPUT + unsigned char *OUTPUT + float *OUTPUT + double *OUTPUT + +A Python List can also be returned by using L_OUTPUT instead of OUTPUT. + +For example, suppose you were trying to wrap the modf() function in the +C math library which splits x into integral and fractional parts (and +returns the integer part in one of its parameters).K: + + double modf(double x, double *ip); + +You could wrap it with SWIG as follows : + + %include typemaps.i + double modf(double x, double *OUTPUT); + +or you can use the %apply directive : + + %include typemaps.i + %apply double *OUTPUT { double *ip }; + double modf(double x, double *ip); + +The Python output of the function would be a tuple containing both +output values. +%} +#endif + +// Helper function for List output + +%{ +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} +%} + +// Force the argument to be ignored. + +%typemap(python,ignore) int *L_OUTPUT(int temp), + short *L_OUTPUT(short temp), + long *L_OUTPUT(long temp), + unsigned int *L_OUTPUT(unsigned int temp), + unsigned short *L_OUTPUT(unsigned short temp), + unsigned long *L_OUTPUT(unsigned long temp), + unsigned char *L_OUTPUT(unsigned char temp), + signed char *L_OUTPUT(signed char temp), + float *L_OUTPUT(float temp), + double *L_OUTPUT(double temp) +{ + $target = &temp; +} + +%typemap(python,argout) int *L_OUTPUT, + short *L_OUTPUT, + long *L_OUTPUT, + unsigned int *L_OUTPUT, + unsigned short *L_OUTPUT, + unsigned long *L_OUTPUT, + unsigned char *L_OUTPUT, + signed char *L_OUTPUT +{ + PyObject *o; + o = PyInt_FromLong((long) (*$source)); + l_output_helper($target,o); +} + +%typemap(python,argout) float *L_OUTPUT, + double *L_OUTPUT +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*$source)); + $target = l_output_helper($target,o); +} + +// These typemaps contributed by Robin Dunn +//---------------------------------------------------------------------- +// +// T_OUTPUT typemap (and helper function) to return multiple argouts as +// a tuple instead of a list. +// +// Author: Robin Dunn +//---------------------------------------------------------------------- + +%{ +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} +%} + +// Force the argument to be ignored. +%typemap(python,ignore) int *T_OUTPUT(int temp), + short *T_OUTPUT(short temp), + long *T_OUTPUT(long temp), + unsigned int *T_OUTPUT(unsigned int temp), + unsigned short *T_OUTPUT(unsigned short temp), + unsigned long *T_OUTPUT(unsigned long temp), + unsigned char *T_OUTPUT(unsigned char temp), + float *T_OUTPUT(float temp), + double *T_OUTPUT(double temp) +{ + $target = &temp; +} + +%typemap(python,argout) int *T_OUTPUT, + short *T_OUTPUT, + long *T_OUTPUT, + unsigned int *T_OUTPUT, + unsigned short *T_OUTPUT, + unsigned long *T_OUTPUT, + unsigned char *T_OUTPUT +{ + PyObject *o; + o = PyInt_FromLong((long) (*$source)); + $target = t_output_helper($target, o); +} + +%typemap(python,argout) float *T_OUTPUT, + double *T_OUTPUT +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*$source)); + $target = t_output_helper($target, o); +} + +// Set the default output typemap + +#ifdef OUTPUT_LIST +%typemap(python,ignore) int *OUTPUT = int *L_OUTPUT; +%typemap(python,ignore) short *OUTPUT = short *L_OUTPUT; +%typemap(python,ignore) long *OUTPUT = long *L_OUTPUT; +%typemap(python,ignore) unsigned *OUTPUT = unsigned *L_OUTPUT; +%typemap(python,ignore) unsigned short *OUTPUT = unsigned short *L_OUTPUT; +%typemap(python,ignore) unsigned long *OUTPUT = unsigned long *L_OUTPUT; +%typemap(python,ignore) unsigned char *OUTPUT = unsigned char *L_OUTPUT; +%typemap(python,ignore) signed char *OUTPUT = signed char *L_OUTPUT; +%typemap(python,ignore) double *OUTPUT = double *L_OUTPUT; +%typemap(python,ignore) float *OUTPUT = float *L_OUTPUT; + +%typemap(python,argout) int *OUTPUT = int *L_OUTPUT; +%typemap(python,argout) short *OUTPUT = short *L_OUTPUT; +%typemap(python,argout) long *OUTPUT = long *L_OUTPUT; +%typemap(python,argout) unsigned *OUTPUT = unsigned *L_OUTPUT; +%typemap(python,argout) unsigned short *OUTPUT = unsigned short *L_OUTPUT; +%typemap(python,argout) unsigned long *OUTPUT = unsigned long *L_OUTPUT; +%typemap(python,argout) unsigned char *OUTPUT = unsigned char *L_OUTPUT; +%typemap(python,argout) signed char *OUTPUT = signed char *L_OUTPUT; +%typemap(python,argout) double *OUTPUT = double *L_OUTPUT; +%typemap(python,argout) float *OUTPUT = float *L_OUTPUT; +#else +%typemap(python,ignore) int *OUTPUT = int *T_OUTPUT; +%typemap(python,ignore) short *OUTPUT = short *T_OUTPUT; +%typemap(python,ignore) long *OUTPUT = long *T_OUTPUT; +%typemap(python,ignore) unsigned *OUTPUT = unsigned *T_OUTPUT; +%typemap(python,ignore) unsigned short *OUTPUT = unsigned short *T_OUTPUT; +%typemap(python,ignore) unsigned long *OUTPUT = unsigned long *T_OUTPUT; +%typemap(python,ignore) unsigned char *OUTPUT = unsigned char *T_OUTPUT; +%typemap(python,ignore) signed char *OUTPUT = signed char *T_OUTPUT; +%typemap(python,ignore) double *OUTPUT = double *T_OUTPUT; +%typemap(python,ignore) float *OUTPUT = float *T_OUTPUT; + +%typemap(python,argout) int *OUTPUT = int *T_OUTPUT; +%typemap(python,argout) short *OUTPUT = short *T_OUTPUT; +%typemap(python,argout) long *OUTPUT = long *T_OUTPUT; +%typemap(python,argout) unsigned *OUTPUT = unsigned *T_OUTPUT; +%typemap(python,argout) unsigned short *OUTPUT = unsigned short *T_OUTPUT; +%typemap(python,argout) unsigned long *OUTPUT = unsigned long *T_OUTPUT; +%typemap(python,argout) unsigned char *OUTPUT = unsigned char *T_OUTPUT; +%typemap(python,argout) signed char *OUTPUT = signed char *T_OUTPUT; +%typemap(python,argout) double *OUTPUT = double *T_OUTPUT; +%typemap(python,argout) float *OUTPUT = float *T_OUTPUT; +#endif + +// INOUT +// Mappings for an argument that is both an input and output +// parameter + + +#ifdef AUTODOC +%subsection "Input/Output Methods" + +%text %{ +The following methods can be applied to make a function parameter both +an input and output value. This combines the behavior of both the +"INPUT" and "OUTPUT" methods described earlier. Output values are +returned in the form of a Python tuple. To return a Python list, +using L_INOUT instead. + + int *INOUT + short *INOUT + long *INOUT + unsigned int *INOUT + unsigned short *INOUT + unsigned long *INOUT + unsigned char *INOUT + float *INOUT + double *INOUT + +For example, suppose you were trying to wrap the following function : + + void neg(double *x) { + *x = -(*x); + } + +You could wrap it with SWIG as follows : + + %include typemaps.i + void neg(double *INOUT); + +or you can use the %apply directive : + + %include typemaps.i + %apply double *INOUT { double *x }; + void neg(double *x); + +Unlike C, this mapping does not directly modify the input value (since +this makes no sense in Python). Rather, the modified input value shows +up as the return value of the function. Thus, to apply this function +to a Python variable you might do this : + + x = neg(x) + +Note : previous versions of SWIG used the symbol 'BOTH' to mark +input/output arguments. This is still supported, but will be slowly +phased out in future releases. +%} + +#endif + +%typemap(python,in) int *INOUT = int *INPUT; +%typemap(python,in) short *INOUT = short *INPUT; +%typemap(python,in) long *INOUT = long *INPUT; +%typemap(python,in) unsigned *INOUT = unsigned *INPUT; +%typemap(python,in) unsigned short *INOUT = unsigned short *INPUT; +%typemap(python,in) unsigned long *INOUT = unsigned long *INPUT; +%typemap(python,in) unsigned char *INOUT = unsigned char *INPUT; +%typemap(python,in) float *INOUT = float *INPUT; +%typemap(python,in) double *INOUT = double *INPUT; + +%typemap(python,argout) int *INOUT = int *OUTPUT; +%typemap(python,argout) short *INOUT = short *OUTPUT; +%typemap(python,argout) long *INOUT = long *OUTPUT; +%typemap(python,argout) unsigned *INOUT = unsigned *OUTPUT; +%typemap(python,argout) unsigned short *INOUT = unsigned short *OUTPUT; +%typemap(python,argout) unsigned long *INOUT = unsigned long *OUTPUT; +%typemap(python,argout) unsigned char *INOUT = unsigned char *OUTPUT; +%typemap(python,argout) float *INOUT = float *OUTPUT; +%typemap(python,argout) double *INOUT = double *OUTPUT; + +%typemap(python,in) int *T_INOUT = int *INPUT; +%typemap(python,in) short *T_INOUT = short *INPUT; +%typemap(python,in) long *T_INOUT = long *INPUT; +%typemap(python,in) unsigned *T_INOUT = unsigned *INPUT; +%typemap(python,in) unsigned short *T_INOUT = unsigned short *INPUT; +%typemap(python,in) unsigned long *T_INOUT = unsigned long *INPUT; +%typemap(python,in) unsigned char *T_INOUT = unsigned char *INPUT; +%typemap(python,in) float *T_INOUT = float *INPUT; +%typemap(python,in) double *T_INOUT = double *INPUT; + +%typemap(python,argout) int *T_INOUT = int *T_OUTPUT; +%typemap(python,argout) short *T_INOUT = short *T_OUTPUT; +%typemap(python,argout) long *T_INOUT = long *T_OUTPUT; +%typemap(python,argout) unsigned *T_INOUT = unsigned *T_OUTPUT; +%typemap(python,argout) unsigned short *T_INOUT = unsigned short *T_OUTPUT; +%typemap(python,argout) unsigned long *T_INOUT = unsigned long *T_OUTPUT; +%typemap(python,argout) unsigned char *T_INOUT = unsigned char *T_OUTPUT; +%typemap(python,argout) float *T_INOUT = float *T_OUTPUT; +%typemap(python,argout) double *T_INOUT = double *T_OUTPUT; + +%typemap(python,in) int *L_INOUT = int *INPUT; +%typemap(python,in) short *L_INOUT = short *INPUT; +%typemap(python,in) long *L_INOUT = long *INPUT; +%typemap(python,in) unsigned *L_INOUT = unsigned *INPUT; +%typemap(python,in) unsigned short *L_INOUT = unsigned short *INPUT; +%typemap(python,in) unsigned long *L_INOUT = unsigned long *INPUT; +%typemap(python,in) unsigned char *L_INOUT = unsigned char *INPUT; +%typemap(python,in) float *L_INOUT = float *INPUT; +%typemap(python,in) double *L_INOUT = double *INPUT; + +%typemap(python,argout) int *L_INOUT = int *L_OUTPUT; +%typemap(python,argout) short *L_INOUT = short *L_OUTPUT; +%typemap(python,argout) long *L_INOUT = long *L_OUTPUT; +%typemap(python,argout) unsigned *L_INOUT = unsigned *L_OUTPUT; +%typemap(python,argout) unsigned short *L_INOUT = unsigned short *L_OUTPUT; +%typemap(python,argout) unsigned long *L_INOUT = unsigned long *L_OUTPUT; +%typemap(python,argout) unsigned char *L_INOUT = unsigned char *L_OUTPUT; +%typemap(python,argout) float *L_INOUT = float *L_OUTPUT; +%typemap(python,argout) double *L_INOUT = double *L_OUTPUT; + +// Backwards compatibility + +%typemap(python,in) int *BOTH = int *INOUT; +%typemap(python,in) short *BOTH = short *INOUT; +%typemap(python,in) long *BOTH = long *INOUT; +%typemap(python,in) unsigned *BOTH = unsigned *INOUT; +%typemap(python,in) unsigned short *BOTH = unsigned short *INOUT; +%typemap(python,in) unsigned long *BOTH = unsigned long *INOUT; +%typemap(python,in) unsigned char *BOTH = unsigned char *INOUT; +%typemap(python,in) float *BOTH = float *INOUT; +%typemap(python,in) double *BOTH = double *INOUT; + +%typemap(python,argout) int *BOTH = int *INOUT; +%typemap(python,argout) short *BOTH = short *INOUT; +%typemap(python,argout) long *BOTH = long *INOUT; +%typemap(python,argout) unsigned *BOTH = unsigned *INOUT; +%typemap(python,argout) unsigned short *BOTH = unsigned short *INOUT; +%typemap(python,argout) unsigned long *BOTH = unsigned long *INOUT; +%typemap(python,argout) unsigned char *BOTH = unsigned char *INOUT; +%typemap(python,argout) float *BOTH = float *INOUT; +%typemap(python,argout) double *BOTH = double *INOUT; + +%typemap(python,in) int *T_BOTH = int *T_INOUT; +%typemap(python,in) short *T_BOTH = short *T_INOUT; +%typemap(python,in) long *T_BOTH = long *T_INOUT; +%typemap(python,in) unsigned *T_BOTH = unsigned *T_INOUT; +%typemap(python,in) unsigned short *T_BOTH = unsigned short *T_INOUT; +%typemap(python,in) unsigned long *T_BOTH = unsigned long *T_INOUT; +%typemap(python,in) unsigned char *T_BOTH = unsigned char *T_INOUT; +%typemap(python,in) float *T_BOTH = float *T_INOUT; +%typemap(python,in) double *T_BOTH = double *T_INOUT; + +%typemap(python,argout) int *T_BOTH = int *T_INOUT; +%typemap(python,argout) short *T_BOTH = short *T_INOUT; +%typemap(python,argout) long *T_BOTH = long *T_INOUT; +%typemap(python,argout) unsigned *T_BOTH = unsigned *T_INOUT; +%typemap(python,argout) unsigned short *T_BOTH = unsigned short *T_INOUT; +%typemap(python,argout) unsigned long *T_BOTH = unsigned long *T_INOUT; +%typemap(python,argout) unsigned char *T_BOTH = unsigned char *T_INOUT; +%typemap(python,argout) float *T_BOTH = float *T_INOUT; +%typemap(python,argout) double *T_BOTH = double *T_INOUT; + +// -------------------------------------------------------------------- +// Special types +// +// -------------------------------------------------------------------- + +#ifdef AUTODOC +%subsection "Special Methods" + +%text %{ +The typemaps.i library also provides the following mappings : + +PyObject * + + When a PyObject * appears as either an input value or return + value of a function, SWIG passes it through unmodified. Thus, + if you want to write a C function that operates on PyObjects, + it is easy to write. For example : + + %include typemaps.i + PyObject *spam(PyObject *obj1, int n); + + Unlike normal Python wrapper functions, These functions can + use any combination of parameters that you wish. + +%} + +#endif + + +// If a PyObject * appears as either an argument or a function return +// value, simply pass it straight through. + +%typemap(python,in) PyObject * { + $target = $source; +} + +%typemap(python,out) PyObject * { + $target = $source; +} + diff --git a/wxPython/b b/wxPython/b new file mode 100755 index 0000000000..c6ac5afd3f --- /dev/null +++ b/wxPython/b @@ -0,0 +1,53 @@ +#!/bin/sh + +if [ "$1" = "15" ]; then + PYVER=1.5 + shift +elif [ "$1" = "20" ]; then + PYVER=2.0 + shift +fi + + +SETUP="python$PYVER -u setup.py" +FLAGS="USE_SWIG=1 IN_CVS_TREE=1" +OTHERFLAGS="" + + + +# "c" --> clean +if [ "$1" = "c" ]; then + shift + CMD="$SETUP $FLAGS $OTHERFLAGS clean" + OTHERCMD="rm -f wxPython/*.so" + +# "i" --> install +elif [ "$1" = "i" ]; then + shift + CMD="$SETUP build $OTHERFLAGS install" + +# "s" --> source dist +elif [ "$1" = "s" ]; then + shift + CMD="$SETUP $OTHERFLAGS sdist" + +# "r" --> rpm dist +elif [ "$1" = "r" ]; then + shift + CMD="$SETUP $OTHERFLAGS bdist_rpm" + +# (no command arg) --> normal build for development +else + CMD="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*" +fi + + +echo $CMD +$CMD + + +if [ "$OTHERCMD" != "" ]; then + echo $OTHERCMD + $OTHERCMD +fi + diff --git a/wxPython/b.bat b/wxPython/b.bat new file mode 100755 index 0000000000..8c3b04a970 --- /dev/null +++ b/wxPython/b.bat @@ -0,0 +1,56 @@ +@echo off +setlocal + +set FLAGS=USE_SWIG=1 IN_CVS_TREE=1 + + +rem Use non-default python? +iff "%1" == "15" .or. "%1" == "20" then + set SETUP=c:\tools\python%1%\python.exe -u setup.py + shift +else + set SETUP=python -u setup.py +endiff + + + +rem "c" --> clean +iff "%1" == "c" then + shift + set CMD=%SETUP% %FLAGS% clean + set OTHERCMD=del wxPython\*.pyd + +rem just remove the *.pyd's +elseiff "%1" == "d" then + shift + set CMD=del wxPython\*.pyd + +rem "i" --> install +elseiff "%1" == "i" then + shift + set CMD=%SETUP% build install + +rem "s" --> source dist +elseiff "%1" == "s" then + shift + set CMD=%SETUP sdist + +rem "f" --> FINAL +elseiff "%1" == "f" then + shift + set CMD=%SETUP% %FLAGS% FINAL=1 build_ext --inplace %1 %2 %3 %4 %5 %6 %7 %8 %9 + +rem (no command arg) --> normal build for development +else + set CMD=%SETUP% %FLAGS% HYBRID=1 build_ext --inplace %1 %2 %3 %4 %5 %6 %7 %8 %9 +endiff + + + +echo %CMD% +%CMD% + +iff "%OTHERCMD%" != "" then + %OTHERCMD% +endiff + diff --git a/wxPython/buildall b/wxPython/buildall deleted file mode 100755 index 8dc24f4aa3..0000000000 --- a/wxPython/buildall +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -cd src -python ../distrib/build.py $* -if [ "$?" != "0" ]; then - exit 1 -fi - -cd ../contrib -python buildall.py $* -cd .. - diff --git a/wxPython/buildall.bat b/wxPython/buildall.bat deleted file mode 100755 index 353b28901b..0000000000 --- a/wxPython/buildall.bat +++ /dev/null @@ -1,10 +0,0 @@ - -cd src -python ..\distrib\build.py %1 %2 %3 %4 %5 %6 %7 %8 %9 - -cd ..\contrib -python .\buildall.py %1 %2 %3 %4 %5 %6 %7 %8 %9 - - -cd .. - diff --git a/wxPython/contrib/buildall.py b/wxPython/contrib/buildall.py deleted file mode 100755 index 561f3bbac1..0000000000 --- a/wxPython/contrib/buildall.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -#---------------------------------------------------------------------------- -# Name: buildall.py -# Purpose: Invokes the build script for all modules defined in -# MODULELIST -# -# Author: Robin Dunn -# -# Created: 18-Aug-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1999 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -import sys, os -sys.path.insert(0, '../distrib') -import build - -MODULELIST = ['glcanvas', 'ogl', 'stc', ] -sys.argv[0] = '../../distrib/build.py' - - -for module in MODULELIST: - cwd = os.getcwd() - print "**** Building %s ****" % module - err = build.main([sys.argv[0], '-C', module] + sys.argv[1:]) - os.chdir(cwd) - if err: - break - -sys.exit(err) diff --git a/wxPython/contrib/glcanvas/build.cfg b/wxPython/contrib/glcanvas/build.cfg deleted file mode 100644 index 650d8f5735..0000000000 --- a/wxPython/contrib/glcanvas/build.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# -*- python -*- -import sys - -MODULE = 'glcanvasc' -SWIGFILES = ['glcanvas.i', ] - - -if sys.platform == 'win32': -# SOURCES = ['_glcanvas.cpp'] -# OTHERLIBS = 'glu32.lib opengl32.lib' -# OTHERCFLAGS = '-DwxUSE_GLCANVAS=1' -# OTHERRULES = ''' -#_glcanvas.cpp : $(WXDIR)\src\msw\glcanvas.cpp -# copy $(WXDIR)\src\msw\glcanvas.cpp _glcanvas.cpp -#''' - pass - -else: - - #print "Warning: Assuming MesaGL libraries. Override OTHERLIBS in build.local\n"\ - # " if you have native GL!" - #OTHERLIBS = "-lwx_gtk_gl -lMesaGL -lMesaGLU" - OTHERLIBS = "-lwx_gtk_gl -lGL -lGLU" - - diff --git a/wxPython/contrib/glcanvas/glcanvas.i b/wxPython/contrib/glcanvas/glcanvas.i index b4d789ab94..247137b5a1 100644 --- a/wxPython/contrib/glcanvas/glcanvas.i +++ b/wxPython/contrib/glcanvas/glcanvas.i @@ -76,13 +76,33 @@ public: //--------------------------------------------------------------------------- +%typemap(python, in) int *attribList (int *temp) { + int i; + if (PySequence_Check($source)) { + int size = PyObject_Length($source); + temp = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); + for (i = 0; i < size; i++) { + temp[i] = PyInt_AsLong(PySequence_GetItem($source, i)); + } + temp[size] = 0; + $target = temp; + } +} + +%typemap(python, freearg) int *attribList +{ + delete [] $source; +} + + + class wxGLCanvas : public wxScrolledWindow { public: wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxPyDefaultPosition, const wxSize& size = wxPyDefaultSize, long style = 0, const char* name = "GLCanvas", - int *attribList = 0, + int *attribList = NULL, const wxPalette& palette = wxNullPalette); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" diff --git a/wxPython/contrib/glcanvas/glcanvasc.def b/wxPython/contrib/glcanvas/glcanvasc.def deleted file mode 100644 index 8be1ced94e..0000000000 --- a/wxPython/contrib/glcanvas/glcanvasc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - initglcanvasc diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp index 6ef7517dd6..bf696c96f7 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -470,20 +470,21 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "GLCanvas"; - int * _arg6 = (int *) 0; + int * _arg6 = (int *) NULL; wxPalette * _arg7 = (wxPalette *) &wxNullPalette; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; - PyObject * _argo6 = 0; + int * temp1; + PyObject * _obj6 = 0; PyObject * _argo7 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_argo6,&_argo7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -504,13 +505,19 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * if (! wxSize_helper(_obj3, &_arg3)) return NULL; } - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxGLCanvas. Expected _int_p."); - return NULL; + if (_obj6) +{ + int i; + if (PySequence_Check(_obj6)) { + int size = PyObject_Length(_obj6); + temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); + for (i = 0; i < size; i++) { + temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i)); } + temp1[size] = 0; + _arg6 = temp1; } +} if (_argo7) { if (_argo7 == Py_None) { _arg7 = NULL; } else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) { @@ -530,6 +537,9 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + delete [] _arg6; +} return _resultobj; } @@ -694,7 +704,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -712,6 +724,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxNotifyEvent","_class_wxNotifyEvent",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, @@ -761,6 +774,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -769,6 +783,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -812,6 +827,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -824,11 +840,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, @@ -885,6 +903,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, @@ -930,6 +949,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_class_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, @@ -970,6 +990,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMenu","_wxMenu",0}, @@ -977,6 +998,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1011,6 +1033,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1021,6 +1044,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1029,16 +1053,27 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, @@ -1068,6 +1103,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -1094,6 +1130,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxGLCanvas","_wxGLCanvas",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, @@ -1131,6 +1168,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; diff --git a/wxPython/contrib/glcanvas/msw/glcanvas.cpp b/wxPython/contrib/glcanvas/msw/glcanvas.cpp index ded3a3bb19..02c23f11e0 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/glcanvas.cpp + * FILE : contrib/glcanvas/msw/glcanvas.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -344,20 +344,21 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "GLCanvas"; - int * _arg6 = (int *) 0; + int * _arg6 = (int *) NULL; wxPalette * _arg7 = (wxPalette *) &wxNullPalette; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; - PyObject * _argo6 = 0; + int * temp1; + PyObject * _obj6 = 0; PyObject * _argo7 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_argo6,&_argo7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -378,13 +379,19 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * if (! wxSize_helper(_obj3, &_arg3)) return NULL; } - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxGLCanvas. Expected _int_p."); - return NULL; + if (_obj6) +{ + int i; + if (PySequence_Check(_obj6)) { + int size = PyObject_Length(_obj6); + temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); + for (i = 0; i < size; i++) { + temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i)); } + temp1[size] = 0; + _arg6 = temp1; } +} if (_argo7) { if (_argo7 == Py_None) { _arg7 = NULL; } else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) { @@ -404,6 +411,9 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + delete [] _arg6; +} return _resultobj; } @@ -564,7 +574,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -582,6 +594,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxNotifyEvent","_class_wxNotifyEvent",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, @@ -631,6 +644,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -640,6 +654,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -682,6 +697,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -694,11 +710,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, @@ -756,6 +774,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, @@ -802,6 +821,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_class_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, @@ -842,6 +862,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMetaFileDC","_wxMetaFileDC",0}, @@ -850,6 +871,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -884,6 +906,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -894,6 +917,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -902,17 +926,28 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, @@ -942,6 +977,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -968,6 +1004,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxGLCanvas","_wxGLCanvas",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, @@ -1005,6 +1042,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; diff --git a/wxPython/contrib/glcanvas/stub.cpp b/wxPython/contrib/glcanvas/stub.cpp new file mode 100644 index 0000000000..b675bd21c0 --- /dev/null +++ b/wxPython/contrib/glcanvas/stub.cpp @@ -0,0 +1,24 @@ +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + + + +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initglcanvasc() { +} + + diff --git a/wxPython/contrib/ogl/.cvsignore b/wxPython/contrib/ogl/.cvsignore index 7fde13a490..2def21472a 100644 --- a/wxPython/contrib/ogl/.cvsignore +++ b/wxPython/contrib/ogl/.cvsignore @@ -1,4 +1,5 @@ Makefile +contrib oglc.exp oglc.ilk oglc.pch diff --git a/wxPython/contrib/ogl/_extras.py b/wxPython/contrib/ogl/_oglextras.py similarity index 100% rename from wxPython/contrib/ogl/_extras.py rename to wxPython/contrib/ogl/_oglextras.py diff --git a/wxPython/contrib/ogl/build.cfg b/wxPython/contrib/ogl/build.cfg deleted file mode 100644 index 8feb3ef061..0000000000 --- a/wxPython/contrib/ogl/build.cfg +++ /dev/null @@ -1,52 +0,0 @@ -# -*- python -*- -import sys - -MODULE = 'oglc' -SWIGFILES = ['ogl.i', 'oglbasic.i', 'oglshapes.i', 'oglshapes2.i', 'oglcanvas.i'] -SOURCES = ['oglhelpers.cpp'] - - -OTHERCFLAGS = '-I$(STCLOC)/contrib/include' -SOURCES = SOURCES + [ - '$(STCLOC)/contrib/src/ogl/basic.cpp', - '$(STCLOC)/contrib/src/ogl/bmpshape.cpp', - '$(STCLOC)/contrib/src/ogl/composit.cpp', - '$(STCLOC)/contrib/src/ogl/divided.cpp', - '$(STCLOC)/contrib/src/ogl/lines.cpp', - '$(STCLOC)/contrib/src/ogl/misc.cpp', - '$(STCLOC)/contrib/src/ogl/basic2.cpp', - '$(STCLOC)/contrib/src/ogl/canvas.cpp', - '$(STCLOC)/contrib/src/ogl/constrnt.cpp', - '$(STCLOC)/contrib/src/ogl/drawn.cpp', - '$(STCLOC)/contrib/src/ogl/mfutils.cpp', - '$(STCLOC)/contrib/src/ogl/ogldiag.cpp', - ] - -if sys.platform == 'win32': - OTHERDEFS = 'STCLOC = $(WXWIN)' - OTHERRULES = ''' -{$(WXWIN)/contrib/src/ogl}.cpp{}.obj: - $(cc) @<< -$(CPPFLAGS) /c /Tp $< -<< -''' -else: - OTHERCFLAGS = '-Icontrib/include' - DEFAULTRULE = 'default: contrib $(GENCODEDIR) $(TARGET) $(BUILDDIR)/$(TARGET) bldpycfiles' - OTHERRULES = """ -%.o : contrib/src/ogl/%.cpp - $(CCC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $< - -contrib : - ln -s $(WXDIR)/contrib contrib - -""" - - -SWIGDEPS = '_ogldefs.i' -OTHERDEPS = 'oglhelpers.h $(WXPSRCDIR)/helpers.h' - - -# There are no platform differences so we don't need separate code directories -GENCODEDIR='.' -SWIGTOOLKITFLAG='' diff --git a/wxPython/contrib/ogl/ogl.cpp b/wxPython/contrib/ogl/ogl.cpp index 2553a84e2f..c10c10df03 100644 --- a/wxPython/contrib/ogl/ogl.cpp +++ b/wxPython/contrib/ogl/ogl.cpp @@ -1,5 +1,5 @@ /* - * FILE : ./ogl.cpp + * FILE : contrib/ogl/ogl.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -105,12 +105,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; -#if defined(__WXMSW__) - wxString wxPyEmptyStr(""); - wxPoint wxPyDefaultPosition(-1, -1); - wxSize wxPyDefaultSize(-1, -1); -#endif - extern "C" SWIGEXPORT(void) initoglbasicc(); extern "C" SWIGEXPORT(void) initoglshapesc(); extern "C" SWIGEXPORT(void) initoglshapes2c(); @@ -169,13 +163,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -184,7 +182,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -195,14 +195,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxPyCompositeShape","_class_wxPyCompositeShape",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, + { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, { "_class_wxPyRectangleShape","_wxPyRectangleShape",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, { "_wxPNGHandler","_class_wxPNGHandler",0}, @@ -256,6 +259,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyEllipseShape","_wxPyEllipseShape",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -263,7 +267,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -273,10 +279,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPySizer","_wxPySizer",0}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, + { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0}, { "_wxPyEvent","_class_wxPyEvent",0}, { "_wxTextCtrl","_class_wxTextCtrl",0}, { "_class_wxMask","_wxMask",0}, @@ -284,6 +290,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -308,10 +315,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDivisionShape","_wxPyDivisionShape",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -320,32 +329,42 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxPyShapeCanvas","_class_wxPyShapeCanvas",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxPyBitmapShape","_wxPyBitmapShape",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, + { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxPyDrawnShape","_wxPyDrawnShape",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, @@ -358,6 +377,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_class_wxShapeRegion","_wxShapeRegion",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -374,7 +394,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -384,15 +406,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxPyLineShape","_class_wxPyLineShape",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxPyTimer","_wxPyTimer",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_class_wxPyPolygonShape","_wxPyPolygonShape",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, @@ -409,6 +436,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -417,6 +445,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, { "_wxArrowHead","_class_wxArrowHead",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -426,10 +455,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxBrush","_wxBrush",0}, { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -449,6 +481,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_wxPyDividedShape","_class_wxPyDividedShape",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -456,7 +489,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, @@ -465,18 +500,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxPyShape","_class_wxPyShape",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -487,6 +525,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -502,6 +542,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, @@ -512,6 +553,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -522,6 +564,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -530,19 +573,38 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_class_wxPyLineShape","_wxPyLineShape",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -554,7 +616,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxValidator","_class_wxValidator",0}, { "_wxToolBarBase","_class_wxToolBarBase",0}, { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, { "_class_wxControl","_wxControl",0}, @@ -566,6 +627,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -573,6 +635,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -580,10 +643,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -601,11 +667,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDividedShape","_wxPyDividedShape",0}, { "_wxPyEllipseShape","_class_wxPyEllipseShape",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxPyShapeEvtHandler","_class_wxPyShapeEvtHandler",0}, @@ -618,6 +686,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, + { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_wxOGLConstraint","_class_wxOGLConstraint",0}, @@ -636,6 +705,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, { "_class_wxDiagram","_wxDiagram",0}, {0,0,0}}; diff --git a/wxPython/contrib/ogl/ogl.i b/wxPython/contrib/ogl/ogl.i index 0b00d351f9..78fc0229e1 100644 --- a/wxPython/contrib/ogl/ogl.i +++ b/wxPython/contrib/ogl/ogl.i @@ -37,14 +37,6 @@ %import oglcanvas.i -%{ -#if defined(__WXMSW__) - wxString wxPyEmptyStr(""); - wxPoint wxPyDefaultPosition(-1, -1); - wxSize wxPyDefaultSize(-1, -1); -#endif -%} - %pragma(python) code = "import wx" //--------------------------------------------------------------------------- @@ -169,7 +161,7 @@ extern "C" SWIGEXPORT(void) initoglcanvasc(); // And this gets appended to the shadow class file. //---------------------------------------------------------------------- -%pragma(python) include="_extras.py"; +%pragma(python) include="_oglextras.py"; //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- diff --git a/wxPython/contrib/ogl/ogl.py b/wxPython/contrib/ogl/ogl.py index c896a7d261..5c3b81333d 100644 --- a/wxPython/contrib/ogl/ogl.py +++ b/wxPython/contrib/ogl/ogl.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -35,6 +37,10 @@ from printfw import * from sizers import * +from filesys import * + +from utils import * + from oglbasic import * from oglshapes import * diff --git a/wxPython/contrib/ogl/oglbasic.cpp b/wxPython/contrib/ogl/oglbasic.cpp index d01617cb0d..473afa513d 100644 --- a/wxPython/contrib/ogl/oglbasic.cpp +++ b/wxPython/contrib/ogl/oglbasic.cpp @@ -1,5 +1,5 @@ /* - * FILE : ./oglbasic.cpp + * FILE : contrib/ogl/oglbasic.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -8245,13 +8245,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -8260,7 +8264,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -8271,12 +8277,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, + { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, { "_wxPNGHandler","_class_wxPNGHandler",0}, @@ -8325,6 +8334,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -8332,7 +8342,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, @@ -8342,10 +8354,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, + { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0}, { "_wxPyEvent","_class_wxPyEvent",0}, { "_wxTextCtrl","_class_wxTextCtrl",0}, { "_class_wxMask","_wxMask",0}, @@ -8353,6 +8365,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -8376,10 +8389,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -8387,30 +8402,40 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, + { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, @@ -8421,6 +8446,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_class_wxShapeRegion","_wxShapeRegion",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -8437,7 +8463,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -8445,14 +8473,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxPyTimer","_wxPyTimer",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -8468,6 +8501,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -8475,6 +8509,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScreenDC","_class_wxScreenDC",0}, { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -8484,10 +8519,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxBrush","_wxBrush",0}, { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -8505,6 +8543,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -8512,7 +8551,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, @@ -8520,18 +8561,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxPyShape","_class_wxPyShape",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -8542,6 +8586,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -8556,6 +8602,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, @@ -8565,6 +8612,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -8575,6 +8623,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -8583,19 +8632,38 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, @@ -8606,7 +8674,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxValidator","_class_wxValidator",0}, { "_wxToolBarBase","_class_wxToolBarBase",0}, { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, { "_class_wxControl","_wxControl",0}, @@ -8617,6 +8684,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -8624,6 +8692,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -8631,10 +8700,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -8649,11 +8721,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxListCtrl","_wxListCtrl",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxPyShapeEvtHandler","_class_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, @@ -8667,6 +8741,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, + { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_wxColourData","_class_wxColourData",0}, @@ -8683,6 +8758,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; diff --git a/wxPython/contrib/ogl/oglbasic.py b/wxPython/contrib/ogl/oglbasic.py index 6f61e69c83..1bb9b5c307 100644 --- a/wxPython/contrib/ogl/oglbasic.py +++ b/wxPython/contrib/ogl/oglbasic.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * import wx from oglcanvas import wxPyShapeCanvasPtr class wxShapeRegionPtr : diff --git a/wxPython/contrib/ogl/oglc.def b/wxPython/contrib/ogl/oglc.def deleted file mode 100644 index 78408b947c..0000000000 --- a/wxPython/contrib/ogl/oglc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - initoglc diff --git a/wxPython/contrib/ogl/oglcanvas.cpp b/wxPython/contrib/ogl/oglcanvas.cpp index 22bfb6bffd..37f99a6054 100644 --- a/wxPython/contrib/ogl/oglcanvas.cpp +++ b/wxPython/contrib/ogl/oglcanvas.cpp @@ -1,5 +1,5 @@ /* - * FILE : ./oglcanvas.cpp + * FILE : contrib/ogl/oglcanvas.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1983,13 +1983,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1998,7 +2002,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -2011,11 +2017,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, @@ -2065,6 +2074,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2072,7 +2082,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -2080,7 +2092,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_wxPanel","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_wxPanel","_class_wxPanel",0}, @@ -2094,6 +2105,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -2117,6 +2129,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -2130,16 +2143,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxPyShapeCanvas","_class_wxPyShapeCanvas",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_wxTimerEvent","_class_wxTimerEvent",0}, @@ -2148,14 +2166,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, + { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, @@ -2166,6 +2187,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_class_wxShapeRegion","_wxShapeRegion",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -2182,7 +2204,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -2191,11 +2215,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, { "_class_wxTimerEvent","_wxTimerEvent",0}, @@ -2217,6 +2245,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -2224,6 +2253,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScreenDC","_class_wxScreenDC",0}, { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -2233,12 +2263,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxBrush","_wxBrush",0}, { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxWindow}, { "_class_wxWindow","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -2256,6 +2289,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -2263,7 +2297,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, @@ -2271,20 +2307,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxPyShape","_class_wxPyShape",0}, { "_wxScrolledWindow","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2295,6 +2334,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -2309,6 +2350,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, @@ -2318,6 +2360,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -2328,6 +2371,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -2336,19 +2380,38 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, @@ -2369,6 +2432,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -2376,6 +2440,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -2383,10 +2448,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -2402,11 +2470,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxListCtrl","_wxListCtrl",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxPyShapeEvtHandler","_class_wxPyShapeEvtHandler",0}, @@ -2422,6 +2492,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, + { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_wxColourData","_class_wxColourData",0}, @@ -2440,6 +2511,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, { "_class_wxDiagram","_wxDiagram",0}, {0,0,0}}; diff --git a/wxPython/contrib/ogl/oglcanvas.py b/wxPython/contrib/ogl/oglcanvas.py index 60c19d8980..2467d6f08d 100644 --- a/wxPython/contrib/ogl/oglcanvas.py +++ b/wxPython/contrib/ogl/oglcanvas.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * import wx class wxDiagramPtr : def __init__(self,this): diff --git a/wxPython/contrib/ogl/oglshapes.cpp b/wxPython/contrib/ogl/oglshapes.cpp index 87b53489a0..be89cdb1f7 100644 --- a/wxPython/contrib/ogl/oglshapes.cpp +++ b/wxPython/contrib/ogl/oglshapes.cpp @@ -1,5 +1,5 @@ /* - * FILE : oglshapes.cpp + * FILE : contrib/ogl/oglshapes.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -12489,13 +12489,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -12504,7 +12508,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -12515,12 +12521,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxPyCompositeShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_wxPyCompositeShape","_class_wxPyCompositeShape",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, + { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, { "_class_wxPyRectangleShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape}, @@ -12535,8 +12544,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyRectangleShape","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_wxPyRectangleShape",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, { "_wxPNGHandler","_class_wxPNGHandler",0}, @@ -12588,6 +12597,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyBitmapShape","_class_wxPyBitmapShape",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -12595,7 +12605,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler}, @@ -12620,10 +12632,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyCompositeShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_class_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, + { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0}, { "_wxPyEvent","_class_wxPyEvent",0}, { "_wxTextCtrl","_class_wxTextCtrl",0}, { "_class_wxMask","_wxMask",0}, @@ -12631,6 +12643,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -12655,10 +12668,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDivisionShape","_wxPyDivisionShape",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -12666,32 +12681,42 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxPyBitmapShape","_wxPyBitmapShape",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, + { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxPyDrawnShape","_wxPyDrawnShape",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, @@ -12704,6 +12729,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_class_wxShapeRegion","_wxShapeRegion",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -12720,21 +12746,29 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, + { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxPyTimer","_wxPyTimer",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -12750,6 +12784,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -12757,6 +12792,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScreenDC","_class_wxScreenDC",0}, { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -12766,10 +12802,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxBrush","_wxBrush",0}, { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -12783,10 +12822,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_wxPyDividedShape","_class_wxPyDividedShape",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -12794,7 +12835,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, @@ -12803,8 +12846,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxPyShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape}, { "_wxPyShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape}, @@ -12822,13 +12865,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyShape","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape}, { "_wxPyShape","_class_wxPyShape",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -12839,6 +12885,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -12853,6 +12901,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, @@ -12863,6 +12912,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -12873,6 +12923,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -12881,19 +12932,38 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, @@ -12918,7 +12988,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxValidator","_class_wxValidator",0}, { "_wxToolBarBase","_class_wxToolBarBase",0}, { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, { "_class_wxControl","_wxControl",0}, @@ -12930,6 +12999,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -12937,6 +13007,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -12944,10 +13015,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -12963,11 +13037,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxPyDividedShape","_wxPyDividedShape",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxPyShapeEvtHandler","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, @@ -13006,6 +13082,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, + { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_wxOGLConstraint","_class_wxOGLConstraint",0}, @@ -13023,6 +13100,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; diff --git a/wxPython/contrib/ogl/oglshapes.py b/wxPython/contrib/ogl/oglshapes.py index d43293b595..c4dd67874e 100644 --- a/wxPython/contrib/ogl/oglshapes.py +++ b/wxPython/contrib/ogl/oglshapes.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -35,6 +37,10 @@ from printfw import * from sizers import * +from filesys import * + +from utils import * + from oglbasic import * import wx class wxPseudoMetaFilePtr : diff --git a/wxPython/contrib/ogl/oglshapes2.cpp b/wxPython/contrib/ogl/oglshapes2.cpp index 9b24e1be61..2cd32fcd9f 100644 --- a/wxPython/contrib/ogl/oglshapes2.cpp +++ b/wxPython/contrib/ogl/oglshapes2.cpp @@ -1,5 +1,5 @@ /* - * FILE : ./oglshapes2.cpp + * FILE : contrib/ogl/oglshapes2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -7860,13 +7860,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -7875,7 +7879,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -7886,16 +7892,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxPyCompositeShape","_class_wxPyCompositeShape",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, + { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, { "_class_wxPyRectangleShape","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_wxPyTextShape",SwigwxPyTextShapeTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_wxPyRectangleShape",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, { "_wxPNGHandler","_class_wxPNGHandler",0}, @@ -7951,6 +7960,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyEllipseShape","_wxPyEllipseShape",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -7958,7 +7968,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyPolygonShape",SwigwxPyPolygonShapeTowxPyShapeEvtHandler}, @@ -7978,10 +7990,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPySizer","_wxPySizer",0}, { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, + { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0}, { "_wxPyEvent","_class_wxPyEvent",0}, { "_wxTextCtrl","_class_wxTextCtrl",0}, { "_class_wxMask","_wxMask",0}, @@ -7989,6 +8001,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -8013,10 +8026,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDivisionShape","_wxPyDivisionShape",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -8024,32 +8039,42 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxPyBitmapShape","_wxPyBitmapShape",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, { "_wxPyControlPoint","_class_wxPyControlPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, + { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxPyDrawnShape","_wxPyDrawnShape",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, @@ -8062,6 +8087,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_class_wxShapeRegion","_wxShapeRegion",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -8078,7 +8104,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -8087,15 +8115,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxPyLineShape","_class_wxPyLineShape",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxPyTimer","_wxPyTimer",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_class_wxPyPolygonShape","_wxPyPolygonShape",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, @@ -8112,6 +8145,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTextCtrl","_wxTextCtrl",0}, { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -8120,6 +8154,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, { "_wxArrowHead","_class_wxArrowHead",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -8129,10 +8164,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxBrush","_wxBrush",0}, { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -8152,6 +8190,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_wxPyDividedShape","_class_wxPyDividedShape",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -8159,7 +8198,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxPyControlPoint","_wxPyControlPoint",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, @@ -8168,8 +8209,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxPyShape","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShape}, { "_wxPyShape","_wxPyTextShape",SwigwxPyTextShapeTowxPyShape}, @@ -8183,13 +8224,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyShape","_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShape}, { "_wxPyShape","_class_wxPyShape",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -8200,6 +8244,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -8215,6 +8261,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, @@ -8225,6 +8272,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -8235,6 +8283,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -8243,19 +8292,38 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_class_wxPyLineShape","_wxPyLineShape",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -8277,7 +8345,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxValidator","_class_wxValidator",0}, { "_wxToolBarBase","_class_wxToolBarBase",0}, { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, { "_class_wxControl","_wxControl",0}, @@ -8289,6 +8356,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -8296,6 +8364,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -8303,10 +8372,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -8325,11 +8397,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyEllipseShape","_wxPyCircleShape",SwigwxPyCircleShapeTowxPyEllipseShape}, { "_wxPyEllipseShape","_class_wxPyEllipseShape",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxPyShapeEvtHandler","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, @@ -8354,6 +8428,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, + { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_wxOGLConstraint","_class_wxOGLConstraint",0}, @@ -8372,6 +8447,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; diff --git a/wxPython/contrib/ogl/oglshapes2.py b/wxPython/contrib/ogl/oglshapes2.py index c7770b514a..d534c2e986 100644 --- a/wxPython/contrib/ogl/oglshapes2.py +++ b/wxPython/contrib/ogl/oglshapes2.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -35,6 +37,10 @@ from printfw import * from sizers import * +from filesys import * + +from utils import * + from oglbasic import * from oglshapes import * diff --git a/wxPython/contrib/ogl/stub.cpp b/wxPython/contrib/ogl/stub.cpp new file mode 100644 index 0000000000..45305e77e1 --- /dev/null +++ b/wxPython/contrib/ogl/stub.cpp @@ -0,0 +1,24 @@ +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + + + +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initoglc() { +} + + diff --git a/wxPython/demo/.cvsignore b/wxPython/demo/.cvsignore index dd4052d12f..47c52eb5c3 100644 --- a/wxPython/demo/.cvsignore +++ b/wxPython/demo/.cvsignore @@ -1,5 +1,6 @@ *.pyc .emacs.desktop +b.bat hangman_dict.txt setup.bat test.out diff --git a/wxPython/demo/About.py b/wxPython/demo/About.py index ab36a5428a..ffa8c3785d 100644 --- a/wxPython/demo/About.py +++ b/wxPython/demo/About.py @@ -1,3 +1,4 @@ +import sys, string from wxPython.wx import * from wxPython.html import * @@ -12,7 +13,10 @@ class MyAboutBox(wxDialog):
- +

wxPython %s

+

wxPython %s

+ Running on Python %s
+
@@ -40,19 +44,13 @@ demo item so you can learn how to use the classes yourself.

''' def __init__(self, parent): - wxDialog.__init__(self, parent, -1, 'About the wxPython demo', - size=wxSize(420, 380)) - self.html = wxHtmlWindow(self, -1) - self.html.SetPage(self.text % wx.__version__) - self.SetAutoLayout(true) - lc = wxLayoutConstraints() - lc.top.SameAs(self, wxTop, 5) - lc.left.SameAs(self, wxLeft, 5) - lc.bottom.SameAs(self, wxBottom, 5) - lc.right.SameAs(self, wxRight, 5) - self.html.SetConstraints(lc) - self.Layout() - + wxDialog.__init__(self, parent, -1, 'About the wxPython demo',) + html = wxHtmlWindow(self, -1, size=(420, -1)) + py_version = string.split(sys.version)[0] + html.SetPage(self.text % (wx.__version__, py_version)) + ir = html.GetInternalRepresentation() + html.SetSize( (ir.GetWidth()+5, ir.GetHeight()+5) ) + self.SetClientSize(html.GetSize()) self.CentreOnParent(wxBOTH) #--------------------------------------------------------------------------- diff --git a/wxPython/demo/ActiveXWrapper_IE.py b/wxPython/demo/ActiveXWrapper_IE.py index 3cfd0ac559..b103d15cf3 100644 --- a/wxPython/demo/ActiveXWrapper_IE.py +++ b/wxPython/demo/ActiveXWrapper_IE.py @@ -37,7 +37,7 @@ class TestPanel(wxWindow): wxWindow.__init__(self, parent, -1)#, style=wxCLIP_CHILDREN) self.ie = None self.log = log - self.current = "http://alldunn.com/" + self.current = "http://wxPython.org/" self.frame = frame if frame: self.titleBase = frame.GetTitle() diff --git a/wxPython/demo/GridSimple.py b/wxPython/demo/GridSimple.py index f816e7a3f4..bafd643cf2 100644 --- a/wxPython/demo/GridSimple.py +++ b/wxPython/demo/GridSimple.py @@ -7,6 +7,9 @@ class SimpleGrid(wxGrid): def __init__(self, parent, log): wxGrid.__init__(self, parent, -1) self.log = log + self.moveTo = None + + EVT_IDLE(self, self.OnIdle) self.CreateGrid(25, 25) @@ -113,15 +116,43 @@ class SimpleGrid(wxGrid): (evt.GetTopLeftCoords(), evt.GetBottomRightCoords())) evt.Skip() + def OnCellChange(self, evt): self.log.write("OnCellChange: (%d,%d) %s\n" % (evt.GetRow(), evt.GetCol(), evt.GetPosition())) - evt.Skip() + + # Show how to stay in a cell that has bad data. We can't just + # call SetGridCursor here since we are nested inside one so it + # won't have any effect. Instead, set coordinants to move to in + # idle time. + value = self.GetCellValue(evt.GetRow(), evt.GetCol()) + if value == 'no good': + self.moveTo = evt.GetRow(), evt.GetCol() + + def OnIdle(self, evt): + if self.moveTo != None: + self.SetGridCursor(self.moveTo[0], self.moveTo[1]) + self.moveTo = None + + def OnSelectCell(self, evt): self.log.write("OnSelectCell: (%d,%d) %s\n" % (evt.GetRow(), evt.GetCol(), evt.GetPosition())) - evt.Skip() + + # Another way to stay in a cell that has a bad value... + row = self.GetGridCursorRow() + col = self.GetGridCursorCol() + if self.IsCellEditControlEnabled(): + self.HideCellEditControl() + self.DisableCellEditControl() + value = self.GetCellValue(row, col) + if value == 'no good 2': + return # cancels the cell selection + else: + evt.Skip() + + def OnEditorShown(self, evt): self.log.write("OnEditorShown: (%d,%d) %s\n" % @@ -154,3 +185,5 @@ if __name__ == '__main__': #--------------------------------------------------------------------------- + + diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index 6d5a116d18..8a7bad7ce6 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -20,7 +20,7 @@ from wxPython.html import wxHtmlWindow _treeList = [ - ('New since last release', ['PyShellWindow', + ('New since last release', ['wxProcess', ]), ('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']), @@ -43,20 +43,22 @@ _treeList = [ 'wxCalendarCtrl', ]), - ('Window Layout', ['wxLayoutConstraints', 'Sizers', 'OldSizers']), + ('Window Layout', ['wxLayoutConstraints', 'Sizers', ]), ('Miscellaneous', [ 'DragAndDrop', 'CustomDragAndDrop', 'FontEnumerator', 'wxTimer', 'wxValidator', 'wxGLCanvas', 'DialogUnits', 'wxImage', 'wxMask', 'PrintFramework', 'wxOGL', 'PythonEvents', 'Threads', 'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE', - 'wxDragImage', 'PyShellWindow', + 'wxDragImage', ]), ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog', 'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar', 'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow', - 'FileBrowseButton', 'GenericButtons', 'wxEditor']), + 'FileBrowseButton', 'GenericButtons', 'wxEditor', + 'PyShellWindow', + ]), ('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']), @@ -65,6 +67,7 @@ _treeList = [ #--------------------------------------------------------------------------- class wxPythonDemo(wxFrame): + def __init__(self, parent, id, title): wxFrame.__init__(self, parent, -1, title, size = (800, 600), style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE) @@ -73,8 +76,17 @@ class wxPythonDemo(wxFrame): self.curOverview = "" if wxPlatform == '__WXMSW__': - self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO) - self.SetIcon(self.icon) + icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO) + self.SetIcon(icon) + + # setup a taskbar icon, and catch some events from it + self.tbicon = wxTaskBarIcon() + self.tbicon.SetIcon(icon, "wxPython Demo") + EVT_TASKBAR_LEFT_DCLICK(self.tbicon, self.OnTaskBarActivate) + EVT_TASKBAR_RIGHT_UP(self.tbicon, self.OnTaskBarMenu) + EVT_MENU(self.tbicon, self.TBMENU_RESTORE, self.OnTaskBarActivate) + EVT_MENU(self.tbicon, self.TBMENU_CLOSE, self.OnTaskBarClose) + self.otherWin = None EVT_IDLE(self, self.OnIdle) @@ -152,9 +164,25 @@ class wxPythonDemo(wxFrame): # Create a Notebook self.nb = wxNotebook(splitter2, -1) - # Set up a TextCtrl on the Overview Notebook page - self.ovr = wxHtmlWindow(self.nb, -1) - self.nb.AddPage(self.ovr, "Overview") + # Set up a wxHtmlWindow on the Overview Notebook page + # we put it in a panel first because there seems to be a + # refresh bug of some sort (wxGTK) when it is directly in + # the notebook... + if 0: # the old way + self.ovr = wxHtmlWindow(self.nb, -1, size=(400, 400)) + self.nb.AddPage(self.ovr, "Overview") + + else: # hopefully I can remove this hacky code soon + panel = wxPanel(self.nb, -1) + self.ovr = wxHtmlWindow(panel, -1, size=(400, 400)) + self.nb.AddPage(panel, "Overview") + + def OnOvrSize(evt, ovr=self.ovr): + ovr.SetSize(evt.GetSize()) + + EVT_SIZE(panel, OnOvrSize) + + self.SetOverview("Overview", overview) # Set up a TextCtrl on the Demo Code Notebook page @@ -215,12 +243,13 @@ class wxPythonDemo(wxFrame): def OnItemExpanded(self, event): item = event.GetItem() wxLogMessage("OnItemExpanded: %s" % self.tree.GetItemText(item)) + event.Skip() #--------------------------------------------- def OnItemCollapsed(self, event): item = event.GetItem() wxLogMessage("OnItemCollapsed: %s" % self.tree.GetItemText(item)) - + event.Skip() #--------------------------------------------- def OnTreeLeftDown(self, event): @@ -307,7 +336,7 @@ class wxPythonDemo(wxFrame): #--------------------------------------------- # Menu methods - def OnFileExit(self, event): + def OnFileExit(self, *event): self.Close() @@ -323,8 +352,11 @@ class wxPythonDemo(wxFrame): self.dying = true self.window = None self.mainmenu = None + if hasattr(self, "tbicon"): + del self.tbicon self.Destroy() + #--------------------------------------------- def OnIdle(self, event): if self.otherWin: @@ -342,6 +374,36 @@ class wxPythonDemo(wxFrame): self.tree.SelectItem(selectedDemo) self.tree.EnsureVisible(selectedDemo) + + #--------------------------------------------- + def OnTaskBarActivate(self, evt): + if self.IsIconized(): + self.Iconize(false) + if not self.IsShown(): + self.Show(true) + self.Raise() + + #--------------------------------------------- + + TBMENU_RESTORE = 1000 + TBMENU_CLOSE = 1001 + + def OnTaskBarMenu(self, evt): + menu = wxMenu() + menu.Append(self.TBMENU_RESTORE, "Restore wxPython Demo") + menu.Append(self.TBMENU_CLOSE, "Close") + self.tbicon.PopupMenu(menu) + menu.Destroy() + + #--------------------------------------------- + def OnTaskBarClose(self, evt): + self.Close() + + # because of the way wxTaskBarIcon.PopupMenu is implemented we have to + # prod the main idle handler a bit to get the window to actually close + wxGetApp().ProcessIdle() + + #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- @@ -370,7 +432,7 @@ class MyApp(wxApp): showTip, index = eval(showTipText) except IOError: showTip, index = (1, 0) - print showTip, index + #print showTip, index if showTip: tp = wxCreateFileTipProvider("data/tips.txt", index) showTip = wxShowTip(frame, tp) diff --git a/wxPython/demo/OldSizers.py b/wxPython/demo/OldSizers.py deleted file mode 100644 index cf24093eb7..0000000000 --- a/wxPython/demo/OldSizers.py +++ /dev/null @@ -1,403 +0,0 @@ -#---------------------------------------------------------------------- -# sizer test code -#---------------------------------------------------------------------- - -from wxPython.wx import * -from wxPython.lib.sizers import * - -#---------------------------------------------------------------------- - -def makeSimpleBox1(win): - box = wxBoxSizer(wxHORIZONTAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 0) - box.Add(wxButton(win, 1010, "four"), 0) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox2(win): - box = wxBoxSizer(wxVERTICAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 0) - box.Add(wxButton(win, 1010, "four"), 0) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox3(win): - box = wxBoxSizer(wxHORIZONTAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 0) - box.Add(wxButton(win, 1010, "four"), 0) - box.Add(wxButton(win, 1010, "five"), 1) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox4(win): - box = wxBoxSizer(wxHORIZONTAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 1) - box.Add(wxButton(win, 1010, "four"), 1) - box.Add(wxButton(win, 1010, "five"), 1) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox5(win): - box = wxBoxSizer(wxHORIZONTAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 3) - box.Add(wxButton(win, 1010, "four"), 1) - box.Add(wxButton(win, 1010, "five"), 1) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox6(win): - box = wxBoxSizer(wxHORIZONTAL, wxSize(250, 50)) - box.Add(wxButton(win, 1010, "10"), 10) - box.Add(wxButton(win, 1010, "20"), 20) - box.Add(wxButton(win, 1010, "30"), 30) - box.Add(wxButton(win, 1010, "15"), 15) - box.Add(wxButton(win, 1010, "5"), 5) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBorder1(win): - bdr = wxBorderSizer(wxALL) - btn = wxButton(win, 1010, "border") - btn.SetSize(wxSize(80, 80)) - bdr.Add(btn, 15) - - return bdr - -#---------------------------------------------------------------------- - -def makeSimpleBorder2(win): - bdr = wxBorderSizer(wxEAST | wxWEST) - btn = wxButton(win, 1010, "border") - btn.SetSize(wxSize(80, 80)) - bdr.Add(btn, 15) - - return bdr - -#---------------------------------------------------------------------- - -def makeSimpleBorder3(win): - bdr = wxBorderSizer(wxNORTH | wxWEST) - btn = wxButton(win, 1010, "border") - btn.SetSize(wxSize(80, 80)) - bdr.Add(btn, 15) - - return bdr - -#---------------------------------------------------------------------- - -def makeShapes(win): - box =wxBoxSizer(wxVERTICAL) - box.Add(wxStaticLine(win, -1), 0) - for line in ( - (wxANCHOR_NW, "NorthWest"), - (wxANCHOR_NORTH, "North"), - (wxANCHOR_NE, "NorthEast") - ), ( - (wxANCHOR_WEST, "West"), - (wxANCHOR_NONE, "Center"), - (wxANCHOR_EAST, "East") - ), ( - (wxANCHOR_SW, "SouthWest"), - (wxANCHOR_SOUTH, "South"), - (wxANCHOR_SE, "SouthEast") - ): - linebox =wxBoxSizer(wxHORIZONTAL) - linebox.Add(wxStaticLine(win, -1, style=wxVERTICAL), 0) - for (anchor, label) in line: - sizer =wxShapeSizer(anchor) - sizer.Add(wxButton(win, -1, label, size=wxSize(100, 50))) - linebox.Add(sizer, 1) - linebox.Add(wxStaticLine(win, -1, style=wxVERTICAL), 0) - box.Add(linebox, 1) - box.Add(wxStaticLine(win, -1), 0) - return box - -#---------------------------------------------------------------------- - -def makeBoxInBox(win): - box = wxBoxSizer(wxVERTICAL) - - box.Add(wxButton(win, 1010, "one")) - - box2 = wxBoxSizer(wxHORIZONTAL) - box2.AddMany([ wxButton(win, 1010, "two"), - wxButton(win, 1010, "three"), - wxButton(win, 1010, "four"), - wxButton(win, 1010, "five"), - ]) - - box3 = wxBoxSizer(wxVERTICAL) - box3.AddMany([ (wxButton(win, 1010, "six"), 0), - (wxButton(win, 1010, "seven"), 2), - (wxButton(win, 1010, "eight"), 1), - (wxButton(win, 1010, "nine"), 1), - ]) - - box2.Add(box3, 1) - box.Add(box2, 1) - - box.Add(wxButton(win, 1010, "ten")) - - return box - -#---------------------------------------------------------------------- - -def makeBoxInBorder(win): - bdr = wxBorderSizer(wxALL) - box = makeSimpleBox3(win) - bdr.Add(box, 15) - - return bdr - -#---------------------------------------------------------------------- - -def makeBorderInBox(win): - insideBox = wxBoxSizer(wxHORIZONTAL) - - box2 = wxBoxSizer(wxHORIZONTAL) - box2.AddMany([ wxButton(win, 1010, "one"), - wxButton(win, 1010, "two"), - wxButton(win, 1010, "three"), - wxButton(win, 1010, "four"), - wxButton(win, 1010, "five"), - ]) - - insideBox.Add(box2, 0) - - bdr = wxBorderSizer(wxALL) - bdr.Add(wxButton(win, 1010, "border"), 20) - insideBox.Add(bdr, 1) - - box3 = wxBoxSizer(wxVERTICAL) - box3.AddMany([ (wxButton(win, 1010, "six"), 0), - (wxButton(win, 1010, "seven"), 2), - (wxButton(win, 1010, "eight"), 1), - (wxButton(win, 1010, "nine"), 1), - ]) - insideBox.Add(box3, 1) - - outsideBox = wxBoxSizer(wxVERTICAL) - outsideBox.Add(wxButton(win, 1010, "top")) - outsideBox.Add(insideBox, 1) - outsideBox.Add(wxButton(win, 1010, "bottom")) - - return outsideBox - - -#---------------------------------------------------------------------- - -theTests = [ - ("Simple horizontal boxes", makeSimpleBox1, - "This is a HORIZONTAL box sizer with four non-stretchable buttons held " - "within it. Notice that the buttons are added and aligned in the horizontal " - "dimension. Also notice that they are fixed size in the horizontal dimension, " - "but will stretch vertically." - ), - - ("Simple vertical boxes", makeSimpleBox2, - "Exactly the same as the previous sample but using a VERTICAL box sizer " - "instead of a HORIZONTAL one." - ), - - ("Add a stretchable", makeSimpleBox3, - "We've added one more button with the strechable flag turned on. Notice " - "how it grows to fill the extra space in the otherwise fixed dimension." - ), - - ("More than one stretchable", makeSimpleBox4, - "Here there are several items that are stretchable, they all divide up the " - "extra space evenly." - ), - - ("Weighting factor", makeSimpleBox5, - "This one shows more than one strechable, but one of them has a weighting " - "factor so it gets more of the free space." - ), - -# ("Percent Sizer", makeSimpleBox6, -# "You can use the wxBoxSizer like a Percent Sizer. Just make sure that all " -# "the weighting factors add up to 100!" -# ), - - ("", None, ""), - - ("Simple border sizer", makeSimpleBorder1, - "The wxBorderSizer leaves empty space around its contents. This one " - "gives a border all the way around." - ), - - ("East and West border", makeSimpleBorder2, - "You can pick and choose which sides have borders." - ), - - ("North and West border", makeSimpleBorder3, - "You can pick and choose which sides have borders." - ), - - ("", None, ""), - - - ("Proportional resize", makeShapes, - "The wxShapeSizer preserves the original proportions of the window." - ), - - ("", None, ""), - - ("Boxes inside of boxes", makeBoxInBox, - "This one shows nesting of boxes within boxes within boxes, using both " - "orientations. Notice also that button seven has a greater weighting " - "factor than its siblings." - ), - - ("Boxes inside a Border", makeBoxInBorder, - "Sizers of different types can be nested withing each other as well. " - "Here is a box sizer with several buttons embedded within a border sizer." - ), - - ("Border in a Box", makeBorderInBox, - "Another nesting example. This one has Boxes and a Border inside another Box." - ), - - ] -#---------------------------------------------------------------------- - -class TestFrame(wxFrame): - def __init__(self, parent, title, sizerFunc): - wxFrame.__init__(self, parent, -1, title) - EVT_BUTTON(self, 1010, self.OnButton) - - self.sizer = sizerFunc(self) - self.CreateStatusBar() - self.SetStatusText("Resize this frame to see how the sizers respond...") - self.sizer.FitWindow(self) - EVT_CLOSE(self, self.OnCloseWindow) - EVT_SIZE(self, self.OnSize) - - - def OnSize(self, event): - size = self.GetClientSize() - self.sizer.Layout(size) - - def OnCloseWindow(self, event): - self.MakeModal(false) - self.Destroy() - - def OnButton(self, event): - self.Close(true) - -#---------------------------------------------------------------------- - - - -class TestSelectionPanel(wxPanel): - def __init__(self, parent, frame=NULL): - wxPanel.__init__(self, parent, -1) - self.frame = frame - - self.list = wxListBox(self, 401, - wxDLG_PNT(self, 10, 10), wxDLG_SZE(self, 100, 60), - []) - EVT_LISTBOX(self, 401, self.OnSelect) - EVT_LISTBOX_DCLICK(self, 401, self.OnDClick) - - wxButton(self, 402, "Try it!", wxDLG_PNT(self, 120, 10)).SetDefault() - EVT_BUTTON(self, 402, self.OnDClick) - - self.text = wxTextCtrl(self, -1, "", - wxDLG_PNT(self, 10, 80), - wxDLG_SZE(self, 200, 60), - wxTE_MULTILINE | wxTE_READONLY) - - for item in theTests: - self.list.Append(item[0]) - - - - def OnSelect(self, event): - pos = self.list.GetSelection() - self.text.SetValue(theTests[pos][2]) - - - def OnDClick(self, event): - pos = self.list.GetSelection() - title = theTests[pos][0] - func = theTests[pos][1] - - if func: - win = TestFrame(self, title, func) - win.CentreOnParent(wxBOTH) - win.Show(true) - win.MakeModal(true) - -#---------------------------------------------------------------------- - -def runTest(frame, nb, log): - win = TestSelectionPanel(nb, frame) - return win - -overview = wxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \ - wxBoxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \ - wxBorderSizer.__doc__ - -#---------------------------------------------------------------------- - - - -if __name__ == '__main__': - - class MainFrame(wxFrame): - def __init__(self): - wxFrame.__init__(self, NULL, -1, "Testing...") - - self.CreateStatusBar() - mainmenu = wxMenuBar() - menu = wxMenu() - menu.Append(200, 'E&xit', 'Get the heck outta here!') - mainmenu.Append(menu, "&File") - self.SetMenuBar(mainmenu) - EVT_MENU(self, 200, self.OnExit) - self.panel = TestSelectionPanel(self, self) - self.SetSize(wxSize(400, 380)) - EVT_CLOSE(self, self.OnCloseWindow) - - def OnCloseWindow(self, event): - self.Destroy() - - def OnExit(self, event): - self.Close(true) - - - class TestApp(wxApp): - def OnInit(self): - frame = MainFrame() - frame.Show(true) - self.SetTopWindow(frame) - return true - - app = TestApp(0) - app.MainLoop() - - -#---------------------------------------------------------------------- diff --git a/wxPython/demo/PyShell.py b/wxPython/demo/PyShell.py deleted file mode 100644 index 41edebf719..0000000000 --- a/wxPython/demo/PyShell.py +++ /dev/null @@ -1,20 +0,0 @@ - -from wxPython.wx import * -from wxPython.lib.shell import PyShell - -#---------------------------------------------------------------------- - - -def runTest(frame, nb, log): - win = PyShell(nb) - win.Show(true) - return win - - -#---------------------------------------------------------------------- - - -overview = """ -A simple GUI version of the interactive interpreter. -""" - diff --git a/wxPython/demo/XMLtreeview.py b/wxPython/demo/XMLtreeview.py index 853bd40b8e..c53e4010c9 100644 --- a/wxPython/demo/XMLtreeview.py +++ b/wxPython/demo/XMLtreeview.py @@ -1,9 +1,16 @@ -import string +import string, sys + +py2 = sys.version[0] == '2' from wxPython.wx import * try: - from xml.parsers import pyexpat + if py2: + from xml.parsers import expat + parsermodule = expat + else: + from xml.parsers import pyexpat + parsermodule = pyexpat haveXML = true except ImportError: haveXML = false @@ -12,7 +19,8 @@ except ImportError: if not haveXML: def runTest(frame, nb, log): - dlg = wxMessageDialog(frame, 'This demo requires the XML package. See http://www.python.org/sigs/xml-sig/', + dlg = wxMessageDialog(frame, 'This demo requires the XML package. ' + 'See http://www.python.org/sigs/xml-sig/', 'Sorry', wxOK | wxICON_INFORMATION) dlg.ShowModal() dlg.Destroy() @@ -26,6 +34,8 @@ else: # Define a handler for start element events def StartElement(self, name, attrs ): + if py2: + name = name.encode() id = self.AppendItem(self.nodeStack[-1], name) self.nodeStack.append(id) @@ -34,12 +44,14 @@ else: def CharacterData(self, data ): if string.strip(data): + if py2: + data = data.encode() self.AppendItem(self.nodeStack[-1], data) def LoadTree(self, filename): # Create a parser - Parser = pyexpat.ParserCreate() + Parser = parsermodule.ParserCreate() # Tell the parser what the start element handler is Parser.StartElementHandler = self.StartElement diff --git a/wxPython/demo/data/echo.py b/wxPython/demo/data/echo.py new file mode 100644 index 0000000000..46e5fa761e --- /dev/null +++ b/wxPython/demo/data/echo.py @@ -0,0 +1,27 @@ + + +""" +This is a simple little echo program that is used by the wxProcess +demo. It reads lines from stdin and echos them back to stdout, until +there is an EOF on stdin. + +Enter text in the field below to send to the stdin of the echo +process. Clicking on 'Close Stream' will close the stream in the +demo, and then echo.py should terminate too... +""" + +import sys + +sys.stdout.write( __doc__) +sys.stdout.flush() + +line = sys.stdin.readline() +while line: + line = line[:-1] + sys.stdout.write('\nYou typed "%s"\n' % line) + sys.stdout.flush() + line = sys.stdin.readline() + + +sys.stdout.write('\nExiting...\n') +sys.stdout.flush() diff --git a/wxPython/demo/data/grid.i b/wxPython/demo/data/grid.i index 0d874ba22b..37f0db23a5 100644 --- a/wxPython/demo/data/grid.i +++ b/wxPython/demo/data/grid.i @@ -6,7 +6,7 @@ // // Created: 17-March-2000 // RCS-ID: $Id$ -// Copyright: (c) 1998 by Total Control Software +// Copyright: (c) 2000 by Total Control Software // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// @@ -74,7 +74,7 @@ if (m_myInst.findCallback(#CBNAME)) \ m_myInst.callCallback( \ Py_BuildValue("(Oii)", \ - wxPyConstructObject((void*)attr, "_wxGridCellAttr_p"), \ + wxPyConstructObject((void*)attr, "wxGridCellAttr"), \ a, b)); \ else \ PCLASS::CBNAME(attr, a, b); \ @@ -92,7 +92,7 @@ if (m_myInst.findCallback(#CBNAME)) \ m_myInst.callCallback( \ Py_BuildValue("(Oi)", \ - wxPyConstructObject((void*)attr, "_wxGridCellAttr_p"), \ + wxPyConstructObject((void*)attr, "wxGridCellAttr"), \ val)); \ else \ PCLASS::CBNAME(attr, val); \ @@ -451,6 +451,8 @@ class wxGridCellRenderer { public: void SetParameters(const wxString& params); + void IncRef(); + void DecRef(); virtual void Draw(wxGrid& grid, wxGridCellAttr& attr, @@ -600,6 +602,8 @@ public: void SetControl(wxControl* control); void SetParameters(const wxString& params); + void IncRef(); + void DecRef(); virtual void Create(wxWindow* parent, wxWindowID id, @@ -612,6 +616,7 @@ public: virtual void SetSize(const wxRect& rect); virtual void Show(bool show, wxGridCellAttr *attr = NULL); virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + virtual bool IsAcceptedKey(wxKeyEvent& event); virtual void StartingKey(wxKeyEvent& event); virtual void StartingClick(); virtual void HandleReturn(wxKeyEvent& event); @@ -687,7 +692,7 @@ public: if (m_myInst.findCallback("Show")) m_myInst.callCallback( Py_BuildValue("(iO)", show, - wxPyConstructObject((void*)attr, "_wxGridCellAttr_p"))); + wxPyConstructObject((void*)attr, "wxGridCellAttr"))); else wxGridCellEditor::Show(show, attr); wxPySaveThread(doSave); @@ -702,8 +707,8 @@ public: if (m_myInst.findCallback("PaintBackground")) m_myInst.callCallback( Py_BuildValue("(OO)", - wxPyConstructObject((void*)&rectCell, "_wxRect_p"), - wxPyConstructObject((void*)attr, "_wxGridCellAttr_p"))); + wxPyConstructObject((void*)&rectCell, "wxRect"), + wxPyConstructObject((void*)attr, "wxGridCellAttr"))); else wxGridCellEditor::PaintBackground(rectCell, attr); wxPySaveThread(doSave); @@ -715,6 +720,7 @@ public: DEC_PYCALLBACK___pure(Reset); DEC_PYCALLBACK__constany(SetSize, wxRect); + DEC_PYCALLBACK_bool_any(IsAcceptedKey, wxKeyEvent); DEC_PYCALLBACK__any(StartingKey, wxKeyEvent); DEC_PYCALLBACK__any(HandleReturn, wxKeyEvent); DEC_PYCALLBACK__(StartingClick); @@ -728,6 +734,7 @@ public: IMP_PYCALLBACK__STRING( wxPyGridCellEditor, wxGridCellEditor, SetParameters); IMP_PYCALLBACK___pure(wxPyGridCellEditor, wxGridCellEditor, Reset); IMP_PYCALLBACK__constany(wxPyGridCellEditor, wxGridCellEditor, SetSize, wxRect); +IMP_PYCALLBACK_bool_any(wxPyGridCellEditor, wxGridCellEditor, IsAcceptedKey, wxKeyEvent); IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, StartingKey, wxKeyEvent); IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, HandleReturn, wxKeyEvent); IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, StartingClick); @@ -1269,15 +1276,14 @@ public: int GetNumberCols(); + +#ifdef NOTNEEDED // ???? // ------ display update functions // void CalcRowLabelsExposed( wxRegion& reg ); - void CalcColLabelsExposed( wxRegion& reg ); void CalcCellsExposed( wxRegion& reg ); - -#ifdef NOTNEEDED // ???? // ------ event handlers // void ProcessRowLabelMouseEvent( wxMouseEvent& event ); @@ -1338,7 +1344,7 @@ public: void GetTextBoxSize( wxDC& dc, wxArrayString& lines, - long *width, long *height ); + long *OUTPUT, long *OUTPUT ); // ------ @@ -1559,7 +1565,8 @@ public: void SelectRow( int row, bool addToSelected = FALSE ); void SelectCol( int col, bool addToSelected = FALSE ); - void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol ); + void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, + bool addToSelected = FALSE ); // TODO: ??? void SelectBlock( const wxGridCellCoords& topLeft, // TODO: ??? const wxGridCellCoords& bottomRight ) @@ -1577,10 +1584,6 @@ public: wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft, const wxGridCellCoords & bottomRight ); - // This function returns the rectangle that encloses the selected cells - // in device coords and clipped to the client size of the grid window. - // - wxRect SelectionToDeviceRect(); // Access or update the selection fore/back colours wxColour GetSelectionBackground() const; diff --git a/wxPython/demo/data/stc.h b/wxPython/demo/data/stc.h index f2a514524e..fc07f2f616 100644 --- a/wxPython/demo/data/stc.h +++ b/wxPython/demo/data/stc.h @@ -23,144 +23,431 @@ #include - //---------------------------------------------------------------------- -// constants and stuff - -enum wxSTC_UndoType { - wxSTC_UndoCollectNone, - wxSTC_UndoCollectAutoStart -}; - - -enum wxSTC_EOL { - wxSTC_EOL_CRLF, - wxSTC_EOL_CR, - wxSTC_EOL_LF -}; - -enum wxSTC_EDGE { - wxSTC_EDGE_NONE, - wxSTC_EDGE_LINE, - wxSTC_EDGE_BACKGROUND -}; - - - -const int wxSTC_LEX_STYLE_MAX = 31; -const int wxSTC_STYLE_DEFAULT = 32; -const int wxSTC_STYLE_LINENUMBER = 33; -const int wxSTC_STYLE_BRACELIGHT = 34; -const int wxSTC_STYLE_BRACEBAD = 35; -const int wxSTC_STYLE_CONTROLCHAR = 36; -const int wxSTC_STYLE_MAX = 127; -const int wxSTC_STYLE_MASK = 31; - -const int wxSTC_MARKER_MAX = 31; -const int wxSTC_MARK_CIRCLE = 0; -const int wxSTC_MARK_ROUNDRECT = 1; -const int wxSTC_MARK_ARROW = 2; -const int wxSTC_MARK_SMALLRECT = 3; -const int wxSTC_MARK_SHORTARROW = 4; -const int wxSTC_MARK_EMPTY = 5; -const int wxSTC_MARK_ARROWDOWN = 6; -const int wxSTC_MARK_MINUS = 7; -const int wxSTC_MARK_PLUS = 8; - -const int wxSTC_MARKNUM_FOLDER = 30; -const int wxSTC_MARKNUM_FOLDEROPEN= 31; -const int wxSTC_MASK_FOLDERS = ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN)); - -const int wxSTC_INDIC_MAX = 7; -const int wxSTC_INDIC_PLAIN = 0; -const int wxSTC_INDIC_SQUIGGLE = 1; -const int wxSTC_INDIC_TT = 2; -const int wxSTC_INDIC0_MASK = 32; -const int wxSTC_INDIC1_MASK = 64; -const int wxSTC_INDIC2_MASK = 128; -const int wxSTC_INDICS_MASK = (wxSTC_INDIC0_MASK | wxSTC_INDIC1_MASK | wxSTC_INDIC2_MASK); - - -const int wxSTC_FOLDLEVELBASE = 0x0400; -const int wxSTC_FOLDLEVELWHITEFLAG = 0x1000; -const int wxSTC_FOLDLEVELHEADERFLAG = 0x2000; -const int wxSTC_FOLDLEVELNUMBERMASK = 0x0FFF; - - -// key commands -enum { - wxSTC_CMD_LINEDOWN = 2300, - wxSTC_CMD_LINEDOWNEXTEND, - wxSTC_CMD_LINEUP, - wxSTC_CMD_LINEUPEXTEND, - wxSTC_CMD_CHARLEFT, - wxSTC_CMD_CHARLEFTEXTEND, - wxSTC_CMD_CHARRIGHT, - wxSTC_CMD_CHARRIGHTEXTEND, - wxSTC_CMD_WORDLEFT, - wxSTC_CMD_WORDLEFTEXTEND, - wxSTC_CMD_WORDRIGHT, - wxSTC_CMD_WORDRIGHTEXTEND, - wxSTC_CMD_HOME, - wxSTC_CMD_HOMEEXTEND, - wxSTC_CMD_LINEEND, - wxSTC_CMD_LINEENDEXTEND, - wxSTC_CMD_DOCUMENTSTART, - wxSTC_CMD_DOCUMENTSTARTEXTEND, - wxSTC_CMD_DOCUMENTEND, - wxSTC_CMD_DOCUMENTENDEXTEND, - wxSTC_CMD_PAGEUP, - wxSTC_CMD_PAGEUPEXTEND, - wxSTC_CMD_PAGEDOWN, - wxSTC_CMD_PAGEDOWNEXTEND, - wxSTC_CMD_EDITTOGGLEOVERTYPE, - wxSTC_CMD_CANCEL, - wxSTC_CMD_DELETEBACK, - wxSTC_CMD_TAB, - wxSTC_CMD_BACKTAB, - wxSTC_CMD_NEWLINE, - wxSTC_CMD_FORMFEED, - wxSTC_CMD_VCHOME, - wxSTC_CMD_VCHOMEEXTEND, - wxSTC_CMD_ZOOMIN, - wxSTC_CMD_ZOOMOUT, - wxSTC_CMD_DELWORDLEFT, - wxSTC_CMD_DELWORDRIGHT, - wxSTC_CMD_LINECUT, - wxSTC_CMD_LINEDELETE, - wxSTC_CMD_LINETRANSPOSE, - wxSTC_CMD_LOWERCASE, - wxSTC_CMD_UPPERCASE, - wxSTC_CMD_LINESCROLLDOWN, - wxSTC_CMD_LINESCROLLUP -}; - - -enum wxSTC_LEX { - wxSTC_LEX_CONTAINER=0, - wxSTC_LEX_NULL, - wxSTC_LEX_PYTHON, - wxSTC_LEX_CPP, - wxSTC_LEX_HTML, - wxSTC_LEX_XML, - wxSTC_LEX_PERL, - wxSTC_LEX_SQL, - wxSTC_LEX_VB, - wxSTC_LEX_PROPERTIES, - wxSTC_LEX_ERRORLIST, - wxSTC_LEX_MAKEFILE, - wxSTC_LEX_BATCH, -}; - +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + +#define wxSTC_INVALID_POSITION -1 +#define wxSTC_START 2000 +#define wxSTC_OPTIONAL_START 3000 +#define wxSTC_LEXER_START 4000 +#define wxSTC_CMD_REDO 2011 +#define wxSTC_CMD_SELECTALL 2013 +#define wxSTC_WS_INVISIBLE 0 +#define wxSTC_WS_VISIBLEALWAYS 1 +#define wxSTC_WS_VISIBLEAFTERINDENT 2 +#define wxSTC_EOL_CRLF 0 +#define wxSTC_EOL_CR 1 +#define wxSTC_EOL_LF 2 + +// The SC_CP_UTF8 value can be used to enter Unicode mode. +// This is the same value as CP_UTF8 in Windows +#define wxSTC_CP_UTF8 65001 +#define wxSTC_MARKER_MAX 31 +#define wxSTC_MARK_CIRCLE 0 +#define wxSTC_MARK_ROUNDRECT 1 +#define wxSTC_MARK_ARROW 2 +#define wxSTC_MARK_SMALLRECT 3 +#define wxSTC_MARK_SHORTARROW 4 +#define wxSTC_MARK_EMPTY 5 +#define wxSTC_MARK_ARROWDOWN 6 +#define wxSTC_MARK_MINUS 7 +#define wxSTC_MARK_PLUS 8 +#define wxSTC_MARKNUM_FOLDER 30 +#define wxSTC_MARKNUM_FOLDEROPEN 31 +#define wxSTC_MARGIN_SYMBOL 0 +#define wxSTC_MARGIN_NUMBER 1 +#define wxSTC_STYLE_DEFAULT 32 +#define wxSTC_STYLE_LINENUMBER 33 +#define wxSTC_STYLE_BRACELIGHT 34 +#define wxSTC_STYLE_BRACEBAD 35 +#define wxSTC_STYLE_CONTROLCHAR 36 +#define wxSTC_STYLE_INDENTGUIDE 37 +#define wxSTC_STYLE_MAX 127 + +// Character set identifiers are used in StyleSetCharacterSet. +// The values are the same as the Windows *_CHARSET values. +#define wxSTC_CHARSET_ANSI 0 +#define wxSTC_CHARSET_DEFAULT 1 +#define wxSTC_CHARSET_BALTIC 186 +#define wxSTC_CHARSET_CHINESEBIG5 136 +#define wxSTC_CHARSET_EASTEUROPE 238 +#define wxSTC_CHARSET_GB2312 134 +#define wxSTC_CHARSET_GREEK 161 +#define wxSTC_CHARSET_HANGUL 129 +#define wxSTC_CHARSET_MAC 77 +#define wxSTC_CHARSET_OEM 255 +#define wxSTC_CHARSET_RUSSIAN 204 +#define wxSTC_CHARSET_SHIFTJIS 128 +#define wxSTC_CHARSET_SYMBOL 2 +#define wxSTC_CHARSET_TURKISH 162 +#define wxSTC_CHARSET_JOHAB 130 +#define wxSTC_CHARSET_HEBREW 177 +#define wxSTC_CHARSET_ARABIC 178 +#define wxSTC_CHARSET_VIETNAMESE 163 +#define wxSTC_CHARSET_THAI 222 +#define wxSTC_INDIC_MAX 7 +#define wxSTC_INDIC_PLAIN 0 +#define wxSTC_INDIC_SQUIGGLE 1 +#define wxSTC_INDIC_TT 2 +#define wxSTC_INDIC_DIAGONAL 3 +#define wxSTC_INDIC_STRIKE 4 +#define wxSTC_INDIC0_MASK 32 +#define wxSTC_INDIC1_MASK 64 +#define wxSTC_INDIC2_MASK 128 +#define wxSTC_INDICS_MASK 32 | 64 | 128 + +// PrintColourMode - use same colours as screen. +#define wxSTC_PRINT_NORMAL 0 + +// PrintColourMode - invert the light value of each style for printing. +#define wxSTC_PRINT_INVERTLIGHT 1 + +// PrintColourMode - force black text on white background for printing. +#define wxSTC_PRINT_BLACKONWHITE 2 +#define wxSTC_FIND_DOWN 1 +#define wxSTC_FIND_WHOLEWORD 2 +#define wxSTC_FIND_MATCHCASE 4 +#define wxSTC_FIND_WORDSTART 0x00100000 + +// SCFIND_REGEXP is not yet implemented. +#define wxSTC_FIND_REGEXP 0x00200000 +#define wxSTC_CMD_UNDO 2176 +#define wxSTC_CMD_CUT 2177 +#define wxSTC_CMD_COPY 2178 +#define wxSTC_CMD_PASTE 2179 +#define wxSTC_FOLDLEVELBASE 0x400 +#define wxSTC_FOLDLEVELWHITEFLAG 0x1000 +#define wxSTC_FOLDLEVELHEADERFLAG 0x2000 +#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF +#define wxSTC_CMD_LINEDOWN 2300 +#define wxSTC_CMD_LINEDOWNEXTEND 2301 +#define wxSTC_CMD_LINEUP 2302 +#define wxSTC_CMD_LINEUPEXTEND 2303 +#define wxSTC_CMD_CHARLEFT 2304 +#define wxSTC_CMD_CHARLEFTEXTEND 2305 +#define wxSTC_CMD_CHARRIGHT 2306 +#define wxSTC_CMD_CHARRIGHTEXTEND 2307 +#define wxSTC_CMD_WORDLEFT 2308 +#define wxSTC_CMD_WORDLEFTEXTEND 2309 +#define wxSTC_CMD_WORDRIGHT 2310 +#define wxSTC_CMD_WORDRIGHTEXTEND 2311 +#define wxSTC_CMD_HOME 2312 +#define wxSTC_CMD_HOMEEXTEND 2313 +#define wxSTC_CMD_LINEEND 2314 +#define wxSTC_CMD_LINEENDEXTEND 2315 +#define wxSTC_CMD_DOCUMENTSTART 2316 +#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317 +#define wxSTC_CMD_DOCUMENTEND 2318 +#define wxSTC_CMD_DOCUMENTENDEXTEND 2319 +#define wxSTC_CMD_PAGEUP 2320 +#define wxSTC_CMD_PAGEUPEXTEND 2321 +#define wxSTC_CMD_PAGEDOWN 2322 +#define wxSTC_CMD_PAGEDOWNEXTEND 2323 +#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324 +#define wxSTC_CMD_CANCEL 2325 +#define wxSTC_CMD_DELETEBACK 2326 +#define wxSTC_CMD_TAB 2327 +#define wxSTC_CMD_BACKTAB 2328 +#define wxSTC_CMD_NEWLINE 2329 +#define wxSTC_CMD_FORMFEED 2330 +#define wxSTC_CMD_VCHOME 2331 +#define wxSTC_CMD_VCHOMEEXTEND 2332 +#define wxSTC_CMD_ZOOMIN 2333 +#define wxSTC_CMD_ZOOMOUT 2334 +#define wxSTC_CMD_DELWORDLEFT 2335 +#define wxSTC_CMD_DELWORDRIGHT 2336 +#define wxSTC_CMD_LINECUT 2337 +#define wxSTC_CMD_LINEDELETE 2338 +#define wxSTC_CMD_LINETRANSPOSE 2339 +#define wxSTC_CMD_LOWERCASE 2340 +#define wxSTC_CMD_UPPERCASE 2341 +#define wxSTC_CMD_LINESCROLLDOWN 2342 +#define wxSTC_CMD_LINESCROLLUP 2343 +#define wxSTC_EDGE_NONE 0 +#define wxSTC_EDGE_LINE 1 +#define wxSTC_EDGE_BACKGROUND 2 + +// Show caret within N lines of edge when it's scrolled to view +#define wxSTC_CARET_SLOP 0x01 + +// Center caret on screen when it's scrolled to view +#define wxSTC_CARET_CENTER 0x02 + +// OR this with CARET_CENTER to reposition even when visible, or +// OR this with CARET_SLOP to reposition whenever outside slop border +#define wxSTC_CARET_STRICT 0x04 + +// Notifications +// Type of modification and the action which caused the modification +// These are defined as a bit mask to make it easy to specify which notifications are wanted. +// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +#define wxSTC_MOD_INSERTTEXT 0x1 +#define wxSTC_MOD_DELETETEXT 0x2 +#define wxSTC_MOD_CHANGESTYLE 0x4 +#define wxSTC_MOD_CHANGEFOLD 0x8 +#define wxSTC_PERFORMED_USER 0x10 +#define wxSTC_PERFORMED_UNDO 0x20 +#define wxSTC_PERFORMED_REDO 0x40 +#define wxSTC_LASTSTEPINUNDOREDO 0x100 +#define wxSTC_MOD_CHANGEMARKER 0x200 +#define wxSTC_MOD_BEFOREINSERT 0x400 +#define wxSTC_MOD_BEFOREDELETE 0x800 +#define wxSTC_MODEVENTMASKALL 0xF77 + +// Symbolic key codes and modifier flags +// ASCII and other printable characters below 256 +// Extended keys above 300 +#define wxSTC_KEY_DOWN 300 +#define wxSTC_KEY_UP 301 +#define wxSTC_KEY_LEFT 302 +#define wxSTC_KEY_RIGHT 303 +#define wxSTC_KEY_HOME 304 +#define wxSTC_KEY_END 305 +#define wxSTC_KEY_PRIOR 306 +#define wxSTC_KEY_NEXT 307 +#define wxSTC_KEY_DELETE 308 +#define wxSTC_KEY_INSERT 309 +#define wxSTC_KEY_ESCAPE 7 +#define wxSTC_KEY_BACK 8 +#define wxSTC_KEY_TAB 9 +#define wxSTC_KEY_RETURN 13 +#define wxSTC_KEY_ADD 310 +#define wxSTC_KEY_SUBTRACT 311 +#define wxSTC_KEY_DIVIDE 312 +#define wxSTC_SCMOD_SHIFT 1 +#define wxSTC_SCMOD_CTRL 2 +#define wxSTC_SCMOD_ALT 4 + +// For SciLexer.h +#define wxSTC_LEX_CONTAINER 0 +#define wxSTC_LEX_NULL 1 +#define wxSTC_LEX_PYTHON 2 +#define wxSTC_LEX_CPP 3 +#define wxSTC_LEX_HTML 4 +#define wxSTC_LEX_XML 5 +#define wxSTC_LEX_PERL 6 +#define wxSTC_LEX_SQL 7 +#define wxSTC_LEX_VB 8 +#define wxSTC_LEX_PROPERTIES 9 +#define wxSTC_LEX_ERRORLIST 10 +#define wxSTC_LEX_MAKEFILE 11 +#define wxSTC_LEX_BATCH 12 +#define wxSTC_LEX_XCODE 13 +#define wxSTC_LEX_LATEX 14 +#define wxSTC_LEX_LUA 15 +#define wxSTC_LEX_DIFF 16 + +// Lexical states for SCLEX_PYTHON +#define wxSTC_P_DEFAULT 0 +#define wxSTC_P_COMMENTLINE 1 +#define wxSTC_P_NUMBER 2 +#define wxSTC_P_STRING 3 +#define wxSTC_P_CHARACTER 4 +#define wxSTC_P_WORD 5 +#define wxSTC_P_TRIPLE 6 +#define wxSTC_P_TRIPLEDOUBLE 7 +#define wxSTC_P_CLASSNAME 8 +#define wxSTC_P_DEFNAME 9 +#define wxSTC_P_OPERATOR 10 +#define wxSTC_P_IDENTIFIER 11 +#define wxSTC_P_COMMENTBLOCK 12 +#define wxSTC_P_STRINGEOL 13 + +// Lexical states for SCLEX_CPP, SCLEX_VB +#define wxSTC_C_DEFAULT 0 +#define wxSTC_C_COMMENT 1 +#define wxSTC_C_COMMENTLINE 2 +#define wxSTC_C_COMMENTDOC 3 +#define wxSTC_C_NUMBER 4 +#define wxSTC_C_WORD 5 +#define wxSTC_C_STRING 6 +#define wxSTC_C_CHARACTER 7 +#define wxSTC_C_UUID 8 +#define wxSTC_C_PREPROCESSOR 9 +#define wxSTC_C_OPERATOR 10 +#define wxSTC_C_IDENTIFIER 11 +#define wxSTC_C_STRINGEOL 12 +#define wxSTC_C_VERBATIM 13 + +// Lexical states for SCLEX_HTML, SCLEX_XML +#define wxSTC_H_DEFAULT 0 +#define wxSTC_H_TAG 1 +#define wxSTC_H_TAGUNKNOWN 2 +#define wxSTC_H_ATTRIBUTE 3 +#define wxSTC_H_ATTRIBUTEUNKNOWN 4 +#define wxSTC_H_NUMBER 5 +#define wxSTC_H_DOUBLESTRING 6 +#define wxSTC_H_SINGLESTRING 7 +#define wxSTC_H_OTHER 8 +#define wxSTC_H_COMMENT 9 +#define wxSTC_H_ENTITY 10 + +// XML and ASP +#define wxSTC_H_TAGEND 11 +#define wxSTC_H_XMLSTART 12 +#define wxSTC_H_XMLEND 13 +#define wxSTC_H_SCRIPT 14 +#define wxSTC_H_ASP 15 +#define wxSTC_H_ASPAT 16 +#define wxSTC_H_CDATA 17 +#define wxSTC_H_QUESTION 18 + +// More HTML +#define wxSTC_H_VALUE 19 + +// Embedded Javascript +#define wxSTC_HJ_START 40 +#define wxSTC_HJ_DEFAULT 41 +#define wxSTC_HJ_COMMENT 42 +#define wxSTC_HJ_COMMENTLINE 43 +#define wxSTC_HJ_COMMENTDOC 44 +#define wxSTC_HJ_NUMBER 45 +#define wxSTC_HJ_WORD 46 +#define wxSTC_HJ_KEYWORD 47 +#define wxSTC_HJ_DOUBLESTRING 48 +#define wxSTC_HJ_SINGLESTRING 49 +#define wxSTC_HJ_SYMBOLS 50 +#define wxSTC_HJ_STRINGEOL 51 + +// ASP Javascript +#define wxSTC_HJA_START 55 +#define wxSTC_HJA_DEFAULT 56 +#define wxSTC_HJA_COMMENT 57 +#define wxSTC_HJA_COMMENTLINE 58 +#define wxSTC_HJA_COMMENTDOC 59 +#define wxSTC_HJA_NUMBER 60 +#define wxSTC_HJA_WORD 61 +#define wxSTC_HJA_KEYWORD 62 +#define wxSTC_HJA_DOUBLESTRING 63 +#define wxSTC_HJA_SINGLESTRING 64 +#define wxSTC_HJA_SYMBOLS 65 +#define wxSTC_HJA_STRINGEOL 66 + +// Embedded VBScript +#define wxSTC_HB_START 70 +#define wxSTC_HB_DEFAULT 71 +#define wxSTC_HB_COMMENTLINE 72 +#define wxSTC_HB_NUMBER 73 +#define wxSTC_HB_WORD 74 +#define wxSTC_HB_STRING 75 +#define wxSTC_HB_IDENTIFIER 76 +#define wxSTC_HB_STRINGEOL 77 + +// ASP VBScript +#define wxSTC_HBA_START 80 +#define wxSTC_HBA_DEFAULT 81 +#define wxSTC_HBA_COMMENTLINE 82 +#define wxSTC_HBA_NUMBER 83 +#define wxSTC_HBA_WORD 84 +#define wxSTC_HBA_STRING 85 +#define wxSTC_HBA_IDENTIFIER 86 +#define wxSTC_HBA_STRINGEOL 87 + +// Embedded Python +#define wxSTC_HP_START 90 +#define wxSTC_HP_DEFAULT 91 +#define wxSTC_HP_COMMENTLINE 92 +#define wxSTC_HP_NUMBER 93 +#define wxSTC_HP_STRING 94 +#define wxSTC_HP_CHARACTER 95 +#define wxSTC_HP_WORD 96 +#define wxSTC_HP_TRIPLE 97 +#define wxSTC_HP_TRIPLEDOUBLE 98 +#define wxSTC_HP_CLASSNAME 99 +#define wxSTC_HP_DEFNAME 100 +#define wxSTC_HP_OPERATOR 101 +#define wxSTC_HP_IDENTIFIER 102 + +// ASP Python +#define wxSTC_HPA_START 105 +#define wxSTC_HPA_DEFAULT 106 +#define wxSTC_HPA_COMMENTLINE 107 +#define wxSTC_HPA_NUMBER 108 +#define wxSTC_HPA_STRING 109 +#define wxSTC_HPA_CHARACTER 110 +#define wxSTC_HPA_WORD 111 +#define wxSTC_HPA_TRIPLE 112 +#define wxSTC_HPA_TRIPLEDOUBLE 113 +#define wxSTC_HPA_CLASSNAME 114 +#define wxSTC_HPA_DEFNAME 115 +#define wxSTC_HPA_OPERATOR 116 +#define wxSTC_HPA_IDENTIFIER 117 + +// PHP +#define wxSTC_HPHP_DEFAULT 118 +#define wxSTC_HPHP_HSTRING 119 +#define wxSTC_HPHP_SIMPLESTRING 120 +#define wxSTC_HPHP_WORD 121 +#define wxSTC_HPHP_NUMBER 122 +#define wxSTC_HPHP_VARIABLE 123 +#define wxSTC_HPHP_COMMENT 124 +#define wxSTC_HPHP_COMMENTLINE 125 +#define wxSTC_HPHP_STRINGEOL 126 + +// Lexical states for SCLEX_PERL +#define wxSTC_PL_DEFAULT 0 +#define wxSTC_PL_HERE 1 +#define wxSTC_PL_COMMENTLINE 2 +#define wxSTC_PL_POD 3 +#define wxSTC_PL_NUMBER 4 +#define wxSTC_PL_WORD 5 +#define wxSTC_PL_STRING 6 +#define wxSTC_PL_CHARACTER 7 +#define wxSTC_PL_PUNCTUATION 8 +#define wxSTC_PL_PREPROCESSOR 9 +#define wxSTC_PL_OPERATOR 10 +#define wxSTC_PL_IDENTIFIER 11 +#define wxSTC_PL_SCALAR 12 +#define wxSTC_PL_ARRAY 13 +#define wxSTC_PL_HASH 14 +#define wxSTC_PL_SYMBOLTABLE 15 +#define wxSTC_PL_REF 16 +#define wxSTC_PL_REGEX 17 +#define wxSTC_PL_REGSUBST 18 +#define wxSTC_PL_LONGQUOTE 19 +#define wxSTC_PL_BACKTICKS 20 +#define wxSTC_PL_DATASECTION 21 + +// Lexical states for SCLEX_LATEX +#define wxSTC_L_DEFAULT 0 +#define wxSTC_L_COMMAND 1 +#define wxSTC_L_TAG 2 +#define wxSTC_L_MATH 3 +#define wxSTC_L_COMMENT 4 + +// Lexical states for SCLEX_LUA +#define wxSTC_LUA_DEFAULT 0 +#define wxSTC_LUA_COMMENT 1 +#define wxSTC_LUA_COMMENTLINE 2 +#define wxSTC_LUA_COMMENTDOC 3 +#define wxSTC_LUA_NUMBER 4 +#define wxSTC_LUA_WORD 5 +#define wxSTC_LUA_STRING 6 +#define wxSTC_LUA_CHARACTER 7 +#define wxSTC_LUA_LITERALSTRING 8 +#define wxSTC_LUA_PREPROCESSOR 9 +#define wxSTC_LUA_OPERATOR 10 +#define wxSTC_LUA_IDENTIFIER 11 +#define wxSTC_LUA_STRINGEOL 12 +#define wxSTC_ERR_DEFAULT 0 +#define wxSTC_ERR_PYTHON 1 +#define wxSTC_ERR_GCC 2 +#define wxSTC_ERR_MS 3 +#define wxSTC_ERR_CMD 4 +#define wxSTC_ERR_BORLAND 5 +#define wxSTC_ERR_PERL 6 + +// END of generated section +//---------------------------------------------------------------------- +// Others +#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN)) -const int wxSTC_CARET_SLOP = 0x01; -const int WXSTC_CARET_CENTER = 0x02; -const int wxSTC_CARET_STRICT = 0x04; -const int wxSTC_MARGIN_SYMBOL = 0; -const int wxSTC_MARGIN_NUMBER = 1; +//---------------------------------------------------------------------- class ScintillaWX; // forward declare class WordList; @@ -178,7 +465,7 @@ public: wxStyledTextCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const char* name = wxSTCNameStr); + const char* name = "styledtext"); #else wxStyledTextCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -191,288 +478,769 @@ public: ~wxStyledTextCtrl(); #endif +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate - // Text retrieval and modification - wxString GetText(); - bool SetText(const wxString& text); - wxString GetLine(int line); - void ReplaceSelection(const wxString& text); - void SetReadOnly(bool readOnly); - bool GetReadOnly(); - wxString GetTextRange(int startPos, int endPos); - wxString GetStyledTextRange(int startPos, int endPos); -#ifndef SWIG - void GetTextRange(int startPos, int endPos, char* buff); - void GetStyledTextRange(int startPos, int endPos, char* buff); -#endif - void AddText(const wxString& text); - void AddStyledText(const wxString& text); - void InsertText(int pos, const wxString& text); - void ClearAll(); - char GetCharAt(int pos); - char GetStyleAt(int pos); - void SetStyleBits(int bits); - int GetStyleBits(); - - - // Clipboard - void Cut(); - void Copy(); - void Paste(); - bool CanPaste(); - void ClearClipbrd(); // avoiding name conflict with virtual in wxWindow - - - // Undo and Redo - void Undo(); - bool CanUndo(); - void EmptyUndoBuffer(); - void Redo(); - bool CanRedo(); - void SetUndoCollection(wxSTC_UndoType type); - wxSTC_UndoType GetUndoCollection(); - void BeginUndoAction(); - void EndUndoAction(); - - - // Selection and information -#ifdef SWIG - void GetSelection(int* OUTPUT, int* OUTPUT); -#else - void GetSelection(int* startPos, int* endPos); -#endif - void SetSelection(int startPos, int endPos); - wxString GetSelectedText(); - void HideSelection(bool hide); - bool GetHideSelection(); - - int GetTextLength(); - int GetFirstVisibleLine(); - bool GetModified(); - int GetLineCount(); - wxRect GetRect(); - int GetLineFromPos(int pos); - int GetLineStartPos(int line); - int GetLineLengthAtPos(int pos); - int GetLineLength(int line); -#ifdef SWIG - wxString GetCurrentLineText(int* OUTPUT); -#else - wxString GetCurrentLineText(int* linePos); -#endif - int GetCurrentLine(); - int PositionFromPoint(wxPoint pt); - int LineFromPoint(wxPoint pt); - wxPoint PointFromPosition(int pos); - int GetCurrentPos(); - int GetAnchor(); - void SelectAll(); - void SetCurrentPosition(int pos); - void SetAnchor(int pos); - void GotoPos(int pos); - void GotoLine(int line); - void ChangePosition(int delta, bool extendSelection); - void PageMove(int cmdKey, bool extendSelection); - - void ScrollBy(int columnDelta, int lineDelta); - void ScrollToLine(int line); - void ScrollToColumn(int column); - void EnsureCaretVisible(); - void SetCaretPolicy(int policy, int slop=0); - int GetSelectionType(); - int GetLinesOnScreen(); - bool IsSelectionRectangle(); - void SetUseHorizontalScrollBar(bool use); - bool GetUseHorizontalScrollBar(); - - - // Searching - int FindText(int minPos, int maxPos, const wxString& text, - bool caseSensitive, bool wholeWord); - void SearchAnchor(); - int SearchNext(const wxString& text, bool caseSensitive, bool wholeWord); - int SearchPrev(const wxString& text, bool caseSensitive, bool wholeWord); - - - // Visible whitespace - bool GetViewWhitespace(); - void SetViewWhitespace(bool visible); - - - // Line endings - wxSTC_EOL GetEOLMode(); - void SetEOLMode(wxSTC_EOL mode); - bool GetViewEOL(); - void SetViewEOL(bool visible); - void ConvertEOL(wxSTC_EOL mode); - - - // Styling - int GetEndStyled(); - void StartStyling(int pos, int mask); - void SetStyleFor(int length, int style); - void SetStyleBytes(int length, char* styleBytes); - void SetLineState(int line, int value); - int GetLineState(int line); - - - // Style Definition - void StyleClearAll(); - void StyleResetDefault(); - void StyleSetSpec(int styleNum, const wxString& spec); - void StyleSetForeground(int styleNum, const wxColour& colour); - void StyleSetBackground(int styleNum, const wxColour& colour); - void StyleSetFont(int styleNum, wxFont& font); - void StyleSetFontAttr(int styleNum, int size, const wxString& faceName, bool bold, bool italic); - void StyleSetBold(int styleNum, bool bold); - void StyleSetItalic(int styleNum, bool italic); - void StyleSetFaceName(int styleNum, const wxString& faceName); - void StyleSetSize(int styleNum, int pointSize); - void StyleSetEOLFilled(int styleNum, bool fillEOL); - - - // Margins in the edit area - int GetLeftMargin(); - int GetRightMargin(); - void SetMargins(int left, int right); - - - // Margins for selection, markers, etc. - void SetMarginType(int margin, int type); - int GetMarginType(int margin); + + // Add text to the document + void AddText(const wxString& text); + + // Add array of cells to document + void AddStyledText(const wxString& text); + + // Insert string at a position + void InsertText(int pos, const wxString& text); + + // Delete all text in the document + void ClearAll(); + + // Set all style bytes to 0, remove all folding information + void ClearDocumentStyle(); + + // The number of characters in the document + int GetLength(); + + // Returns the character byte at the position + int GetCharAt(int pos); + + // Returns the position of the caret + int GetCurrentPos(); + + // Returns the position of the opposite end of the selection to the caret + int GetAnchor(); + + // Returns the style byte at the position + int GetStyleAt(int pos); + + // Redoes the next action on the undo history + void Redo(); + + // Choose between collecting actions into the undo + // history and discarding them. + void SetUndoCollection(bool collectUndo); + + // Select all the text in the document. + void SelectAll(); + + // Remember the current position in the undo history as the position + // at which the document was saved. + void SetSavePoint(); + + // Retrieve a buffer of cells. + wxString GetStyledText(int startPos, int endPos); + + // Are there any redoable actions in the undo history. + bool CanRedo(); + + // Retrieve the line number at which a particular marker is located + int MarkerLineFromHandle(int handle); + + // Delete a marker. + void MarkerDeleteHandle(int handle); + + // Is undo history being collected? + bool GetUndoCollection(); + + // Are white space characters currently visible? + // Returns one of SCWS_* constants. + int GetViewWhiteSpace(); + + // Make white space characters invisible, always visible or visible outside indentation. + void SetViewWhiteSpace(int viewWS); + + // Find the position from a point within the window. + int PositionFromPoint(wxPoint pt); + + // Set caret to start of a line and ensure it is visible. + void GotoLine(int line); + + // Set caret to a position and ensure it is visible. + void GotoPos(int pos); + + // Set the selection anchor to a position. The anchor is the opposite + // end of the selection from the caret. + void SetAnchor(int posAnchor); + + // Retrieve the text of the line containing the caret. + // Returns the index of the caret on the line. + wxString GetCurLine(int* OUTPUT=NULL); + + // Retrieve the position of the last correctly styled character. + int GetEndStyled(); + + // Convert all line endings in the document to use the current mode. + void ConvertEOLs(); + + // Retrieve the current end of line mode - one of CRLF, CR, or LF. + int GetEOLMode(); + + // Set the current end of line mode. + void SetEOLMode(int eolMode); + + // Set the current styling position to pos and the styling mask to mask. + // The styling mask can be used to protect some bits in each styling byte from + // modification. + void StartStyling(int pos, int mask); + + // Change style from current styling position for length characters to a style + // and move the current styling position to after this newly styled segment. + void SetStyling(int length, int style); + + // Is drawing done first into a buffer or direct to the screen. + bool GetBufferedDraw(); + + // If drawing is buffered then each line of text is drawn into a bitmap buffer + // before drawing it to the screen to avoid flicker. + void SetBufferedDraw(bool buffered); + + // Change the visible size of a tab to be a multiple of the width of a space + // character. + void SetTabWidth(int tabWidth); + + // Retrieve the visible size of a tab. + int GetTabWidth(); + + // Set the code page used to interpret the bytes of the document as characters. + // The SC_CP_UTF8 value can be used to enter Unicode mode. + void SetCodePage(int codePage); + + // Set the symbol used for a particular marker number, + // and optionally the for and background colours. + void MarkerDefine(int markerNumber, int markerSymbol, + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour); + + // Set the foreground colour used for a particular marker number. + void MarkerSetForeground(int markerNumber, const wxColour& fore); + + // Set the background colour used for a particular marker number. + void MarkerSetBackground(int markerNumber, const wxColour& back); + + // Add a marker to a line. + void MarkerAdd(int line, int markerNumber); + + // Delete a marker from a line + void MarkerDelete(int line, int markerNumber); + + // Delete all markers with a particular number from all lines + void MarkerDeleteAll(int markerNumber); + + // Get a bit mask of all the markers set on a line. + int MarkerGet(int line); + + // Find the next line after lineStart that includes a marker in mask. + int MarkerNext(int lineStart, int markerMask); + + // Find the previous line before lineStart that includes a marker in mask. + int MarkerPrevious(int lineStart, int markerMask); + + // Set a margin to be either numeric or symbolic. + void SetMarginType(int margin, int marginType); + + // Retrieve the type of a margin. + int GetMarginType(int margin); + + // Set the width of a margin to a width expressed in pixels. void SetMarginWidth(int margin, int pixelWidth); - int GetMarginWidth(int margin); + + // Retrieve the width of a margin in pixels. + int GetMarginWidth(int margin); + + // Set a mask that determines which markers are displayed in a margin. void SetMarginMask(int margin, int mask); - int GetMarginMask(int margin); + + // Retrieve the marker mask of a margin. + int GetMarginMask(int margin); + + // Make a margin sensitive or insensitive to mouse clicks. void SetMarginSensitive(int margin, bool sensitive); + + // Retrieve the mouse click sensitivity of a margin. bool GetMarginSensitive(int margin); + // Clear all the styles and make equivalent to the global default style. + void StyleClearAll(); + + // Set the foreground colour of a style. + void StyleSetForeground(int style, const wxColour& fore); + + // Set the background colour of a style. + void StyleSetBackground(int style, const wxColour& back); + + // Set a style to be bold or not. + void StyleSetBold(int style, bool bold); + + // Set a style to be italic or not. + void StyleSetItalic(int style, bool italic); + + // Set the size of characters of a style. + void StyleSetSize(int style, int sizePoints); + + // Set the font of a style. + void StyleSetFaceName(int style, const wxString& fontName); + + // Set a style to have its end of line filled or not. + void StyleSetEOLFilled(int style, bool filled); + + // Reset the default style to its state at startup + void StyleResetDefault(); + + // Set a style to be underlined or not. + void StyleSetUnderline(int style, bool underline); + + // Set the foreground colour of the selection and whether to use this setting. + void SetSelForeground(bool useSetting, const wxColour& fore); + + // Set the background colour of the selection and whether to use this setting. + void SetSelBackground(bool useSetting, const wxColour& back); + + // Set the foreground colour of the caret. + void SetCaretForeground(const wxColour& fore); + + // When key+modifier combination km is pressed perform msg. + void CmdKeyAssign(int key, int modifiers, int cmd); + + // When key+modifier combination km do nothing. + void CmdKeyClear(int key, int modifiers); + + // Drop all key mappings. + void CmdKeyClearAll(); + + // Set the styles for a segment of the document. + void SetStyleBytes(int length, char* styleBytes); + + // Set a style to be visible or not. + void StyleSetVisible(int style, bool visible); + + // Get the time in milliseconds that the caret is on and off. + int GetCaretPeriod(); + + // Get the time in milliseconds that the caret is on and off. 0 = steady on. + void SetCaretPeriod(int periodMilliseconds); + + // Set the set of characters making up words for when moving or selecting + // by word. + void SetWordChars(const wxString& characters); + + // Start a sequence of actions that is undone and redone as a unit. + // May be nested. + void BeginUndoAction(); + + // End a sequence of actions that is undone and redone as a unit. + void EndUndoAction(); + + // Set an indicator to plain, squiggle or TT. + void IndicatorSetStyle(int indic, int style); + + // Retrieve the style of an indicator. + int IndicatorGetStyle(int indic); + + // Set the foreground colour of an indicator. + void IndicatorSetForeground(int indic, const wxColour& fore); + + // Retrieve the foreground colour of an indicator. + wxColour IndicatorGetForeground(int indic); + + // Divide each styling byte into lexical class bits (default:5) and indicator + // bits (default:3). If a lexer requires more than 32 lexical states, then this + // is used to expand the possible states. + void SetStyleBits(int bits); + + // Retrieve number of bits in style bytes used to hold the lexical state. + int GetStyleBits(); + + // Used to hold extra styling information for each line. + void SetLineState(int line, int state); + + // Retrieve the extra styling information for a line. + int GetLineState(int line); + + // Retrieve the last line number that has line state. + int GetMaxLineState(); + + // Display a auto-completion list. + // The lenEntered parameter indicates how many characters before + // the caret should be used to provide context. + void AutoCompShow(int lenEntered, const wxString& itemList); + + // Remove the auto-completion list from the screen. + void AutoCompCancel(); + + // Is there an auto-completion list visible? + bool AutoCompActive(); + + // Retrieve the position of the caret when the auto-completion list was + // displayed. + int AutoCompPosStart(); + + // User has selected an item so remove the list and insert the selection. + void AutoCompComplete(); + + // Define a set of character that when typed cancel the auto-completion list. + void AutoCompStops(const wxString& characterSet); + + // Change the separator character in the string setting up an auto-completion + // list. Default is space but can be changed if items contain space. + void AutoCompSetSeparator(int separatorCharacter); + + // Retrieve the auto-completion list separator character. + int AutoCompGetSeparator(); + + // Select the item in the auto-completion list that starts with a string. + void AutoCompSelect(const wxString& text); + + // Should the auto-completion list be cancelled if the user backspaces to a + // position before where the box was created. + void AutoCompSetCancelAtStart(bool cancel); + + // Retrieve whether auto-completion cancelled by backspacing before start. + bool AutoCompGetCancelAtStart(); + + // Define a set of character that when typed fills up the selected word. + void AutoCompSetFillUps(const wxString& characterSet); + + // Should a single item auto-completion list automatically choose the item. + void AutoCompSetChooseSingle(bool chooseSingle); + + // Retrieve whether a single item auto-completion list automatically choose the item. + bool AutoCompGetChooseSingle(); + + // Set whether case is significant when performing auto-completion searches. + void AutoCompSetIgnoreCase(bool ignoreCase); + + // Retrieve state of ignore case flag. + bool AutoCompGetIgnoreCase(); + + // Set the number of spaces used for one level of indentation. + void SetIndent(int indentSize); + + // Retrieve indentation size. + int GetIndent(); + + // Indentation will only use space characters if useTabs is false, otherwise + // it will use a combination of tabs and spaces. + void SetUseTabs(bool useTabs); + + // Retrieve whether tabs will be used in indentation. + bool GetUseTabs(); + + // Change the indentation of a line to a number of columns. + void SetLineIndentation(int line, int indentSize); + + // Retrieve the number of columns that a line is indented. + int GetLineIndentation(int line); + + // Retrieve the position before the first non indentation character on a line. + int GetLineIndentPosition(int line); - // Selection and Caret styles - void SetSelectionForeground(const wxColour& colour); - void SetSelectionBackground(const wxColour& colour); - void SetCaretForeground(const wxColour& colour); - int GetCaretPeriod(); - void SetCaretPeriod(int milliseconds); - - - // Other settings - void SetBufferedDraw(bool isBuffered); - void SetTabWidth(int numChars); - void SetIndent(int numChars); - void SetUseTabs(bool usetabs); - void SetLineIndentation(int line, int indentation); - int GetLineIndentation(int line); - int GetLineIndentationPos(int line); - void SetWordChars(const wxString& wordChars); - - void SetUsePop(bool usepopup); - - - // Brace highlighting - void BraceHighlight(int pos1, int pos2); - void BraceBadlight(int pos); - int BraceMatch(int pos, int maxReStyle=0); - - - // Markers - void MarkerDefine(int markerNumber, int markerSymbol, - const wxColour& foreground, - const wxColour& background); - void MarkerSetType(int markerNumber, int markerSymbol); - void MarkerSetForeground(int markerNumber, const wxColour& colour); - void MarkerSetBackground(int markerNumber, const wxColour& colour); - int MarkerAdd(int line, int markerNumber); - void MarkerDelete(int line, int markerNumber); - void MarkerDeleteAll(int markerNumber); - int MarkerGet(int line); - int MarkerGetNextLine(int lineStart, int markerMask); - int MarkerGetPrevLine(int lineStart, int markerMask); - int MarkerLineFromHandle(int handle); - void MarkerDeleteHandle(int handle); - - - // Indicators - void IndicatorSetStyle(int indicNum, int indicStyle); - int IndicatorGetStyle(int indicNum); - void IndicatorSetColour(int indicNum, const wxColour& colour); - - - // Auto completion - void AutoCompShow(const wxString& listOfWords); - void AutoCompCancel(); - bool AutoCompActive(); - int AutoCompPosAtStart(); - void AutoCompComplete(); - void AutoCompStopChars(const wxString& stopChars); - void AutoCompSetSeparator(char separator); - char AutoCompGetSeparator(); - void AutoCompSelect(const wxString& stringtoselect); - - // Call tips - void CallTipShow(int pos, const wxString& text); - void CallTipCancel(); - bool CallTipActive(); - int CallTipPosAtStart(); - void CallTipSetHighlight(int start, int end); - void CallTipSetBackground(const wxColour& colour); - - - // Key bindings - void CmdKeyAssign(int key, int modifiers, int cmd); - void CmdKeyClear(int key, int modifiers); - void CmdKeyClearAll(); - void CmdKeyExecute(int cmd); - - - // Print formatting - int FormatRange(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, // Why does it use two? Can they be the same? - wxRect renderRect, - wxRect pageRect); - - - // Document Sharing (multiple views) - void* GetDocument(); - void SetDocument(void* document); - // TODO: create a wx wrapper for Scintilla's document class - - - // Folding - int VisibleFromDocLine(int docLine); - int DocLineFromVisible(int displayLine); - int SetFoldLevel(int line, int level); - int GetFoldLevel(int line); - int GetLastChild(int line, int level); - int GetFoldParent(int line); - void ShowLines(int lineStart, int lineEnd); - void HideLines(int lineStart, int lineEnd); - bool GetLineVisible(int line); - void SetFoldExpanded(int line, bool expanded); - bool GetFoldExpanded(int line); - void ToggleFold(int line); - void EnsureVisible(int line); - void SetFoldFlags(int flags); - - - // Long Lines - int GetEdgeColumn(); - void SetEdgeColumn(int column); - wxSTC_EDGE GetEdgeMode(); - void SetEdgeMode(wxSTC_EDGE mode); + // Retrieve the column number of a position, taking tab width into account. + int GetColumn(int pos); + + // Show or hide the horizontal scroll bar. + void SetUseHorizontalScrollBar(bool show); + + // Is the horizontal scroll bar visible? + bool GetUseHorizontalScrollBar(); + + // Show or hide indentation guides. + void SetIndentationGuides(bool show); + + // Are the indentation guides visible? + bool GetIndentationGuides(); + + // Set the highlighted indentation guide column. + // 0 = no highlighted guide. + void SetHighlightGuide(int column); + + // Get the highlighted indentation guide column. + int GetHighlightGuide(); + + // Get the position after the last visible characters on a line. + int GetLineEndPosition(int line); + + // Get the code page used to interpret the bytes of the document as characters. + int GetCodePage(); + + // Get the foreground colour of the caret. + wxColour GetCaretForeground(); + + // In read-only mode? + bool GetReadOnly(); + + // Sets the position of the caret. + void SetCurrentPos(int pos); + + // Sets the position that starts the selection - this becomes the anchor. + void SetSelectionStart(int pos); + + // Returns the position at the start of the selection. + int GetSelectionStart(); + + // Sets the position that ends the selection - this becomes the currentPosition. + void SetSelectionEnd(int pos); + + // Returns the position at the end of the selection. + int GetSelectionEnd(); + + // Sets the print magnification added to the point size of each style for printing. + void SetPrintMagnification(int magnification); + + // Returns the print magnification. + int GetPrintMagnification(); + + // Modify colours when printing for clearer printed text. + void SetPrintColourMode(int mode); + + // Returns the print colour mode. + int GetPrintColourMode(); + + // Find some text in the document. + int FindText(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord); + + // On Windows will draw the document into a display context such as a printer. + int FormatRange(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect); + + // Retrieve the line at the top of the display. + int GetFirstVisibleLine(); + + // Retrieve the contents of a line. + wxString GetLine(int line); + + // Returns the number of lines in the document. There is always at least one. + int GetLineCount(); + + // Sets the size in pixels of the left margin. + void SetMarginLeft(int width); + + // Returns the size in pixels of the left margin. + int GetMarginLeft(); + + // Sets the size in pixels of the right margin. + void SetMarginRight(int width); + + // Returns the size in pixels of the right margin. + int GetMarginRight(); + + // Is the document different from when it was last saved? + bool GetModify(); + + // Select a range of text. + void SetSelection(int start, int end); + + // Retrieve the selected text. + wxString GetSelectedText(); + + // Retrieve a range of text. + wxString GetTextRange(int startPos, int endPos); + + // Draw the selection in normal style or with selection highlighted. + void HideSelection(bool normal); + + // Retrieve the line containing a position. + int LineFromPosition(int pos); + + // Retrieve the position at the start of a line. + int PositionFromLine(int line); + + // Scroll horizontally and vertically. + void LineScroll(int columns, int lines); + + // Ensure the caret is visible. + void EnsureCaretVisible(); + + // Replace the selected text with the argument text. + void ReplaceSelection(const wxString& text); + + // Set to read only or read write. + void SetReadOnly(bool readOnly); + + // Will a paste succeed? + bool CanPaste(); + + // Are there any undoable actions in the undo history. + bool CanUndo(); + + // Delete the undo history. + void EmptyUndoBuffer(); + + // Undo one action in the undo history. + void Undo(); + + // Cut the selection to the clipboard. + void Cut(); + + // Copy the selection to the clipboard. + void Copy(); + + // Paste the contents of the clipboard into the document replacing the selection. + void Paste(); + + // Clear the selection. + void Clear(); + + // Replace the contents of the document with the argument text. + void SetText(const wxString& text); + + // Retrieve all the text in the document. + wxString GetText(); + + // Retrieve the number of characters in the document. + int GetTextLength(); + + // Set to overtype (true) or insert mode + void SetOvertype(bool overtype); + + // Returns true if overtype mode is active otherwise false is returned. + bool GetOvertype(); + + // Show a call tip containing a definition near position pos. + void CallTipShow(int pos, const wxString& definition); + + // Remove the call tip from the screen. + void CallTipCancel(); + + // Is there an active call tip? + bool CallTipActive(); + + // Retrieve the position where the caret was before displaying the call tip. + int CallTipPosAtStart(); + + // Highlight a segment of the definition. + void CallTipSetHighlight(int start, int end); + + // Set the background colour for the call tip. + void CallTipSetBackground(const wxColour& back); + + // Find the display line of a document line taking hidden lines into account. + int VisibleFromDocLine(int line); + + // Find the document line of a display line taking hidden lines into account. + int DocLineFromVisible(int lineDisplay); + + // Set the fold level of a line. + // This encodes an integer level along with flags indicating whether the + // line is a header and whether it is effectively white space. + void SetFoldLevel(int line, int level); + + // Retrieve the fold level of a line. + int GetFoldLevel(int line); + + // Find the last child line of a header line. + int GetLastChild(int line, int level); + + // Find the parent line of a child line. + int GetFoldParent(int line); + + // Make a range of lines visible. + void ShowLines(int lineStart, int lineEnd); + + // Make a range of lines invisible. + void HideLines(int lineStart, int lineEnd); + + // Is a line visible? + bool GetLineVisible(int line); + + // Show the children of a header line. + void SetFoldExpanded(int line, bool expanded); + + // Is a header line expanded? + bool GetFoldExpanded(int line); + + // Switch a header line between expanded and contracted. + void ToggleFold(int line); + + // Ensure a particular line is visible by expanding any header line hiding it. + void EnsureVisible(int line); + + // Set some debugging options for folding + void SetFoldFlags(int flags); + + // How many characters are on a line, not including end of line characters. + int LineLength(int line); + + // Highlight the characters at two positions. + void BraceHighlight(int pos1, int pos2); + + // Highlight the character at a position indicating there is no matching brace. + void BraceBadLight(int pos); + + // Find the position of a matching brace or INVALID_POSITION if no match. + int BraceMatch(int pos); + + // Are the end of line characters visible. + bool GetViewEOL(); + + // Make the end of line characters visible or invisible + void SetViewEOL(bool visible); + + // Retrieve a pointer to the document object. + void* GetDocPointer(); + + // Change the document object used. + void SetDocPointer(void* docPointer); + + // Set which document modification events are sent to the container. + void SetModEventMask(int mask); + + // Retrieve the column number which text should be kept within. + int GetEdgeColumn(); + + // Set the column number of the edge. + // If text goes past the edge then it is highlighted. + void SetEdgeColumn(int column); + + // Retrieve the edge highlight mode. + int GetEdgeMode(); + + // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that + // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + void SetEdgeMode(int mode); + + // Retrieve the colour used in edge indication. wxColour GetEdgeColour(); - void SetEdgeColour(const wxColour& colour); + // Change the colour used in edge indication. + void SetEdgeColour(const wxColour& edgeColour); + + // Sets the current caret position to be the search anchor. + void SearchAnchor(); + + // Find some text starting at the search anchor. + int SearchNext(int flags, const wxString& text); + + // Find some text starting at the search anchor and moving backwards. + int SearchPrev(int flags, const wxString& text); + + // Set the way the line the caret is on is kept visible. + void SetCaretPolicy(int caretPolicy, int caretSlop); + + // Retrieves the number of lines completely visible. + int LinesOnScreen(); + + // Set whether a pop up menu is displayed automatically when the user presses + // the wrong mouse button. + void UsePopUp(bool allowPopUp); + + // Is the selection a rectangular. The alternative is the more common stream selection. + bool SelectionIsRectangle(); + + // Set the zoom level. This number of points is added to the size of all fonts. + // It may be positive to magnify or negative to reduce. + void SetZoom(int zoom); + + // Retrieve the zoom level. + int GetZoom(); + + // Create a new document object. + // Starts with reference count of 1 and not selected into editor. + void* CreateDocument(); + + // Extend life of document. + void AddRefDocument(void* docPointer); + + // Release a reference to the document, deleting document if it fades to black. + void ReleaseDocument(void* docPointer); + + // Get which document modification events are sent to the container. + int GetModEventMask(); + + // Start notifying the container of all key presses and commands. + void StartRecord(); + + // Stop notifying the container of all key presses and commands. + void StopRecord(); - // Lexer - void SetLexer(wxSTC_LEX lexer); - wxSTC_LEX GetLexer(); - void Colourise(int start, int end); - void SetProperty(const wxString& key, const wxString& value); - void SetKeywords(int keywordSet, const wxString& keywordList); + // Set the lexing language of the document. + void SetLexer(int lexer); + + // Retrieve the lexing language of the document. + int GetLexer(); + + // Colourise a segment of the document using the current lexing language. + void Colourise(int start, int end); + + // Set up a value that may be used by a lexer for some optional feature. + void SetProperty(const wxString& key, const wxString& value); + + // Set up the key words used by the lexer. + void SetKeyWords(int keywordSet, const wxString& keyWords); + +// END of generated section +//---------------------------------------------------------------------- +// Others... + + + // Returns the line number of the line with the caret. + int GetCurrentLine(); + + // Extract style settings from a spec-string which is composed of one or + // more of the following comma separated elements: + // + // bold turns on bold + // italic turns on italics + // fore:#RRGGBB sets the foreground colour + // back:#RRGGBB sets the background colour + // face:[facename] sets the font face name to use + // size:[num] sets the font size in points + // eol turns on eol filling + // underline turns on underlining + // + void StyleSetSpec(int styleNum, const wxString& spec); + + + + // Set style size, face, bold, italic, and underline attributes from + // a wxFont's attributes. + void StyleSetFont(int styleNum, wxFont& font); + + + + // Set all font style attributes at once. + void StyleSetFontAttr(int styleNum, int size, + const wxString& faceName, + bool bold, bool italic, + bool underline); + + + + // Perform one of the operations defined by the wxSTC_CMD_* constants. + void CmdKeyExecute(int cmd); + + + + // Set the left and right margin in the edit area, measured in pixels. + void SetMargins(int left, int right); + + + // Retrieve the start and end positions of the current selection. +#ifdef SWIG + void GetSelection(int* OUTPUT, int* OUTPUT); +#else + void GetSelection(int* startPos, int* endPos); +#endif + + // Retrieve the point in the window where a position is displayed. + wxPoint PointFromPosition(int pos); + + + // Scroll enough to make the given line visible + void ScrollToLine(int line); + + + // Scroll enough to make the given column visible + void ScrollToColumn(int column); + +//---------------------------------------------------------------------- #ifndef SWIG @@ -507,8 +1275,6 @@ private: ScintillaWX* m_swx; wxStopWatch m_stopWatch; - bool m_readOnly; - wxSTC_UndoType m_undoType; friend class ScintillaWX; @@ -584,7 +1350,7 @@ private: }; - +// Event types enum { wxEVT_STC_CHANGE = 1650, wxEVT_STC_STYLENEEDED, @@ -598,9 +1364,11 @@ enum { wxEVT_STC_KEY, wxEVT_STC_MACRORECORD, wxEVT_STC_MARGINCLICK, - wxEVT_STC_NEEDSHOWN + wxEVT_STC_NEEDSHOWN, + wxEVT_STC_POSCHANGED }; + #ifndef SWIG typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); @@ -617,6 +1385,7 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #endif diff --git a/wxPython/demo/data/stc.h.html b/wxPython/demo/data/stc.h.html new file mode 100644 index 0000000000..38aa8c4391 --- /dev/null +++ b/wxPython/demo/data/stc.h.html @@ -0,0 +1,1405 @@ + + +stc.h.html + + +
+////////////////////////////////////////////////////////////////////////////
+// Name:        stc.h
+// Purpose:     A wxWindows implementation of Scintilla.  This class is the
+//              one meant to be used directly by wx applications.  It does not
+//              derive directly from the Scintilla classes, and in fact there
+//              is no mention of Scintilla classes at all in this header.
+//              This class delegates all method calls and events to the
+//              Scintilla objects and so forth.  This allows the use of
+//              Scintilla without polluting the namespace with all the
+//              classes and itentifiers from Scintilla.
+//
+// Author:      Robin Dunn
+//
+// Created:     13-Jan-2000
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 by Total Control Software
+// Licence:     wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __stc_h__
+#define __stc_h__
+
+
+#include <wx/wx.h>
+
+//----------------------------------------------------------------------
+// BEGIN generated section.  The following code is automatically generated
+//       by gen_iface.py.  Do not edit this file.  Edit stc.h.in instead
+//       and regenerate
+
+#define wxSTC_INVALID_POSITION -1
+#define wxSTC_START 2000
+#define wxSTC_OPTIONAL_START 3000
+#define wxSTC_LEXER_START 4000
+#define wxSTC_CMD_REDO 2011
+#define wxSTC_CMD_SELECTALL 2013
+#define wxSTC_WS_INVISIBLE 0
+#define wxSTC_WS_VISIBLEALWAYS 1
+#define wxSTC_WS_VISIBLEAFTERINDENT 2
+#define wxSTC_EOL_CRLF 0
+#define wxSTC_EOL_CR 1
+#define wxSTC_EOL_LF 2
+
+// The SC_CP_UTF8 value can be used to enter Unicode mode.
+// This is the same value as CP_UTF8 in Windows
+#define wxSTC_CP_UTF8 65001
+#define wxSTC_MARKER_MAX 31
+#define wxSTC_MARK_CIRCLE 0
+#define wxSTC_MARK_ROUNDRECT 1
+#define wxSTC_MARK_ARROW 2
+#define wxSTC_MARK_SMALLRECT 3
+#define wxSTC_MARK_SHORTARROW 4
+#define wxSTC_MARK_EMPTY 5
+#define wxSTC_MARK_ARROWDOWN 6
+#define wxSTC_MARK_MINUS 7
+#define wxSTC_MARK_PLUS 8
+#define wxSTC_MARKNUM_FOLDER 30
+#define wxSTC_MARKNUM_FOLDEROPEN 31
+#define wxSTC_MARGIN_SYMBOL 0
+#define wxSTC_MARGIN_NUMBER 1
+#define wxSTC_STYLE_DEFAULT 32
+#define wxSTC_STYLE_LINENUMBER 33
+#define wxSTC_STYLE_BRACELIGHT 34
+#define wxSTC_STYLE_BRACEBAD 35
+#define wxSTC_STYLE_CONTROLCHAR 36
+#define wxSTC_STYLE_INDENTGUIDE 37
+#define wxSTC_STYLE_MAX 127
+
+// Character set identifiers are used in StyleSetCharacterSet.
+// The values are the same as the Windows *_CHARSET values.
+#define wxSTC_CHARSET_ANSI 0
+#define wxSTC_CHARSET_DEFAULT 1
+#define wxSTC_CHARSET_BALTIC 186
+#define wxSTC_CHARSET_CHINESEBIG5 136
+#define wxSTC_CHARSET_EASTEUROPE 238
+#define wxSTC_CHARSET_GB2312 134
+#define wxSTC_CHARSET_GREEK 161
+#define wxSTC_CHARSET_HANGUL 129
+#define wxSTC_CHARSET_MAC 77
+#define wxSTC_CHARSET_OEM 255
+#define wxSTC_CHARSET_RUSSIAN 204
+#define wxSTC_CHARSET_SHIFTJIS 128
+#define wxSTC_CHARSET_SYMBOL 2
+#define wxSTC_CHARSET_TURKISH 162
+#define wxSTC_CHARSET_JOHAB 130
+#define wxSTC_CHARSET_HEBREW 177
+#define wxSTC_CHARSET_ARABIC 178
+#define wxSTC_CHARSET_VIETNAMESE 163
+#define wxSTC_CHARSET_THAI 222
+#define wxSTC_INDIC_MAX 7
+#define wxSTC_INDIC_PLAIN 0
+#define wxSTC_INDIC_SQUIGGLE 1
+#define wxSTC_INDIC_TT 2
+#define wxSTC_INDIC_DIAGONAL 3
+#define wxSTC_INDIC_STRIKE 4
+#define wxSTC_INDIC0_MASK 32
+#define wxSTC_INDIC1_MASK 64
+#define wxSTC_INDIC2_MASK 128
+#define wxSTC_INDICS_MASK 32 | 64 | 128
+
+// PrintColourMode - use same colours as screen.
+#define wxSTC_PRINT_NORMAL 0
+
+// PrintColourMode - invert the light value of each style for printing.
+#define wxSTC_PRINT_INVERTLIGHT 1
+
+// PrintColourMode - force black text on white background for printing.
+#define wxSTC_PRINT_BLACKONWHITE 2
+#define wxSTC_FIND_DOWN 1
+#define wxSTC_FIND_WHOLEWORD 2
+#define wxSTC_FIND_MATCHCASE 4
+#define wxSTC_FIND_WORDSTART 0x00100000
+
+// SCFIND_REGEXP is not yet implemented.
+#define wxSTC_FIND_REGEXP 0x00200000
+#define wxSTC_CMD_UNDO 2176
+#define wxSTC_CMD_CUT 2177
+#define wxSTC_CMD_COPY 2178
+#define wxSTC_CMD_PASTE 2179
+#define wxSTC_FOLDLEVELBASE 0x400
+#define wxSTC_FOLDLEVELWHITEFLAG 0x1000
+#define wxSTC_FOLDLEVELHEADERFLAG 0x2000
+#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF
+#define wxSTC_CMD_LINEDOWN 2300
+#define wxSTC_CMD_LINEDOWNEXTEND 2301
+#define wxSTC_CMD_LINEUP 2302
+#define wxSTC_CMD_LINEUPEXTEND 2303
+#define wxSTC_CMD_CHARLEFT 2304
+#define wxSTC_CMD_CHARLEFTEXTEND 2305
+#define wxSTC_CMD_CHARRIGHT 2306
+#define wxSTC_CMD_CHARRIGHTEXTEND 2307
+#define wxSTC_CMD_WORDLEFT 2308
+#define wxSTC_CMD_WORDLEFTEXTEND 2309
+#define wxSTC_CMD_WORDRIGHT 2310
+#define wxSTC_CMD_WORDRIGHTEXTEND 2311
+#define wxSTC_CMD_HOME 2312
+#define wxSTC_CMD_HOMEEXTEND 2313
+#define wxSTC_CMD_LINEEND 2314
+#define wxSTC_CMD_LINEENDEXTEND 2315
+#define wxSTC_CMD_DOCUMENTSTART 2316
+#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317
+#define wxSTC_CMD_DOCUMENTEND 2318
+#define wxSTC_CMD_DOCUMENTENDEXTEND 2319
+#define wxSTC_CMD_PAGEUP 2320
+#define wxSTC_CMD_PAGEUPEXTEND 2321
+#define wxSTC_CMD_PAGEDOWN 2322
+#define wxSTC_CMD_PAGEDOWNEXTEND 2323
+#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324
+#define wxSTC_CMD_CANCEL 2325
+#define wxSTC_CMD_DELETEBACK 2326
+#define wxSTC_CMD_TAB 2327
+#define wxSTC_CMD_BACKTAB 2328
+#define wxSTC_CMD_NEWLINE 2329
+#define wxSTC_CMD_FORMFEED 2330
+#define wxSTC_CMD_VCHOME 2331
+#define wxSTC_CMD_VCHOMEEXTEND 2332
+#define wxSTC_CMD_ZOOMIN 2333
+#define wxSTC_CMD_ZOOMOUT 2334
+#define wxSTC_CMD_DELWORDLEFT 2335
+#define wxSTC_CMD_DELWORDRIGHT 2336
+#define wxSTC_CMD_LINECUT 2337
+#define wxSTC_CMD_LINEDELETE 2338
+#define wxSTC_CMD_LINETRANSPOSE 2339
+#define wxSTC_CMD_LOWERCASE 2340
+#define wxSTC_CMD_UPPERCASE 2341
+#define wxSTC_CMD_LINESCROLLDOWN 2342
+#define wxSTC_CMD_LINESCROLLUP 2343
+#define wxSTC_EDGE_NONE 0
+#define wxSTC_EDGE_LINE 1
+#define wxSTC_EDGE_BACKGROUND 2
+
+// Show caret within N lines of edge when it's scrolled to view
+#define wxSTC_CARET_SLOP 0x01
+
+// Center caret on screen when it's scrolled to view
+#define wxSTC_CARET_CENTER 0x02
+
+// OR this with CARET_CENTER to reposition even when visible, or
+// OR this with CARET_SLOP to reposition whenever outside slop border
+#define wxSTC_CARET_STRICT 0x04
+
+// Notifications
+// Type of modification and the action which caused the modification
+// These are defined as a bit mask to make it easy to specify which notifications are wanted.
+// One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
+#define wxSTC_MOD_INSERTTEXT 0x1
+#define wxSTC_MOD_DELETETEXT 0x2
+#define wxSTC_MOD_CHANGESTYLE 0x4
+#define wxSTC_MOD_CHANGEFOLD 0x8
+#define wxSTC_PERFORMED_USER 0x10
+#define wxSTC_PERFORMED_UNDO 0x20
+#define wxSTC_PERFORMED_REDO 0x40
+#define wxSTC_LASTSTEPINUNDOREDO 0x100
+#define wxSTC_MOD_CHANGEMARKER 0x200
+#define wxSTC_MOD_BEFOREINSERT 0x400
+#define wxSTC_MOD_BEFOREDELETE 0x800
+#define wxSTC_MODEVENTMASKALL 0xF77
+
+// Symbolic key codes and modifier flags
+// ASCII and other printable characters below 256
+// Extended keys above 300
+#define wxSTC_KEY_DOWN 300
+#define wxSTC_KEY_UP 301
+#define wxSTC_KEY_LEFT 302
+#define wxSTC_KEY_RIGHT 303
+#define wxSTC_KEY_HOME 304
+#define wxSTC_KEY_END 305
+#define wxSTC_KEY_PRIOR 306
+#define wxSTC_KEY_NEXT 307
+#define wxSTC_KEY_DELETE 308
+#define wxSTC_KEY_INSERT 309
+#define wxSTC_KEY_ESCAPE 7
+#define wxSTC_KEY_BACK 8
+#define wxSTC_KEY_TAB 9
+#define wxSTC_KEY_RETURN 13
+#define wxSTC_KEY_ADD 310
+#define wxSTC_KEY_SUBTRACT 311
+#define wxSTC_KEY_DIVIDE 312
+#define wxSTC_SCMOD_SHIFT 1
+#define wxSTC_SCMOD_CTRL 2
+#define wxSTC_SCMOD_ALT 4
+
+// For SciLexer.h
+#define wxSTC_LEX_CONTAINER 0
+#define wxSTC_LEX_NULL 1
+#define wxSTC_LEX_PYTHON 2
+#define wxSTC_LEX_CPP 3
+#define wxSTC_LEX_HTML 4
+#define wxSTC_LEX_XML 5
+#define wxSTC_LEX_PERL 6
+#define wxSTC_LEX_SQL 7
+#define wxSTC_LEX_VB 8
+#define wxSTC_LEX_PROPERTIES 9
+#define wxSTC_LEX_ERRORLIST 10
+#define wxSTC_LEX_MAKEFILE 11
+#define wxSTC_LEX_BATCH 12
+#define wxSTC_LEX_XCODE 13
+#define wxSTC_LEX_LATEX 14
+#define wxSTC_LEX_LUA 15
+#define wxSTC_LEX_DIFF 16
+
+// Lexical states for SCLEX_PYTHON
+#define wxSTC_P_DEFAULT 0
+#define wxSTC_P_COMMENTLINE 1
+#define wxSTC_P_NUMBER 2
+#define wxSTC_P_STRING 3
+#define wxSTC_P_CHARACTER 4
+#define wxSTC_P_WORD 5
+#define wxSTC_P_TRIPLE 6
+#define wxSTC_P_TRIPLEDOUBLE 7
+#define wxSTC_P_CLASSNAME 8
+#define wxSTC_P_DEFNAME 9
+#define wxSTC_P_OPERATOR 10
+#define wxSTC_P_IDENTIFIER 11
+#define wxSTC_P_COMMENTBLOCK 12
+#define wxSTC_P_STRINGEOL 13
+
+// Lexical states for SCLEX_CPP, SCLEX_VB
+#define wxSTC_C_DEFAULT 0
+#define wxSTC_C_COMMENT 1
+#define wxSTC_C_COMMENTLINE 2
+#define wxSTC_C_COMMENTDOC 3
+#define wxSTC_C_NUMBER 4
+#define wxSTC_C_WORD 5
+#define wxSTC_C_STRING 6
+#define wxSTC_C_CHARACTER 7
+#define wxSTC_C_UUID 8
+#define wxSTC_C_PREPROCESSOR 9
+#define wxSTC_C_OPERATOR 10
+#define wxSTC_C_IDENTIFIER 11
+#define wxSTC_C_STRINGEOL 12
+#define wxSTC_C_VERBATIM 13
+
+// Lexical states for SCLEX_HTML, SCLEX_XML
+#define wxSTC_H_DEFAULT 0
+#define wxSTC_H_TAG 1
+#define wxSTC_H_TAGUNKNOWN 2
+#define wxSTC_H_ATTRIBUTE 3
+#define wxSTC_H_ATTRIBUTEUNKNOWN 4
+#define wxSTC_H_NUMBER 5
+#define wxSTC_H_DOUBLESTRING 6
+#define wxSTC_H_SINGLESTRING 7
+#define wxSTC_H_OTHER 8
+#define wxSTC_H_COMMENT 9
+#define wxSTC_H_ENTITY 10
+
+// XML and ASP
+#define wxSTC_H_TAGEND 11
+#define wxSTC_H_XMLSTART 12
+#define wxSTC_H_XMLEND 13
+#define wxSTC_H_SCRIPT 14
+#define wxSTC_H_ASP 15
+#define wxSTC_H_ASPAT 16
+#define wxSTC_H_CDATA 17
+#define wxSTC_H_QUESTION 18
+
+// More HTML
+#define wxSTC_H_VALUE 19
+
+// Embedded Javascript
+#define wxSTC_HJ_START 40
+#define wxSTC_HJ_DEFAULT 41
+#define wxSTC_HJ_COMMENT 42
+#define wxSTC_HJ_COMMENTLINE 43
+#define wxSTC_HJ_COMMENTDOC 44
+#define wxSTC_HJ_NUMBER 45
+#define wxSTC_HJ_WORD 46
+#define wxSTC_HJ_KEYWORD 47
+#define wxSTC_HJ_DOUBLESTRING 48
+#define wxSTC_HJ_SINGLESTRING 49
+#define wxSTC_HJ_SYMBOLS 50
+#define wxSTC_HJ_STRINGEOL 51
+
+// ASP Javascript
+#define wxSTC_HJA_START 55
+#define wxSTC_HJA_DEFAULT 56
+#define wxSTC_HJA_COMMENT 57
+#define wxSTC_HJA_COMMENTLINE 58
+#define wxSTC_HJA_COMMENTDOC 59
+#define wxSTC_HJA_NUMBER 60
+#define wxSTC_HJA_WORD 61
+#define wxSTC_HJA_KEYWORD 62
+#define wxSTC_HJA_DOUBLESTRING 63
+#define wxSTC_HJA_SINGLESTRING 64
+#define wxSTC_HJA_SYMBOLS 65
+#define wxSTC_HJA_STRINGEOL 66
+
+// Embedded VBScript
+#define wxSTC_HB_START 70
+#define wxSTC_HB_DEFAULT 71
+#define wxSTC_HB_COMMENTLINE 72
+#define wxSTC_HB_NUMBER 73
+#define wxSTC_HB_WORD 74
+#define wxSTC_HB_STRING 75
+#define wxSTC_HB_IDENTIFIER 76
+#define wxSTC_HB_STRINGEOL 77
+
+// ASP VBScript
+#define wxSTC_HBA_START 80
+#define wxSTC_HBA_DEFAULT 81
+#define wxSTC_HBA_COMMENTLINE 82
+#define wxSTC_HBA_NUMBER 83
+#define wxSTC_HBA_WORD 84
+#define wxSTC_HBA_STRING 85
+#define wxSTC_HBA_IDENTIFIER 86
+#define wxSTC_HBA_STRINGEOL 87
+
+// Embedded Python
+#define wxSTC_HP_START 90
+#define wxSTC_HP_DEFAULT 91
+#define wxSTC_HP_COMMENTLINE 92
+#define wxSTC_HP_NUMBER 93
+#define wxSTC_HP_STRING 94
+#define wxSTC_HP_CHARACTER 95
+#define wxSTC_HP_WORD 96
+#define wxSTC_HP_TRIPLE 97
+#define wxSTC_HP_TRIPLEDOUBLE 98
+#define wxSTC_HP_CLASSNAME 99
+#define wxSTC_HP_DEFNAME 100
+#define wxSTC_HP_OPERATOR 101
+#define wxSTC_HP_IDENTIFIER 102
+
+// ASP Python
+#define wxSTC_HPA_START 105
+#define wxSTC_HPA_DEFAULT 106
+#define wxSTC_HPA_COMMENTLINE 107
+#define wxSTC_HPA_NUMBER 108
+#define wxSTC_HPA_STRING 109
+#define wxSTC_HPA_CHARACTER 110
+#define wxSTC_HPA_WORD 111
+#define wxSTC_HPA_TRIPLE 112
+#define wxSTC_HPA_TRIPLEDOUBLE 113
+#define wxSTC_HPA_CLASSNAME 114
+#define wxSTC_HPA_DEFNAME 115
+#define wxSTC_HPA_OPERATOR 116
+#define wxSTC_HPA_IDENTIFIER 117
+
+// PHP
+#define wxSTC_HPHP_DEFAULT 118
+#define wxSTC_HPHP_HSTRING 119
+#define wxSTC_HPHP_SIMPLESTRING 120
+#define wxSTC_HPHP_WORD 121
+#define wxSTC_HPHP_NUMBER 122
+#define wxSTC_HPHP_VARIABLE 123
+#define wxSTC_HPHP_COMMENT 124
+#define wxSTC_HPHP_COMMENTLINE 125
+#define wxSTC_HPHP_STRINGEOL 126
+
+// Lexical states for SCLEX_PERL
+#define wxSTC_PL_DEFAULT 0
+#define wxSTC_PL_HERE 1
+#define wxSTC_PL_COMMENTLINE 2
+#define wxSTC_PL_POD 3
+#define wxSTC_PL_NUMBER 4
+#define wxSTC_PL_WORD 5
+#define wxSTC_PL_STRING 6
+#define wxSTC_PL_CHARACTER 7
+#define wxSTC_PL_PUNCTUATION 8
+#define wxSTC_PL_PREPROCESSOR 9
+#define wxSTC_PL_OPERATOR 10
+#define wxSTC_PL_IDENTIFIER 11
+#define wxSTC_PL_SCALAR 12
+#define wxSTC_PL_ARRAY 13
+#define wxSTC_PL_HASH 14
+#define wxSTC_PL_SYMBOLTABLE 15
+#define wxSTC_PL_REF 16
+#define wxSTC_PL_REGEX 17
+#define wxSTC_PL_REGSUBST 18
+#define wxSTC_PL_LONGQUOTE 19
+#define wxSTC_PL_BACKTICKS 20
+#define wxSTC_PL_DATASECTION 21
+
+// Lexical states for SCLEX_LATEX
+#define wxSTC_L_DEFAULT 0
+#define wxSTC_L_COMMAND 1
+#define wxSTC_L_TAG 2
+#define wxSTC_L_MATH 3
+#define wxSTC_L_COMMENT 4
+
+// Lexical states for SCLEX_LUA
+#define wxSTC_LUA_DEFAULT 0
+#define wxSTC_LUA_COMMENT 1
+#define wxSTC_LUA_COMMENTLINE 2
+#define wxSTC_LUA_COMMENTDOC 3
+#define wxSTC_LUA_NUMBER 4
+#define wxSTC_LUA_WORD 5
+#define wxSTC_LUA_STRING 6
+#define wxSTC_LUA_CHARACTER 7
+#define wxSTC_LUA_LITERALSTRING 8
+#define wxSTC_LUA_PREPROCESSOR 9
+#define wxSTC_LUA_OPERATOR 10
+#define wxSTC_LUA_IDENTIFIER 11
+#define wxSTC_LUA_STRINGEOL 12
+#define wxSTC_ERR_DEFAULT 0
+#define wxSTC_ERR_PYTHON 1
+#define wxSTC_ERR_GCC 2
+#define wxSTC_ERR_MS 3
+#define wxSTC_ERR_CMD 4
+#define wxSTC_ERR_BORLAND 5
+#define wxSTC_ERR_PERL 6
+
+// END of generated section
+//----------------------------------------------------------------------
+// Others
+
+#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN))
+
+
+
+//----------------------------------------------------------------------
+
+class  ScintillaWX;                      // forward declare
+class  WordList;
+struct SCNotification;
+
+
+extern const wxChar* wxSTCNameStr;
+
+//----------------------------------------------------------------------
+
+class wxStyledTextCtrl : public wxControl {
+public:
+
+#ifdef SWIG
+    wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
+                     const wxPoint& pos = wxDefaultPosition,
+                     const wxSize& size = wxDefaultSize, long style = 0,
+                     const char* name = "styledtext");
+#else
+    wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
+                     const wxPoint& pos = wxDefaultPosition,
+                     const wxSize& size = wxDefaultSize, long style = 0,
+                     const wxString& name = wxSTCNameStr);
+#endif
+
+
+#ifndef SWIG
+    ~wxStyledTextCtrl();
+#endif
+
+//----------------------------------------------------------------------
+// BEGIN generated section.  The following code is automatically generated
+//       by gen_iface.py.  Do not edit this file.  Edit stc.h.in instead
+//       and regenerate
+
+
+    // Add text to the document
+    void AddText(const wxString& text);
+
+    // Add array of cells to document
+    void AddStyledText(const wxString& text);
+
+    // Insert string at a position
+    void InsertText(int pos, const wxString& text);
+
+    // Delete all text in the document
+    void ClearAll();
+
+    // Set all style bytes to 0, remove all folding information
+    void ClearDocumentStyle();
+
+    // The number of characters in the document
+    int GetLength();
+
+    // Returns the character byte at the position
+    int GetCharAt(int pos);
+
+    // Returns the position of the caret
+    int GetCurrentPos();
+
+    // Returns the position of the opposite end of the selection to the caret
+    int GetAnchor();
+
+    // Returns the style byte at the position
+    int GetStyleAt(int pos);
+
+    // Redoes the next action on the undo history
+    void Redo();
+
+    // Choose between collecting actions into the undo
+    // history and discarding them.
+    void SetUndoCollection(bool collectUndo);
+
+    // Select all the text in the document.
+    void SelectAll();
+
+    // Remember the current position in the undo history as the position
+    // at which the document was saved.
+    void SetSavePoint();
+
+    // Retrieve a buffer of cells.
+    wxString GetStyledText(int startPos, int endPos);
+
+    // Are there any redoable actions in the undo history.
+    bool CanRedo();
+
+    // Retrieve the line number at which a particular marker is located
+    int MarkerLineFromHandle(int handle);
+
+    // Delete a marker.
+    void MarkerDeleteHandle(int handle);
+
+    // Is undo history being collected?
+    bool GetUndoCollection();
+
+    // Are white space characters currently visible?
+    // Returns one of SCWS_* constants.
+    int GetViewWhiteSpace();
+
+    // Make white space characters invisible, always visible or visible outside indentation.
+    void SetViewWhiteSpace(int viewWS);
+
+    // Find the position from a point within the window.
+    int PositionFromPoint(wxPoint pt);
+
+    // Set caret to start of a line and ensure it is visible.
+    void GotoLine(int line);
+
+    // Set caret to a position and ensure it is visible.
+    void GotoPos(int pos);
+
+    // Set the selection anchor to a position. The anchor is the opposite
+    // end of the selection from the caret.
+    void SetAnchor(int posAnchor);
+
+    // Retrieve the text of the line containing the caret.
+    // Returns the index of the caret on the line.
+    wxString GetCurLine(int* OUTPUT=NULL);
+
+    // Retrieve the position of the last correctly styled character.
+    int GetEndStyled();
+
+    // Convert all line endings in the document to use the current mode.
+    void ConvertEOLs();
+
+    // Retrieve the current end of line mode - one of CRLF, CR, or LF.
+    int GetEOLMode();
+
+    // Set the current end of line mode.
+    void SetEOLMode(int eolMode);
+
+    // Set the current styling position to pos and the styling mask to mask.
+    // The styling mask can be used to protect some bits in each styling byte from
+    // modification.
+    void StartStyling(int pos, int mask);
+
+    // Change style from current styling position for length characters to a style
+    // and move the current styling position to after this newly styled segment.
+    void SetStyling(int length, int style);
+
+    // Is drawing done first into a buffer or direct to the screen.
+    bool GetBufferedDraw();
+
+    // If drawing is buffered then each line of text is drawn into a bitmap buffer
+    // before drawing it to the screen to avoid flicker.
+    void SetBufferedDraw(bool buffered);
+
+    // Change the visible size of a tab to be a multiple of the width of a space
+    // character.
+    void SetTabWidth(int tabWidth);
+
+    // Retrieve the visible size of a tab.
+    int GetTabWidth();
+
+    // Set the code page used to interpret the bytes of the document as characters.
+    // The SC_CP_UTF8 value can be used to enter Unicode mode.
+    void SetCodePage(int codePage);
+
+    // Set the symbol used for a particular marker number,
+    // and optionally the for and background colours.
+    void MarkerDefine(int markerNumber, int markerSymbol,
+                         const wxColour& foreground = wxNullColour,
+                         const wxColour& background = wxNullColour);
+
+    // Set the foreground colour used for a particular marker number.
+    void MarkerSetForeground(int markerNumber, const wxColour& fore);
+
+    // Set the background colour used for a particular marker number.
+    void MarkerSetBackground(int markerNumber, const wxColour& back);
+
+    // Add a marker to a line.
+    void MarkerAdd(int line, int markerNumber);
+
+    // Delete a marker from a line
+    void MarkerDelete(int line, int markerNumber);
+
+    // Delete all markers with a particular number from all lines
+    void MarkerDeleteAll(int markerNumber);
+
+    // Get a bit mask of all the markers set on a line.
+    int MarkerGet(int line);
+
+    // Find the next line after lineStart that includes a marker in mask.
+    int MarkerNext(int lineStart, int markerMask);
+
+    // Find the previous line before lineStart that includes a marker in mask.
+    int MarkerPrevious(int lineStart, int markerMask);
+
+    // Set a margin to be either numeric or symbolic.
+    void SetMarginType(int margin, int marginType);
+
+    // Retrieve the type of a margin.
+    int GetMarginType(int margin);
+
+    // Set the width of a margin to a width expressed in pixels.
+    void SetMarginWidth(int margin, int pixelWidth);
+
+    // Retrieve the width of a margin in pixels.
+    int GetMarginWidth(int margin);
+
+    // Set a mask that determines which markers are displayed in a margin.
+    void SetMarginMask(int margin, int mask);
+
+    // Retrieve the marker mask of a margin.
+    int GetMarginMask(int margin);
+
+    // Make a margin sensitive or insensitive to mouse clicks.
+    void SetMarginSensitive(int margin, bool sensitive);
+
+    // Retrieve the mouse click sensitivity of a margin.
+    bool GetMarginSensitive(int margin);
+
+    // Clear all the styles and make equivalent to the global default style.
+    void StyleClearAll();
+
+    // Set the foreground colour of a style.
+    void StyleSetForeground(int style, const wxColour& fore);
+
+    // Set the background colour of a style.
+    void StyleSetBackground(int style, const wxColour& back);
+
+    // Set a style to be bold or not.
+    void StyleSetBold(int style, bool bold);
+
+    // Set a style to be italic or not.
+    void StyleSetItalic(int style, bool italic);
+
+    // Set the size of characters of a style.
+    void StyleSetSize(int style, int sizePoints);
+
+    // Set the font of a style.
+    void StyleSetFaceName(int style, const wxString& fontName);
+
+    // Set a style to have its end of line filled or not.
+    void StyleSetEOLFilled(int style, bool filled);
+
+    // Reset the default style to its state at startup
+    void StyleResetDefault();
+
+    // Set a style to be underlined or not.
+    void StyleSetUnderline(int style, bool underline);
+
+    // Set the foreground colour of the selection and whether to use this setting.
+    void SetSelForeground(bool useSetting, const wxColour& fore);
+
+    // Set the background colour of the selection and whether to use this setting.
+    void SetSelBackground(bool useSetting, const wxColour& back);
+
+    // Set the foreground colour of the caret.
+    void SetCaretForeground(const wxColour& fore);
+
+    // When key+modifier combination km is pressed perform msg.
+    void CmdKeyAssign(int key, int modifiers, int cmd);
+
+    // When key+modifier combination km do nothing.
+    void CmdKeyClear(int key, int modifiers);
+
+    // Drop all key mappings.
+    void CmdKeyClearAll();
+
+    // Set the styles for a segment of the document.
+    void SetStyleBytes(int length, char* styleBytes);
+
+    // Set a style to be visible or not.
+    void StyleSetVisible(int style, bool visible);
+
+    // Get the time in milliseconds that the caret is on and off.
+    int GetCaretPeriod();
+
+    // Get the time in milliseconds that the caret is on and off. 0 = steady on.
+    void SetCaretPeriod(int periodMilliseconds);
+
+    // Set the set of characters making up words for when moving or selecting
+    // by word.
+    void SetWordChars(const wxString& characters);
+
+    // Start a sequence of actions that is undone and redone as a unit.
+    // May be nested.
+    void BeginUndoAction();
+
+    // End a sequence of actions that is undone and redone as a unit.
+    void EndUndoAction();
+
+    // Set an indicator to plain, squiggle or TT.
+    void IndicatorSetStyle(int indic, int style);
+
+    // Retrieve the style of an indicator.
+    int IndicatorGetStyle(int indic);
+
+    // Set the foreground colour of an indicator.
+    void IndicatorSetForeground(int indic, const wxColour& fore);
+
+    // Retrieve the foreground colour of an indicator.
+    wxColour IndicatorGetForeground(int indic);
+
+    // Divide each styling byte into lexical class bits (default:5) and indicator
+    // bits (default:3). If a lexer requires more than 32 lexical states, then this
+    // is used to expand the possible states.
+    void SetStyleBits(int bits);
+
+    // Retrieve number of bits in style bytes used to hold the lexical state.
+    int GetStyleBits();
+
+    // Used to hold extra styling information for each line.
+    void SetLineState(int line, int state);
+
+    // Retrieve the extra styling information for a line.
+    int GetLineState(int line);
+
+    // Retrieve the last line number that has line state.
+    int GetMaxLineState();
+
+    // Display a auto-completion list.
+    // The lenEntered parameter indicates how many characters before
+    // the caret should be used to provide context.
+    void AutoCompShow(int lenEntered, const wxString& itemList);
+
+    // Remove the auto-completion list from the screen.
+    void AutoCompCancel();
+
+    // Is there an auto-completion list visible?
+    bool AutoCompActive();
+
+    // Retrieve the position of the caret when the auto-completion list was
+    // displayed.
+    int AutoCompPosStart();
+
+    // User has selected an item so remove the list and insert the selection.
+    void AutoCompComplete();
+
+    // Define a set of character that when typed cancel the auto-completion list.
+    void AutoCompStops(const wxString& characterSet);
+
+    // Change the separator character in the string setting up an auto-completion
+    // list. Default is space but can be changed if items contain space.
+    void AutoCompSetSeparator(int separatorCharacter);
+
+    // Retrieve the auto-completion list separator character.
+    int AutoCompGetSeparator();
+
+    // Select the item in the auto-completion list that starts with a string.
+    void AutoCompSelect(const wxString& text);
+
+    // Should the auto-completion list be cancelled if the user backspaces to a
+    // position before where the box was created.
+    void AutoCompSetCancelAtStart(bool cancel);
+
+    // Retrieve whether auto-completion cancelled by backspacing before start.
+    bool AutoCompGetCancelAtStart();
+
+    // Define a set of character that when typed fills up the selected word.
+    void AutoCompSetFillUps(const wxString& characterSet);
+
+    // Should a single item auto-completion list automatically choose the item.
+    void AutoCompSetChooseSingle(bool chooseSingle);
+
+    // Retrieve whether a single item auto-completion list automatically choose the item.
+    bool AutoCompGetChooseSingle();
+
+    // Set whether case is significant when performing auto-completion searches.
+    void AutoCompSetIgnoreCase(bool ignoreCase);
+
+    // Retrieve state of ignore case flag.
+    bool AutoCompGetIgnoreCase();
+
+    // Set the number of spaces used for one level of indentation.
+    void SetIndent(int indentSize);
+
+    // Retrieve indentation size.
+    int GetIndent();
+
+    // Indentation will only use space characters if useTabs is false, otherwise
+    // it will use a combination of tabs and spaces.
+    void SetUseTabs(bool useTabs);
+
+    // Retrieve whether tabs will be used in indentation.
+    bool GetUseTabs();
+
+    // Change the indentation of a line to a number of columns.
+    void SetLineIndentation(int line, int indentSize);
+
+    // Retrieve the number of columns that a line is indented.
+    int GetLineIndentation(int line);
+
+    // Retrieve the position before the first non indentation character on a line.
+    int GetLineIndentPosition(int line);
+
+    // Retrieve the column number of a position, taking tab width into account.
+    int GetColumn(int pos);
+
+    // Show or hide the horizontal scroll bar.
+    void SetUseHorizontalScrollBar(bool show);
+
+    // Is the horizontal scroll bar visible?
+    bool GetUseHorizontalScrollBar();
+
+    // Show or hide indentation guides.
+    void SetIndentationGuides(bool show);
+
+    // Are the indentation guides visible?
+    bool GetIndentationGuides();
+
+    // Set the highlighted indentation guide column.
+    // 0 = no highlighted guide.
+    void SetHighlightGuide(int column);
+
+    // Get the highlighted indentation guide column.
+    int GetHighlightGuide();
+
+    // Get the position after the last visible characters on a line.
+    int GetLineEndPosition(int line);
+
+    // Get the code page used to interpret the bytes of the document as characters.
+    int GetCodePage();
+
+    // Get the foreground colour of the caret.
+    wxColour GetCaretForeground();
+
+    // In read-only mode?
+    bool GetReadOnly();
+
+    // Sets the position of the caret.
+    void SetCurrentPos(int pos);
+
+    // Sets the position that starts the selection - this becomes the anchor.
+    void SetSelectionStart(int pos);
+
+    // Returns the position at the start of the selection.
+    int GetSelectionStart();
+
+    // Sets the position that ends the selection - this becomes the currentPosition.
+    void SetSelectionEnd(int pos);
+
+    // Returns the position at the end of the selection.
+    int GetSelectionEnd();
+
+    // Sets the print magnification added to the point size of each style for printing.
+    void SetPrintMagnification(int magnification);
+
+    // Returns the print magnification.
+    int GetPrintMagnification();
+
+    // Modify colours when printing for clearer printed text.
+    void SetPrintColourMode(int mode);
+
+    // Returns the print colour mode.
+    int GetPrintColourMode();
+
+    // Find some text in the document.
+    int FindText(int minPos, int maxPos,
+                               const wxString& text,
+                               bool caseSensitive, bool wholeWord);
+
+    // On Windows will draw the document into a display context such as a printer.
+    int FormatRange(bool   doDraw,
+                               int    startPos,
+                               int    endPos,
+                               wxDC*  draw,
+                               wxDC*  target,  // Why does it use two? Can they be the same?
+                               wxRect renderRect,
+                               wxRect pageRect);
+
+    // Retrieve the line at the top of the display.
+    int GetFirstVisibleLine();
+
+    // Retrieve the contents of a line.
+    wxString GetLine(int line);
+
+    // Returns the number of lines in the document. There is always at least one.
+    int GetLineCount();
+
+    // Sets the size in pixels of the left margin.
+    void SetMarginLeft(int width);
+
+    // Returns the size in pixels of the left margin.
+    int GetMarginLeft();
+
+    // Sets the size in pixels of the right margin.
+    void SetMarginRight(int width);
+
+    // Returns the size in pixels of the right margin.
+    int GetMarginRight();
+
+    // Is the document different from when it was last saved?
+    bool GetModify();
+
+    // Select a range of text.
+    void SetSelection(int start, int end);
+
+    // Retrieve the selected text.
+    wxString GetSelectedText();
+
+    // Retrieve a range of text.
+    wxString GetTextRange(int startPos, int endPos);
+
+    // Draw the selection in normal style or with selection highlighted.
+    void HideSelection(bool normal);
+
+    // Retrieve the line containing a position.
+    int LineFromPosition(int pos);
+
+    // Retrieve the position at the start of a line.
+    int PositionFromLine(int line);
+
+    // Scroll horizontally and vertically.
+    void LineScroll(int columns, int lines);
+
+    // Ensure the caret is visible.
+    void EnsureCaretVisible();
+
+    // Replace the selected text with the argument text.
+    void ReplaceSelection(const wxString& text);
+
+    // Set to read only or read write.
+    void SetReadOnly(bool readOnly);
+
+    // Will a paste succeed?
+    bool CanPaste();
+
+    // Are there any undoable actions in the undo history.
+    bool CanUndo();
+
+    // Delete the undo history.
+    void EmptyUndoBuffer();
+
+    // Undo one action in the undo history.
+    void Undo();
+
+    // Cut the selection to the clipboard.
+    void Cut();
+
+    // Copy the selection to the clipboard.
+    void Copy();
+
+    // Paste the contents of the clipboard into the document replacing the selection.
+    void Paste();
+
+    // Clear the selection.
+    void Clear();
+
+    // Replace the contents of the document with the argument text.
+    void SetText(const wxString& text);
+
+    // Retrieve all the text in the document.
+    wxString GetText();
+
+    // Retrieve the number of characters in the document.
+    int GetTextLength();
+
+    // Set to overtype (true) or insert mode
+    void SetOvertype(bool overtype);
+
+    // Returns true if overtype mode is active otherwise false is returned.
+    bool GetOvertype();
+
+    // Show a call tip containing a definition near position pos.
+    void CallTipShow(int pos, const wxString& definition);
+
+    // Remove the call tip from the screen.
+    void CallTipCancel();
+
+    // Is there an active call tip?
+    bool CallTipActive();
+
+    // Retrieve the position where the caret was before displaying the call tip.
+    int CallTipPosAtStart();
+
+    // Highlight a segment of the definition.
+    void CallTipSetHighlight(int start, int end);
+
+    // Set the background colour for the call tip.
+    void CallTipSetBackground(const wxColour& back);
+
+    // Find the display line of a document line taking hidden lines into account.
+    int VisibleFromDocLine(int line);
+
+    // Find the document line of a display line taking hidden lines into account.
+    int DocLineFromVisible(int lineDisplay);
+
+    // Set the fold level of a line.
+    // This encodes an integer level along with flags indicating whether the
+    // line is a header and whether it is effectively white space.
+    void SetFoldLevel(int line, int level);
+
+    // Retrieve the fold level of a line.
+    int GetFoldLevel(int line);
+
+    // Find the last child line of a header line.
+    int GetLastChild(int line, int level);
+
+    // Find the parent line of a child line.
+    int GetFoldParent(int line);
+
+    // Make a range of lines visible.
+    void ShowLines(int lineStart, int lineEnd);
+
+    // Make a range of lines invisible.
+    void HideLines(int lineStart, int lineEnd);
+
+    // Is a line visible?
+    bool GetLineVisible(int line);
+
+    // Show the children of a header line.
+    void SetFoldExpanded(int line, bool expanded);
+
+    // Is a header line expanded?
+    bool GetFoldExpanded(int line);
+
+    // Switch a header line between expanded and contracted.
+    void ToggleFold(int line);
+
+    // Ensure a particular line is visible by expanding any header line hiding it.
+    void EnsureVisible(int line);
+
+    // Set some debugging options for folding
+    void SetFoldFlags(int flags);
+
+    // How many characters are on a line, not including end of line characters.
+    int LineLength(int line);
+
+    // Highlight the characters at two positions.
+    void BraceHighlight(int pos1, int pos2);
+
+    // Highlight the character at a position indicating there is no matching brace.
+    void BraceBadLight(int pos);
+
+    // Find the position of a matching brace or INVALID_POSITION if no match.
+    int BraceMatch(int pos);
+
+    // Are the end of line characters visible.
+    bool GetViewEOL();
+
+    // Make the end of line characters visible or invisible
+    void SetViewEOL(bool visible);
+
+    // Retrieve a pointer to the document object.
+    void* GetDocPointer();
+
+    // Change the document object used.
+    void SetDocPointer(void* docPointer);
+
+    // Set which document modification events are sent to the container.
+    void SetModEventMask(int mask);
+
+    // Retrieve the column number which text should be kept within.
+    int GetEdgeColumn();
+
+    // Set the column number of the edge.
+    // If text goes past the edge then it is highlighted.
+    void SetEdgeColumn(int column);
+
+    // Retrieve the edge highlight mode.
+    int GetEdgeMode();
+
+    // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
+    // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
+    void SetEdgeMode(int mode);
+
+    // Retrieve the colour used in edge indication.
+    wxColour GetEdgeColour();
+
+    // Change the colour used in edge indication.
+    void SetEdgeColour(const wxColour& edgeColour);
+
+    // Sets the current caret position to be the search anchor.
+    void SearchAnchor();
+
+    // Find some text starting at the search anchor.
+    int SearchNext(int flags, const wxString& text);
+
+    // Find some text starting at the search anchor and moving backwards.
+    int SearchPrev(int flags, const wxString& text);
+
+    // Set the way the line the caret is on is kept visible.
+    void SetCaretPolicy(int caretPolicy, int caretSlop);
+
+    // Retrieves the number of lines completely visible.
+    int LinesOnScreen();
+
+    // Set whether a pop up menu is displayed automatically when the user presses
+    // the wrong mouse button.
+    void UsePopUp(bool allowPopUp);
+
+    // Is the selection a rectangular. The alternative is the more common stream selection.
+    bool SelectionIsRectangle();
+
+    // Set the zoom level. This number of points is added to the size of all fonts.
+    // It may be positive to magnify or negative to reduce.
+    void SetZoom(int zoom);
+
+    // Retrieve the zoom level.
+    int GetZoom();
+
+    // Create a new document object.
+    // Starts with reference count of 1 and not selected into editor.
+    void* CreateDocument();
+
+    // Extend life of document.
+    void AddRefDocument(void* docPointer);
+
+    // Release a reference to the document, deleting document if it fades to black.
+    void ReleaseDocument(void* docPointer);
+
+    // Get which document modification events are sent to the container.
+    int GetModEventMask();
+
+    // Start notifying the container of all key presses and commands.
+    void StartRecord();
+
+    // Stop notifying the container of all key presses and commands.
+    void StopRecord();
+
+    // Set the lexing language of the document.
+    void SetLexer(int lexer);
+
+    // Retrieve the lexing language of the document.
+    int GetLexer();
+
+    // Colourise a segment of the document using the current lexing language.
+    void Colourise(int start, int end);
+
+    // Set up a value that may be used by a lexer for some optional feature.
+    void SetProperty(const wxString& key, const wxString& value);
+
+    // Set up the key words used by the lexer.
+    void SetKeyWords(int keywordSet, const wxString& keyWords);
+
+// END of generated section
+//----------------------------------------------------------------------
+// Others...
+
+
+    // Returns the line number of the line with the caret.
+    int GetCurrentLine();
+
+    // Extract style settings from a spec-string which is composed of one or
+    // more of the following comma separated elements:
+    //
+    //      bold                    turns on bold
+    //      italic                  turns on italics
+    //      fore:#RRGGBB            sets the foreground colour
+    //      back:#RRGGBB            sets the background colour
+    //      face:[facename]         sets the font face name to use
+    //      size:[num]              sets the font size in points
+    //      eol                     turns on eol filling
+    //      underline               turns on underlining
+    //
+    void StyleSetSpec(int styleNum, const wxString& spec);
+
+
+
+    // Set style size, face, bold, italic, and underline attributes from
+    // a wxFont's attributes.
+    void StyleSetFont(int styleNum, wxFont& font);
+
+
+
+    // Set all font style attributes at once.
+    void StyleSetFontAttr(int styleNum, int size,
+                          const wxString& faceName,
+                          bool bold, bool italic,
+                          bool underline);
+
+
+
+    // Perform one of the operations defined by the wxSTC_CMD_* constants.
+    void CmdKeyExecute(int cmd);
+
+
+
+    // Set the left and right margin in the edit area, measured in pixels.
+    void SetMargins(int left, int right);
+
+
+    // Retrieve the start and end positions of the current selection.
+#ifdef SWIG
+    void GetSelection(int* OUTPUT, int* OUTPUT);
+#else
+    void GetSelection(int* startPos, int* endPos);
+#endif
+
+    // Retrieve the point in the window where a position is displayed.
+    wxPoint PointFromPosition(int pos);
+
+
+    // Scroll enough to make the given line visible
+    void ScrollToLine(int line);
+
+
+    // Scroll enough to make the given column visible
+    void ScrollToColumn(int column);
+
+//----------------------------------------------------------------------
+
+
+#ifndef SWIG
+private:
+    // Event handlers
+    void OnPaint(wxPaintEvent& evt);
+    void OnScrollWin(wxScrollWinEvent& evt);
+    void OnSize(wxSizeEvent& evt);
+    void OnMouseLeftDown(wxMouseEvent& evt);
+    void OnMouseMove(wxMouseEvent& evt);
+    void OnMouseLeftUp(wxMouseEvent& evt);
+    void OnMouseRightUp(wxMouseEvent& evt);
+    void OnChar(wxKeyEvent& evt);
+    void OnKeyDown(wxKeyEvent& evt);
+    void OnLoseFocus(wxFocusEvent& evt);
+    void OnGainFocus(wxFocusEvent& evt);
+    void OnSysColourChanged(wxSysColourChangedEvent& evt);
+    void OnEraseBackground(wxEraseEvent& evt);
+    void OnMenu(wxCommandEvent& evt);
+    void OnListBox(wxCommandEvent& evt);
+
+
+    // Turn notifications from Scintilla into events
+    void NotifyChange();
+    void NotifyParent(SCNotification* scn);
+
+    long SendMsg(int msg, long wp=0, long lp=0);
+
+private:
+    DECLARE_EVENT_TABLE()
+    DECLARE_CLASS(wxStyledTextCtrl)
+
+    ScintillaWX*        m_swx;
+    wxStopWatch         m_stopWatch;
+
+
+    friend class ScintillaWX;
+    friend class Platform;
+#endif
+};
+
+//----------------------------------------------------------------------
+
+class wxStyledTextEvent : public wxCommandEvent {
+public:
+    wxStyledTextEvent(wxEventType commandType=0, int id=0);
+    ~wxStyledTextEvent() {}
+
+    void SetPosition(int pos)        { m_position = pos; }
+    void SetKey(int k)               { m_key = k; }
+    void SetModifiers(int m)         { m_modifiers = m; }
+    void SetModificationType(int t)  { m_modificationType = t; }
+    void SetText(const char* t)      { m_text = t; }
+    void SetLength(int len)          { m_length = len; }
+    void SetLinesAdded(int num)      { m_linesAdded = num; }
+    void SetLine(int val)            { m_line = val; }
+    void SetFoldLevelNow(int val)    { m_foldLevelNow = val; }
+    void SetFoldLevelPrev(int val)   { m_foldLevelPrev = val; }
+    void SetMargin(int val)          { m_margin = val; }
+    void SetMessage(int val)         { m_message = val; }
+    void SetWParam(int val)          { m_wParam = val; }
+    void SetLParam(int val)          { m_lParam = val; }
+
+    int  GetPosition() const         { return m_position; }
+    int  GetKey()  const             { return m_key; }
+    int  GetModifiers() const        { return m_modifiers; }
+    int  GetModificationType() const { return m_modificationType; }
+    wxString GetText() const         { return m_text; }
+    int  GetLength() const           { return m_length; }
+    int  GetLinesAdded() const       { return m_linesAdded; }
+    int  GetLine() const             { return m_line; }
+    int  GetFoldLevelNow() const     { return m_foldLevelNow; }
+    int  GetFoldLevelPrev() const    { return m_foldLevelPrev; }
+    int  GetMargin() const           { return m_margin; }
+    int  GetMessage() const          { return m_message; }
+    int  GetWParam() const           { return m_wParam; }
+    int  GetLParam() const           { return m_lParam; }
+
+    bool GetShift() const;
+    bool GetControl() const;
+    bool GetAlt() const;
+
+    void CopyObject(wxObject& obj) const;
+
+#ifndef SWIG
+private:
+    DECLARE_DYNAMIC_CLASS(wxStyledTextEvent)
+
+    int  m_position;
+    int  m_key;
+    int  m_modifiers;
+
+    int  m_modificationType;    // wxEVT_STC_MODIFIED
+    wxString m_text;
+    int  m_length;
+    int  m_linesAdded;
+    int  m_line;
+    int  m_foldLevelNow;
+    int  m_foldLevelPrev;
+
+    int  m_margin;              // wxEVT_STC_MARGINCLICK
+
+    int  m_message;             // wxEVT_STC_MACRORECORD
+    int  m_wParam;
+    int  m_lParam;
+#endif
+};
+
+
+// Event types
+enum {
+    wxEVT_STC_CHANGE = 1650,
+    wxEVT_STC_STYLENEEDED,
+    wxEVT_STC_CHARADDED,
+    wxEVT_STC_UPDATEUI,
+    wxEVT_STC_SAVEPOINTREACHED,
+    wxEVT_STC_SAVEPOINTLEFT,
+    wxEVT_STC_ROMODIFYATTEMPT,
+    wxEVT_STC_DOUBLECLICK,
+    wxEVT_STC_MODIFIED,
+    wxEVT_STC_KEY,
+    wxEVT_STC_MACRORECORD,
+    wxEVT_STC_MARGINCLICK,
+    wxEVT_STC_NEEDSHOWN,
+    wxEVT_STC_POSCHANGED
+};
+
+
+#ifndef SWIG
+typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
+
+#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
+
+#endif
+
+//----------------------------------------------------------------------
+//----------------------------------------------------------------------
+#endif
+
+
+
+ + diff --git a/wxPython/demo/widgetTest.py b/wxPython/demo/widgetTest.py index 9a060d045c..ee940e89f4 100644 --- a/wxPython/demo/widgetTest.py +++ b/wxPython/demo/widgetTest.py @@ -1,5 +1,7 @@ +import sys, string + from wxPython.wx import * from wxPython.html import * @@ -41,7 +43,10 @@ class TestHtmlPanel(wxPanel): import About wxPanel.__init__(self, parent, id, size=size) self.html = wxHtmlWindow(self, -1, wxPoint(5,5), wxSize(400, 350)) - self.html.SetPage(About.MyAboutBox.text % wx.__version__) + py_version = string.split(sys.version)[0] + self.html.SetPage(About.MyAboutBox.text % (wx.__version__, py_version)) + ir = self.html.GetInternalRepresentation() + self.html.SetSize( (ir.GetWidth()+5, ir.GetHeight()+5) ) self.Fit() #---------------------------------------------------------------------- diff --git a/wxPython/demo/wxFloatBar.py b/wxPython/demo/wxFloatBar.py index 4d0547bd51..2df9552041 100644 --- a/wxPython/demo/wxFloatBar.py +++ b/wxPython/demo/wxFloatBar.py @@ -43,7 +43,7 @@ class TestFloatBar(wxFrame): tb.AddTool(60, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP), wxBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP), - shortHelpString="Toggle with 2 bitmaps", toggle=true) + shortHelpString="Toggle with 2 bitmaps", isToggle=true) EVT_TOOL(self, 60, self.OnToolClick) EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick) tb.Realize() diff --git a/wxPython/demo/wxGLCanvas.py b/wxPython/demo/wxGLCanvas.py index d6266f5814..8813c3f0cd 100644 --- a/wxPython/demo/wxGLCanvas.py +++ b/wxPython/demo/wxGLCanvas.py @@ -8,7 +8,7 @@ except ImportError: try: # The Python OpenGL package can be found at - # http://starship.python.net:9673/crew/da/Code/PyOpenGL/ + # http://PyOpenGL.sourceforge.net/ from OpenGL.GL import * from OpenGL.GLUT import * haveOpenGL = true @@ -28,7 +28,7 @@ elif not haveOpenGL: def runTest(frame, nb, log): dlg = wxMessageDialog(frame, 'The OpenGL package was not found. You can get it at\n' - 'http://starship.python.net:9673/crew/da/Code/PyOpenGL/', + 'http://PyOpenGL.sourceforge.net/', 'Sorry', wxOK | wxICON_INFORMATION) dlg.ShowModal() dlg.Destroy() @@ -57,7 +57,8 @@ else: class CubeCanvas(wxGLCanvas): def __init__(self, parent): - wxGLCanvas.__init__(self, parent, -1) + wxGLCanvas.__init__(self, parent, -1) #, + #attribList=[GL_RED_BITS, 4, GL_DOUBLEBUFFER] ) EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) EVT_SIZE(self, self.OnSize) EVT_PAINT(self, self.OnPaint) diff --git a/wxPython/demo/wxGauge.py b/wxPython/demo/wxGauge.py index 3d26a6e727..21e185a439 100644 --- a/wxPython/demo/wxGauge.py +++ b/wxPython/demo/wxGauge.py @@ -9,16 +9,15 @@ class TestPanel(wxPanel): self.log = log self.count = 0 - wxStaticText(self, -1, "This example uses the wxGauge control.", + wxStaticText(self, -1, "This example shows the wxGauge control.", wxPoint(45, 15)) - #self.g1 = wxGauge(self, -1, 50, wxPoint(40, 50), wxSize(40, 160), - # wxGA_VERTICAL) - #self.g1.SetBezelFace(3) - #self.g1.SetShadowWidth(3) + self.g1 = wxGauge(self, -1, 50, wxPoint(110, 50), wxSize(250, 25)) + self.g1.SetBezelFace(3) + self.g1.SetShadowWidth(3) - self.g2 = wxGauge(self, -1, 50, wxPoint(110, 50), wxSize(250, 25), - wxGA_HORIZONTAL) + self.g2 = wxGauge(self, -1, 50, wxPoint(110, 95), wxSize(250, 25), + wxGA_HORIZONTAL|wxGA_SMOOTH) self.g2.SetBezelFace(5) self.g2.SetShadowWidth(5) @@ -29,7 +28,7 @@ class TestPanel(wxPanel): self.count = self.count + 1 if self.count >= 50: self.count = 0 - #self.g1.SetValue(self.count) + self.g1.SetValue(self.count) self.g2.SetValue(self.count) diff --git a/wxPython/demo/wxHtmlWindow.py b/wxPython/demo/wxHtmlWindow.py index eb2aac73e3..e2e902d865 100644 --- a/wxPython/demo/wxHtmlWindow.py +++ b/wxPython/demo/wxHtmlWindow.py @@ -13,6 +13,12 @@ class MyHtmlWindow(wxHtmlWindow): def __init__(self, parent, id, log): wxHtmlWindow.__init__(self, parent, id) self.log = log + EVT_SCROLLWIN( self, self.OnScroll ) + + def OnScroll( self, event ): + print 'event.GetOrientation()',event.GetOrientation() + print 'event.GetPosition()',event.GetPosition() + event.Skip() def OnLinkClicked(self, linkinfo): diff --git a/wxPython/demo/wxListCtrl.py b/wxPython/demo/wxListCtrl.py index 4374d82d33..6ac4ede2ba 100644 --- a/wxPython/demo/wxListCtrl.py +++ b/wxPython/demo/wxListCtrl.py @@ -60,7 +60,7 @@ musicdata = { class TestListCtrlPanel(wxPanel): def __init__(self, parent, log): - wxPanel.__init__(self, parent, -1) + wxPanel.__init__(self, parent, -1, style=wxWANTS_CHARS) self.log = log tID = wxNewId() @@ -68,15 +68,15 @@ class TestListCtrlPanel(wxPanel): self.il = wxImageList(16, 16) idx1 = self.il.Add(wxBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP)) - self.list = wxListCtrl(self, tID, wxDefaultPosition, wxDefaultSize, - wxLC_REPORT|wxSUNKEN_BORDER) + self.list = wxListCtrl(self, tID, + style=wxLC_REPORT|wxSUNKEN_BORDER) self.list.SetImageList(self.il, wxIMAGE_LIST_SMALL) self.list.SetToolTip(wxToolTip("This is a ToolTip!")) wxToolTip_Enable(true) self.list.InsertColumn(0, "Artist") - self.list.InsertColumn(1, "Title") + self.list.InsertColumn(1, "Title", wxLIST_FORMAT_RIGHT) self.list.InsertColumn(2, "Genre") items = musicdata.items() for x in range(len(items)): @@ -90,11 +90,20 @@ class TestListCtrlPanel(wxPanel): self.list.SetColumnWidth(1, wxLIST_AUTOSIZE) ##self.list.SetColumnWidth(2, wxLIST_AUTOSIZE) - self.list.SetItemState(5, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) + self.list.SetItemState(25, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) + + #self.list.SetItemState(25, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) + #self.list.EnsureVisible(25) + + # show how to change the colour of an item + item = self.list.GetItem(1) + item.SetTextColour(wxBLUE) + self.list.SetItem(item) self.currentItem = 0 EVT_SIZE(self, self.OnSize) EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected) + EVT_LIST_ITEM_ACTIVATED(self, tID, self.OnItemActivated) EVT_LIST_DELETE_ITEM(self, tID, self.OnItemDelete) EVT_LIST_COL_CLICK(self, tID, self.OnColClick) EVT_LEFT_DCLICK(self.list, self.OnDoubleClick) @@ -117,6 +126,10 @@ class TestListCtrlPanel(wxPanel): self.currentItem = event.m_itemIndex self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem)) + def OnItemActivated(self, event): + self.currentItem = event.m_itemIndex + self.log.WriteText("OnItemActivated: %s\n" % self.list.GetItemText(self.currentItem)) + def OnItemDelete(self, event): self.log.WriteText("OnItemDelete\n") diff --git a/wxPython/demo/wxProcess.py b/wxPython/demo/wxProcess.py new file mode 100644 index 0000000000..4e25bd6e6d --- /dev/null +++ b/wxPython/demo/wxProcess.py @@ -0,0 +1,157 @@ + +from wxPython.wx import * + +#---------------------------------------------------------------------- + +class TestPanel(wxPanel): + def __init__(self, parent, ID, log): + wxPanel.__init__(self, parent, ID) + self.log = log + + self.process = None + EVT_IDLE(self, self.OnIdle) + + # We can either derive from wxProcess and override OnTerminate + # or we can let wxProcess send this window an event that is + # caught in the normal way... + EVT_END_PROCESS(self, -1, self.OnProcessEnded) + + + # Make the controls + prompt = wxStaticText(self, -1, 'Command line:') + self.cmd = wxTextCtrl(self, -1, 'python data/echo.py') + self.exBtn = wxButton(self, -1, 'Execute') + + self.out = wxTextCtrl(self, -1, '', style=wxTE_MULTILINE|wxTE_READONLY) + + self.inp = wxTextCtrl(self, -1, '', style=wxTE_PROCESS_ENTER) + self.sndBtn = wxButton(self, -1, 'Send') + self.termBtn = wxButton(self, -1, 'Close Stream') + self.inp.Enable(false) + self.sndBtn.Enable(false) + self.termBtn.Enable(false) + + # Hook up the events + EVT_BUTTON(self, self.exBtn.GetId(), self.OnExecuteBtn) + EVT_BUTTON(self, self.sndBtn.GetId(), self.OnSendText) + EVT_BUTTON(self, self.termBtn.GetId(), self.OnCloseStream) + EVT_TEXT_ENTER(self, self.inp.GetId(), self.OnSendText) + + + # Do the layout + box1 = wxBoxSizer(wxHORIZONTAL) + box1.Add(prompt, 0, wxALIGN_CENTER) + box1.Add(self.cmd, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5) + box1.Add(self.exBtn, 0) + + box2 = wxBoxSizer(wxHORIZONTAL) + box2.Add(self.inp, 1, wxALIGN_CENTER) + box2.Add(self.sndBtn, 0, wxLEFT, 5) + box2.Add(self.termBtn, 0, wxLEFT, 5) + + sizer = wxBoxSizer(wxVERTICAL) + sizer.Add(box1, 0, wxEXPAND|wxALL, 10) + sizer.Add(self.out, 1, wxEXPAND|wxALL, 10) + sizer.Add(box2, 0, wxEXPAND|wxALL, 10) + + self.SetSizer(sizer) + self.SetAutoLayout(true) + + + def __del__(self): + if self.process is not None: + self.process.Detach() + self.process.CloseOutput() + self.process = None + + + def OnExecuteBtn(self, evt): + cmd = self.cmd.GetValue() + + self.process = wxProcess(self) + self.process.Redirect(); + pid = wxExecute(cmd, false, self.process) + self.log.write('OnExecuteBtn: "%s" pid: %s\n' % (cmd, pid)) + + self.inp.Enable(true) + self.sndBtn.Enable(true) + self.termBtn.Enable(true) + self.cmd.Enable(false) + self.exBtn.Enable(false) + self.inp.SetFocus() + + + def OnSendText(self, evt): + text = self.inp.GetValue() + self.inp.SetValue('') + self.log.write('OnSendText: "%s"\n' % text) + self.process.GetOutputStream().write(text + '\n') + self.inp.SetFocus() + + + def OnCloseStream(self, evt): + self.log.write('OnCloseStream\n') + self.process.CloseOutput() + + + def OnIdle(self, evt): + if self.process is not None: + stream = self.process.GetInputStream() + + # Yes, this is weird. For this particular stream, EOF + # simply means that there is no data available to be read, + # not truly the end of file. Also, read() just reads all + # the currently available data, not until the real EOF... + if not stream.eof(): + text = stream.read() + self.out.AppendText(text) + + + def OnProcessEnded(self, evt): + self.log.write('OnProcessEnded, pid:%s, exitCode: %s\n' % + (evt.GetPid(), evt.GetExitCode())) + + stream = self.process.GetInputStream() + if not stream.eof(): + text = stream.read() + self.out.AppendText(text) + + self.process.Destroy() + self.process = None + self.inp.Enable(false) + self.sndBtn.Enable(false) + self.termBtn.Enable(false) + self.cmd.Enable(true) + self.exBtn.Enable(true) + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb, -1, log) + return win + + +#---------------------------------------------------------------------- + + +overview = """\ + +

wxProcess

+ +wxProcess lets you get notified when an asyncronous child process +started by wxExecute terminates, and also to get input/output streams +for the child process's stdout, stderr and stdin. + +

+This demo launches a simple python script that echos back on stdout +lines that it reads from stdin. You can send text to the echo +process' stdin by typing in the lower textctrl and clicking Send. + +

+Clicking the Close Stream button will close the demo's end of the +stdin pipe to the child process. In our case that will cause the +child process to exit its main loop. + + +""" diff --git a/wxPython/demo/wxScrolledWindow.py b/wxPython/demo/wxScrolledWindow.py index e018d18e10..3b6edadb14 100644 --- a/wxPython/demo/wxScrolledWindow.py +++ b/wxPython/demo/wxScrolledWindow.py @@ -81,6 +81,9 @@ class MyCanvas(wxScrolledWindow): dc.DrawRectangle(50,500,50,50) dc.DrawRectangle(100,500,50,50) + dc.SetPen(pen1) + dc.DrawEllipticArc(200, 500, 50, 75, 0, 90) + #from wxPython import dch #dch.FillRect(dc, wxRect(50, 400, 50, 50), wxBLACK) diff --git a/wxPython/demo/wxSplitterWindow.py b/wxPython/demo/wxSplitterWindow.py index 662975b5f8..fac9cbee57 100644 --- a/wxPython/demo/wxSplitterWindow.py +++ b/wxPython/demo/wxSplitterWindow.py @@ -9,9 +9,17 @@ class MySplitter(wxSplitterWindow): wxSplitterWindow.__init__(self, parent, ID) self.log = log EVT_SPLITTER_SASH_POS_CHANGED(self, self.GetId(), self.OnSashChanged) + EVT_SPLITTER_SASH_POS_CHANGING(self, self.GetId(), self.OnSashChanging) def OnSashChanged(self, evt): - self.log.WriteText("sash changed to " + str(evt.GetSashPosition())) + self.log.WriteText("sash changed to %s\n" % str(evt.GetSashPosition())) + # uncomment this to not allow the change + #evt.SetSashPosition(-1) + + def OnSashChanging(self, evt): + self.log.WriteText("sash changing to %s\n" % str(evt.GetSashPosition())) + # uncomment this to not allow the change + #evt.SetSashPosition(-1) #--------------------------------------------------------------------------- diff --git a/wxPython/demo/wxStatusBar.py b/wxPython/demo/wxStatusBar.py index bdb016a1fa..f40facb72f 100644 --- a/wxPython/demo/wxStatusBar.py +++ b/wxPython/demo/wxStatusBar.py @@ -10,7 +10,9 @@ class CustomStatusBar(wxStatusBar): wxStatusBar.__init__(self, parent, -1) self.SetFieldsCount(3) self.log = log + self.sizeChanged = false EVT_SIZE(self, self.OnSize) + EVT_IDLE(self, self.OnIdle) self.SetStatusText("A Custom StatusBar...", 0) @@ -18,12 +20,8 @@ class CustomStatusBar(wxStatusBar): EVT_CHECKBOX(self, 1001, self.OnToggleClock) self.cb.SetValue(true) - # figure out how tall to make it. - dc = wxClientDC(self) - dc.SetFont(self.GetFont()) - (w,h) = dc.GetTextExtent('X') - h = int(h * 1.8) - self.SetSize(wxSize(100, h)) + # set the initial position of the checkbox + self.Reposition() # start our timer self.timer = wxPyTimer(self.Notify) @@ -38,6 +36,7 @@ class CustomStatusBar(wxStatusBar): self.SetStatusText(st, 2) self.log.WriteText("tick...\n") + # the checkbox was clicked def OnToggleClock(self, event): if self.cb.GetValue(): @@ -47,11 +46,26 @@ class CustomStatusBar(wxStatusBar): self.timer.Stop() + def OnSize(self, evt): + self.Reposition() # for normal size events + + # Set a flag so the idle time handler will also do the repositioning. + # It is done this way to get around a buglet where GetFieldRect is not + # accurate during the EVT_SIZE resulting from a frame maximize. + self.sizeChanged = true + + + def OnIdle(self, evt): + if self.sizeChanged: + self.Reposition() + + # reposition the checkbox - def OnSize(self, event): + def Reposition(self): rect = self.GetFieldRect(1) self.cb.SetPosition(wxPoint(rect.x+2, rect.y+2)) self.cb.SetSize(wxSize(rect.width-4, rect.height-4)) + self.sizeChanged = false @@ -89,28 +103,4 @@ def runTest(frame, nb, log): overview = """\ A status bar is a narrow window that can be placed along the bottom of a frame to give small amounts of status information. It can contain one or more fields, one or more of which can be variable length according to the size of the window. - -wxStatusBar() ----------------------------- - -Default constructor. - -wxStatusBar(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "statusBar") - -Constructor, creating the window. - -Parameters -------------------- - -parent = The window parent, usually a frame. - -id = The window identifier. It may take a value of -1 to indicate a default value. - -pos = The window position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxWindows, depending on platform. - -size = The window size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxWindows, depending on platform. - -style = The window style. See wxStatusBar. - -name = The name of the window. This parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual windows. """ diff --git a/wxPython/demo/wxStyledTextCtrl_1.py b/wxPython/demo/wxStyledTextCtrl_1.py index 7fab856c7c..f7bf221259 100644 --- a/wxPython/demo/wxStyledTextCtrl_1.py +++ b/wxPython/demo/wxStyledTextCtrl_1.py @@ -113,15 +113,15 @@ def runTest(frame, nb, log): # now set some text to those styles... Normally this would be # done in an event handler that happens when text needs displayed. ed.StartStyling(98, 0xff) - ed.SetStyleFor(6, 1) # set style for 6 characters using style 1 + ed.SetStyling(6, 1) # set style for 6 characters using style 1 ed.StartStyling(190, 0xff) - ed.SetStyleFor(20, 2) + ed.SetStyling(20, 2) ed.StartStyling(310, 0xff) - ed.SetStyleFor(4, 3) - ed.SetStyleFor(2, 0) - ed.SetStyleFor(10, 4) + ed.SetStyling(4, 3) + ed.SetStyling(2, 0) + ed.SetStyling(10, 4) # line numbers in the margin @@ -146,16 +146,16 @@ def runTest(frame, nb, log): # and finally, an indicator or two ed.IndicatorSetStyle(0, wxSTC_INDIC_SQUIGGLE) - ed.IndicatorSetColour(0, wxRED) + ed.IndicatorSetForeground(0, wxRED) ed.IndicatorSetStyle(1, wxSTC_INDIC_DIAGONAL) - ed.IndicatorSetColour(1, wxBLUE) + ed.IndicatorSetForeground(1, wxBLUE) ed.IndicatorSetStyle(2, wxSTC_INDIC_STRIKE) - ed.IndicatorSetColour(2, wxRED) + ed.IndicatorSetForeground(2, wxRED) ed.StartStyling(836, wxSTC_INDICS_MASK) - ed.SetStyleFor(10, wxSTC_INDIC0_MASK) - ed.SetStyleFor(10, wxSTC_INDIC1_MASK) - ed.SetStyleFor(10, wxSTC_INDIC2_MASK | wxSTC_INDIC1_MASK) + ed.SetStyling(10, wxSTC_INDIC0_MASK) + ed.SetStyling(10, wxSTC_INDIC1_MASK) + ed.SetStyling(10, wxSTC_INDIC2_MASK | wxSTC_INDIC1_MASK) return ed diff --git a/wxPython/demo/wxStyledTextCtrl_2.py b/wxPython/demo/wxStyledTextCtrl_2.py index c2c7ae4855..228c404bdb 100644 --- a/wxPython/demo/wxStyledTextCtrl_2.py +++ b/wxPython/demo/wxStyledTextCtrl_2.py @@ -41,13 +41,13 @@ class PythonSTC(wxStyledTextCtrl): wxStyledTextCtrl.__init__(self, parent, ID) self.SetLexer(wxSTC_LEX_PYTHON) - self.SetKeywords(0, string.join(keyword.kwlist)) + self.SetKeyWords(0, string.join(keyword.kwlist)) self.SetProperty("fold", "1") self.SetProperty("tab.timmy.whinge.level", "1") self.SetMargins(0,0) - self.SetViewWhitespace(false) + self.SetViewWhiteSpace(false) #self.SetBufferedDraw(false) self.SetEdgeMode(wxSTC_EDGE_BACKGROUND) @@ -82,33 +82,33 @@ class PythonSTC(wxStyledTextCtrl): # Python styles # White space - self.StyleSetSpec(SCE_P_DEFAULT, "fore:#808080") + self.StyleSetSpec(wxSTC_P_DEFAULT, "fore:#808080") # Comment - self.StyleSetSpec(SCE_P_COMMENTLINE, "fore:#007F00,face:%(other)s" % faces) + self.StyleSetSpec(wxSTC_P_COMMENTLINE, "fore:#007F00,face:%(other)s" % faces) # Number - self.StyleSetSpec(SCE_P_NUMBER, "fore:#007F7F") + self.StyleSetSpec(wxSTC_P_NUMBER, "fore:#007F7F") # String - self.StyleSetSpec(SCE_P_STRING, "fore:#7F007F,italic,face:%(times)s" % faces) + self.StyleSetSpec(wxSTC_P_STRING, "fore:#7F007F,italic,face:%(times)s" % faces) # Single quoted string - self.StyleSetSpec(SCE_P_CHARACTER, "fore:#7F007F,italic,face:%(times)s" % faces) + self.StyleSetSpec(wxSTC_P_CHARACTER, "fore:#7F007F,italic,face:%(times)s" % faces) # Keyword - self.StyleSetSpec(SCE_P_WORD, "fore:#00007F,bold") + self.StyleSetSpec(wxSTC_P_WORD, "fore:#00007F,bold") # Triple quotes - self.StyleSetSpec(SCE_P_TRIPLE, "fore:#7F0000") + self.StyleSetSpec(wxSTC_P_TRIPLE, "fore:#7F0000") # Triple double quotes - self.StyleSetSpec(SCE_P_TRIPLEDOUBLE, "fore:#7F0000") + self.StyleSetSpec(wxSTC_P_TRIPLEDOUBLE, "fore:#7F0000") # Class name definition - self.StyleSetSpec(SCE_P_CLASSNAME, "fore:#0000FF,bold,underline") + self.StyleSetSpec(wxSTC_P_CLASSNAME, "fore:#0000FF,bold,underline") # Function or method name definition - self.StyleSetSpec(SCE_P_DEFNAME, "fore:#007F7F,bold") + self.StyleSetSpec(wxSTC_P_DEFNAME, "fore:#007F7F,bold") # Operators - self.StyleSetSpec(SCE_P_OPERATOR, "bold") + self.StyleSetSpec(wxSTC_P_OPERATOR, "bold") # Identifiers - #self.StyleSetSpec(SCE_P_IDENTIFIER, "bold")#,fore:#FF00FF") + #self.StyleSetSpec(wxSTC_P_IDENTIFIER, "bold")#,fore:#FF00FF") # Comment-blocks - self.StyleSetSpec(SCE_P_COMMENTBLOCK, "fore:#7F7F7F") + self.StyleSetSpec(wxSTC_P_COMMENTBLOCK, "fore:#7F7F7F") # End of line where string is not closed - self.StyleSetSpec(SCE_P_STRINGEOL, "fore:#000000,face:%(mono)s,back:#E0C0E0,eolfilled" % faces) + self.StyleSetSpec(wxSTC_P_STRINGEOL, "fore:#000000,face:%(mono)s,back:#E0C0E0,eolfilled" % faces) self.SetCaretForeground("BLUE") @@ -126,8 +126,17 @@ class PythonSTC(wxStyledTextCtrl): self.CallTipShow(pos, 'param1, param2') # Code completion else: - self.AutoCompShow('I love wxPython a b c') - + #lst = [] + #for x in range(50000): + # lst.append('%05d' % x) + #st = string.join(lst) + #print len(st) + #self.AutoCompShow(0, st) + self.AutoCompSetIgnoreCase(true) + self.AutoCompShow(0, string.join(keyword.kwlist)) + self.AutoCompSelect('br') + else: + event.Skip() def OnUpdateUI(self, evt): @@ -141,21 +150,21 @@ class PythonSTC(wxStyledTextCtrl): styleBefore = self.GetStyleAt(caretPos - 1) # check before - if charBefore and charBefore in "[]{}()" and ord(styleBefore) == SCE_P_OPERATOR: + if charBefore and chr(charBefore) in "[]{}()" and styleBefore == wxSTC_P_OPERATOR: braceAtCaret = caretPos - 1 # check after if braceAtCaret < 0: charAfter = self.GetCharAt(caretPos) styleAfter = self.GetStyleAt(caretPos) - if charAfter and charAfter in "[]{}()" and ord(styleAfter) == SCE_P_OPERATOR: + if charAfter and chr(charAfter) in "[]{}()" and styleAfter == wxSTC_P_OPERATOR: braceAtCaret = caretPos if braceAtCaret >= 0: braceOpposite = self.BraceMatch(braceAtCaret) if braceAtCaret != -1 and braceOpposite == -1: - self.BraceBadlight(braceAtCaret) + self.BraceBadLight(braceAtCaret) else: self.BraceHighlight(braceAtCaret, braceOpposite) #pt = self.PointFromPosition(braceOpposite) @@ -170,7 +179,7 @@ class PythonSTC(wxStyledTextCtrl): if evt.GetShift() and evt.GetControl(): self.FoldAll() else: - lineClicked = self.GetLineFromPos(evt.GetPosition()) + lineClicked = self.LineFromPosition(evt.GetPosition()) if self.GetFoldLevel(lineClicked) & wxSTC_FOLDLEVELHEADERFLAG: if evt.GetShift(): self.SetFoldExpanded(lineClicked, true) diff --git a/wxPython/demo/wxTextCtrl.py b/wxPython/demo/wxTextCtrl.py index 98f0a25a66..8936d34de4 100644 --- a/wxPython/demo/wxTextCtrl.py +++ b/wxPython/demo/wxTextCtrl.py @@ -12,13 +12,16 @@ class TestPanel(wxPanel): t = wxTextCtrl(self, 10, "Test it out and see", wxPoint(80, 25), wxSize(150, 20)) t.SetInsertionPoint(0) EVT_TEXT(self, 10, self.EvtText) + EVT_CHAR(t, self.EvtChar) + wxStaticText(self, -1, "Passsword", wxPoint(5, 50), wxSize(75, 20)) wxTextCtrl(self, 20, "", wxPoint(80, 50), wxSize(150, 20), wxTE_PASSWORD) EVT_TEXT(self, 20, self.EvtText) wxStaticText(self, -1, "Multi-line", wxPoint(5, 75), wxSize(75, 20)) - t = wxTextCtrl(self, 30, "How does it work with a long line of text set in the control", wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE) + t = wxTextCtrl(self, 30, "How does it work with a long line of text set in the control", + wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE) t.SetInsertionPoint(0) EVT_TEXT(self, 30, self.EvtText) @@ -26,6 +29,10 @@ class TestPanel(wxPanel): self.log.WriteText('EvtText: %s\n' % event.GetString()) + def EvtChar(self, event): + self.log.WriteText('EvtChar: %d\n' % event.GetKeyCode()) + event.Skip() + #--------------------------------------------------------------------------- diff --git a/wxPython/demo/wxToolBar.py b/wxPython/demo/wxToolBar.py index 19a806d94f..81f6009ad7 100644 --- a/wxPython/demo/wxToolBar.py +++ b/wxPython/demo/wxToolBar.py @@ -39,20 +39,22 @@ class TestToolBar(wxFrame): tb.AddSeparator() tool = tb.AddTool(50, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP), - shortHelpString="Toggle this", toggle=true) + shortHelpString="Toggle this", isToggle=true) EVT_TOOL(self, 50, self.OnToolClick) EVT_TOOL_RCLICKED(self, 50, self.OnToolRClick) tb.AddTool(60, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP), wxBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP), - shortHelpString="Toggle with 2 bitmaps", toggle=true) + shortHelpString="Toggle with 2 bitmaps", isToggle=true) EVT_TOOL(self, 60, self.OnToolClick) EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick) tb.AddSeparator() - tb.AddControl(wxComboBox(tb, -1, "", choices=["", "This", "is a", "wxComboBox"], + cbID = wxNewId() + tb.AddControl(wxComboBox(tb, cbID, "", choices=["", "This", "is a", "wxComboBox"], size=(150,-1), style=wxCB_DROPDOWN)) + EVT_COMBOBOX(self, cbID, self.OnCombo) tb.Realize() EVT_CLOSE(self, self.OnCloseWindow) @@ -67,6 +69,10 @@ class TestToolBar(wxFrame): def OnToolRClick(self, event): self.log.WriteText("tool %s right-clicked\n" % event.GetId()) + def OnCombo(self, event): + self.log.WriteText("combobox item selected: %s\n" % event.GetString()) + + #--------------------------------------------------------------------------- def runTest(frame, nb, log): diff --git a/wxPython/demo/wxTreeCtrl.py b/wxPython/demo/wxTreeCtrl.py index 9f1c20183a..64f8662fd4 100644 --- a/wxPython/demo/wxTreeCtrl.py +++ b/wxPython/demo/wxTreeCtrl.py @@ -21,7 +21,8 @@ class MyTreeCtrl(wxTreeCtrl): class TestTreeCtrlPanel(wxPanel): def __init__(self, parent, log): - wxPanel.__init__(self, parent, -1) + # Use the WANTS_CHARS style so the panel doesn't eat the Return key. + wxPanel.__init__(self, parent, -1, style=wxWANTS_CHARS) EVT_SIZE(self, self.OnSize) self.log = log @@ -68,6 +69,7 @@ class TestTreeCtrlPanel(wxPanel): EVT_TREE_SEL_CHANGED (self, tID, self.OnSelChanged) EVT_TREE_BEGIN_LABEL_EDIT(self, tID, self.OnBeginEdit) EVT_TREE_END_LABEL_EDIT (self, tID, self.OnEndEdit) + EVT_TREE_ITEM_ACTIVATED (self, tID, self.OnActivate) EVT_LEFT_DCLICK(self.tree, self.OnLeftDClick) EVT_RIGHT_DOWN(self.tree, self.OnRightClick) @@ -135,9 +137,16 @@ class TestTreeCtrlPanel(wxPanel): def OnSelChanged(self, event): self.item = event.GetItem() self.log.WriteText("OnSelChanged: %s\n" % self.tree.GetItemText(self.item)) - self.log.WriteText("BoundingRect: %s\n" % - self.tree.GetBoundingRect(self.item, true)) + if wxPlatform == '__WXMSW__': + self.log.WriteText("BoundingRect: %s\n" % + self.tree.GetBoundingRect(self.item, true)) + #items = self.tree.GetSelections() + #print map(self.tree.GetItemText, items) + event.Skip() + + def OnActivate(self, evt): + self.log.WriteText("OnActivate: %s\n" % self.tree.GetItemText(self.item)) #--------------------------------------------------------------------------- @@ -160,11 +169,6 @@ def runTest(frame, nb, log): - - - - - overview = """\ A tree control presents information as a hierarchy, with items that may be expanded to show further items. Items in a tree control are referenced by wxTreeItemId handles. diff --git a/wxPython/distrib/README.dbg.txt b/wxPython/distrib/README.dbg.txt index b2289512b3..ba829d4443 100644 --- a/wxPython/distrib/README.dbg.txt +++ b/wxPython/distrib/README.dbg.txt @@ -10,11 +10,21 @@ Another debugging feature is when the wxPython program exits, it will print to stdout information about any wxWindows C++ objects that havn't been properly cleaned up. -This archive contains a new wxWindows DLL named wx[version]d.dll that -should be copied to the windows system directory or some other -directory on the PATH.You will also find replacements for all of -wxPython's *.pyd files that are linked to use this DLL. Until I put -together a new installer, you'll need to copy things manually. +This archive contains a new wxWindows DLL named wx[version]d.dll and a +debugging version of the core wxPython module, wxc_d.pyd. These +should be put into your wxPython package directory. Also included are +the debuging version of Python, python_d.exe and python[VER]_d.dll +which can be put wherever you like. + +In order to run the debugging version of wxPython sumply run you +program with python_d.exe instead of python.exe. This lets the +debugging version sit side by side with the production version, with +no need for swapping this around. You will also need _d versions of +any other extension modules you are using. If you need _d's for any +of the other standard Python extensions you can get them here, for 2.0 +at least: + +http://www.pythonlabs.com/products/python2.0/downloads/BeOpen-Python-2.0-Debug.zip Robin diff --git a/wxPython/distrib/autobuild.py b/wxPython/distrib/autobuild.py index 706f00dc1b..edeade7f9a 100755 --- a/wxPython/distrib/autobuild.py +++ b/wxPython/distrib/autobuild.py @@ -7,8 +7,8 @@ cwd = os.getcwd() logfile = 'c:\\temp\\autobuild.log' WXDIR = os.environ['WXWIN'] -dllVer = '22_0' -wxpVer = '2.2.0' +dllVer = '22_1' +wxpVer = '2.2.1' dateSt = time.strftime("%Y%m%d", time.localtime(time.time())) base = os.path.split(sys.argv[0])[0] @@ -149,7 +149,7 @@ FINAL=1 logSeparator("Uploading to website...") do('python c:\\utils\\sendwxp.py %s' % destName) - do('python c:\\utils\\sendwxp.py %s' % destZName) + #do('python c:\\utils\\sendwxp.py %s' % destZName) do('python c:\\utils\\sendwxp.py %s' % destDName) diff --git a/wxPython/distrib/build.py b/wxPython/distrib/build.py deleted file mode 100755 index 3e64e9f736..0000000000 --- a/wxPython/distrib/build.py +++ /dev/null @@ -1,860 +0,0 @@ -#!/usr/bin/env python -#---------------------------------------------------------------------------- -# Name: build.py -# Purpose: This script is used to build wxPython. It reads a build -# configuration file in the requested project directory and -# based on the contents of the file can build Makefiles for -# unix or win32, and can execute make with various options -# potentially automating the entire build/install/clean process -# from a single command. -# -# Author: Robin Dunn -# -# Created: 18-Aug-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1999 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- -""" -build.py - - This script is used to build wxPython. It reads a build configuration - file in the requested project directory and based on the contents of - the file can build Makefiles for unix or win32, and can execute make - with various options potentially automating the entire - build/install/clean process from a single command. - - The default action is to build the Makefile and exit. - -Options - -C dir CD to dir before doing anything - -B file Use file as the build configuration (default ./build.cfg) - -M file Use file as the name of the makefile to create - (default Makefile) - - -b Build the module (runs make) - -i Install the module (runs make install) - -c Cleanup (runs make clean) - -u Uninstall (runs make uninstall) - - -h Show help and exit - - -Configuration Files - - The build configuration file lists targets, source files and options - for the the build process. The contents of the build.cfg are used to - dynamically generate the Makefile. - - To prevent you from getting screwed when the default build.cfg is - updated, you can override the values in build.cfg by putting your - custom definitions in a file named build.local. You can also place a - build.local file in the parent directory, or even in the grandparent - directory for project-wide overrides. Finally, command-line arguments - of the form NAME=VALUE can also be used to override simple configuration - values. The order of evaluation is: - - 0. comman-line flags (-M, -b, etc.) - 1. ./build.cfg - 2. ../../build.local (if present) - 3. ../build.local (if present) - 4. ./build.local (if present) - 5. command-line NAME=VALUEs - - The config files are actually just Python files that get exec'ed in a - separate namespace which is then used later as a configuration object. - This keeps the build script simple in that it doesn't have to parse - anything, and the config files can be much more than just names and - values as pretty much any python code can be executed. The global - variables set in the config namespace are what are used later as - configuation values. - - -Configuration Options - - The following variables can be set in the config files. Only a few are - required, the rest will either have suitable defaults or will be - calculated from your current Python runtime environment. - - MODULE The name of the extension module to produce - SWIGFILES A list of files that should be run through SWIG - SWIGFLAGS Flags for SWIG - SOURCES Other C/C++ sources that should be part of the module - PYFILES Other Python files that should be installed with the module - CFLAGS Flags to be used by the compiler - LFLAGS Flags to be used at the link step - LIBS Libraries to be linked with - - OTHERCFLAGS Extra flags to append to CFLAGS - OTHERLFLAGS Extra flags to append to LFLAGS - OTHERSWIGFLAGS Extra flags to append to SWIGFLAGS - OTHERLIBS Other libraries to be linked with, in addition to LIBS - OTHERTARGETS Other targets to be placed on the default rule line - OTHERINSTALLTARGETS - Other targets to be placed on the install rule line - OTHERDEFS Text to place near the begining of the Makefile - OTHERRULES This text is placed at the end of the makefile and - will typically be used for adding rules and such - DEFAULTRULE Text to be used for the default rule in the makefile - - TARGETDIR Destination for the install step - - MAKE The make program to use - MAKEFILE The name of the makefile - - runBuild Setting this to 1 is eqivalent to the -b flag - runInstall Setting this to 1 is eqivalent to the -i flag - runClean Setting this to 1 is eqivalent to the -c flag - runUninstall Setting this to 1 is eqivalent to the -u flag - - PYVERSION Version number of Python used in pathnames - PYPREFIX The root of the Python install - EXECPREFIX The root of the Python install for binary files - PYTHONLIB The Python link library - -""" - -import sys, os, string, getopt - -#---------------------------------------------------------------------------- -# This is really the wxPython version number, and will be placed in the -# Makefiles for use with the distribution related targets. - -major_version = '2.2' -build_version = '0' - -__version__ = major_version + '.' + build_version - -#---------------------------------------------------------------------------- - -def main(args): - try: - opts, args = getopt.getopt(args[1:], 'C:B:M:bicu') - except getopt.error: - usage() - sys.exit(1) - - if not os.environ.has_key('WXWIN'): - print "WARNING: WXWIN is not set in the environment. WXDIR may not\n"\ - " be set properly in the makefile, you will have to \n"\ - " set the environment variable or override in build.local." - - bldCfg = 'build.cfg' - bldCfgLocal = 'build.local' - MAKEFILE = 'Makefile' - runBuild = 0 - runInstall = 0 - runClean = 0 - runUninstall = 0 - - for flag, value in opts: - if flag == '-C': os.chdir(value) - elif flag == '-B': bldCfgFile = value - elif flag == '-M': makefile = value - elif flag == '-b': runBuild = 1 - elif flag == '-c': runClean = 1 - elif flag == '-i': runInstall = 1 - elif flag == '-u': runUninstall = 1 - - elif flag == '-h': usage(); sys.exit(1) - else: usage(); sys.exit(1) - - config = BuildConfig(bldCfg = bldCfg, - bldCfgLocal = bldCfgLocal, - MAKEFILE = MAKEFILE, - runBuild = runBuild, - runInstall = runInstall, - runClean = runClean, - runUninstall = runUninstall) - - err = 0 - if config.readConfigFiles(args): - config.doFixups() - config.makeMakefile() - - if config.runBuild: - cmd = "%s -f %s" % (config.MAKE, config.MAKEFILE) - print "Running:", cmd - err = os.system(cmd) - - if not err and config.runInstall: - cmd = "%s -f %s install" % (config.MAKE, config.MAKEFILE) - print "Running:", cmd - err = os.system(cmd) - - - if not err and config.runClean: - cmd = "%s -f %s clean" % (config.MAKE, config.MAKEFILE) - print "Running:", cmd - err = os.system(cmd) - - if not err and config.runUninstall: - cmd = "%s -f %s uninstall" % (config.MAKE, config.MAKEFILE) - print "Running:", cmd - err = os.system(cmd) - - return err/256 - - -#---------------------------------------------------------------------------- - -def usage(): - print __doc__ - -#---------------------------------------------------------------------------- - -def swapslash(st): - if sys.platform != 'win32': - st = string.join(string.split(st, '\\'), '/') - return st - -#---------------------------------------------------------------------------- - -def splitlines(st): - return string.join(string.split(string.strip(st), ' '), ' \\\n\t') - -#---------------------------------------------------------------------------- - -class BuildConfig: - def __init__(self, **kw): - self.__dict__.update(kw) - self.setDefaults() - - #------------------------------------------------------------ - def setDefaults(self): - base = os.path.split(sys.argv[0])[0] - base = os.path.join(base, '..') - self.WXPYDIR = os.path.abspath(base) - self.VERSION = __version__ - self.MAJVER = major_version - self.BLDVER = build_version - self.MODULE = '' - self.SWIGFILES = [] - self.SWIGFLAGS = '-c++ -shadow -python -keyword -dnone -I$(WXPSRCDIR)' - self.SOURCES = [] - self.PYFILES = [] - self.LFLAGS = '' - self.OTHERCFLAGS = '' - self.OTHERLFLAGS = '' - self.OTHERSWIGFLAGS = '' - self.OTHERLIBS = '' - self.OTHERTARGETS = '' - self.OTHERINSTALLTARGETS = '' - self.OTHERUNINSTALLTARGETS = '' - self.OTHERRULES = '' - self.DEFAULTRULE = 'default: $(GENCODEDIR) $(TARGET) $(BUILDDIR)/$(TARGET) bldpycfiles' - self.PYVERSION = sys.version[:3] - self.PYPREFIX = sys.prefix - self.EXECPREFIX = sys.exec_prefix - self.WXDIR = '$(WXWIN)' - self.FINAL = '0' - self.WXP_USE_THREAD = '1' - self.WXUSINGDLL = '1' - self.OTHERDEP = '' - self.WXPSRCDIR = '$(WXPYDIR)/src' - self.SWIGDEPS = '' - self.OTHERDEPS = '' - self.OTHERDEFS = '' - - - if sys.platform == 'win32': - self.MAKE = 'nmake' - self.PYTHONLIB = '$(PYPREFIX)\\libs\\python15.lib' - self.TARGETDIR = '$(PYPREFIX)\\wxPython' - self.LIBS = '$(PYTHONLIB) $(WXPSRCDIR)\wxc.lib' - self.GENCODEDIR = 'msw' - self.SWIGTOOLKITFLAG = '-D__WXMSW__' - self.OBJEXT = '.obj' - self.TARGET = '$(MODULE).pyd' - self.CFLAGS = '-I$(PYPREFIX)\include -I$(WXPSRCDIR) -I. /Fp$(MODULE).pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H $(THREAD) ' - self.LFLAGS = '$(DEBUGLFLAGS) /DLL /subsystem:windows,3.50 /machine:I386 /nologo' - self.RESFILE = '' - self.RESRULE = '' - self.OVERRIDEFLAGS = '/GX-' - self.RMCMD = '-erase ' - self.WXPSRCDIR = os.path.normpath(self.WXPSRCDIR) - self.CRTFLAG = '' - - - else: - self.MAKE = 'make' - self.PYLIB = '$(EXECPREFIX)/lib/python$(PYVERSION)' - self.LIBPL = '$(PYLIB)/config' - self.PYTHONLIB = '$(LIBPL)/libpython$(PYVERSION).a' - self.TARGETDIR = '$(EXECPREFIX)/lib/python$(PYVERSION)/site-packages/wxPython' - self.TARGET = '$(MODULE)module$(SO)' - self.OBJEXT = '.o' - self.HELPERLIB = 'wxPyHelpers' - self.HELPERLIBDIR = '$(EXECPREFIX)/lib' - self.CFLAGS = '-DSWIG_GLOBAL -DHAVE_CONFIG_H $(THREAD) -I. '\ - '`$(WXCONFIG) --cflags` -I$(PYINCLUDE) -I$(EXECINCLUDE) '\ - '-I$(WXPSRCDIR)' - self.LFLAGS = '-L$(WXPSRCDIR) `$(WXCONFIG) --libs`' - self.RMCMD = '-rm -f ' - self.WXCONFIG = 'wx-config' - self.USE_SONAME = '1' - - # **** What to do when I start supporting Motif, etc.??? - self.GENCODEDIR = 'gtk' - self.SWIGTOOLKITFLAG = '-D__WXGTK__' - - # Extract a few things from Python's Makefile... - try: - filename = os.path.join(self.EXECPREFIX, - 'lib/python'+self.PYVERSION, - 'config/Makefile') - mfText = string.split(open(filename, 'r').read(), '\n') - except IOError: - raise SystemExit, "Python development files not found" - - self.CCC = self.findMFValue(mfText, 'CCC') - self.CC = self.findMFValue(mfText, 'CC') - self.OPT = self.findMFValue(mfText, 'OPT') - self.SO = self.findMFValue(mfText, 'SO') - self.LDSHARED = self.findMFValue(mfText, 'LDSHARED') - self.CCSHARED = self.findMFValue(mfText, 'CCSHARED') - #self.LINKFORSHARED = self.findMFValue(mfText, 'LINKFORSHARED') - #self. = self.findMFValue(mfText, '') - #self. = self.findMFValue(mfText, '') - - - # The majority of cases will require LDSHARED to be - # modified to use the C++ driver instead of the C driver - # for linking. We'll try to do it here and if we goof up - # then the user can correct it in their build.local file. - self.LDSHARED = string.join(['$(CCC)'] + - string.split(self.LDSHARED, ' ')[1:], - ' ') - - - #------------------------------------------------------------ - def doFixups(self): - # This is called after the config files have been evaluated - # so we can do some sanity checking... - if sys.platform != 'win32': - if not self.CCC: - self.CCC = os.popen('%(WXCONFIG)s --cxx' % self.__dict__, 'r').read()[:-1] - if not self.CCC: - print "Warning: C++ compiler not specified (CCC). Assuming c++" - self.CCC = 'c++' - if not self.CC: - self.CCC = os.popen('%(WXCONFIG)s --cc' % self.__dict__, 'r').read()[:-1] - if not self.CC: - print "Warning: C compiler not specified (CC). Assuming cc" - self.CC = 'cc' - - #------------------------------------------------------------ - def findMFValue(self, mfText, st): - # Find line begining with st= and return the value - # Regex would probably be to cooler way to do this, but - # I think this is the most understandable. - for line in mfText: - if string.find(line, st+'=') == 0: - st = string.strip(line[len(st)+1:]) - return st - return None - - #------------------------------------------------------------ - def makeMakefile(self): - - # make a list of object file names - objects = "" - for name in self.SWIGFILES: - objects = objects + os.path.splitext(name)[0] + self.OBJEXT + ' ' - for name in self.SOURCES: - obj = os.path.basename(name) - objects = objects + os.path.splitext(obj)[0] + self.OBJEXT + ' ' - self.OBJECTS = splitlines(objects) - - - # now build the text for the dependencies - depends = "" - for name in self.SWIGFILES: - rootname = os.path.splitext(name)[0] - text = '$(GENCODEDIR)/%s.cpp $(GENCODEDIR)/%s.py : %s.i %s\n' \ - '$(TARGETDIR)\\%s.py : $(GENCODEDIR)\\%s.py\n' \ - '$(BUILDDIR)\\%s.py : $(GENCODEDIR)\\%s.py\n' % \ - (rootname, rootname, rootname, self.SWIGDEPS, - rootname, rootname, rootname, rootname) - depends = depends + text - if self.OTHERDEPS: - text = '%s%s : %s\n' % \ - (os.path.splitext(name)[0], self.OBJEXT, self.OTHERDEPS) - depends = depends + text - for name in self.PYFILES: - text = '$(TARGETDIR)\\%s.py : %s.py\n' % \ - tuple([os.path.splitext(name)[0]] * 2) - depends = depends + text - if self.OTHERDEPS: - for name in self.SOURCES: - name = os.path.basename(name) - text = '%s%s : %s\n' % \ - (os.path.splitext(name)[0], self.OBJEXT, self.OTHERDEPS) - depends = depends + text - - self.DEPENDS = swapslash(depends) - - - # and the list of .py files - pymodules = "" - bldpymodules = "" - for name in self.SWIGFILES: - pymodules = pymodules + '$(TARGETDIR)\\%s.py ' % os.path.splitext(name)[0] - bldpymodules = bldpymodules + '$(BUILDDIR)\\%s.py ' % os.path.splitext(name)[0] - for name in self.PYFILES: - pymodules = pymodules + '$(TARGETDIR)\\%s.py ' % os.path.splitext(name)[0] - bldpymodules = bldpymodules + '$(BUILDDIR)\\%s.py ' % os.path.splitext(name)[0] - self.PYMODULES = splitlines(swapslash(pymodules)) - self.BLDPYMODULES = splitlines(swapslash(bldpymodules)) - - - # now make a list of the python files that would need cleaned up - pycleanup = "" - for name in self.SWIGFILES: - pycleanup = pycleanup + self.makeCleanupList(name) - for name in self.PYFILES: - pycleanup = pycleanup + self.makeCleanupList(name) - self.PYCLEANUP = swapslash(pycleanup) - - - # now make a list of the python files that would need uninstalled - pyUninstall = "" - for name in self.SWIGFILES: - pyUninstall = pyUninstall + self.makeUninstallList(name) - for name in self.PYFILES: - pyUninstall = pyUninstall + self.makeUninstallList(name) - self.PYUNINSTALL = swapslash(pyUninstall) - - - # finally, build the makefile - if sys.platform == 'win32': - if self.RESFILE: - self.RESFILE = '$(MODULE).res' - self.RESRULE = '$(MODULE).res : $(MODULE).rc $(WXDIR)\\include\\wx\\msw\\wx.rc\n\t'\ - '$(rc) -r /i$(WXDIR)\\include -fo$@ $(MODULE).rc' - text = win32Template % self.__dict__ - else: - text = unixTemplate % self.__dict__ - f = open(self.MAKEFILE, 'w') - f.write(text) - f.close() - - print "Makefile created: ", self.MAKEFILE - - - - #------------------------------------------------------------ - def makeUninstallList(self, name): - st = "" - st = st + '\t%s$(TARGETDIR)\\%s.py\n' % (self.RMCMD, os.path.splitext(name)[0]) - st = st + '\t%s$(TARGETDIR)\\%s.pyc\n' % (self.RMCMD, os.path.splitext(name)[0]) - st = st + '\t%s$(TARGETDIR)\\%s.pyo\n' % (self.RMCMD, os.path.splitext(name)[0]) - return st - - - #------------------------------------------------------------ - def makeCleanupList(self, name): - st = "" - st = st + '\t%s$(BUILDDIR)\\%s.py\n' % (self.RMCMD, os.path.splitext(name)[0]) - st = st + '\t%s$(BUILDDIR)\\%s.pyc\n' % (self.RMCMD, os.path.splitext(name)[0]) - st = st + '\t%s$(BUILDDIR)\\%s.pyo\n' % (self.RMCMD, os.path.splitext(name)[0]) - return st - - - #------------------------------------------------------------ - def readConfigFiles(self, args): - return self.processFile(self.bldCfg, 1) and \ - self.processFile(os.path.join('../..', self.bldCfgLocal)) and \ - self.processFile(os.path.join('..', self.bldCfgLocal)) and \ - self.processFile(os.path.join('.', self.bldCfgLocal)) and \ - self.processArgs(args) - - #------------------------------------------------------------ - def processFile(self, filename, required=0): - try: - text = open(filename, 'r').read() - except IOError: - if required: - print "Unable to open %s" % filename - return 0 - else: - return 1 - - try: - exec(text, self.__dict__) - except: - print "Error evaluating %s" % filename - import traceback - traceback.print_exc() - return 0 - return 1 - - - #------------------------------------------------------------ - def processArgs(self, args): - try: - for st in args: - pair = string.split(st, '=') - name = pair[0] - value = string.join(pair[1:], '=') - self.__dict__[name] = value - except: - print "Error parsing command-line: %s" % st - return 0 - - return 1 - - - #------------------------------------------------------------ - - - - - -#---------------------------------------------------------------------------- -#---------------------------------------------------------------------------- -#---------------------------------------------------------------------------- - -win32Template = ''' -#---------------------------------------------------------------------- -# This makefile was autogenerated from build.py. Your changes will be -# lost if the generator is run again. You have been warned. -#---------------------------------------------------------------------- - -WXDIR = %(WXDIR)s -VERSION = %(VERSION)s -MAJVER = %(MAJVER)s -BLDVER = %(BLDVER)s -MODULE = %(MODULE)s -SWIGFLAGS = %(SWIGFLAGS)s %(SWIGTOOLKITFLAG)s %(OTHERSWIGFLAGS)s -CFLAGS = %(CFLAGS)s -LFLAGS = %(LFLAGS)s -PYVERSION = %(PYVERSION)s -PYPREFIX = %(PYPREFIX)s -EXECPREFIX = %(EXECPREFIX)s -PYTHONLIB = %(PYTHONLIB)s -FINAL = %(FINAL)s -WXP_USE_THREAD = %(WXP_USE_THREAD)s -WXUSINGDLL = %(WXUSINGDLL)s -GENCODEDIR = %(GENCODEDIR)s -RESFILE = %(RESFILE)s -WXPSRCDIR = %(WXPSRCDIR)s -%(OTHERDEFS)s - -WXPYDIR = %(WXPYDIR)s -BUILDDIR = $(WXPYDIR)\\wxPython -TARGETDIR = %(TARGETDIR)s - -OBJECTS = %(OBJECTS)s -PYMODULES = %(PYMODULES)s -BLDPYMODULES = %(BLDPYMODULES)s -TARGET = %(TARGET)s - - - - -!if "$(FINAL)" == "0" -DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES -!else -DEBUGLFLAGS = /INCREMENTAL:NO -!endif -!if "$(WXP_USE_THREAD)" == "1" -THREAD=-DWXP_USE_THREAD=1 -!endif - - - - -NOPCH=1 -OVERRIDEFLAGS=%(OVERRIDEFLAGS)s -EXTRAFLAGS = $(CFLAGS) %(OTHERCFLAGS)s - -LFLAGS = %(LFLAGS)s %(OTHERLFLAGS)s -EXTRALIBS = %(LIBS)s %(OTHERLIBS)s - -CRTFLAG=%(CRTFLAG)s - -#---------------------------------------------------------------------- - -!include $(WXDIR)\\src\\makevc.env - -#---------------------------------------------------------------------- - -%(DEFAULTRULE)s %(OTHERTARGETS)s - - - -install: default $(TARGETDIR) $(TARGETDIR)\\$(TARGET) pycfiles %(OTHERINSTALLTARGETS)s - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - -erase *.pch - -erase $(MODULE).exp - -erase $(MODULE).lib - -erase $(MODULE).ilk - -erase $(TARGET) - -erase $(BUILDDIR)\$(TARGET) -%(PYCLEANUP)s - - -uninstall: %(OTHERUNINSTALLTARGETS)s - -erase $(TARGETDIR)\\$(TARGET) -%(PYUNINSTALL)s - - -#---------------------------------------------------------------------- -# implicit rule for compiling .cpp and .c files -{}.cpp{}.obj: - $(cc) @<< -$(CPPFLAGS) /c /Tp $< -<< - -{$(GENCODEDIR)}.cpp{}.obj: - $(cc) @<< -$(CPPFLAGS) /c /Tp $< -<< - -{}.c{}.obj: - $(cc) @<< -$(CPPFLAGS) /c $< -<< - -.SUFFIXES : .i .py - -# Implicit rules to run SWIG -{}.i{$(GENCODEDIR)}.cpp: - swig $(SWIGFLAGS) -c -o $@ $< - -{}.i{$(GENCODEDIR)}.py: - swig $(SWIGFLAGS) -c -o $(GENCODEDIR)\\tmp_wrap.cpp $< - -erase $(GENCODEDIR)\\tmp_wrap.cpp - - -{$(GENCODEDIR)}.py{$(TARGETDIR)}.py: - copy $< $@ - -{}.py{$(TARGETDIR)}.py: - copy $< $@ - - -{$(GENCODEDIR)}.py{$(BUILDDIR)}.py: - copy $< $@ - -{}.py{$(BUILDDIR)}.py: - copy $< $@ - -#---------------------------------------------------------------------- - -$(TARGET) : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(RESFILE) - $(link) @<< -/out:$@ -$(LFLAGS) /export:init$(MODULE) /implib:./$(MODULE).lib -$(DUMMYOBJ) $(OBJECTS) $(RESFILE) -$(LIBS) -<< - - -%(RESRULE)s - - -$(TARGETDIR)\\$(TARGET) : $(TARGET) - copy $(TARGET) $@ - -$(BUILDDIR)\\$(TARGET) : $(TARGET) - copy $(TARGET) $@ - - -pycfiles : $(PYMODULES) - $(EXECPREFIX)\\python $(PYPREFIX)\\Lib\\compileall.py -l $(TARGETDIR) - $(EXECPREFIX)\\python -O $(PYPREFIX)\Lib\\compileall.py -l $(TARGETDIR) - -bldpycfiles : $(BLDPYMODULES) - - -$(TARGETDIR) : - mkdir $(TARGETDIR) - -$(GENCODEDIR): - mkdir $(GENCODEDIR) - -#---------------------------------------------------------------------- - -%(DEPENDS)s - -#---------------------------------------------------------------------- - -showflags: - @echo CPPFLAGS: - @echo $(CPPFLAGS) - @echo LFLAGS: - @echo $(LFLAGS) - @echo BUILDDIR: - @echo $(BUILDDIR) - - -%(OTHERRULES)s -''' - -#---------------------------------------------------------------------------- -#---------------------------------------------------------------------------- -#---------------------------------------------------------------------------- - -unixTemplate = ''' -#---------------------------------------------------------------------- -# This makefile was autogenerated from build.py. Your changes will be -# lost if the generator is run again. You have been warned. -#---------------------------------------------------------------------- - -WXDIR = %(WXDIR)s -VERSION = %(VERSION)s -MAJVER = %(MAJVER)s -BLDVER = %(BLDVER)s -MODULE = %(MODULE)s -SWIGFLAGS = %(SWIGFLAGS)s %(SWIGTOOLKITFLAG)s %(OTHERSWIGFLAGS)s -CFLAGS = %(CFLAGS)s $(OPT) %(OTHERCFLAGS)s -LFLAGS = %(LFLAGS)s %(OTHERLFLAGS)s - -PYVERSION = %(PYVERSION)s -PYPREFIX = %(PYPREFIX)s -EXECPREFIX = %(EXECPREFIX)s -PYINCLUDE = $(PYPREFIX)/include/python$(PYVERSION) -EXECINCLUDE = $(EXECPREFIX)/include/python$(PYVERSION) -PYLIB = %(PYLIB)s -LIBPL = %(LIBPL)s -PYTHONLIB = %(PYTHONLIB)s -FINAL = %(FINAL)s -WXP_USE_THREAD = %(WXP_USE_THREAD)s -GENCODEDIR = %(GENCODEDIR)s -WXPSRCDIR = %(WXPSRCDIR)s -HELPERLIB = %(HELPERLIB)s -HELPERLIBDIR = %(HELPERLIBDIR)s -WXCONFIG=%(WXCONFIG)s - -WXPYDIR = %(WXPYDIR)s -BUILDDIR = $(WXPYDIR)/wxPython -TARGETDIR = %(TARGETDIR)s -%(OTHERDEFS)s - - -CCC = %(CCC)s -CC = %(CC)s -OPT = %(OPT)s -SO = %(SO)s -LDSHARED = %(LDSHARED)s -CCSHARED = %(CCSHARED)s - - -OBJECTS = %(OBJECTS)s -PYMODULES = %(PYMODULES)s -BLDPYMODULES = %(BLDPYMODULES)s -TARGET = %(TARGET)s - - -ifeq ($(WXP_USE_THREAD), 1) -THREAD=-DWXP_USE_THREAD -endif - -USE_SONAME = %(USE_SONAME)s -ifeq ($(USE_SONAME), 1) -LIBS = -l$(HELPERLIB) %(OTHERLIBS)s -else -LIBS = $(WXPSRCDIR)/lib$(HELPERLIB)$(SO) %(OTHERLIBS)s -endif - -#---------------------------------------------------------------------- - -%(DEFAULTRULE)s %(OTHERTARGETS)s - -install: default $(TARGETDIR) $(TARGETDIR)/$(TARGET) pycfiles %(OTHERINSTALLTARGETS)s - -clean: - -rm -f *.o *$(SO) *$(SO).* *~ - -rm -f $(TARGET) - -rm -f $(BUILDDIR)/$(TARGET) -%(PYCLEANUP)s - -uninstall: %(OTHERUNINSTALLTARGETS)s - -rm -f $(TARGETDIR)/$(TARGET) -%(PYUNINSTALL)s - - -#---------------------------------------------------------------------- - -%%.o : %%.cpp - $(CCC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $< - -%%.o : $(GENCODEDIR)/%%.cpp - $(CCC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $< - -%%.o : %%.c - $(CC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $< - -%%.o : $(GENCODEDIR)/%%.c - $(CC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $< - -ifndef NOSWIG -$(GENCODEDIR)/%%.cpp : %%.i - swig $(SWIGFLAGS) -c -o $@ $< - -$(GENCODEDIR)/%%.py : %%.i - swig $(SWIGFLAGS) -c -o $(GENCODEDIR)/tmp_wrap.cpp $< - rm $(GENCODEDIR)/tmp_wrap.cpp -endif - - -$(TARGETDIR)/%% : %% - cp -f $< $@ - -$(TARGETDIR)/%% : $(GENCODEDIR)/%% - cp -f $< $@ - -$(BUILDDIR)/%% : %% - cp -f $< $@ - -$(BUILDDIR)/%% : $(GENCODEDIR)/%% - cp -f $< $@ - -#---------------------------------------------------------------------- - -%(DEPENDS)s - -#---------------------------------------------------------------------- - -$(TARGET) : $(OBJECTS) - $(LDSHARED) $(OBJECTS) $(LFLAGS) $(LIBS) $(OTHERLIBS) -o $(TARGET) - - -pycfiles : $(PYMODULES) - $(EXECPREFIX)/bin/python $(PYLIB)/compileall.py -l $(TARGETDIR) - $(EXECPREFIX)/bin/python -O $(PYLIB)/compileall.py -l $(TARGETDIR) - -bldpycfiles : $(BLDPYMODULES) - - -$(TARGETDIR) : - mkdir -p $(TARGETDIR) - -$(GENCODEDIR): - mkdir $(GENCODEDIR) - -#---------------------------------------------------------------------- - - -%(OTHERRULES)s - - -''' - - -#---------------------------------------------------------------------------- - -if __name__ == '__main__': - err = main(sys.argv) - sys.exit(err) - -#---------------------------------------------------------------------------- diff --git a/wxPython/distrib/makedbg.bat b/wxPython/distrib/makedbg.bat index f4618328df..f738789ffa 100755 --- a/wxPython/distrib/makedbg.bat +++ b/wxPython/distrib/makedbg.bat @@ -2,13 +2,32 @@ rem Builds a zip containing debugging versions of wxWindows and wxPython rem that could be unziped over a wxPython installation. +setlocal + +iff "%1" == "15" then + set PCBUILD=c:\projects\Python-1.5.2\PCBuild +elseiff "%1" == "20" then + set PCBUILD=c:\projects\Python-2.0\PCBuild +else + echo Specivy Python version!!! + goto end +endiff + +iff "%2" == "" then + echo Specify wxPython version!!! + goto end +endiff + mkdir wxPython-dbg copy README.dbg.txt wxPython-dbg copy %WXWIN%\lib\wx*d.dll wxPython-dbg -copy %WXWIN%\wxPython\wxPython\*.pyd wxPython-dbg +copy %WXWIN%\wxPython\wxPython\*_d.pyd wxPython-dbg +copy %PCBUILD%\python_d.exe wxPython-dbg +copy %PCBUILD%\python%1_d.dll wxPython-dbg -zip -r wxPython-dbg-%1.zip wxPython-dbg +zip -r wxPython-dbg-%2-Py%1.zip wxPython-dbg del /sx wxPython-dbg +:end \ No newline at end of file diff --git a/wxPython/distrib/makedemo b/wxPython/distrib/makedemo new file mode 100755 index 0000000000..20b3163651 --- /dev/null +++ b/wxPython/distrib/makedemo @@ -0,0 +1,36 @@ +#!/bin/bash +#---------------------------------------------------------------------- + +if [ -z $1 ]; then + echo "Please specify a version number on the command line." + exit 1 +fi + +if [ ! -d wxPython ]; then + echo "Please run this script from the root wxPython directory." + exit 1 +fi + +mkdir _distrib_tgz +mkdir _distrib_tgz/wxPython-$1 + +cp -R demo _distrib_tgz/wxPython-$1 + +# do some cleanup +rm -rf `find _distrib_tgz/wxPython-$1 -name CVS` +rm -f `find _distrib_tgz/wxPython-$1 -name "*.pyc"` +rm -f `find _distrib_tgz/wxPython-$1 -name .cvsignore` +rm -f _distrib_tgz/wxPython-$1/demo/core +rm -rf _distrib_tgz/wxPython-$1/demo/wxPython + +cd _distrib_tgz + +tar cvf ../dist/wxPython-demo-$1.tar wxPython-$1 +gzip ../dist/wxPython-demo-$1.tar + +cd .. +rm -r _distrib_tgz + + + + diff --git a/wxPython/distrib/wxPython.WSM b/wxPython/distrib/wxPython.WSM index 863771d4a9ea2aa92fc7dfa0a8f1dc19ce4f7761..f3ebe132f8dd4126671daff19688d932b59fec83 100644 GIT binary patch literal 33 lcmWF!_BFFLVPIfnh|&zoaD5ua5TU}v00NAm -URL:http://alldunn.com/wxPython/index.html -Vendor: Total Control Software -Requires: python >= 1.5.2 -##BuildRoot: /tmp/wxPython-build -##Prefix: /usr/lib/python1.5/site-packages - -Prefix: %{pref} - -%description -wxPython is a GUI toolkit for Python that is a wrapper around the -wxWindows C++ GUI library. wxPython provides a large variety of -window types and controls, all imlemented with a native look and -feel (and runtime speed) on the platforms it is supported on. - - -%package gl -Summary: Cross platform GUI toolkit for use with the Python language, OpenGL addon. -Group: Development/Languages/Python -Requires: wxPython - -%description gl -OpenGL add on for wxPython. - -#---------------------------------------------------------------------- - -%prep - -%setup - -%build -NOSWIG=1 -export NOSWIG -cd src -python ../distrib/build.py -b WXPSRCDIR=$PWD USE_SONAME=1 -cd ../contrib/ogl -python ../../distrib/build.py -b WXPSRCDIR=../../src USE_SONAME=1 -cd ../stc -python ../../distrib/build.py -b WXPSRCDIR=../../src USE_SONAME=1 -if [ -z $NOGLCANVAS ]; then - cd ../glcanvas - python ../../distrib/build.py -b WXPSRCDIR=../../src USE_SONAME=1 -fi - -#---------------------------------------------------------------------- - -%install -NOSWIG=1 -export NOSWIG -cd src -python ../distrib/build.py -i -cd ../contrib/ogl -python ../../distrib/build.py -i -cd ../stc -python ../../distrib/build.py -i -if [ -z $NOGLCANVAS ]; then - cd ../glcanvas - python ../../distrib/build.py -i -fi - -#---------------------------------------------------------------------- - -%post -/sbin/ldconfig - -%postun -/sbin/ldconfig - -#---------------------------------------------------------------------- - -%files -%doc BUILD.txt CHANGES.txt README.txt gpl.txt lgpl.txt licence.txt licendoc.txt preamble.txt -%{pref}/lib/libwxPyHelpers* -%{pref}/lib/python1.5/site-packages/wxPython/*.py -%{pref}/lib/python1.5/site-packages/wxPython/*.py? -%{pref}/lib/python1.5/site-packages/wxPython/lib -%{pref}/lib/python1.5/site-packages/wxPython/demo -%{pref}/lib/python1.5/site-packages/wxPython/wxcmodule.so -%{pref}/lib/python1.5/site-packages/wxPython/oglcmodule.so -%{pref}/lib/python1.5/site-packages/wxPython/stc_cmodule.so - -%files gl -%{pref}/lib/python1.5/site-packages/wxPython/glcanvascmodule.so - - - - - - - diff --git a/wxPython/distrib/wxPython.wse b/wxPython/distrib/wxPython.wse index 0d82dd645c..14697059cb 100644 --- a/wxPython/distrib/wxPython.wse +++ b/wxPython/distrib/wxPython.wse @@ -17,7 +17,7 @@ item: Global Patch Flags=0000000000001001 Patch Threshold=85 Patch Memory=4000 - EXE Filename=wxPython-2.2.0.exe + EXE Filename=wxPython-2.2.2.exe FTP Cluster Size=20 Per-User Version ID=1 Dialogs Version=6 @@ -72,40 +72,37 @@ item: Set Variable Value=wxPython Flags=10000000 end -item: Set Variable - Variable=DLLVER - Value=wx21_16 -end item: Check Configuration Flags=10111011 end item: Remark - Text= 1.5 and 1.5.1 have a CurrentVersion key end -item: Get Registry Key Value - Variable=PYTHONVER - Key=SOFTWARE\Python\PythonCore\CurrentVersion - Default=None - Flags=00000100 -end -item: If/While Statement +item: Set Variable Variable=PYTHONVER - Value=None -end -item: Remark - Text= Just try 1.5 since 1.5.2b2 doesn't set CurrentVersion but uses 1.5 + Value=2.0 end item: Set Variable - Variable=PYTHONVER - Value=1.5 + Variable=SAMEDIR + Value=1 end -item: End Block +item: Remark end item: Get Registry Key Value Variable=PYTHONDIR Key=SOFTWARE\Python\PythonCore\%PYTHONVER%\InstallPath Flags=00000100 end +remarked item: If/While Statement + Variable=PYTHONDIR + Value=None +end +remarked item: Get Registry Key Value + Variable=PYTHONDIR + Key=SOFTWARE\Python\PythonCore\%PYTHONVER%\InstallPath + Flags=00000010 +end +remarked item: End Block +end item: If/While Statement Variable=PYTHONDIR Value=None @@ -123,6 +120,8 @@ item: Set Variable Variable=MAINDIR Value=%PYTHONDIR% end +item: Remark +end item: Set Variable Variable=EXPLORER Value=1 @@ -818,11 +817,24 @@ item: Install File Destination=%SYS%\Msvcrt.dll Flags=0000001010000011 end +item: If/While Statement + Variable=SAMEDIR + Value=0 +end item: Install File - Source=c:\projects\wx\lib\wx22_0.dll - Destination=%SYS%\wx22_0.dll + Source=c:\projects\wx\lib\wx22_2.dll + Destination=%SYS%\wx22_2.dll Flags=0000001010010010 end +item: Else Statement +end +item: Install File + Source=c:\projects\wx\lib\wx22_2.dll + Destination=%MAINDIR%\wxPython\wx22_2.dll + Flags=0000000010010010 +end +item: End Block +end item: Install File Source=c:\Projects\wx\wxPython\wxPython\*.py Destination=%MAINDIR%\wxPython @@ -848,13 +860,13 @@ item: Install File Flags=0000000010000010 end item: Install File - Source=c:\Projects\wx\wxPython\wxPython\lib\sizers\*.py - Destination=%MAINDIR%\wxPython\lib\sizers + Source=c:\Projects\wx\wxPython\wxPython\lib\editor\*.py + Destination=%MAINDIR%\wxPython\lib\editor Description=wxPython Standard Library Flags=0000000010000010 end item: Install File - Source=c:\Projects\wx\wxPython\wxPython\lib\editor\*.py + Source=c:\Projects\wx\wxPython\wxPython\lib\editor\*.txt Destination=%MAINDIR%\wxPython\lib\editor Description=wxPython Standard Library Flags=0000000010000010 @@ -913,6 +925,18 @@ item: Install File Description=Demos Flags=0000000010000010 end +item: Install File + Source=c:\Projects\wx\wxPython\demo\data\*.htm + Destination=%MAINDIR%\wxPython\demo\data + Description=Demos + Flags=0000000010000010 +end +item: Install File + Source=c:\Projects\wx\wxPython\demo\data\*.py + Destination=%MAINDIR%\wxPython\demo\data + Description=Demos + Flags=0000000010000010 +end item: Install File Source=c:\Projects\wx\wxPython\demo\data\*.png Destination=%MAINDIR%\wxPython\demo\data @@ -937,14 +961,16 @@ item: Install File Description=Demos Flags=0000000010000010 end +item: Remark +end item: Install File - Source=C:\PROJECTS\wx\wxPython\README.txt - Destination=%MAINDIR%\wxPython\README.txt + Source=C:\PROJECTS\wx\wxPython\*.txt + Destination=%MAINDIR%\wxPython\docs\ Flags=0000000010000010 end item: Install File - Source=C:\PROJECTS\wx\wxPython\CHANGES.txt - Destination=%MAINDIR%\wxPython\CHANGES.txt + Source=C:\PROJECTS\wx\wxPython\licence\*.txt + Destination=%MAINDIR%\wxPython\docs\licence\ Flags=0000000010000010 end item: Remark @@ -961,36 +987,6 @@ item: Install File Description=wxPython documentation Flags=0000000010000010 end -item: Install File - Source=c:\PROJECTS\wx\docs\preamble.txt - Destination=%MAINDIR%\wxPython\docs\preamble.txt - Description=wxPython documentation - Flags=0000000010000010 -end -item: Install File - Source=c:\PROJECTS\wx\docs\licence.txt - Destination=%MAINDIR%\wxPython\docs\licence.txt - Description=wxPython documentation - Flags=0000000010000010 -end -item: Install File - Source=c:\PROJECTS\wx\docs\licendoc.txt - Destination=%MAINDIR%\wxPython\docs\licendoc.txt - Description=wxPython documentation - Flags=0000000010000010 -end -item: Install File - Source=c:\PROJECTS\wx\docs\lgpl.txt - Destination=%MAINDIR%\wxPython\docs\lgpl.txt - Description=wxPython documentation - Flags=0000000010000010 -end -item: Install File - Source=c:\PROJECTS\wx\docs\gpl.txt - Destination=%MAINDIR%\wxPython\docs\gpl.txt - Description=wxPython documentation - Flags=0000000010000010 -end item: Remark end item: Remark @@ -1165,21 +1161,21 @@ item: Create Shortcut Flags=00000001 end item: Create Shortcut - Source=%MAINDIR%\wxPython\docs\licence.txt + Source=%MAINDIR%\wxPython\docs\licence\licence.txt Destination=%CGROUPDIR%\%CGROUP_SAVE%\License.lnk Icon Number=0 Key Type=1536 Flags=00000001 end item: Create Shortcut - Source=%MAINDIR%\wxPython\README.txt + Source=%MAINDIR%\wxPython\docs\README.txt Destination=%CGROUPDIR%\%CGROUP_SAVE%\ReadMe.lnk Icon Number=0 Key Type=1536 Flags=00000001 end item: Create Shortcut - Source=%MAINDIR%\wxPython\CHANGES.txt + Source=%MAINDIR%\wxPython\docs\CHANGES.txt Destination=%CGROUPDIR%\%CGROUP_SAVE%\Changes.lnk Icon Number=0 Key Type=1536 @@ -1214,7 +1210,7 @@ end item: Self-Register OCXs/DLLs Description=Updating System Configuration, Please Wait... end -item: Edit Registry +remarked item: Edit Registry Total Keys=1 Key=SOFTWARE\Python\PythonCore\%PYTHONVER%\PythonPath\wxPython New Value=%MAINDIR% @@ -1359,7 +1355,7 @@ item: Custom Dialog Set end item: Push Button Rectangle=90 68 153 82 - Alternate=0%MAINDIR%\wxPython\README.txt + Alternate=0%MAINDIR%\wxPython\docs\README.txt Action=6 Enabled Color=00000000000000001111111111111111 Create Flags=01010000000000010000000000000000 diff --git a/wxPython/distrib/zipit.bat b/wxPython/distrib/zipit.bat index ee24243f01..1f00d5777a 100755 --- a/wxPython/distrib/zipit.bat +++ b/wxPython/distrib/zipit.bat @@ -4,24 +4,25 @@ rem **** Make a directory to build up a distribution tree md _distrib_zip md _distrib_zip\wxPython-%1 -rem **** Copy the license files -copy %WXWIN%\docs\gpl.txt _distrib_zip\wxPython-%1 -copy %WXWIN%\docs\lgpl.txt _distrib_zip\wxPython-%1 -copy %WXWIN%\docs\licence.txt _distrib_zip\wxPython-%1 -copy %WXWIN%\docs\licendoc.txt _distrib_zip\wxPython-%1 -copy %WXWIN%\docs\preamble.txt _distrib_zip\wxPython-%1 +REM rem **** Copy the license files +REM copy %WXWIN%\docs\gpl.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\lgpl.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\licence.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\licendoc.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\preamble.txt _distrib_zip\wxPython-%1 -rem **** Make a zip fron the live files -zip -@ -r _distrib_zip\temp.zip < distrib\wxPython.rsp +REM rem **** Make a zip fron the live files +REM zip -@ -r _distrib_zip\temp.zip < distrib\wxPython.rsp -rem **** Unzip it in our build dir -cd _distrib_zip\wxPython-%1 -unzip ..\temp.zip +REM rem **** Unzip it in our build dir +REM cd _distrib_zip\wxPython-%1 +REM unzip ..\temp.zip -rem **** zip up the build dir -cd .. -zip -r ..\distrib\wxPython-src-%1.zip wxPython-%1 +REM rem **** zip up the build dir +REM cd .. +REM zip -r ..\distrib\wxPython-src-%1.zip wxPython-%1 +cd _distrib_zip rem **** copy the docs into the tree md wxPython-%1\docs @@ -35,7 +36,9 @@ copy %WXWIN%\docs\html\ogl\*.htm wxPython-%1\docs\ogl copy wxPython-%1\docs\ogl\ogl.htm wxPython-%1\docs\ogl\index.htm rem **** zip up the docs -zip -r ..\distrib\wxPython-docs-%1.zip wxPython-%1\docs +rem zip -r ..\distrib\wxPython-docs-%1.zip wxPython-%1\docs +tar cvf ..\distrib\wxPython-docs-%1.tar wxPython-%1 +gzip -9 ..\distrib\wxPython-docs-%1.tar rem **** Cleanup diff --git a/wxPython/my_distutils.py b/wxPython/my_distutils.py new file mode 100644 index 0000000000..47da51b1d7 --- /dev/null +++ b/wxPython/my_distutils.py @@ -0,0 +1,278 @@ + +import sys, os, string + +from distutils.msvccompiler import MSVCCompiler + +from distutils.errors import \ + DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError +from distutils.ccompiler import \ + CCompiler, gen_preprocess_options, gen_lib_options + +#---------------------------------------------------------------------- + +class MyMSVCCompiler(MSVCCompiler): + + ##------------------------------------------------------------ + ## Override the entire compile method just to add flags to the + ## RC command. There should be an easier way to do this from + ## distutils directly or in a derived class... + ##------------------------------------------------------------ + + def compile (self, + sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) + (objects, skip_sources) = self._prep_compile (sources, output_dir) + + if extra_postargs is None: + extra_postargs = [] + + pp_opts = gen_preprocess_options (macros, include_dirs) + compile_opts = extra_preargs or [] + compile_opts.append ('/c') + if debug: + compile_opts.extend (self.compile_options_debug) + else: + compile_opts.extend (self.compile_options) + + for i in range (len (sources)): + src = sources[i] ; obj = objects[i] + ext = (os.path.splitext (src))[1] + + if skip_sources[src]: + self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + else: + self.mkpath (os.path.dirname (obj)) + + if ext in self._c_extensions: + input_opt = "/Tc" + src + elif ext in self._cpp_extensions: + input_opt = "/Tp" + src + elif ext in self._rc_extensions: + # compile .RC to .RES file + input_opt = src + output_opt = "/fo" + obj + try: + self.spawn ([self.rc] + pp_opts + ### RPD changed this line only + [output_opt] + [input_opt]) + except DistutilsExecError, msg: + raise CompileError, msg + continue + elif ext in self._mc_extensions: + + # Compile .MC to .RC file to .RES file. + # * '-h dir' specifies the directory for the + # generated include file + # * '-r dir' specifies the target directory of the + # generated RC file and the binary message resource + # it includes + # + # For now (since there are no options to change this), + # we use the source-directory for the include file and + # the build directory for the RC file and message + # resources. This works at least for win32all. + + h_dir = os.path.dirname (src) + rc_dir = os.path.dirname (obj) + try: + # first compile .MC to .RC and .H file + self.spawn ([self.mc] + + ['-h', h_dir, '-r', rc_dir] + [src]) + base, _ = os.path.splitext (os.path.basename (src)) + rc_file = os.path.join (rc_dir, base + '.rc') + # then compile .RC to .RES file + self.spawn ([self.rc] + + ["/fo" + obj] + [rc_file]) + + except DistutilsExecError, msg: + raise CompileError, msg + continue + else: + # how to handle this file? + raise CompileError ( + "Don't know how to compile %s to %s" % \ + (src, obj)) + + output_opt = "/Fo" + obj + try: + self.spawn ([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + + return objects + + # compile () + + + + ##------------------------------------------------------------ + ## Now override the link() method to change where the import + ## library is placed. Hopefully distutils will be updated + ## someday to make this configurable... + ##------------------------------------------------------------ + + def link (self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): + + (objects, output_dir) = self._fix_object_args (objects, output_dir) + (libraries, library_dirs, runtime_library_dirs) = \ + self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + + if runtime_library_dirs: + self.warn ("I don't know what to do with 'runtime_library_dirs': " + + str (runtime_library_dirs)) + + lib_opts = gen_lib_options (self, + library_dirs, runtime_library_dirs, + libraries) + if output_dir is not None: + output_filename = os.path.join (output_dir, output_filename) + + if self._need_link (objects, output_filename): + + if target_desc == CCompiler.EXECUTABLE: + if debug: + ldflags = self.ldflags_shared_debug[1:] + else: + ldflags = self.ldflags_shared[1:] + else: + if debug: + ldflags = self.ldflags_shared_debug + else: + ldflags = self.ldflags_shared + + export_opts = [] + for sym in (export_symbols or []): + export_opts.append("/EXPORT:" + sym) + + ld_args = (ldflags + lib_opts + export_opts + + objects + ['/OUT:' + output_filename]) + + # The MSVC linker generates .lib and .exp files, which cannot be + # suppressed by any linker switches. The .lib files may even be + # needed! Make sure they are generated in the temporary build + # directory. Since they have different names for debug and release + # builds, they can go into the same directory. + if export_symbols is not None: + (dll_name, dll_ext) = os.path.splitext( + os.path.basename(output_filename)) + + ## The old code + ##implib_file = os.path.join( + ## os.path.dirname(objects[0]), + ## self.library_filename(dll_name)) + + ## The new + implib_file = os.path.join('build', 'ilib', + self.library_filename(dll_name)) + self.mkpath(os.path.dirname(implib_file)) + + ld_args.append ('/IMPLIB:' + implib_file) + + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend(extra_postargs) + + self.mkpath (os.path.dirname (output_filename)) + try: + self.spawn ([self.linker] + ld_args) + except DistutilsExecError, msg: + raise LinkError, msg + + else: + self.announce ("skipping %s (up-to-date)" % output_filename) + + # link () + + + +#---------------------------------------------------------------------- +# Hack this module and class into the distutils... + +from distutils import ccompiler + +ccompiler.default_compiler['nt'] = 'my_msvc' +ccompiler.compiler_class['my_msvc'] = ('my_distutils', + 'MyMSVCCompiler', + 'My MSVC derived class') + + +# make it look like it is part of the package... +import my_distutils +sys.modules['distutils.my_distutils'] = my_distutils + + + + +#---------------------------------------------------------------------- +# Run SWIG the way I want it done + +def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args, swig_deps=[]): + from distutils.file_util import copy_file + from distutils.dep_util import newer + from distutils.spawn import spawn + + sources = [] + + for file in files: + basefile = os.path.splitext(file)[0] + i_file = os.path.join(dir, file) + py_file = os.path.join(dir, gendir, basefile+'.py') + cpp_file = os.path.join(dir, gendir, basefile+'.cpp') + + sources.append(cpp_file) + + if USE_SWIG: + for dep in swig_deps: + if newer(dep, py_file) or newer(dep, cpp_file): + force = 1 + break + + if force or newer(i_file, py_file) or newer(i_file, cpp_file): + # we need forward slashes here even on win32 + cpp_file = string.join(string.split(cpp_file, '\\'), '/') + i_file = string.join(string.split(i_file, '\\'), '/') + + cmd = ['swig'] + swig_args + ['-I'+dir, '-c', '-o', cpp_file, i_file] + spawn(cmd, verbose=1) + + # copy the generated python file to the package directory + copy_file(py_file, package, update=not force, verbose=0) + + + return sources + + + +#---------------------------------------------------------------------- +# Update local copies of wxWindows contrib files + + +def contrib_copy_tree(src, dest, verbose=0): + from distutils.dir_util import mkpath, copy_tree + + mkpath(dest, verbose=verbose) + copy_tree(src, dest, update=1, verbose=verbose) + diff --git a/wxPython/my_install_data.py b/wxPython/my_install_data.py new file mode 100644 index 0000000000..4738371ed8 --- /dev/null +++ b/wxPython/my_install_data.py @@ -0,0 +1,167 @@ +"""my_install_data.py + +Provides a more sophisticated facility to install data files +than distutils' install_data does. +You can specify your files as a template like in MANIFEST.in +and you have more control over the copy process. + +""" + +# created 2000/08/01, Rene Liebscher + +########################################################################### +# import some modules we need + +import os,sys,string +from types import StringType,TupleType,ListType +from distutils.util import change_root +from distutils.filelist import FileList +from distutils.command.install_data import install_data + +########################################################################### +# a container class for our more sophisticated install mechanism + +class Data_Files: + """ container for list of data files. + supports alternate base_dirs e.g. 'install_lib','install_header',... + supports a directory where to copy files + supports templates as in MANIFEST.in + supports preserving of paths in filenames + eg. foo/xyz is copied to base_dir/foo/xyz + supports stripping of leading dirs of source paths + eg. foo/bar1/xyz, foo/bar2/abc can be copied to bar1/xyz, bar2/abc + """ + + def __init__(self,base_dir=None,files=None,copy_to=None,template=None,preserve_path=0,strip_dirs=0): + self.base_dir = base_dir + self.files = files + self.copy_to = copy_to + self.template = template + self.preserve_path = preserve_path + self.strip_dirs = strip_dirs + self.finalized = 0 + + def warn (self, msg): + sys.stderr.write ("warning: %s: %s\n" % + ("install_data", msg)) + + def debug_print (self, msg): + """Print 'msg' to stdout if the global DEBUG (taken from the + DISTUTILS_DEBUG environment variable) flag is true. + """ + from distutils.core import DEBUG + if DEBUG: + print msg + + + def finalize(self): + """ complete the files list by processing the given template """ + if self.finalized: + return + if self.files == None: + self.files = [] + if self.template != None: + if type(self.template) == StringType: + self.template = string.split(self.template,";") + filelist = FileList(self.warn,self.debug_print) + for line in self.template: + filelist.process_template_line(string.strip(line)) + filelist.sort() + filelist.remove_duplicates() + self.files.extend(filelist.files) + self.finalized = 1 + +# end class Data_Files + +########################################################################### +# a more sophisticated install routine than distutils install_data + +class my_install_data (install_data): + + def check_data(self,d): + """ check if data are in new format, if not create a suitable object. + returns finalized data object + """ + if not isinstance(d, Data_Files): + self.warn(("old-style data files list found " + "-- please convert to Data_Files instance")) + if type(d) is TupleType: + if len(d) != 2 or not (type(d[1]) is ListType): + raise DistutilsSetupError, \ + ("each element of 'data_files' option must be an " + "Data File instance, a string or 2-tuple (string,[strings])") + d = Data_Files(copy_to=d[0],files=d[1]) + else: + if not (type(d) is StringType): + raise DistutilsSetupError, \ + ("each element of 'data_files' option must be an " + "Data File instance, a string or 2-tuple (string,[strings])") + d = Data_Files(files=[d]) + d.finalize() + return d + + def run(self): + self.outfiles = [] + install_cmd = self.get_finalized_command('install') + + for d in self.data_files: + d = self.check_data(d) + + install_dir = self.install_dir + # alternative base dir given => overwrite install_dir + if d.base_dir != None: + install_dir = getattr(install_cmd,d.base_dir) + + # copy to an other directory + if d.copy_to != None: + if not os.path.isabs(d.copy_to): + # relatiev path to install_dir + dir = os.path.join(install_dir, d.copy_to) + elif install_cmd.root: + # absolute path and alternative root set + dir = change_root(self.root,d.copy_to) + else: + # absolute path + dir = d.copy_to + else: + # simply copy to install_dir + dir = install_dir + # warn if necceassary + self.warn("setup script did not provide a directory to copy files to " + " -- installing right in '%s'" % install_dir) + + dir=os.path.normpath(dir) + # create path + self.mkpath(dir) + + # copy all files + for src in d.files: + if d.strip_dirs > 0: + dst = string.join(string.split(os.path.normcase(src),os.sep)[d.strip_dirs:],os.sep) + else: + dst = src + if d.preserve_path: + # preserve path in filename + self.mkpath(os.path.dirname(os.path.join(dir,dst))) + out = self.copy_file(src, os.path.join(dir,dst)) + else: + out = self.copy_file(src, dir) + if type(out) is TupleType: + out = out[0] + self.outfiles.append(out) + + return self.outfiles + + def get_inputs (self): + inputs = [] + for d in self.data_files: + d = self.check_data(d) + inputs.append(d.files) + return inputs + + def get_outputs (self): + return self.outfiles + + +########################################################################### + diff --git a/wxPython/setup.cfg b/wxPython/setup.cfg new file mode 100644 index 0000000000..a6ffda1465 --- /dev/null +++ b/wxPython/setup.cfg @@ -0,0 +1,14 @@ +[build_ext] +inplace=0 + + +[sdist] +formats=gztar + + +[bdist_rpm] +release = 1 +group = Development/Languages/Python +packager = Robin Dunn +vendor = wxPROs +doc_files = README.txt BUILD.win32.txt BUILD.unix.txt CHANGES.txt licence/ diff --git a/wxPython/setup.py b/wxPython/setup.py new file mode 100755 index 0000000000..3fa72dd936 --- /dev/null +++ b/wxPython/setup.py @@ -0,0 +1,627 @@ +#!/usr/bin/env python +#---------------------------------------------------------------------- + +import sys, os, string +from distutils.core import setup, Extension +from distutils.file_util import copy_file +from distutils.dir_util import mkpath +from distutils.dep_util import newer + +from my_distutils import run_swig, contrib_copy_tree + +#---------------------------------------------------------------------- +# flags and values that affect this script +#---------------------------------------------------------------------- + +VERSION = "2.3.0b1" +DESCRIPTION = "Cross platform GUI toolkit for Python" +AUTHOR = "Robin Dunn" +AUTHOR_EMAIL = "robin@alldunn.com" +URL = "http://wxPython.org/" +LICENCE = "wxWindows (LGPL derivative)" +LONG_DESCRIPTION = """\ +wxPython is a GUI toolkit for Python that is a wrapper around the +wxWindows C++ GUI library. wxPython provides a large variety of +window types and controls, all imlemented with a native look and +feel (and native runtime speed) on the platforms it is supported +on. +""" + + +BUILD_GLCANVAS = 1 # If true, build the contrib/glcanvas extension module +BUILD_OGL = 1 # If true, build the contrib/ogl extension module +BUILD_STC = 1 # If true, build the contrib/stc extension module +CORE_ONLY = 0 # if true, don't build any of the above + +USE_SWIG = 0 # Should we actually execute SWIG, or just use the + # files already in the distribution? + +IN_CVS_TREE = 0 # Set to true if building in a full wxWindows CVS + # tree, otherwise will assume all needed files are + # available in the wxPython source distribution + + +# Some MSW build settings + +FINAL = 1 # Mirrors use of same flag in wx makefiles, + # (0 or 1 only) should probably find a way to + # autodetect this... + +HYBRID = 0 # If set and not debug or FINAL, then build a + # hybrid extension that can be used by the + # non-debug version of python, but contains + # debugging symbols for wxWindows and wxPython. + # wxWindows must have been built with /MD, not /MDd + # (using FINAL=hybrid will do it.) + +WXDLLVER = '23_0' # Version part of DLL name + + +#---------------------------------------------------------------------- +# Some other globals +#---------------------------------------------------------------------- + +PKGDIR = 'wxPython' +wxpExtensions = [] + +force = '--force' in sys.argv or '-f' in sys.argv +debug = '--debug' in sys.argv or '-g' in sys.argv + + +#---------------------------------------------------------------------- +# Check for build flags on the command line +#---------------------------------------------------------------------- + +for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'CORE_ONLY', + 'USE_SWIG', 'IN_CVS_TREE', 'FINAL', 'HYBRID', + 'WXDLLVER', ]: + for x in range(len(sys.argv)): + if string.find(sys.argv[x], flag) == 0: + pos = string.find(sys.argv[x], '=') + 1 + if pos > 0: + vars()[flag] = eval(sys.argv[x][pos:]) + sys.argv[x] = '' + +sys.argv = filter(None, sys.argv) + + +if CORE_ONLY: + BUILD_GLCANVAS = 0 + BUILD_OGL = 0 + BUILD_STC = 0 + +#---------------------------------------------------------------------- +# Setup some platform specific stuff +#---------------------------------------------------------------------- + +if os.name == 'nt': + # Set compile flags and such for MSVC. These values are derived + # from the wxWindows makefiles for MSVC, others will probably + # vary... + WXDIR = os.environ['WXWIN'] + WXPLAT = '__WXMSW__' + GENDIR = 'msw' + + + + if debug: + FINAL = 0 + HYBRID = 0 + + if HYBRID: + FINAL = 0 + + + includes = ['src', + os.path.join(WXDIR, 'include'), + ] + + defines = [ ('WIN32', None), # Some of these are no longer + ('__WIN32__', None), # necessary. Anybody know which? + ('_WINDOWS', None), + ('__WINDOWS__', None), + ('WINVER', '0x0400'), + ('__WIN95__', None), + ('STRICT', None), + + (WXPLAT, None), + ('WXUSINGDLL', '1'), + + ('SWIG_GLOBAL', None), + ('HAVE_CONFIG_H', None), + ('WXP_USE_THREAD', '1'), + ] + + if not FINAL or HYBRID: + defines.append( ('__WXDEBUG__', None) ) + + libdirs = [os.path.join(WXDIR, 'lib'), 'build\\ilib'] + + if FINAL: + wxdll = 'wx' + WXDLLVER + elif HYBRID: + wxdll = 'wx' + WXDLLVER + 'h' + else: + wxdll = 'wx' + WXDLLVER + 'd' + + #print 'Linking with ', wxdll + + libs = [wxdll, 'kernel32', 'user32', 'gdi32', 'comdlg32', + 'winspool', 'winmm', 'shell32', 'oldnames', 'comctl32', + 'ctl3d32', 'odbc32', 'ole32', 'oleaut32', 'uuid', 'rpcrt4', + 'advapi32', 'wsock32'] + + cflags = None + lflags = None + + if not FINAL and HYBRID: + cflags = ['/Od', '/Z7'] + lflags = ['/DEBUG', ] ## '/PDB:NONE'] + + +elif os.name == 'posix': + # Set flags for Unix type platforms + + WXDIR = '..' # assumes IN_CVS_TREE + WXPLAT = '__WXGTK__' # and assumes GTK... + GENDIR = 'gtk' # Need to allow for Motif eventually too + + includes = ['src'] + defines = [('SWIG_GLOBAL', None), + ('HAVE_CONFIG_H', None), + ('WXP_USE_THREAD', '1'), + ] + libdirs = [] + libs = [] + + cflags = os.popen('wx-config --cflags', 'r').read()[:-1] + ' ' + \ + os.popen('gtk-config --cflags', 'r').read()[:-1] + cflags = string.split(cflags) + + lflags = os.popen('wx-config --libs', 'r').read()[:-1] + lflags = string.split(lflags) + + +else: + raise 'Sorry Charlie...' + + +#---------------------------------------------------------------------- +# Check if the version file needs updated +#---------------------------------------------------------------------- + +if IN_CVS_TREE and newer('setup.py', 'src/__version__.py'): + open('src/__version__.py', 'w').write("ver = '%s'\n" % VERSION) + +#---------------------------------------------------------------------- +# Define the CORE extension module +#---------------------------------------------------------------------- + +print 'Preparing CORE...' +swig_force = force +swig_args = ['-c++', '-shadow', '-python', '-keyword', '-dnone', + '-I./src', '-D'+WXPLAT] + +swig_files = [ 'wx.i', 'windows.i', 'windows2.i', 'windows3.i', 'events.i', + 'misc.i', 'misc2.i', 'utils.i', 'gdi.i', 'mdi.i', 'controls.i', + 'controls2.i', 'cmndlgs.i', 'stattool.i', 'frames.i', 'image.i', + 'printfw.i', 'sizers.i', 'clip_dnd.i', 'grid.i', 'html.i', + 'htmlhelp.i', 'calendar.i', 'filesys.i', 'streams.i' + ] + +swig_sources = run_swig(swig_files, 'src', GENDIR, PKGDIR, + USE_SWIG, swig_force, swig_args) + +copy_file('src/__init__.py', PKGDIR, update=1, verbose=0) +copy_file('src/__version__.py', PKGDIR, update=1, verbose=0) + + +if IN_CVS_TREE: # update the licence files + mkpath('licence') + for file in ['preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt']: + copy_file(WXDIR+'/docs/'+file, 'licence/'+file, update=1, verbose=0) + + +if os.name == 'nt': + rc_file = ['src/wxc.rc'] +else: + rc_file = [] + + +wxext = ext = Extension('wxc', ['src/helpers.cpp', + 'src/libpy.c', + ] + rc_file + swig_sources, + + include_dirs = includes, + define_macros = defines, + + library_dirs = libdirs, + libraries = libs, + + extra_compile_args = cflags, + extra_link_args = lflags, + ) + + +wxpExtensions.append(ext) + +if os.name == 'nt': + libs = libs[:] + if debug: + libs.insert(0, 'wxc_d') + else: + libs.insert(0, 'wxc') + +#---------------------------------------------------------------------- +# Define the GLCanvas extension module +#---------------------------------------------------------------------- + +if not BUILD_GLCANVAS: + wxext.sources = wxext.sources + ['contrib/glcanvas/stub.cpp'] +else: + print 'Preparing GLCANVAS...' + location = 'contrib/glcanvas' + swig_files = ['glcanvas.i'] + + swig_sources = run_swig(swig_files, location, GENDIR, PKGDIR, + USE_SWIG, swig_force, swig_args) + + gl_libs = [] + if os.name == 'posix': + if '-D__WXDEBUG__' in cflags: + gl_libs = ['wx_gtkd_gl', 'GL', 'GLU'] + else: + gl_libs = ['wx_gtk_gl', 'GL', 'GLU'] + + wxext.sources = wxext.sources + swig_sources + wxext.libraries = wxext.libraries + gl_libs + + +#---------------------------------------------------------------------- +# Define the OGL extension module +#---------------------------------------------------------------------- + + +if not BUILD_OGL: + wxext.sources = wxext.sources + ['contrib/ogl/stub.cpp'] +else: + print 'Preparing OGL...' + location = 'contrib/ogl' + OGLLOC = location + '/contrib/src/ogl' + OGLINC = location + '/contrib/include' + + swig_files = ['ogl.i', 'oglbasic.i', 'oglshapes.i', 'oglshapes2.i', + 'oglcanvas.i'] + + swig_sources = run_swig(swig_files, location, '', PKGDIR, + USE_SWIG, swig_force, swig_args) + + # make sure local copy of contrib files are up to date + if IN_CVS_TREE: + contrib_copy_tree(WXDIR + '/contrib/include/wx/ogl', OGLINC+'/wx/ogl') + contrib_copy_tree(WXDIR + '/contrib/src/ogl', OGLLOC) + + # add items to the core extension module definition + wxext.sources = wxext.sources + [location + '/oglhelpers.cpp', + '%s/basic.cpp' % OGLLOC, + '%s/bmpshape.cpp' % OGLLOC, + '%s/composit.cpp' % OGLLOC, + '%s/divided.cpp' % OGLLOC, + '%s/lines.cpp' % OGLLOC, + '%s/misc.cpp' % OGLLOC, + '%s/basic2.cpp' % OGLLOC, + '%s/canvas.cpp' % OGLLOC, + '%s/constrnt.cpp' % OGLLOC, + '%s/drawn.cpp' % OGLLOC, + '%s/mfutils.cpp' % OGLLOC, + '%s/ogldiag.cpp' % OGLLOC, + ] + swig_sources + + wxext.include_dirs = wxext.include_dirs + [OGLINC] + +#---------------------------------------------------------------------- +# Define the STC extension module +#---------------------------------------------------------------------- + + +if not BUILD_STC: + wxext.sources = wxext.sources + ['contrib/stc/stub.cpp'] +else: + print 'Preparing STC...' + location = 'contrib/stc' + STCLOC = location + '/contrib/src/stc' + STCINC = location + '/contrib/include' + STC_H = location + '/contrib/include/wx/stc' + + # make sure local copy of contrib files are up to date + if IN_CVS_TREE: + contrib_copy_tree(WXDIR + '/contrib/include/wx/stc', STCINC+'/wx/stc') + contrib_copy_tree(WXDIR + '/contrib/src/stc', STCLOC) + + + swig_files = ['stc_.i'] + swig_sources = run_swig(swig_files, location, '', PKGDIR, + USE_SWIG, swig_force, + swig_args + ['-I'+STC_H, '-I'+location], + [STC_H+'/stc.h']) + + # copy a project specific py module to the main package dir + copy_file(location+'/stc.py', PKGDIR, update=1, verbose=1) + + # add some include dirs to the standard set + stc_includes = [ '%s/scintilla/include' % STCLOC, + '%s/scintilla/src' % STCLOC, + STCINC ] + + # and some macro definitions + stc_defines = [ ('__WX__', None), + ('SCI_LEXER', None) ] + + + # add items to the core extension module definition + wxext.sources = wxext.sources + [ + '%s/scintilla/src/AutoComplete.cxx' % STCLOC, + '%s/scintilla/src/CallTip.cxx' % STCLOC, + '%s/scintilla/src/CellBuffer.cxx' % STCLOC, + '%s/scintilla/src/ContractionState.cxx' % STCLOC, + '%s/scintilla/src/Document.cxx' % STCLOC, + '%s/scintilla/src/Editor.cxx' % STCLOC, + '%s/scintilla/src/Indicator.cxx' % STCLOC, + '%s/scintilla/src/KeyMap.cxx' % STCLOC, + '%s/scintilla/src/KeyWords.cxx' % STCLOC, + '%s/scintilla/src/LineMarker.cxx' % STCLOC, + '%s/scintilla/src/PropSet.cxx' % STCLOC, + '%s/scintilla/src/ScintillaBase.cxx' % STCLOC, + '%s/scintilla/src/Style.cxx' % STCLOC, + '%s/scintilla/src/ViewStyle.cxx' % STCLOC, + '%s/scintilla/src/LexCPP.cxx' % STCLOC, + '%s/scintilla/src/LexHTML.cxx' % STCLOC, + '%s/scintilla/src/LexLua.cxx' % STCLOC, + '%s/scintilla/src/LexOthers.cxx' % STCLOC, + '%s/scintilla/src/LexPerl.cxx' % STCLOC, + '%s/scintilla/src/LexPython.cxx' % STCLOC, + '%s/scintilla/src/LexSQL.cxx' % STCLOC, + '%s/scintilla/src/LexVB.cxx' % STCLOC, + '%s/scintilla/src/DocumentAccessor.cxx' % STCLOC, + '%s/scintilla/src/UniConversion.cxx' % STCLOC, + '%s/scintilla/src/WindowAccessor.cxx' % STCLOC, + '%s/scintilla/src/PosRegExp.cxx' % STCLOC, + + '%s/PlatWX.cpp' % STCLOC, + '%s/ScintillaWX.cpp' % STCLOC, + '%s/stc.cpp' % STCLOC, + ] + swig_sources + + wxext.include_dirs = wxext.include_dirs + stc_includes + wxext.define_macros = wxext.define_macros + stc_defines + + + +#---------------------------------------------------------------------- +# Do the Setup/Build/Install/Whatever +#---------------------------------------------------------------------- + +setup(name = PKGDIR, + version = VERSION, + description = DESCRIPTION, + long_description = LONG_DESCRIPTION, + author = AUTHOR, + author_email = AUTHOR_EMAIL, + url = URL, + licence = LICENCE, + + packages = [PKGDIR, + PKGDIR+'.lib', + PKGDIR+'.lib.editor', + ], + + ext_package = PKGDIR, + ext_modules = wxpExtensions, + + ) + + + + +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- + +# The pre-distutils binary distributions of wxPython included the demo +# as a subdirectory of the package dir. This doesn't really make sense +# for Linux/Unix platforms as it's not part of the package, and the user +# may want to tweak and learn without having to become root first. +# +# For now I am going to start distributing the demo as a separate tarball, +# but if I ever want to go back to the old way, this is how to do it the +# distutils way: + + +## from my_install_data import * + +## Add this to the setup() call +## # Overridden command classes +## cmdclass = {'install_data': my_install_data}, +## # non python files of examples +## data_files = [ +## Data_Files( +## base_dir='install_lib', +## copy_to = 'wxPython', +## #strip_dirs = 2, +## template=[ 'graft demo', +## 'global-exclude CVS/*' +## ], +## preserve_path=1 +## ) +## ], + + + +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- + +# Originally I was building separate extension module .so's for the +# CORE and the various contribs. Because of shared library issues I've +# decided to combine things into one .so as implemented above, but as +# I'm still not entirely convinced that this is the right thing to do +# I will keep the old code around for a while, but commented out below. + +## if BUILD_GLCANVAS: +## print 'Preparing GLCANVAS...' +## location = 'contrib/glcanvas' +## swig_files = ['glcanvas.i'] + +## swig_sources = run_swig(swig_files, location, GENDIR, PKGDIR, +## USE_SWIG, swig_force, swig_args) + +## gl_libs = [] +## if os.name == 'posix': +## if '-D__WXDEBUG__' in cflags: +## gl_libs = ['wx_gtkd_gl', 'GL', 'GLU'] +## else: +## gl_libs = ['wx_gtk_gl', 'GL', 'GLU'] + +## ext = Extension('glcanvasc', +## swig_sources, + +## include_dirs = includes, +## define_macros = defines, + +## library_dirs = libdirs, +## libraries = libs + gl_libs, + +## extra_compile_args = cflags, +## extra_link_args = lflags, +## ) + +## wxpExtensions.append(ext) + + + +## if BUILD_OGL: +## print 'Preparing OGL...' +## location = 'contrib/ogl' +## OGLLOC = location + '/contrib/src/ogl' +## OGLINC = location + '/contrib/include' + +## swig_files = ['ogl.i', 'oglbasic.i', 'oglshapes.i', 'oglshapes2.i', +## 'oglcanvas.i'] + +## swig_sources = run_swig(swig_files, location, '', PKGDIR, +## USE_SWIG, swig_force, swig_args) + +## # make sure local copy of contrib files are up to date +## if IN_CVS_TREE: +## contrib_copy_tree(WXDIR + '/contrib/include/wx/ogl', OGLINC+'/wx/ogl') +## contrib_copy_tree(WXDIR + '/contrib/src/ogl', OGLLOC) + +## ext = Extension('oglc', [location + '/oglhelpers.cpp', +## '%s/basic.cpp' % OGLLOC, +## '%s/bmpshape.cpp' % OGLLOC, +## '%s/composit.cpp' % OGLLOC, +## '%s/divided.cpp' % OGLLOC, +## '%s/lines.cpp' % OGLLOC, +## '%s/misc.cpp' % OGLLOC, +## '%s/basic2.cpp' % OGLLOC, +## '%s/canvas.cpp' % OGLLOC, +## '%s/constrnt.cpp' % OGLLOC, +## '%s/drawn.cpp' % OGLLOC, +## '%s/mfutils.cpp' % OGLLOC, +## '%s/ogldiag.cpp' % OGLLOC, +## ] + swig_sources, + +## include_dirs = [OGLINC] + includes, +## define_macros = defines, + +## library_dirs = libdirs, +## libraries = libs, + +## extra_compile_args = cflags, +## extra_link_args = lflags, +## ) + +## wxpExtensions.append(ext) + + + +## if BUILD_STC: +## print 'Preparing STC...' +## location = 'contrib/stc' +## STCLOC = location + '/contrib/src/stc' +## STCINC = location + '/contrib/include' +## STC_H = location + '/contrib/include/wx/stc' + +## # make sure local copy of contrib files are up to date +## if IN_CVS_TREE: +## contrib_copy_tree(WXDIR + '/contrib/include/wx/stc', STCINC+'/wx/stc') +## contrib_copy_tree(WXDIR + '/contrib/src/stc', STCLOC) + + +## swig_files = ['stc_.i'] +## swig_sources = run_swig(swig_files, location, '', PKGDIR, +## USE_SWIG, swig_force, +## swig_args + ['-I'+STC_H, '-I'+location], +## [STC_H+'/stc.h']) + +## # copy a project specific py module to the main package dir +## copy_file(location+'/stc.py', PKGDIR, update=1, verbose=1) + +## # add some include dirs to the standard set +## stc_includes = includes[:] +## stc_includes.append('%s/scintilla/include' % STCLOC) +## stc_includes.append('%s/scintilla/src' % STCLOC) +## stc_includes.append(STCINC) + +## # and some macro definitions +## stc_defines = defines[:] +## stc_defines.append( ('__WX__', None) ) +## stc_defines.append( ('SCI_LEXER', None) ) + + +## ext = Extension('stc_c', +## ['%s/scintilla/src/AutoComplete.cxx' % STCLOC, +## '%s/scintilla/src/CallTip.cxx' % STCLOC, +## '%s/scintilla/src/CellBuffer.cxx' % STCLOC, +## '%s/scintilla/src/ContractionState.cxx' % STCLOC, +## '%s/scintilla/src/Document.cxx' % STCLOC, +## '%s/scintilla/src/Editor.cxx' % STCLOC, +## '%s/scintilla/src/Indicator.cxx' % STCLOC, +## '%s/scintilla/src/KeyMap.cxx' % STCLOC, +## '%s/scintilla/src/KeyWords.cxx' % STCLOC, +## '%s/scintilla/src/LineMarker.cxx' % STCLOC, +## '%s/scintilla/src/PropSet.cxx' % STCLOC, +## '%s/scintilla/src/ScintillaBase.cxx' % STCLOC, +## '%s/scintilla/src/Style.cxx' % STCLOC, +## '%s/scintilla/src/ViewStyle.cxx' % STCLOC, +## '%s/scintilla/src/LexCPP.cxx' % STCLOC, +## '%s/scintilla/src/LexHTML.cxx' % STCLOC, +## '%s/scintilla/src/LexLua.cxx' % STCLOC, +## '%s/scintilla/src/LexOthers.cxx' % STCLOC, +## '%s/scintilla/src/LexPerl.cxx' % STCLOC, +## '%s/scintilla/src/LexPython.cxx' % STCLOC, +## '%s/scintilla/src/LexSQL.cxx' % STCLOC, +## '%s/scintilla/src/LexVB.cxx' % STCLOC, +## '%s/scintilla/src/DocumentAccessor.cxx' % STCLOC, +## '%s/scintilla/src/UniConversion.cxx' % STCLOC, +## '%s/scintilla/src/WindowAccessor.cxx' % STCLOC, +## '%s/scintilla/src/PosRegExp.cxx' % STCLOC, + +## '%s/PlatWX.cpp' % STCLOC, +## '%s/ScintillaWX.cpp' % STCLOC, +## '%s/stc.cpp' % STCLOC, +## ] + swig_sources, + +## include_dirs = stc_includes, +## define_macros = stc_defines, + +## library_dirs = libdirs, +## libraries = libs, + +## extra_compile_args = cflags, +## extra_link_args = lflags, +## ) + +## wxpExtensions.append(ext) + + diff --git a/wxPython/src/.cvsignore b/wxPython/src/.cvsignore index 40e8dd7480..71b0afd835 100644 --- a/wxPython/src/.cvsignore +++ b/wxPython/src/.cvsignore @@ -7,12 +7,16 @@ Setup.save Setup.save Setup.test _make.bat +b.bat build.local compile.py config.c glcanvas.h glcanvasc.exp libwxPyHelpers.2.1.so.16.0.0 +libwxPyHelpers.2.2.so.0.0.0 +libwxPyHelpers.2.2.so.1.0.0 +libwxPyHelpers.2.2.so.2.0.0 make.bat makefile.test sedscript diff --git a/wxPython/src/__version__.py b/wxPython/src/__version__.py index 2ca00768cd..8d9b0a60d8 100644 --- a/wxPython/src/__version__.py +++ b/wxPython/src/__version__.py @@ -1 +1 @@ -ver = '2.2.0' +ver = '2.3.0b1' diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 81fc5fc610..9f3be2fecf 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -157,6 +157,7 @@ typedef int wxWindowID; typedef unsigned int uint; typedef signed int EBool; typedef unsigned int size_t +typedef unsigned int time_t typedef int wxPrintQuality; typedef int wxCoord; typedef char wxChar; @@ -955,6 +956,8 @@ enum wxEventType { wxEVT_TIMER, + wxEVT_END_PROCESS, + }; diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index a3cd475a6c..49e2eedce6 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -628,9 +628,6 @@ def EVT_LIST_SET_INFO(win, id, func): def EVT_LIST_ITEM_SELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func) -def EVT_LIST_ITEM_ACTIVATED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) - def EVT_LIST_ITEM_DESELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func) @@ -649,6 +646,10 @@ def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func): def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func) +def EVT_LIST_ITEM_ACTIVATED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) + + #wxSplitterWindow @@ -669,7 +670,9 @@ def EVT_SPLITTER_DOUBLECLICKED(win, id, func): def EVT_TIMER(win, id, func): win.Connect(id, -1, wxEVT_TIMER, func) - +# wxProcess +def EVT_END_PROCESS(eh, id, func): + eh.Connect(id, -1, wxEVT_END_PROCESS, func) #---------------------------------------------------------------------- diff --git a/wxPython/src/build.cfg b/wxPython/src/build.cfg deleted file mode 100644 index edca6547f0..0000000000 --- a/wxPython/src/build.cfg +++ /dev/null @@ -1,153 +0,0 @@ -# -*- python -*- -import sys - -MODULE = 'wxc' -SWIGFILES = ['wx.i', 'windows.i', 'windows2.i', 'windows3.i', 'events.i', - 'misc.i', 'misc2.i', 'utils.i', 'gdi.i', 'mdi.i', 'controls.i', - 'controls2.i', 'cmndlgs.i', 'stattool.i', 'frames.i', - 'image.i', 'printfw.i', 'sizers.i', 'clip_dnd.i', 'grid.i', - 'html.i', 'htmlhelp.i', 'calendar.i' - ] - -PYFILES = ['__init__.py', '__version__.py'] - -SWIGDEPS = '_defs.i my_typemaps.i' -OTHERDEPS = 'helpers.h' - -if sys.platform == 'win32': - RESFILE = 1 - SOURCES = ['helpers.cpp', 'libpy.c'] - LIBS = '$(PYTHONLIB)' - OTHERRULES = """ -dist: - cd .. - distrib\zipit.bat $(VERSION) - -dbg: - cd ..\distrib - makedbg.bat $(VERSION) - -dev: - cd ..\distrib - makedev.bat $(VERSION) - -__version__.py: ../distrib/build.py build.cfg - echo ver = '$(VERSION)' > __version__.py - -""" - -else: - DEFAULTRULE = 'default: $(GENCODEDIR) helperlib $(TARGET) $(BUILDDIR)/$(TARGET) bldpycfiles' - OTHERINSTALLTARGETS = 'installLib installDemo installHelpers ' - OTHERUNINSTALLTARGETS = 'uninstallLib uninstallDemo uninstallHelpers ' - - OTHERCFLAGS = '`gtk-config --cflags`' - OTHERRULES = """ -HELPERLIBNAME = lib$(HELPERLIB).$(MAJVER)$(SO).$(BLDVER).0.0 -helperlib: $(HELPERLIBNAME) - -$(HELPERLIBNAME) : helpers.o libpy.o - $(LDSHARED) helpers.o libpy.o $(LFLAGS) -o $@ - ln -s $(HELPERLIBNAME) lib$(HELPERLIB).$(MAJVER)$(SO).$(BLDVER) - ln -s $(HELPERLIBNAME) lib$(HELPERLIB).$(MAJVER)$(SO) - ln -s $(HELPERLIBNAME) lib$(HELPERLIB)$(SO) - - -installHelpers: $(HELPERLIBDIR)/$(HELPERLIBNAME) - - -$(HELPERLIBDIR)/$(HELPERLIBNAME) : $(HELPERLIBNAME) - cp $(HELPERLIBNAME) $(HELPERLIBDIR) - cd $(HELPERLIBDIR); \ - ln -sf $(HELPERLIBNAME) lib$(HELPERLIB).$(MAJVER)$(SO).$(BLDVER); \ - ln -sf $(HELPERLIBNAME) lib$(HELPERLIB).$(MAJVER)$(SO); \ - ln -sf $(HELPERLIBNAME) lib$(HELPERLIB)$(SO) - @echo --------------------------------------------------------- - @echo You may have to run ldconfig, or set an environment - @echo variable in order for $(HELPERLIBDIR)/lib$(HELPERLIB)$(SO) - @echo to be found at runtime. See your man pages for ld.so or - @echo equivalent. - @echo --------------------------------------------------------- - - -installLib: - mkdir $(TARGETDIR)/lib; \\ - mkdir $(TARGETDIR)/lib/sizers; \\ - mkdir $(TARGETDIR)/lib/editor; \\ - cp ../wxPython/lib/*.py $(TARGETDIR)/lib; \\ - cp ../wxPython/lib/sizers/*.py $(TARGETDIR)/lib/sizers; \\ - cp ../wxPython/lib/editor/*.py $(TARGETDIR)/lib/editor; \\ - cp ../wxPython/lib/*.txt $(TARGETDIR)/lib; \\ - cp ../wxPython/lib/sizers/*.txt $(TARGETDIR)/lib/sizers;\\ - cp ../wxPython/lib/editor/*.txt $(TARGETDIR)/lib/editor;\\ - $(EXECPREFIX)/bin/python $(PYLIB)/compileall.py $(TARGETDIR); \\ - $(EXECPREFIX)/bin/python -O $(PYLIB)/compileall.py $(TARGETDIR); - -installDemo: - mkdir $(TARGETDIR)/demo; \\ - mkdir $(TARGETDIR)/demo/bitmaps; \\ - mkdir $(TARGETDIR)/demo/data; \\ - cp ../demo/*.py $(TARGETDIR)/demo; \\ - cp ../demo/*.xml $(TARGETDIR)/demo; \\ - cp ../demo/*.txt $(TARGETDIR)/demo; \\ - cp ../demo/bitmaps/*.bmp $(TARGETDIR)/demo/bitmaps; \\ - cp ../demo/bitmaps/*.ico $(TARGETDIR)/demo/bitmaps; \\ - cp ../demo/bitmaps/*.gif $(TARGETDIR)/demo/bitmaps; \\ - cp ../demo/bitmaps/*.png $(TARGETDIR)/demo/bitmaps; \\ - cp ../demo/bitmaps/*.jpg $(TARGETDIR)/demo/bitmaps; \\ - cp ../demo/data/*.png $(TARGETDIR)/demo/data; \\ - cp ../demo/data/*.htm $(TARGETDIR)/demo/data; \\ - cp ../demo/data/*.bmp $(TARGETDIR)/demo/data; \\ - cp ../demo/data/*.txt $(TARGETDIR)/demo/data; \\ - cp ../demo/data/*.i $(TARGETDIR)/demo/data; \\ - cp ../demo/data/*.h $(TARGETDIR)/demo/data; \\ - echo "(1,0)" > $(TARGETDIR)/demo/data/showTips; \\ - chmod 666 $(TARGETDIR)/demo/data/showTips; \\ - $(EXECPREFIX)/bin/python $(PYLIB)/compileall.py $(TARGETDIR)/demo;\\ - $(EXECPREFIX)/bin/python -O $(PYLIB)/compileall.py $(TARGETDIR)/demo; - - -uninstallLib: - rm -rf $(TARGETDIR)/lib; - -uninstallDemo: - rm -rf $(TARGETDIR)/demo; - - -uninstallHelpers: - rm -f $(HELPERLIBDIR)/lib$(HELPERLIB)$(SO) - rm -f $(HELPERLIBDIR)/$(HELPERLIBNAME) - rm -f $(HELPERLIBDIR)/lib$(HELPERLIB).$(MAJVER)$(SO).$(BLDVER) - rm -f $(HELPERLIBDIR)/lib$(HELPERLIB).$(MAJVER)$(SO) - rm -f $(HELPERLIBDIR)/lib$(HELPERLIB)$(SO) - - -__version__.py: ../distrib/build.py build.cfg - echo ver = \\'$(VERSION)\\' > __version__.py - - -#---------------------------------------------------------------------- - -dist: tgz rpm - -tgz: - cd ..; distrib/maketgz $(VERSION) - -rpm: - cd ../distrib; ./makerpm $(VERSION) - - -""" - - - - - -OTHERRULES = OTHERRULES + """ - -$(GENCODEDIR)/wx.py : _extras.py -$(GENCODEDIR)/grid.py : _gridextras.py -$(GENCODEDIR)/html.py : _htmlextras.py -$(GENCODEDIR)/calendar.py : _calextras.py - -""" diff --git a/wxPython/src/clip_dnd.i b/wxPython/src/clip_dnd.i index 8feb9e8786..6c3b014c8f 100644 --- a/wxPython/src/clip_dnd.i +++ b/wxPython/src/clip_dnd.i @@ -346,6 +346,7 @@ public: } size_t GetSize(); + //void *GetData(); %addmethods { PyObject* GetData() { diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index 35fbfd1b81..951d344358 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -596,8 +596,16 @@ public: const char* name = "wxSpinCtrl"); + int GetMax(); + int GetMin(); + int GetValue(); + void SetRange(int min, int max); + void SetValue(int value); + }; //---------------------------------------------------------------------- + + diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index d24b8ebb28..945533fe2d 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -184,7 +184,7 @@ public: }; -class wxListEvent: public wxCommandEvent { +class wxListEvent: public wxNotifyEvent { public: int m_code; long m_itemIndex; @@ -281,7 +281,7 @@ public: #endif long GetTopItem(); long HitTest(const wxPoint& point, int& OUTPUT); - %name(InsertColumnWith)long InsertColumn(long col, wxListItem& info); + %name(InsertColumnInfo)long InsertColumn(long col, wxListItem& info); long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT, int width = -1); @@ -380,7 +380,7 @@ public: %addmethods { int __cmp__(wxTreeItemId* other) { - if (! other) return 0; + if (! other) return -1; return *self != *other; } } @@ -392,15 +392,15 @@ public: class wxPyTreeItemData : public wxTreeItemData { public: wxPyTreeItemData(PyObject* obj = NULL) { - if (obj == NULL) + if (obj == NULL) obj = Py_None; - Py_INCREF(obj); - m_obj = obj; + Py_INCREF(obj); + m_obj = obj; } ~wxPyTreeItemData() { bool doSave = wxPyRestoreThread(); - Py_DECREF(m_obj); + Py_DECREF(m_obj); wxPySaveThread(doSave); } @@ -410,7 +410,9 @@ public: } void SetData(PyObject* obj) { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_obj); + wxPySaveThread(doSave); m_obj = obj; Py_INCREF(obj); } @@ -517,8 +519,8 @@ public: void SetItemHasChildren(const wxTreeItemId& item, bool hasChildren = TRUE); %addmethods { - // [Get|Set]ItemData substitutes. Automatically create wxPyTreeItemData - // if needed. + // [Get|Set]ItemData substitutes. Automatically create wxPyTreeItemData + // if needed. wxPyTreeItemData* GetItemData(const wxTreeItemId& item) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { @@ -532,11 +534,11 @@ public: void SetItemData(const wxTreeItemId& item, wxPyTreeItemData* data) { data->SetId(item); // set the id self->SetItemData(item, data); - } + } - // [Get|Set]PyData are short-cuts. Also made somewhat crash-proof by - // automatically creating data classes. - PyObject* GetPyData(const wxTreeItemId& item) { + // [Get|Set]PyData are short-cuts. Also made somewhat crash-proof by + // automatically creating data classes. + PyObject* GetPyData(const wxTreeItemId& item) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(); @@ -544,7 +546,7 @@ public: self->SetItemData(item, data); } return data->GetData(); - } + } void SetPyData(const wxTreeItemId& item, PyObject* obj) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); @@ -554,7 +556,7 @@ public: self->SetItemData(item, data); } else data->SetData(obj); - } + } } @@ -575,8 +577,8 @@ public: size_t num, x; num = self->GetSelections(array); for (x=0; x < num; x++) { - PyObject* item = wxPyConstructObject((void*)&array.Item(x), - "wxTreeItemId"); + wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); + PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE); PyList_Append(rval, item); } wxPySaveThread(doSave); diff --git a/wxPython/src/events.i b/wxPython/src/events.i index d0c6713c0b..b534f076b7 100644 --- a/wxPython/src/events.i +++ b/wxPython/src/events.i @@ -156,6 +156,15 @@ public: wxPoint GetLogicalPosition(const wxDC& dc); long GetX(); long GetY(); + + long m_x, m_y; + bool m_leftDown; + bool m_middleDown; + bool m_rightDown; + bool m_controlDown; + bool m_shiftDown; + bool m_altDown; + bool m_metaDown; }; //--------------------------------------------------------------------------- @@ -177,6 +186,15 @@ public: long GetY(); wxPoint GetPosition(); %name(GetPositionTuple) void GetPosition(long* OUTPUT, long* OUTPUT); + + long m_x, m_y; + long m_keyCode; + bool m_controlDown; + bool m_shiftDown; + bool m_altDown; + bool m_metaDown; + bool m_scanCode; + }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/filesys.i b/wxPython/src/filesys.i new file mode 100644 index 0000000000..7fc6c420c6 --- /dev/null +++ b/wxPython/src/filesys.i @@ -0,0 +1,274 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: filesys.i +// Purpose: SWIG definitions of the wxFileSystem family of classes +// +// Author: Joerg Baumann +// +// Created: 25-Sept-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Joerg Baumann +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +%module filesys + +%{ +#include "helpers.h" +#include +#include +#include +#include +%} + +//---------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +// Import some definitions of other classes, etc. +%import _defs.i +%import utils.i +%import image.i +%import streams.i + +%pragma(python) code = "import wx" +%pragma(python) code = "import string" + +//--------------------------------------------------------------------------- + +// // typemaps for wxInputStream: Note wxFSFile object has to do the delete +// // of wxInputStream * +// %typemap(python,in) wxInputStream *stream { +// if (PyInstance_Check($source)) { +// wxPyInputStream* ptr; +// if (SWIG_GetPtrObj($source, (void **) &ptr,"_wxPyInputStream_p")) { +// PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); +// return NULL; +// } +// $target = ptr->wxi; +// } else { +// PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); +// return NULL; +// } +// } + + +// // typemaps for wxInputStream: Note wxFSFile object has to do the delete +// // of wxInputStream * +// %typemap(python,out) wxInputStream* { +// wxPyInputStream * _ptr = NULL; + +// if ($source) { +// _ptr = new wxPyInputStream($source); +// } +// if (_ptr) { +// char swigptr[64]; +// SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + +// PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); +// if (! classobj) { +// Py_INCREF(Py_None); +// $target = Py_None; +// } else { +// PyObject* arg = Py_BuildValue("(s)", swigptr); +// $target = PyInstance_New(classobj, arg, NULL); +// Py_DECREF(arg); + +// // set ThisOwn +// PyObject_SetAttrString($target, "thisown", PyInt_FromLong(1)); +// } +// } else { +// Py_INCREF(Py_None); +// $target = Py_None; +// } +// } + + + +class wxFSFile { +public: + wxFSFile(wxInputStream *stream, const wxString& loc, + const wxString& mimetype, const wxString& anchor, + wxDateTime modif); + + wxInputStream *GetStream(); + const wxString& GetMimeType(); + const wxString& GetLocation(); + const wxString& GetAnchor(); + wxDateTime GetModificationTime(); +}; + + +// clear typemaps +%typemap(python,in) wxInputStream *stream; +%typemap(python,out) wxInputStream *; + + +//--------------------------------------------------------------------------- + +%{ +// wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling +// the callback functions +class wxPyFileSystemHandler : public wxFileSystemHandler { +public: + wxPyFileSystemHandler() : wxFileSystemHandler() {} + + DEC_PYCALLBACK_BOOL_STRING_pure(CanOpen); + DEC_PYCALLBACK_FSF_FSSTRING_pure(OpenFile); + DEC_PYCALLBACK_STRING_STRINGINT_pure(FindFirst); + DEC_PYCALLBACK_STRING__pure(FindNext); + + wxString GetProtocol(const wxString& location) { + return wxFileSystemHandler::GetProtocol(location); + } + + wxString GetLeftLocation(const wxString& location) { + return wxFileSystemHandler::GetLeftLocation(location); + } + + wxString GetAnchor(const wxString& location) { + return wxFileSystemHandler::GetAnchor(location); + } + + wxString GetRightLocation(const wxString& location) { + return wxFileSystemHandler::GetRightLocation(location); + } + + wxString GetMimeTypeFromExt(const wxString& location){ + return wxFileSystemHandler::GetMimeTypeFromExt(location); + } + + PYPRIVATE; +}; + + +IMP_PYCALLBACK_BOOL_STRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, CanOpen); +IMP_PYCALLBACK_FSF_FSSTRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, OpenFile); +IMP_PYCALLBACK_STRING_STRINGINT_pure(wxPyFileSystemHandler, wxFileSystemHandler, FindFirst); +IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext); +%} + + +%name(wxCPPFileSystemHandler)class wxFileSystemHandler { + wxFileSystemHandler(); +} + +%name(wxFileSystemHandler)class wxPyFileSystemHandler : public wxFileSystemHandler { +public: + wxPyFileSystemHandler(); + + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxFileSystemHandler)" + + bool CanOpen(const wxString& location); + wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + wxString FindFirst(const wxString& spec, int flags = 0); + wxString FindNext(); + + wxString GetProtocol(const wxString& location); + wxString GetLeftLocation(const wxString& location); + wxString GetAnchor(const wxString& location); + wxString GetRightLocation(const wxString& location) const; + wxString GetMimeTypeFromExt(const wxString& location); +}; + +//--------------------------------------------------------------------------- + +class wxFileSystem { +public: + wxFileSystem(); + + void ChangePathTo(const wxString& location, bool is_dir = FALSE); + wxString GetPath(); + + wxFSFile* OpenFile(const wxString& location); + + wxString FindFirst(const wxString& spec, int flags = 0); + wxString FindNext(); + + static void AddHandler(wxFileSystemHandler *handler); + static void CleanUpHandlers(); +}; + +//--------------------------------------------------------------------------- + +class wxInternetFSHandler : public wxFileSystemHandler { +public: + wxInternetFSHandler(); + bool CanOpen(const wxString& location); + wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); +}; + + +//--------------------------------------------------------------------------- +class wxZipFSHandler : public wxFileSystemHandler { +public: + wxZipFSHandler(); + + bool CanOpen(const wxString& location); + wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + wxString FindFirst(const wxString& spec, int flags = 0); + wxString FindNext(); +}; + +//--------------------------------------------------------------------------- + +class wxMemoryFSHandler : public wxFileSystemHandler { +public: + wxMemoryFSHandler(); + + // Remove file from memory FS and free occupied memory + static void RemoveFile(const wxString& filename); + + bool CanOpen(const wxString& location); + wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + wxString FindFirst(const wxString& spec, int flags = 0); + virtual wxString FindNext(); +}; + + +// getting the overloaded static AddFile method right +%inline %{ +void __wxMemoryFSHandler_AddFile_wxImage(const wxString& filename, + wxImage& image, + long type) { + wxMemoryFSHandler::AddFile(filename, image, type); +} + +void __wxMemoryFSHandler_AddFile_wxBitmap(const wxString& filename, + const wxBitmap& bitmap, + long type) { + wxMemoryFSHandler::AddFile(filename, bitmap, type); +} + +// void __wxMemoryFSHandler_AddFile_wxString(const wxString& filename, +// const wxString& textdata) { +// wxMemoryFSHandler::AddFile(filename, textdata); +// } + +void __wxMemoryFSHandler_AddFile_Data(const wxString& filename, + PyObject* data) { + + wxMemoryFSHandler::AddFile(filename, + (void*)PyString_AsString(data), + (size_t)PyString_Size(data)); +} +%} + + +// case switch for overloading +%pragma(python) code = " +import types +def wxMemoryFSHandler_AddFile(filename, a, b=''): + if isinstance(a, wxImage): + __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) + elif isinstance(a, wxBitmap): + __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) + elif type(a) == types.StringType: + #__wxMemoryFSHandler_AddFile_wxString(filename, a) + __wxMemoryFSHandler_AddFile_Data(filename, a) + else: raise TypeError, 'wxImage, wxBitmap or string expected' +" + + +//--------------------------------------------------------------------------- diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 957de4beb5..6902ace135 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -669,7 +669,7 @@ public: } - wxGridCellEditor *Clone() const { + wxGridCellEditor*Clone() const { wxGridCellEditor* rval = NULL; bool doSave = wxPyRestoreThread(); if (m_myInst.findCallback("Clone")) { @@ -796,23 +796,6 @@ public: wxGridCellChoiceEditor(int LCOUNT = 0, const wxString* choices = NULL, bool allowOthers = FALSE); -#ifdef PRE2115 - %addmethods { - wxGridCellChoiceEditor(PyObject* choices, - bool allowOthers = FALSE) { - - const char** temp = string_LIST_helper(choices); - if (temp) { - int count = PyList_Size(choices); - wxGridCellChoiceEditor* ret; - ret = new wxGridCellChoiceEditor(count, temp, allowOthers); - delete [] temp; - return ret; - } - return NULL; - } - } -#endif }; //--------------------------------------------------------------------------- @@ -1565,7 +1548,8 @@ public: void SelectRow( int row, bool addToSelected = FALSE ); void SelectCol( int col, bool addToSelected = FALSE ); - void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol ); + void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, + bool addToSelected = FALSE ); // TODO: ??? void SelectBlock( const wxGridCellCoords& topLeft, // TODO: ??? const wxGridCellCoords& bottomRight ) diff --git a/wxPython/src/gtk/calendar.cpp b/wxPython/src/gtk/calendar.cpp index 0da0125dce..b7af622910 100644 --- a/wxPython/src/gtk/calendar.cpp +++ b/wxPython/src/gtk/calendar.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1684,7 +1684,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -1719,6 +1721,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1752,6 +1755,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1770,6 +1774,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -1880,6 +1885,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1904,6 +1910,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1913,6 +1920,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1927,6 +1935,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -1960,6 +1975,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/clip_dnd.cpp b/wxPython/src/gtk/clip_dnd.cpp index 280cf5646c..4c40e9680a 100644 --- a/wxPython/src/gtk/clip_dnd.cpp +++ b/wxPython/src/gtk/clip_dnd.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,13 +61,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -83,23 +83,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -3338,6 +3338,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -3393,6 +3394,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -3443,6 +3445,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -3521,6 +3524,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3535,6 +3539,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3543,12 +3548,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, @@ -3566,6 +3579,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_wxRegion","_class_wxRegion",0}, diff --git a/wxPython/src/gtk/cmndlgs.cpp b/wxPython/src/gtk/cmndlgs.cpp index 0469cd89db..5d615773dc 100644 --- a/wxPython/src/gtk/cmndlgs.cpp +++ b/wxPython/src/gtk/cmndlgs.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -61,13 +62,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -84,23 +84,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2770,7 +2770,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -2824,6 +2826,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2887,6 +2890,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -2901,6 +2905,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, @@ -3041,6 +3046,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3081,6 +3087,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3090,6 +3097,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3100,6 +3108,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -3129,6 +3144,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp index e79ba95900..ae4817b80d 100644 --- a/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/controls.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -74,13 +75,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -97,23 +97,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -7327,7 +7327,150 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define wxSpinCtrl_GetMax(_swigobj) (_swigobj->GetMax()) +static PyObject *_wrap_wxSpinCtrl_GetMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetMax. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_GetMin(_swigobj) (_swigobj->GetMin()) +static PyObject *_wrap_wxSpinCtrl_GetMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetMin. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_GetValue(_swigobj) (_swigobj->GetValue()) +static PyObject *_wrap_wxSpinCtrl_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetValue",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetValue. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetValue(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_SetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSpinCtrl_SetRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","min","max", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxSpinCtrl_SetRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_SetRange. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSpinCtrl_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) +static PyObject *_wrap_wxSpinCtrl_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSpinCtrl_SetValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_SetValue. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSpinCtrl_SetValue(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef controlscMethods[] = { + { "wxSpinCtrl_SetValue", (PyCFunction) _wrap_wxSpinCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_SetRange", (PyCFunction) _wrap_wxSpinCtrl_SetRange, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetValue", (PyCFunction) _wrap_wxSpinCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetMin", (PyCFunction) _wrap_wxSpinCtrl_GetMin, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetMax", (PyCFunction) _wrap_wxSpinCtrl_GetMax, METH_VARARGS | METH_KEYWORDS }, { "new_wxSpinCtrl", (PyCFunction) _wrap_new_wxSpinCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetValue", (PyCFunction) _wrap_wxSlider_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetTick", (PyCFunction) _wrap_wxSlider_SetTick, METH_VARARGS | METH_KEYWORDS }, @@ -7542,6 +7685,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -7618,6 +7762,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -7650,6 +7795,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -7849,6 +7995,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -7873,6 +8020,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -7882,6 +8030,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -7892,6 +8041,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxBitmapButton",SwigwxBitmapButtonTowxButton}, { "_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton}, @@ -7960,6 +8116,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/controls.py b/wxPython/src/gtk/controls.py index 3e6a270097..974248219c 100644 --- a/wxPython/src/gtk/controls.py +++ b/wxPython/src/gtk/controls.py @@ -806,6 +806,21 @@ class wxSpinCtrlPtr(wxSpinButtonPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetMax(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetMax,(self,) + _args, _kwargs) + return val + def GetMin(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetMin,(self,) + _args, _kwargs) + return val + def GetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetValue,(self,) + _args, _kwargs) + return val + def SetRange(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_SetRange,(self,) + _args, _kwargs) + return val + def SetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_SetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxSpinCtrl(wxSpinCtrlPtr): diff --git a/wxPython/src/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index 4389888fa7..9659feb790 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -1,5 +1,5 @@ /* - * FILE : gtk/controls2.cpp + * FILE : src/gtk/controls2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -62,13 +63,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -85,23 +85,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -132,15 +132,15 @@ extern wxValidator wxPyDefaultValidator; class wxPyTreeItemData : public wxTreeItemData { public: wxPyTreeItemData(PyObject* obj = NULL) { - if (obj == NULL) + if (obj == NULL) obj = Py_None; - Py_INCREF(obj); - m_obj = obj; + Py_INCREF(obj); + m_obj = obj; } ~wxPyTreeItemData() { bool doSave = wxPyRestoreThread(); - Py_DECREF(m_obj); + Py_DECREF(m_obj); wxPySaveThread(doSave); } @@ -150,7 +150,9 @@ public: } void SetData(PyObject* obj) { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_obj); + wxPySaveThread(doSave); m_obj = obj; Py_INCREF(obj); } @@ -1970,6 +1972,14 @@ static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args, Py return _resultobj; } +static void *SwigwxListEventTowxNotifyEvent(void *ptr) { + wxListEvent *src; + wxNotifyEvent *dest; + src = (wxListEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + static void *SwigwxListEventTowxCommandEvent(void *ptr) { wxListEvent *src; wxCommandEvent *dest; @@ -3727,8 +3737,8 @@ static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxListCtrl_InsertColumnWith(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxListCtrl_InsertColumnInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxListCtrl_InsertColumnInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; long _result; wxListCtrl * _arg0; @@ -3739,25 +3749,25 @@ static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *arg char *_kwnames[] = { "self","col","info", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnWith",_kwnames,&_argo0,&_arg1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnInfo",_kwnames,&_argo0,&_arg1,&_argo2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnWith. Expected _wxListCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnInfo. Expected _wxListCtrl_p."); return NULL; } } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnWith. Expected _wxListItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnInfo. Expected _wxListItem_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxListCtrl_InsertColumnWith(_arg0,_arg1,*_arg2); + _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("l",_result); @@ -4543,7 +4553,7 @@ static PyObject *_wrap_wxTreeItemId_IsOk(PyObject *self, PyObject *args, PyObjec } static int wxTreeItemId___cmp__(wxTreeItemId *self,wxTreeItemId * other) { - if (! other) return 0; + if (! other) return -1; return *self != *other; } static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -5645,7 +5655,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py static void wxPyTreeCtrl_SetItemData(wxPyTreeCtrl *self,const wxTreeItemId & item,wxPyTreeItemData * data) { data->SetId(item); // set the id self->SetItemData(item, data); - } + } static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTreeCtrl * _arg0; @@ -5698,7 +5708,7 @@ static PyObject * wxPyTreeCtrl_GetPyData(wxPyTreeCtrl *self,const wxTreeItemId & self->SetItemData(item, data); } return data->GetData(); - } + } static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; PyObject * _result; @@ -5744,7 +5754,7 @@ static void wxPyTreeCtrl_SetPyData(wxPyTreeCtrl *self,const wxTreeItemId & item self->SetItemData(item, data); } else data->SetData(obj); - } + } static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTreeCtrl * _arg0; @@ -6032,8 +6042,8 @@ static PyObject * wxPyTreeCtrl_GetSelections(wxPyTreeCtrl *self) { size_t num, x; num = self->GetSelections(array); for (x=0; x < num; x++) { - PyObject* item = wxPyConstructObject((void*)&array.Item(x), - "wxTreeItemId"); + wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); + PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE); PyList_Append(rval, item); } wxPySaveThread(doSave); @@ -7565,7 +7575,7 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_InsertStringItem", (PyCFunction) _wrap_wxListCtrl_InsertStringItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_InsertItem", (PyCFunction) _wrap_wxListCtrl_InsertItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_InsertColumn", (PyCFunction) _wrap_wxListCtrl_InsertColumn, METH_VARARGS | METH_KEYWORDS }, - { "wxListCtrl_InsertColumnWith", (PyCFunction) _wrap_wxListCtrl_InsertColumnWith, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_InsertColumnInfo", (PyCFunction) _wrap_wxListCtrl_InsertColumnInfo, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_HitTest", (PyCFunction) _wrap_wxListCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetTopItem", (PyCFunction) _wrap_wxListCtrl_GetTopItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetSelectedItemCount", (PyCFunction) _wrap_wxListCtrl_GetSelectedItemCount, METH_VARARGS | METH_KEYWORDS }, @@ -7711,6 +7721,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -7727,6 +7738,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, { "_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, + { "_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, @@ -7754,6 +7767,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -7787,6 +7801,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -7819,6 +7834,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, { "_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, @@ -7921,6 +7938,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -7944,6 +7962,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -7953,6 +7972,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -7964,6 +7984,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -7998,6 +8025,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/controls2.py b/wxPython/src/gtk/controls2.py index bf8d4e24bb..d7d9409983 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -219,7 +219,7 @@ class wxListItem(wxListItemPtr): -class wxListEventPtr(wxCommandEventPtr): +class wxListEventPtr(wxNotifyEventPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -401,8 +401,8 @@ class wxListCtrlPtr(wxControlPtr): def HitTest(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_HitTest,(self,) + _args, _kwargs) return val - def InsertColumnWith(self, *_args, **_kwargs): - val = apply(controls2c.wxListCtrl_InsertColumnWith,(self,) + _args, _kwargs) + def InsertColumnInfo(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_InsertColumnInfo,(self,) + _args, _kwargs) return val def InsertColumn(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_InsertColumn,(self,) + _args, _kwargs) diff --git a/wxPython/src/gtk/events.cpp b/wxPython/src/gtk/events.cpp index 32334162a2..b6cd65de94 100644 --- a/wxPython/src/gtk/events.cpp +++ b/wxPython/src/gtk/events.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2176,356 +2176,1315 @@ static PyObject *_wrap_wxMouseEvent_GetY(PyObject *self, PyObject *args, PyObjec return _resultobj; } -static void *SwigwxKeyEventTowxEvent(void *ptr) { - wxKeyEvent *src; - wxEvent *dest; - src = (wxKeyEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; +#define wxMouseEvent_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxMouseEvent_m_x_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_x_set. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_x_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; } -#define new_wxKeyEvent(_swigarg0) (new wxKeyEvent(_swigarg0)) -static PyObject *_wrap_new_wxKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_x_get(_swigobj) ((long ) _swigobj->m_x) +static PyObject *_wrap_wxMouseEvent_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxKeyEvent * _result; - int _arg0; - char *_kwnames[] = { "keyEventType", NULL }; - char _ptemp[128]; + long _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxKeyEvent",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_x_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_x_get. Expected _wxMouseEvent_p."); return NULL; + } + } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxKeyEvent *)new_wxKeyEvent(_arg0); + _result = (long )wxMouseEvent_m_x_get(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxKeyEvent_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxMouseEvent_m_y_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_y_set. Expected _wxMouseEvent_p."); + return NULL; + } } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_y_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); return _resultobj; } -#define wxKeyEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) -static PyObject *_wrap_wxKeyEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_y_get(_swigobj) ((long ) _swigobj->m_y) +static PyObject *_wrap_wxMouseEvent_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; + long _result; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_ControlDown",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_y_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ControlDown. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_y_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_ControlDown(_arg0); + _result = (long )wxMouseEvent_m_y_get(_arg0); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); +} _resultobj = Py_BuildValue("l",_result); return _resultobj; } -#define wxKeyEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) -static PyObject *_wrap_wxKeyEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_leftDown_set(_swigobj,_swigval) (_swigobj->m_leftDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_leftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxKeyEvent * _arg0; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1; + char *_kwnames[] = { "self","m_leftDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_MetaDown",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_leftDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_MetaDown. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_leftDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_MetaDown(_arg0); + _result = (bool )wxMouseEvent_m_leftDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_AltDown(_swigobj) (_swigobj->AltDown()) -static PyObject *_wrap_wxKeyEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_leftDown_get(_swigobj) ((bool ) _swigobj->m_leftDown) +static PyObject *_wrap_wxMouseEvent_m_leftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxKeyEvent * _arg0; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_AltDown",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_leftDown_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_AltDown. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_leftDown_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_AltDown(_arg0); + _result = (bool )wxMouseEvent_m_leftDown_get(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) -static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_middleDown_set(_swigobj,_swigval) (_swigobj->m_middleDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_middleDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxKeyEvent * _arg0; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1; + char *_kwnames[] = { "self","m_middleDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_ShiftDown",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_middleDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ShiftDown. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_middleDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_ShiftDown(_arg0); + _result = (bool )wxMouseEvent_m_middleDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_KeyCode(_swigobj) (_swigobj->KeyCode()) -static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_middleDown_get(_swigobj) ((bool ) _swigobj->m_middleDown) +static PyObject *_wrap_wxMouseEvent_m_middleDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_KeyCode",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_middleDown_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_KeyCode. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_middleDown_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxKeyEvent_KeyCode(_arg0); + _result = (bool )wxMouseEvent_m_middleDown_get(_arg0); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) -static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_rightDown_set(_swigobj,_swigval) (_swigobj->m_rightDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_rightDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1; + char *_kwnames[] = { "self","m_rightDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetKeyCode",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_rightDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetKeyCode. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_rightDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxKeyEvent_GetKeyCode(_arg0); + _result = (bool )wxMouseEvent_m_rightDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_HasModifiers(_swigobj) (_swigobj->HasModifiers()) -static PyObject *_wrap_wxKeyEvent_HasModifiers(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_rightDown_get(_swigobj) ((bool ) _swigobj->m_rightDown) +static PyObject *_wrap_wxMouseEvent_m_rightDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxKeyEvent * _arg0; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_HasModifiers",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_rightDown_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_HasModifiers. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_rightDown_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_HasModifiers(_arg0); + _result = (bool )wxMouseEvent_m_rightDown_get(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_controlDown_set(_swigobj,_swigval) (_swigobj->m_controlDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_controlDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1; + char *_kwnames[] = { "self","m_controlDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetX",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_controlDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetX. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_controlDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxKeyEvent_GetX(_arg0); + _result = (bool )wxMouseEvent_m_controlDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxKeyEvent_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_controlDown_get(_swigobj) ((bool ) _swigobj->m_controlDown) +static PyObject *_wrap_wxMouseEvent_m_controlDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetY",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_controlDown_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetY. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_controlDown_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxKeyEvent_GetY(_arg0); + _result = (bool )wxMouseEvent_m_controlDown_get(_arg0); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxKeyEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_shiftDown_set(_swigobj,_swigval) (_swigobj->m_shiftDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_shiftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxPoint * _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; + int tempbool1; + char *_kwnames[] = { "self","m_shiftDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetPosition",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_shiftDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetPosition. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_shiftDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = new wxPoint (wxKeyEvent_GetPosition(_arg0)); + _result = (bool )wxMouseEvent_m_shiftDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxKeyEvent_GetPositionTuple(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_shiftDown_get(_swigobj) ((bool ) _swigobj->m_shiftDown) +static PyObject *_wrap_wxMouseEvent_m_shiftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxKeyEvent * _arg0; - long * _arg1; - long temp; - long * _arg2; - long temp0; + bool _result; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_shiftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_shiftDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } { - _arg1 = &temp; -} -{ - _arg2 = &temp0; + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_shiftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; } - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetPositionTuple",_kwnames,&_argo0)) + +#define wxMouseEvent_m_altDown_set(_swigobj,_swigval) (_swigobj->m_altDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_altDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_altDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_altDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetPositionTuple. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_altDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - wxKeyEvent_GetPositionTuple(_arg0,_arg1,_arg2); + _result = (bool )wxMouseEvent_m_altDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_altDown_get(_swigobj) ((bool ) _swigobj->m_altDown) +static PyObject *_wrap_wxMouseEvent_m_altDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_altDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_altDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_altDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_metaDown_set(_swigobj,_swigval) (_swigobj->m_metaDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_metaDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_metaDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_metaDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_metaDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_metaDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_metaDown_get(_swigobj) ((bool ) _swigobj->m_metaDown) +static PyObject *_wrap_wxMouseEvent_m_metaDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_metaDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_metaDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_metaDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxKeyEventTowxEvent(void *ptr) { + wxKeyEvent *src; + wxEvent *dest; + src = (wxKeyEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxKeyEvent(_swigarg0) (new wxKeyEvent(_swigarg0)) +static PyObject *_wrap_new_wxKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxKeyEvent * _result; + int _arg0; + char *_kwnames[] = { "keyEventType", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxKeyEvent",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxKeyEvent *)new_wxKeyEvent(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxKeyEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxKeyEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) +static PyObject *_wrap_wxKeyEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_ControlDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ControlDown. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_ControlDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) +static PyObject *_wrap_wxKeyEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_MetaDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_MetaDown. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_MetaDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_AltDown(_swigobj) (_swigobj->AltDown()) +static PyObject *_wrap_wxKeyEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_AltDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_AltDown. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_AltDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) +static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_ShiftDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ShiftDown. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_ShiftDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_KeyCode(_swigobj) (_swigobj->KeyCode()) +static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_KeyCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_KeyCode. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_KeyCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) +static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetKeyCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetKeyCode. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_GetKeyCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_HasModifiers(_swigobj) (_swigobj->HasModifiers()) +static PyObject *_wrap_wxKeyEvent_HasModifiers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_HasModifiers",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_HasModifiers. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_HasModifiers(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_GetX(_swigobj) (_swigobj->GetX()) +static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetX",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetX. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_GetX(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_GetY(_swigobj) (_swigobj->GetY()) +static PyObject *_wrap_wxKeyEvent_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetY",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetY. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_GetY(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxKeyEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetPosition. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxKeyEvent_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxKeyEvent_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxKeyEvent_GetPositionTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxKeyEvent * _arg0; + long * _arg1; + long temp; + long * _arg2; + long temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetPositionTuple",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetPositionTuple. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxKeyEvent_GetPositionTuple(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxKeyEvent_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_x_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_x_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_x_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_x_get(_swigobj) ((long ) _swigobj->m_x) +static PyObject *_wrap_wxKeyEvent_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_x_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_x_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_x_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_y_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_y_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_y_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_y_get(_swigobj) ((long ) _swigobj->m_y) +static PyObject *_wrap_wxKeyEvent_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_y_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_y_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_y_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_keyCode_set(_swigobj,_swigval) (_swigobj->m_keyCode = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_keyCode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_keyCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_keyCode_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_keyCode_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_keyCode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_keyCode_get(_swigobj) ((long ) _swigobj->m_keyCode) +static PyObject *_wrap_wxKeyEvent_m_keyCode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_keyCode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_keyCode_get. Expected _wxKeyEvent_p."); + return NULL; + } + } { - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_keyCode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; } + +#define wxKeyEvent_m_controlDown_set(_swigobj,_swigval) (_swigobj->m_controlDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_controlDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_controlDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_controlDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_controlDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; { - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_controlDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_controlDown_get(_swigobj) ((bool ) _swigobj->m_controlDown) +static PyObject *_wrap_wxKeyEvent_m_controlDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_controlDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_controlDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_controlDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_shiftDown_set(_swigobj,_swigval) (_swigobj->m_shiftDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_shiftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_shiftDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_shiftDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_shiftDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_shiftDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_shiftDown_get(_swigobj) ((bool ) _swigobj->m_shiftDown) +static PyObject *_wrap_wxKeyEvent_m_shiftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_shiftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_shiftDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_shiftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_altDown_set(_swigobj,_swigval) (_swigobj->m_altDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_altDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_altDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_altDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_altDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_altDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_altDown_get(_swigobj) ((bool ) _swigobj->m_altDown) +static PyObject *_wrap_wxKeyEvent_m_altDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_altDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_altDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_altDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_metaDown_set(_swigobj,_swigval) (_swigobj->m_metaDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_metaDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_metaDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_metaDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_metaDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_metaDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_metaDown_get(_swigobj) ((bool ) _swigobj->m_metaDown) +static PyObject *_wrap_wxKeyEvent_m_metaDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_metaDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_metaDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_metaDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_scanCode_set(_swigobj,_swigval) (_swigobj->m_scanCode = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_scanCode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_scanCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_scanCode_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_scanCode_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_scanCode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; } + +#define wxKeyEvent_m_scanCode_get(_swigobj) ((bool ) _swigobj->m_scanCode) +static PyObject *_wrap_wxKeyEvent_m_scanCode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_scanCode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_scanCode_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_scanCode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -5155,6 +6114,22 @@ static PyMethodDef eventscMethods[] = { { "wxNavigationKeyEvent_SetDirection", (PyCFunction) _wrap_wxNavigationKeyEvent_SetDirection, METH_VARARGS | METH_KEYWORDS }, { "wxNavigationKeyEvent_GetDirection", (PyCFunction) _wrap_wxNavigationKeyEvent_GetDirection, METH_VARARGS | METH_KEYWORDS }, { "new_wxNavigationKeyEvent", (PyCFunction) _wrap_new_wxNavigationKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_scanCode_get", (PyCFunction) _wrap_wxKeyEvent_m_scanCode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_scanCode_set", (PyCFunction) _wrap_wxKeyEvent_m_scanCode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_metaDown_get", (PyCFunction) _wrap_wxKeyEvent_m_metaDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_metaDown_set", (PyCFunction) _wrap_wxKeyEvent_m_metaDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_altDown_get", (PyCFunction) _wrap_wxKeyEvent_m_altDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_altDown_set", (PyCFunction) _wrap_wxKeyEvent_m_altDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_shiftDown_get", (PyCFunction) _wrap_wxKeyEvent_m_shiftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_shiftDown_set", (PyCFunction) _wrap_wxKeyEvent_m_shiftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_controlDown_get", (PyCFunction) _wrap_wxKeyEvent_m_controlDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_controlDown_set", (PyCFunction) _wrap_wxKeyEvent_m_controlDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_keyCode_get", (PyCFunction) _wrap_wxKeyEvent_m_keyCode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_keyCode_set", (PyCFunction) _wrap_wxKeyEvent_m_keyCode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_y_get", (PyCFunction) _wrap_wxKeyEvent_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_y_set", (PyCFunction) _wrap_wxKeyEvent_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_x_get", (PyCFunction) _wrap_wxKeyEvent_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_x_set", (PyCFunction) _wrap_wxKeyEvent_m_x_set, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetPositionTuple", (PyCFunction) _wrap_wxKeyEvent_GetPositionTuple, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetPosition", (PyCFunction) _wrap_wxKeyEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetY", (PyCFunction) _wrap_wxKeyEvent_GetY, METH_VARARGS | METH_KEYWORDS }, @@ -5167,6 +6142,24 @@ static PyMethodDef eventscMethods[] = { { "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_ControlDown", (PyCFunction) _wrap_wxKeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, { "new_wxKeyEvent", (PyCFunction) _wrap_new_wxKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_metaDown_get", (PyCFunction) _wrap_wxMouseEvent_m_metaDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_metaDown_set", (PyCFunction) _wrap_wxMouseEvent_m_metaDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_altDown_get", (PyCFunction) _wrap_wxMouseEvent_m_altDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_altDown_set", (PyCFunction) _wrap_wxMouseEvent_m_altDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_shiftDown_get", (PyCFunction) _wrap_wxMouseEvent_m_shiftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_shiftDown_set", (PyCFunction) _wrap_wxMouseEvent_m_shiftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_controlDown_get", (PyCFunction) _wrap_wxMouseEvent_m_controlDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_controlDown_set", (PyCFunction) _wrap_wxMouseEvent_m_controlDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_rightDown_get", (PyCFunction) _wrap_wxMouseEvent_m_rightDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_rightDown_set", (PyCFunction) _wrap_wxMouseEvent_m_rightDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_middleDown_get", (PyCFunction) _wrap_wxMouseEvent_m_middleDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_middleDown_set", (PyCFunction) _wrap_wxMouseEvent_m_middleDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_leftDown_get", (PyCFunction) _wrap_wxMouseEvent_m_leftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_leftDown_set", (PyCFunction) _wrap_wxMouseEvent_m_leftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_y_get", (PyCFunction) _wrap_wxMouseEvent_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_y_set", (PyCFunction) _wrap_wxMouseEvent_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_x_get", (PyCFunction) _wrap_wxMouseEvent_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_x_set", (PyCFunction) _wrap_wxMouseEvent_m_x_set, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetY", (PyCFunction) _wrap_wxMouseEvent_GetY, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetX", (PyCFunction) _wrap_wxMouseEvent_GetX, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetLogicalPosition", (PyCFunction) _wrap_wxMouseEvent_GetLogicalPosition, METH_VARARGS | METH_KEYWORDS }, @@ -5325,6 +6318,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, @@ -5343,6 +6337,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -5364,6 +6359,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -5517,6 +6513,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -5534,6 +6531,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -5543,6 +6541,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -5553,6 +6552,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, @@ -5573,6 +6579,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, diff --git a/wxPython/src/gtk/events.py b/wxPython/src/gtk/events.py index bea61f2861..4a44a50011 100644 --- a/wxPython/src/gtk/events.py +++ b/wxPython/src/gtk/events.py @@ -298,6 +298,55 @@ class wxMouseEventPtr(wxEventPtr): def GetY(self, *_args, **_kwargs): val = apply(eventsc.wxMouseEvent_GetY,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxMouseEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxMouseEvent_m_y_set(self,value) + return + if name == "m_leftDown" : + eventsc.wxMouseEvent_m_leftDown_set(self,value) + return + if name == "m_middleDown" : + eventsc.wxMouseEvent_m_middleDown_set(self,value) + return + if name == "m_rightDown" : + eventsc.wxMouseEvent_m_rightDown_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxMouseEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxMouseEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxMouseEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxMouseEvent_m_metaDown_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxMouseEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxMouseEvent_m_y_get(self) + if name == "m_leftDown" : + return eventsc.wxMouseEvent_m_leftDown_get(self) + if name == "m_middleDown" : + return eventsc.wxMouseEvent_m_middleDown_get(self) + if name == "m_rightDown" : + return eventsc.wxMouseEvent_m_rightDown_get(self) + if name == "m_controlDown" : + return eventsc.wxMouseEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxMouseEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxMouseEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxMouseEvent_m_metaDown_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxMouseEvent(wxMouseEventPtr): @@ -346,6 +395,50 @@ class wxKeyEventPtr(wxEventPtr): def GetPositionTuple(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_GetPositionTuple,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxKeyEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxKeyEvent_m_y_set(self,value) + return + if name == "m_keyCode" : + eventsc.wxKeyEvent_m_keyCode_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxKeyEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxKeyEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxKeyEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxKeyEvent_m_metaDown_set(self,value) + return + if name == "m_scanCode" : + eventsc.wxKeyEvent_m_scanCode_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxKeyEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxKeyEvent_m_y_get(self) + if name == "m_keyCode" : + return eventsc.wxKeyEvent_m_keyCode_get(self) + if name == "m_controlDown" : + return eventsc.wxKeyEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxKeyEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxKeyEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxKeyEvent_m_metaDown_get(self) + if name == "m_scanCode" : + return eventsc.wxKeyEvent_m_scanCode_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxKeyEvent(wxKeyEventPtr): diff --git a/wxPython/src/gtk/filesys.cpp b/wxPython/src/gtk/filesys.cpp new file mode 100644 index 0000000000..acc2ec86a1 --- /dev/null +++ b/wxPython/src/gtk/filesys.cpp @@ -0,0 +1,2149 @@ +/* + * FILE : src/gtk/filesys.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 810) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initfilesysc + +#define SWIG_name "filesysc" + +#include "helpers.h" +#include +#include +#include +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + +// wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling +// the callback functions +class wxPyFileSystemHandler : public wxFileSystemHandler { +public: + wxPyFileSystemHandler() : wxFileSystemHandler() {} + + DEC_PYCALLBACK_BOOL_STRING_pure(CanOpen); + DEC_PYCALLBACK_FSF_FSSTRING_pure(OpenFile); + DEC_PYCALLBACK_STRING_STRINGINT_pure(FindFirst); + DEC_PYCALLBACK_STRING__pure(FindNext); + + wxString GetProtocol(const wxString& location) { + return wxFileSystemHandler::GetProtocol(location); + } + + wxString GetLeftLocation(const wxString& location) { + return wxFileSystemHandler::GetLeftLocation(location); + } + + wxString GetAnchor(const wxString& location) { + return wxFileSystemHandler::GetAnchor(location); + } + + wxString GetRightLocation(const wxString& location) { + return wxFileSystemHandler::GetRightLocation(location); + } + + wxString GetMimeTypeFromExt(const wxString& location){ + return wxFileSystemHandler::GetMimeTypeFromExt(location); + } + + PYPRIVATE; +}; + + +IMP_PYCALLBACK_BOOL_STRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, CanOpen); +IMP_PYCALLBACK_FSF_FSSTRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, OpenFile); +IMP_PYCALLBACK_STRING_STRINGINT_pure(wxPyFileSystemHandler, wxFileSystemHandler, FindFirst); +IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext); + +void __wxMemoryFSHandler_AddFile_wxImage(const wxString& filename, + wxImage& image, + long type) { + wxMemoryFSHandler::AddFile(filename, image, type); +} + +void __wxMemoryFSHandler_AddFile_wxBitmap(const wxString& filename, + const wxBitmap& bitmap, + long type) { + wxMemoryFSHandler::AddFile(filename, bitmap, type); +} + +// void __wxMemoryFSHandler_AddFile_wxString(const wxString& filename, +// const wxString& textdata) { +// wxMemoryFSHandler::AddFile(filename, textdata); +// } + +void __wxMemoryFSHandler_AddFile_Data(const wxString& filename, + PyObject* data) { + + wxMemoryFSHandler::AddFile(filename, + (void*)PyString_AsString(data), + (size_t)PyString_Size(data)); +} +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxImage * _arg1; + long _arg2; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","image","type", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxImage",_kwnames,&_obj0,&_argo1,&_arg2)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxImage. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_wxImage(*_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxBitmap * _arg1; + long _arg2; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","bitmap","type", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxBitmap",_kwnames,&_obj0,&_argo1,&_arg2)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxBitmap. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_wxBitmap(*_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _arg1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "filename","data", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:__wxMemoryFSHandler_AddFile_Data",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_Data(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define new_wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxInputStream * _arg0; + wxString * _arg1; + wxString * _arg2; + wxString * _arg3; + wxDateTime * _arg4; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + PyObject * _argo4 = 0; + char *_kwnames[] = { "stream","loc","mimetype","anchor","modif", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOO:new_wxFSFile",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_argo4)) + return NULL; +{ + if (PyInstance_Check(_obj0)) { + wxPyInputStream* ptr; + if (SWIG_GetPtrObj(_obj0, (void **) &ptr,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } + _arg0 = ptr->wxi; + } else { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } +} +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); +} + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxFSFile. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)new_wxFSFile(_arg0,*_arg1,*_arg2,*_arg3,*_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxFSFile_GetStream(_swigobj) (_swigobj->GetStream()) +static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetStream. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxFSFile_GetStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject_SetAttrString(_resultobj, "thisown", PyInt_FromLong(1)); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxFSFile_GetMimeType(_swigobj) (_swigobj->GetMimeType()) +static PyObject *_wrap_wxFSFile_GetMimeType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetMimeType",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetMimeType. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetMimeType(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetLocation(_swigobj) (_swigobj->GetLocation()) +static PyObject *_wrap_wxFSFile_GetLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetLocation",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetLocation. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetLocation(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetAnchor(_swigobj) (_swigobj->GetAnchor()) +static PyObject *_wrap_wxFSFile_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetAnchor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetAnchor. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetAnchor(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetModificationTime(_swigobj) (_swigobj->GetModificationTime()) +static PyObject *_wrap_wxFSFile_GetModificationTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetModificationTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetModificationTime. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxFSFile_GetModificationTime(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static void *SwigwxPyFileSystemHandlerTowxFileSystemHandler(void *ptr) { + wxPyFileSystemHandler *src; + wxFileSystemHandler *dest; + src = (wxPyFileSystemHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxFileSystemHandler() (new wxPyFileSystemHandler()) +static PyObject *_wrap_new_wxFileSystemHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFileSystemHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFileSystemHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyFileSystemHandler *)new_wxFileSystemHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyFileSystemHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFileSystemHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFileSystemHandler * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler__setSelf. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystemHandler__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFileSystemHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_CanOpen. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFileSystemHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystemHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxPyFileSystemHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_OpenFile. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileSystemHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxFileSystemHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystemHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_FindFirst. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxFileSystemHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystemHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_FindNext. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetProtocol(_swigobj,_swigarg0) (_swigobj->GetProtocol(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetProtocol",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetProtocol. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetProtocol(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetLeftLocation(_swigobj,_swigarg0) (_swigobj->GetLeftLocation(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetLeftLocation",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetLeftLocation. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetLeftLocation(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetAnchor(_swigobj,_swigarg0) (_swigobj->GetAnchor(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetAnchor",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetAnchor. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetAnchor(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetRightLocation(_swigobj,_swigarg0) (_swigobj->GetRightLocation(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetRightLocation",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetRightLocation. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetRightLocation(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetMimeTypeFromExt(_swigobj,_swigarg0) (_swigobj->GetMimeTypeFromExt(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetMimeTypeFromExt",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetMimeTypeFromExt. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetMimeTypeFromExt(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define new_wxFileSystem() (new wxFileSystem()) +static PyObject *_wrap_new_wxFileSystem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystem * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFileSystem",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileSystem *)new_wxFileSystem(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileSystem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFileSystem_ChangePathTo(_swigobj,_swigarg0,_swigarg1) (_swigobj->ChangePathTo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystem_ChangePathTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystem * _arg0; + wxString * _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","location","is_dir", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystem_ChangePathTo",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_ChangePathTo. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem_ChangePathTo(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystem_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxFileSystem_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_GetPath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_GetPath. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_GetPath(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystem_OpenFile(_swigobj,_swigarg0) (_swigobj->OpenFile(_swigarg0)) +static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxFileSystem * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystem_OpenFile",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystem_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystem_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_FindFirst. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystem_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxFileSystem_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_FindNext. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxFileSystem_AddHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystemHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "handler", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_AddHandler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_AddHandler. Expected _wxFileSystemHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem::AddHandler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxFileSystem_CleanUpHandlers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFileSystem_CleanUpHandlers",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem::CleanUpHandlers(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxInternetFSHandlerTowxFileSystemHandler(void *ptr) { + wxInternetFSHandler *src; + wxFileSystemHandler *dest; + src = (wxInternetFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxInternetFSHandler() (new wxInternetFSHandler()) +static PyObject *_wrap_new_wxInternetFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInternetFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxInternetFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInternetFSHandler *)new_wxInternetFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxInternetFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxInternetFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxInternetFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxInternetFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxInternetFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxInternetFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInternetFSHandler_CanOpen. Expected _wxInternetFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxInternetFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxInternetFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxInternetFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxInternetFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxInternetFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInternetFSHandler_OpenFile. Expected _wxInternetFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxInternetFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +static void *SwigwxZipFSHandlerTowxFileSystemHandler(void *ptr) { + wxZipFSHandler *src; + wxFileSystemHandler *dest; + src = (wxZipFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxZipFSHandler() (new wxZipFSHandler()) +static PyObject *_wrap_new_wxZipFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxZipFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxZipFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxZipFSHandler *)new_wxZipFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxZipFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxZipFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxZipFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxZipFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxZipFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_CanOpen. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxZipFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxZipFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxZipFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxZipFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_OpenFile. Expected _wxZipFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxZipFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxZipFSHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxZipFSHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxZipFSHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_FindFirst. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxZipFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxZipFSHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxZipFSHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxZipFSHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxZipFSHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_FindNext. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxZipFSHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static void *SwigwxMemoryFSHandlerTowxFileSystemHandler(void *ptr) { + wxMemoryFSHandler *src; + wxFileSystemHandler *dest; + src = (wxMemoryFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxMemoryFSHandler() (new wxMemoryFSHandler()) +static PyObject *_wrap_new_wxMemoryFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMemoryFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMemoryFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMemoryFSHandler *)new_wxMemoryFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxMemoryFSHandler_RemoveFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "filename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_RemoveFile",_kwnames,&_obj0)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMemoryFSHandler::RemoveFile(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define wxMemoryFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxMemoryFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMemoryFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMemoryFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_CanOpen. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMemoryFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxMemoryFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxMemoryFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxMemoryFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_OpenFile. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxMemoryFSHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxMemoryFSHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxMemoryFSHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_FindFirst. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxMemoryFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxMemoryFSHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxMemoryFSHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxMemoryFSHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_FindNext. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxMemoryFSHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyMethodDef filesyscMethods[] = { + { "wxMemoryFSHandler_FindNext", (PyCFunction) _wrap_wxMemoryFSHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_FindFirst", (PyCFunction) _wrap_wxMemoryFSHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_OpenFile", (PyCFunction) _wrap_wxMemoryFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_CanOpen", (PyCFunction) _wrap_wxMemoryFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_RemoveFile", (PyCFunction) _wrap_wxMemoryFSHandler_RemoveFile, METH_VARARGS | METH_KEYWORDS }, + { "new_wxMemoryFSHandler", (PyCFunction) _wrap_new_wxMemoryFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_FindNext", (PyCFunction) _wrap_wxZipFSHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_FindFirst", (PyCFunction) _wrap_wxZipFSHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_OpenFile", (PyCFunction) _wrap_wxZipFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_CanOpen", (PyCFunction) _wrap_wxZipFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "new_wxZipFSHandler", (PyCFunction) _wrap_new_wxZipFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxInternetFSHandler_OpenFile", (PyCFunction) _wrap_wxInternetFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxInternetFSHandler_CanOpen", (PyCFunction) _wrap_wxInternetFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "new_wxInternetFSHandler", (PyCFunction) _wrap_new_wxInternetFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_CleanUpHandlers", (PyCFunction) _wrap_wxFileSystem_CleanUpHandlers, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_AddHandler", (PyCFunction) _wrap_wxFileSystem_AddHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_FindNext", (PyCFunction) _wrap_wxFileSystem_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_FindFirst", (PyCFunction) _wrap_wxFileSystem_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_OpenFile", (PyCFunction) _wrap_wxFileSystem_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_GetPath", (PyCFunction) _wrap_wxFileSystem_GetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_ChangePathTo", (PyCFunction) _wrap_wxFileSystem_ChangePathTo, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileSystem", (PyCFunction) _wrap_new_wxFileSystem, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetMimeTypeFromExt", (PyCFunction) _wrap_wxFileSystemHandler_GetMimeTypeFromExt, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetRightLocation", (PyCFunction) _wrap_wxFileSystemHandler_GetRightLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetAnchor", (PyCFunction) _wrap_wxFileSystemHandler_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetLeftLocation", (PyCFunction) _wrap_wxFileSystemHandler_GetLeftLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetProtocol", (PyCFunction) _wrap_wxFileSystemHandler_GetProtocol, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_FindNext", (PyCFunction) _wrap_wxFileSystemHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_FindFirst", (PyCFunction) _wrap_wxFileSystemHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_OpenFile", (PyCFunction) _wrap_wxFileSystemHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_CanOpen", (PyCFunction) _wrap_wxFileSystemHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler__setSelf", (PyCFunction) _wrap_wxFileSystemHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileSystemHandler", (PyCFunction) _wrap_new_wxFileSystemHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetModificationTime", (PyCFunction) _wrap_wxFSFile_GetModificationTime, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetAnchor", (PyCFunction) _wrap_wxFSFile_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetLocation", (PyCFunction) _wrap_wxFSFile_GetLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetMimeType", (PyCFunction) _wrap_wxFSFile_GetMimeType, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetStream", (PyCFunction) _wrap_wxFSFile_GetStream, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFSFile", (PyCFunction) _wrap_new_wxFSFile, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_Data", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_Data, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_wxBitmap", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxBitmap, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_wxImage", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxImage, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, + { "_signed_long","_long",0}, + { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, + { "_wxBMPHandler","_class_wxBMPHandler",0}, + { "_wxImage","_class_wxImage",0}, + { "_class_wxDateTime","_wxDateTime",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxRegionIterator","_wxRegionIterator",0}, + { "_wxGIFHandler","_class_wxGIFHandler",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, + { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, + { "_wxCursor","_class_wxCursor",0}, + { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxMask","_class_wxMask",0}, + { "_wxPNGHandler","_class_wxPNGHandler",0}, + { "_wxPen","_class_wxPen",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_wxImageList","_class_wxImageList",0}, + { "_class_wxTIFFHandler","_wxTIFFHandler",0}, + { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_wxDC","_class_wxDC",0}, + { "_class_wxBMPHandler","_wxBMPHandler",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_class_wxRealPoint","_wxRealPoint",0}, + { "_wxPNMHandler","_class_wxPNMHandler",0}, + { "_class_wxGIFHandler","_wxGIFHandler",0}, + { "_class_wxPostScriptDC","_wxPostScriptDC",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, + { "_class_wxMask","_wxMask",0}, + { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxColour","_class_wxColour",0}, + { "_wxBrush","_class_wxBrush",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_wxRect","_class_wxRect",0}, + { "_class_wxImage","_wxImage",0}, + { "_wxPoint","_class_wxPoint",0}, + { "_class_wxPNMHandler","_wxPNMHandler",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, + { "_char","_wxChar",0}, + { "_wxBitmap","_class_wxBitmap",0}, + { "_wxWindowDC","_class_wxWindowDC",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, + { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_wxConfig","_class_wxConfig",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_class_wxRegion","_wxRegion",0}, + { "_wxFont","_class_wxFont",0}, + { "_wxFSFile","_class_wxFSFile",0}, + { "_unsigned_long","_long",0}, + { "_class_wxRect","_wxRect",0}, + { "_class_wxDC","_wxDC",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxScreenDC","_class_wxScreenDC",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, + { "_class_wxFont","_wxFont",0}, + { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxClientDC","_class_wxClientDC",0}, + { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, + { "_wxRealPoint","_class_wxRealPoint",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_wxMemoryDC","_class_wxMemoryDC",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, + { "_wxPaintDC","_class_wxPaintDC",0}, + { "_class_wxWindowDC","_wxWindowDC",0}, + { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, + { "_class_wxCursor","_wxCursor",0}, + { "_wxPostScriptDC","_class_wxPostScriptDC",0}, + { "_class_wxImageHandler","_wxImageHandler",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_wxIcon","_class_wxIcon",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_class_wxPen","_wxPen",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_class_wxImageList","_wxImageList",0}, + { "_wxFileSystemHandler","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, + { "_wxPCXHandler","_class_wxPCXHandler",0}, + { "_wxJPEGHandler","_class_wxJPEGHandler",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_wxSize","_class_wxSize",0}, + { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, + { "_class_wxPaintDC","_wxPaintDC",0}, + { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, + { "_class_wxIcon","_wxIcon",0}, + { "_class_wxColour","_wxColour",0}, + { "_class_wxScreenDC","_wxScreenDC",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, + { "_wxPalette","_class_wxPalette",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxRegion","_class_wxRegion",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, + { "_class_wxPCXHandler","_wxPCXHandler",0}, + { "_wxTIFFHandler","_class_wxTIFFHandler",0}, + { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxClientDC","_wxClientDC",0}, + { "_class_wxSize","_wxSize",0}, + { "_class_wxBitmap","_wxBitmap",0}, + { "_class_wxMemoryDC","_wxMemoryDC",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, + { "_class_wxConfig","_wxConfig",0}, + { "_class_wxPalette","_wxPalette",0}, + { "_class_wxFileSystemHandler","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initfilesysc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("filesysc", filesyscMethods); + d = PyModule_GetDict(m); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/gtk/filesys.py b/wxPython/src/gtk/filesys.py new file mode 100644 index 0000000000..b0f442faea --- /dev/null +++ b/wxPython/src/gtk/filesys.py @@ -0,0 +1,240 @@ +# This file was created automatically by SWIG. +import filesysc + +from utils import * + +from image import * + +from misc import * + +from gdi import * + +from streams import * +import wx +import string + +import types +def wxMemoryFSHandler_AddFile(filename, a, b=''): + if isinstance(a, wxImage): + __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) + elif isinstance(a, wxBitmap): + __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) + elif type(a) == types.StringType: + #__wxMemoryFSHandler_AddFile_wxString(filename, a) + __wxMemoryFSHandler_AddFile_Data(filename, a) + else: raise TypeError, 'wxImage, wxBitmap or string expected' + +class wxFSFilePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetStream(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetStream,(self,) + _args, _kwargs) + return val + def GetMimeType(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetMimeType,(self,) + _args, _kwargs) + return val + def GetLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetLocation,(self,) + _args, _kwargs) + return val + def GetAnchor(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetAnchor,(self,) + _args, _kwargs) + return val + def GetModificationTime(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetModificationTime,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __repr__(self): + return "" % (self.this,) +class wxFSFile(wxFSFilePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFSFile,_args,_kwargs) + self.thisown = 1 + + + + +class wxCPPFileSystemHandlerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxCPPFileSystemHandler(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + + + + +class wxFileSystemHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler__setSelf,(self,) + _args, _kwargs) + return val + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_FindNext,(self,) + _args, _kwargs) + return val + def GetProtocol(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetProtocol,(self,) + _args, _kwargs) + return val + def GetLeftLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetLeftLocation,(self,) + _args, _kwargs) + return val + def GetAnchor(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetAnchor,(self,) + _args, _kwargs) + return val + def GetRightLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetRightLocation,(self,) + _args, _kwargs) + return val + def GetMimeTypeFromExt(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetMimeTypeFromExt,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFileSystemHandler(wxFileSystemHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFileSystemHandler,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxFileSystemHandler) + + + + +class wxFileSystemPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def ChangePathTo(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_ChangePathTo,(self,) + _args, _kwargs) + return val + def GetPath(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_GetPath,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFileSystem(wxFileSystemPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFileSystem,_args,_kwargs) + self.thisown = 1 + + + + +class wxInternetFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxInternetFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxInternetFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxInternetFSHandler(wxInternetFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxInternetFSHandler,_args,_kwargs) + self.thisown = 1 + + + + +class wxZipFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxZipFSHandler(wxZipFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxZipFSHandler,_args,_kwargs) + self.thisown = 1 + + + + +class wxMemoryFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxMemoryFSHandler(wxMemoryFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxMemoryFSHandler,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +__wxMemoryFSHandler_AddFile_wxImage = filesysc.__wxMemoryFSHandler_AddFile_wxImage + +__wxMemoryFSHandler_AddFile_wxBitmap = filesysc.__wxMemoryFSHandler_AddFile_wxBitmap + +__wxMemoryFSHandler_AddFile_Data = filesysc.__wxMemoryFSHandler_AddFile_Data + +wxFileSystem_AddHandler = filesysc.wxFileSystem_AddHandler + +wxFileSystem_CleanUpHandlers = filesysc.wxFileSystem_CleanUpHandlers + +wxMemoryFSHandler_RemoveFile = filesysc.wxMemoryFSHandler_RemoveFile + + + +#-------------- VARIABLE WRAPPERS ------------------ + diff --git a/wxPython/src/gtk/frames.cpp b/wxPython/src/gtk/frames.cpp index 499118ba6a..fb1fb62c6a 100644 --- a/wxPython/src/gtk/frames.cpp +++ b/wxPython/src/gtk/frames.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1173,6 +1173,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -1212,6 +1213,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1247,6 +1249,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1367,6 +1370,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1392,6 +1396,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1401,6 +1406,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1411,6 +1417,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -1440,6 +1453,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index e46c1a0c3f..56516cfcc0 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -62,13 +63,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -85,23 +85,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -7476,6 +7476,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, @@ -7501,6 +7502,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDC","_class_wxDC",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -7512,6 +7514,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBrush","_class_wxBrush",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -7575,6 +7578,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -7587,6 +7591,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -7595,12 +7600,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPaintDC","_wxPaintDC",0}, @@ -7616,6 +7629,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, diff --git a/wxPython/src/gtk/grid.cpp b/wxPython/src/gtk/grid.cpp index fba92308fd..fc7ac4a285 100644 --- a/wxPython/src/gtk/grid.cpp +++ b/wxPython/src/gtk/grid.cpp @@ -1,5 +1,5 @@ /* - * FILE : gtk/grid.cpp + * FILE : src/gtk/grid.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -595,7 +595,7 @@ public: } - wxGridCellEditor *Clone() const { + wxGridCellEditor*Clone() const { wxGridCellEditor* rval = NULL; bool doSave = wxPyRestoreThread(); if (m_myInst.findCallback("Clone")) { @@ -10936,7 +10936,7 @@ static PyObject *_wrap_wxGrid_SelectCol(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxGrid_SelectBlock(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SelectBlock(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +#define wxGrid_SelectBlock(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SelectBlock(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGrid * _arg0; @@ -10944,11 +10944,13 @@ static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObje int _arg2; int _arg3; int _arg4; + bool _arg5 = (bool ) FALSE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","topRow","leftCol","bottomRow","rightCol", NULL }; + int tempbool5 = (int) FALSE; + char *_kwnames[] = { "self","topRow","leftCol","bottomRow","rightCol","addToSelected", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxGrid_SelectBlock",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|i:wxGrid_SelectBlock",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10957,9 +10959,10 @@ static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObje return NULL; } } + _arg5 = (bool ) tempbool5; { wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4); + wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -12826,6 +12829,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -12877,6 +12881,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_WXGRIDSELECTIONMODES",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -12916,6 +12921,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_uint","_WXGRIDSELECTIONMODES",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -13013,6 +13019,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_WXGRIDSELECTIONMODES","_uint",0}, { "_WXGRIDSELECTIONMODES","_EBool",0}, { "_WXGRIDSELECTIONMODES","_size_t",0}, + { "_WXGRIDSELECTIONMODES","_time_t",0}, { "_WXGRIDSELECTIONMODES","_wxPrintQuality",0}, { "_WXGRIDSELECTIONMODES","_wxCoord",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, @@ -13117,6 +13124,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_int","_WXGRIDSELECTIONMODES",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -13143,6 +13151,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_WXGRIDSELECTIONMODES",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -13153,6 +13162,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_WXGRIDSELECTIONMODES",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -13163,6 +13173,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_WXGRIDSELECTIONMODES",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -13208,6 +13226,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp index 9e2c612869..089b770317 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/html.cpp @@ -1,5 +1,5 @@ /* - * FILE : gtk/html.cpp + * FILE : src/gtk/html.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -65,13 +66,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -88,23 +88,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -5651,13 +5651,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxHtmlParser","_wxHtmlParser",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, @@ -5667,7 +5670,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_HtmlHistoryItem","_HtmlHistoryItem",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -5682,12 +5687,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, { "_wxHtmlWidgetCell","_class_wxHtmlWidgetCell",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, @@ -5740,6 +5748,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -5748,6 +5757,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -5795,6 +5805,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -5807,14 +5818,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_wxHtmlCell","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, { "_wxHtmlCell","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, { "_wxHtmlCell","_class_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, @@ -5832,6 +5847,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, @@ -5854,6 +5870,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, { "_wxPyHtmlTagHandler","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, { "_wxPyHtmlTagHandler","_class_wxPyHtmlTagHandler",0}, @@ -5873,7 +5890,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -5881,9 +5900,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_wxHtmlWinParser","_class_wxHtmlWinParser",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, @@ -5938,6 +5960,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, { "_class_wxWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, @@ -5957,6 +5980,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -5973,6 +5997,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, @@ -5982,11 +6007,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCursor","_wxCursor",0}, { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_class_wxHtmlTag","_wxHtmlTag",0}, { "_wxScrolledWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, { "_wxScrolledWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMenu","_wxMenu",0}, @@ -5994,6 +6021,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -6021,6 +6049,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_class_wxHtmlContainerCell","_wxHtmlContainerCell",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, @@ -6031,6 +6060,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -6041,6 +6071,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -6049,6 +6080,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, { "_wxDateTime_t","_unsigned_short",0}, @@ -6058,16 +6090,28 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, { "_wxDateTime","_class_wxDateTime",0}, { "_wxPyHtmlWinTagHandler","_class_wxPyHtmlWinTagHandler",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_wxHtmlDCRenderer","_class_wxHtmlDCRenderer",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -6096,6 +6140,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -6103,11 +6148,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -6126,12 +6173,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxPyHtmlWinTagHandler","_wxPyHtmlWinTagHandler",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_HtmlHistoryItem","_class_HtmlHistoryItem",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxEvtHandler}, @@ -6168,6 +6217,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; @@ -6206,16 +6258,9 @@ SWIGEXPORT(void) inithtmlc() { inithtmlhelpc(); - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); + //wxClassInfo::CleanUpClasses(); + //wxClassInfo::InitializeClasses(); - // Until wxFileSystem is wrapped... - #if wxUSE_FS_ZIP - wxFileSystem::AddHandler(new wxZipFSHandler); - #endif - #if wxUSE_FS_INET -// wxFileSystem::AddHandler(new wxInternetFSHandler); - #endif { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index ebda9bbf3b..f8795bcd53 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * import wx class wxHtmlLinkInfoPtr : def __init__(self,this): @@ -112,6 +118,7 @@ class wxHtmlParserPtr : return val def GetFS(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_GetFS,(self,) + _args, _kwargs) + if val: val = wxFileSystemPtr(val) return val def Parse(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_Parse,(self,) + _args, _kwargs) diff --git a/wxPython/src/gtk/htmlhelp.cpp b/wxPython/src/gtk/htmlhelp.cpp index 0477be1b66..5983fa8ca8 100644 --- a/wxPython/src/gtk/htmlhelp.cpp +++ b/wxPython/src/gtk/htmlhelp.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -63,13 +64,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -86,23 +86,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2658,7 +2658,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_HtmlHistoryItem","_HtmlHistoryItem",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -2682,6 +2684,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, { "_wxHtmlWidgetCell","_class_wxHtmlWidgetCell",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, @@ -2733,6 +2736,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2741,6 +2745,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -2784,6 +2789,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -2796,11 +2802,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, @@ -2867,6 +2875,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxHtmlWinParser","_class_wxHtmlWinParser",0}, { "_wxHtmlSearchStatus","_class_wxHtmlSearchStatus",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, @@ -2919,6 +2928,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, { "_class_wxWindow","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, @@ -2963,6 +2973,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxHtmlTag","_wxHtmlTag",0}, { "_class_wxHtmlBookRecord","_wxHtmlBookRecord",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMenu","_wxMenu",0}, @@ -2970,6 +2981,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3011,6 +3023,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3021,6 +3034,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3029,6 +3043,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, { "_wxDateTime_t","_unsigned_short",0}, @@ -3038,12 +3053,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, { "_wxDateTime","_class_wxDateTime",0}, { "_wxPyHtmlWinTagHandler","_class_wxPyHtmlWinTagHandler",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, @@ -3076,6 +3101,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -3105,6 +3131,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxPyHtmlWinTagHandler","_wxPyHtmlWinTagHandler",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_HtmlHistoryItem","_class_HtmlHistoryItem",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, @@ -3147,6 +3174,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, { "_class_wxFrame","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, { "_class_wxFrame","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, { "_class_wxFrame","_wxFrame",0}, diff --git a/wxPython/src/gtk/image.cpp b/wxPython/src/gtk/image.cpp index 1bd6f294cc..e57b186136 100644 --- a/wxPython/src/gtk/image.cpp +++ b/wxPython/src/gtk/image.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2014,6 +2014,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, @@ -2046,6 +2047,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2060,6 +2062,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBrush","_class_wxBrush",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -2128,6 +2131,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2142,6 +2146,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -2150,12 +2155,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPaintDC","_wxPaintDC",0}, @@ -2171,6 +2184,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, diff --git a/wxPython/src/gtk/mdi.cpp b/wxPython/src/gtk/mdi.cpp index 0e8fb7a797..793cb50ff4 100644 --- a/wxPython/src/gtk/mdi.cpp +++ b/wxPython/src/gtk/mdi.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,13 +58,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -80,23 +80,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -702,6 +702,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -743,6 +744,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -778,6 +780,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -904,6 +907,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -931,6 +935,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -940,6 +945,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -950,6 +956,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -980,6 +993,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index 7eae08658b..d08ad0f767 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -1,5 +1,5 @@ /* - * FILE : gtk/misc.cpp + * FILE : src/gtk/misc.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,13 +61,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -83,23 +83,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -318,37 +318,6 @@ static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args, PyObject return _resultobj; } -static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxString * _arg0; - int _arg1 = (int ) FALSE; - PyObject * _obj0 = 0; - char *_kwnames[] = { "command","sync", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxExecute",_kwnames,&_obj0,&_arg1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxExecute(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - static PyObject *_wrap_wxGetElapsedTime(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; long _result; @@ -530,6 +499,28 @@ static PyObject *_wrap_wxGetOsVersion(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetOsDescription",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetOsDescription()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _arg0; @@ -548,34 +539,35 @@ static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxUsleep(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - char *_kwnames[] = { NULL }; + unsigned long _arg0; + char *_kwnames[] = { "milliseconds", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxYield",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxUsleep",_kwnames,&_arg0)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxYield(); + wxUsleep(_arg0); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; char *_kwnames[] = { NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSafeYield",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxYield",_kwnames)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSafeYield(); + _result = (bool )wxYield(); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); @@ -657,6 +649,175 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject return _resultobj; } +static PyObject *_wrap_wxGetEmailAddress(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetEmailAddress",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetEmailAddress()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetHostName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHostName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetHostName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetFullHostName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetFullHostName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetFullHostName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetUserId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserId",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetUserId()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetUserName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetUserName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHomeDir",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetHomeDir()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxAcceleratorEntry * _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "label", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGetAccelFromString",_kwnames,&_obj0)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + static int _wrap_wxNullAcceleratorTable_set(PyObject *val) { PyErr_SetString(PyExc_TypeError,"Variable wxNullAcceleratorTable is read-only."); @@ -1273,6 +1434,121 @@ static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObj return _resultobj; } +static wxRealPoint wxRealPoint___add__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return *self; + return *self + *p; + } +static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRealPoint * _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___add__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxRealPoint wxRealPoint___sub__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return *self; + return *self - *p; + } +static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRealPoint * _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___sub__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxRealPoint___cmp__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return 0; + return *self == *p; + } +static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___cmp__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxRealPoint___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPoint_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1496,6 +1772,121 @@ static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject return _resultobj; } +static wxPoint wxPoint___add__(wxPoint *self,const wxPoint * p) { + if (! p) return *self; + return *self + *p; + } +static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___add__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxPoint wxPoint___sub__(wxPoint *self,const wxPoint * p) { + if (! p) return *self; + return *self - *p; + } +static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___sub__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxPoint___cmp__(wxPoint *self,const wxPoint * p) { + if (! p) return 0; + return *self == *p; + } +static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___cmp__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPoint___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define new_wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3053,19 +3444,23 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a return _resultobj; } -#define new_wxRegion() (new wxRegion()) +#define new_wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxRegion * _result; - char *_kwnames[] = { NULL }; + long _arg0 = (long ) 0; + long _arg1 = (long ) 0; + long _arg2 = (long ) 0; + long _arg3 = (long ) 0; + char *_kwnames[] = { "x","y","width","height", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxRegion",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegion *)new_wxRegion(); + _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -4461,6 +4856,9 @@ static PyMethodDef misccMethods[] = { { "wxRect_GetX", (PyCFunction) _wrap_wxRect_GetX, METH_VARARGS | METH_KEYWORDS }, { "delete_wxRect", (PyCFunction) _wrap_delete_wxRect, METH_VARARGS | METH_KEYWORDS }, { "new_wxRect", (PyCFunction) _wrap_new_wxRect, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___cmp__", (PyCFunction) _wrap_wxPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___sub__", (PyCFunction) _wrap_wxPoint___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___add__", (PyCFunction) _wrap_wxPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_asTuple", (PyCFunction) _wrap_wxPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_Set", (PyCFunction) _wrap_wxPoint_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPoint", (PyCFunction) _wrap_delete_wxPoint, METH_VARARGS | METH_KEYWORDS }, @@ -4469,6 +4867,9 @@ static PyMethodDef misccMethods[] = { { "wxPoint_y_set", (PyCFunction) _wrap_wxPoint_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_get", (PyCFunction) _wrap_wxPoint_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_set", (PyCFunction) _wrap_wxPoint_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___cmp__", (PyCFunction) _wrap_wxRealPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___sub__", (PyCFunction) _wrap_wxRealPoint___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___add__", (PyCFunction) _wrap_wxRealPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_asTuple", (PyCFunction) _wrap_wxRealPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_Set", (PyCFunction) _wrap_wxRealPoint_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxRealPoint", (PyCFunction) _wrap_delete_wxRealPoint, METH_VARARGS | METH_KEYWORDS }, @@ -4495,12 +4896,20 @@ static PyMethodDef misccMethods[] = { { "wxSize_y_set", (PyCFunction) _wrap_wxSize_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_get", (PyCFunction) _wrap_wxSize_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_set", (PyCFunction) _wrap_wxSize_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS }, + { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserId", (PyCFunction) _wrap_wxGetUserId, METH_VARARGS | METH_KEYWORDS }, + { "wxGetFullHostName", (PyCFunction) _wrap_wxGetFullHostName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetHostName", (PyCFunction) _wrap_wxGetHostName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetEmailAddress", (PyCFunction) _wrap_wxGetEmailAddress, METH_VARARGS | METH_KEYWORDS }, { "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS }, { "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS }, { "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS }, - { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS }, + { "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS }, { "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS }, + { "wxGetOsDescription", (PyCFunction) _wrap_wxGetOsDescription, METH_VARARGS | METH_KEYWORDS }, { "wxGetOsVersion", (PyCFunction) _wrap_wxGetOsVersion, METH_VARARGS | METH_KEYWORDS }, { "wxStartTimer", (PyCFunction) _wrap_wxStartTimer, METH_VARARGS | METH_KEYWORDS }, { "wxShell", (PyCFunction) _wrap_wxShell, METH_VARARGS | METH_KEYWORDS }, @@ -4508,7 +4917,6 @@ static PyMethodDef misccMethods[] = { { "wxIsBusy", (PyCFunction) _wrap_wxIsBusy, METH_VARARGS | METH_KEYWORDS }, { "wxGetMousePosition", (PyCFunction) _wrap_wxGetMousePosition, METH_VARARGS | METH_KEYWORDS }, { "wxGetElapsedTime", (PyCFunction) _wrap_wxGetElapsedTime, METH_VARARGS | METH_KEYWORDS }, - { "wxExecute", (PyCFunction) _wrap_wxExecute, METH_VARARGS | METH_KEYWORDS }, { "wxEndBusyCursor", (PyCFunction) _wrap_wxEndBusyCursor, METH_VARARGS | METH_KEYWORDS }, { "wxDisplaySize", (PyCFunction) _wrap_wxDisplaySize, METH_VARARGS | METH_KEYWORDS }, { "wxBell", (PyCFunction) _wrap_wxBell, METH_VARARGS | METH_KEYWORDS }, @@ -4536,6 +4944,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_byte","_unsigned_char",0}, @@ -4544,6 +4953,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -4551,6 +4961,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -4589,6 +5000,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -4598,6 +5010,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_short","_signed_short",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -4606,12 +5019,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, @@ -4622,6 +5043,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, diff --git a/wxPython/src/gtk/misc.py b/wxPython/src/gtk/misc.py index eb6de20f06..d3cc3b8580 100644 --- a/wxPython/src/gtk/misc.py +++ b/wxPython/src/gtk/misc.py @@ -80,6 +80,17 @@ class wxRealPointPtr : def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxRealPoint_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___add__,(self,) + _args, _kwargs) + if val: val = wxRealPointPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___sub__,(self,) + _args, _kwargs) + if val: val = wxRealPointPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxRealPoint_x_set(self,value) @@ -119,6 +130,17 @@ class wxPointPtr : def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxPoint_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___add__,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___sub__,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxPoint_x_set(self,value) @@ -605,8 +627,6 @@ wxDisplaySize = miscc.wxDisplaySize wxEndBusyCursor = miscc.wxEndBusyCursor -wxExecute = miscc.wxExecute - wxGetElapsedTime = miscc.wxGetElapsedTime wxGetMousePosition = miscc.wxGetMousePosition @@ -621,11 +641,13 @@ wxStartTimer = miscc.wxStartTimer wxGetOsVersion = miscc.wxGetOsVersion +wxGetOsDescription = miscc.wxGetOsDescription + wxSleep = miscc.wxSleep -wxYield = miscc.wxYield +wxUsleep = miscc.wxUsleep -wxSafeYield = miscc.wxSafeYield +wxYield = miscc.wxYield wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows @@ -633,6 +655,23 @@ wxGetResource = miscc.wxGetResource wxStripMenuCodes = miscc.wxStripMenuCodes +wxGetEmailAddress = miscc.wxGetEmailAddress + +wxGetHostName = miscc.wxGetHostName + +wxGetFullHostName = miscc.wxGetFullHostName + +wxGetUserId = miscc.wxGetUserId + +wxGetUserName = miscc.wxGetUserName + +wxGetHomeDir = miscc.wxGetHomeDir + +def wxGetAccelFromString(*_args, **_kwargs): + val = apply(miscc.wxGetAccelFromString,_args,_kwargs) + if val: val = wxAcceleratorEntryPtr(val) + return val + #-------------- VARIABLE WRAPPERS ------------------ diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index b4add9d916..6da4946e08 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -1,5 +1,5 @@ /* - * FILE : gtk/misc2.cpp + * FILE : src/gtk/misc2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,16 +60,16 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -85,23 +86,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -190,6 +191,20 @@ wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id) { return new wxGenericDragImage(listCtrl, id); } + // C++ version of wxProcess derived class + +class wxPyProcess : public wxProcess { +public: + wxPyProcess(wxEvtHandler *parent = NULL, int id = -1) + : wxProcess(parent, id) + {} + + DEC_PYCALLBACK_VOID_INTINT(OnTerminate); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate); #ifdef __cplusplus extern "C" { #endif @@ -1192,6 +1207,32 @@ static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxSafeYield",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSafeYield. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSafeYield(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; @@ -1656,6 +1697,46 @@ static PyObject *_wrap_wxLogSysError(PyObject *self, PyObject *args, PyObject *k return _resultobj; } +static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxString * _arg0; + int _arg1 = (int ) FALSE; + wxPyProcess * _arg2 = (wxPyProcess *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "command","sync","process", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxExecute",_kwnames,&_obj0,&_arg1,&_argo2)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxExecute. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxExecute(*_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + #define new_wxToolTip(_swigarg0) (new wxToolTip(_swigarg0)) static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2571,6 +2652,67 @@ static PyObject *_wrap_delete_wxBusyCursor(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define new_wxWindowDisabler(_swigarg0) (new wxWindowDisabler(_swigarg0)) +static PyObject *_wrap_new_wxWindowDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindowDisabler * _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "winToSkip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxWindowDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxWindowDisabler. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindowDisabler *)new_wxWindowDisabler(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindowDisabler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxWindowDisabler(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxWindowDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindowDisabler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxWindowDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindowDisabler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxWindowDisabler. Expected _wxWindowDisabler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxWindowDisabler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define delete_wxTipProvider(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_wxTipProvider(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4125,7 +4267,609 @@ static PyObject *_wrap_delete_wxLogNull(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxProcessEventTowxEvent(void *ptr) { + wxProcessEvent *src; + wxEvent *dest; + src = (wxProcessEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxProcessEvent(_swigarg0,_swigarg1,_swigarg2) (new wxProcessEvent(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxProcessEvent * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + char *_kwnames[] = { "id","pid","exitcode", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:new_wxProcessEvent",_kwnames,&_arg0,&_arg1,&_arg2)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxProcessEvent *)new_wxProcessEvent(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxProcessEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxProcessEvent_GetPid(_swigobj) (_swigobj->GetPid()) +static PyObject *_wrap_wxProcessEvent_GetPid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_GetPid",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_GetPid. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_GetPid(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_GetExitCode(_swigobj) (_swigobj->GetExitCode()) +static PyObject *_wrap_wxProcessEvent_GetExitCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_GetExitCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_GetExitCode. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_GetExitCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_pid_set(_swigobj,_swigval) (_swigobj->m_pid = _swigval,_swigval) +static PyObject *_wrap_wxProcessEvent_m_pid_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_pid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxProcessEvent_m_pid_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_pid_set. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_pid_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_pid_get(_swigobj) ((int ) _swigobj->m_pid) +static PyObject *_wrap_wxProcessEvent_m_pid_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_m_pid_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_pid_get. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_pid_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_exitcode_set(_swigobj,_swigval) (_swigobj->m_exitcode = _swigval,_swigval) +static PyObject *_wrap_wxProcessEvent_m_exitcode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_exitcode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxProcessEvent_m_exitcode_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_exitcode_set. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_exitcode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_exitcode_get(_swigobj) ((int ) _swigobj->m_exitcode) +static PyObject *_wrap_wxProcessEvent_m_exitcode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_m_exitcode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_exitcode_get. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_exitcode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxPyProcessTowxEvtHandler(void *ptr) { + wxPyProcess *src; + wxEvtHandler *dest; + src = (wxPyProcess *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxProcess(_swigarg0,_swigarg1) (new wxPyProcess(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxProcess(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _result; + wxEvtHandler * _arg0 = (wxEvtHandler *) NULL; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "parent","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|Oi:new_wxProcess",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxProcess. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyProcess *)new_wxProcess(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyProcess_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void wxPyProcess_Destroy(wxPyProcess *self) { delete self; } +static PyObject *_wrap_wxProcess_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Destroy. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyProcess_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxProcess__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxProcess__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess__setSelf. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_base_OnTerminate(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_OnTerminate(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxProcess_base_OnTerminate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pid","status", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxProcess_base_OnTerminate",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_base_OnTerminate. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_base_OnTerminate(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_Redirect(_swigobj) (_swigobj->Redirect()) +static PyObject *_wrap_wxProcess_Redirect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Redirect",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Redirect. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_Redirect(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_IsRedirected(_swigobj) (_swigobj->IsRedirected()) +static PyObject *_wrap_wxProcess_IsRedirected(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_IsRedirected",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_IsRedirected. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxProcess_IsRedirected(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcess_Detach(_swigobj) (_swigobj->Detach()) +static PyObject *_wrap_wxProcess_Detach(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Detach",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Detach. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_Detach(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_GetInputStream(_swigobj) (_swigobj->GetInputStream()) +static PyObject *_wrap_wxProcess_GetInputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetInputStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetInputStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxProcess_GetInputStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject_SetAttrString(_resultobj, "thisown", PyInt_FromLong(1)); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxProcess_GetErrorStream(_swigobj) (_swigobj->GetErrorStream()) +static PyObject *_wrap_wxProcess_GetErrorStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetErrorStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetErrorStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxProcess_GetErrorStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject_SetAttrString(_resultobj, "thisown", PyInt_FromLong(1)); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxProcess_GetOutputStream(_swigobj) (_swigobj->GetOutputStream()) +static PyObject *_wrap_wxProcess_GetOutputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxOutputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetOutputStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetOutputStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxOutputStream *)wxProcess_GetOutputStream(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxOutputStream_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxProcess_CloseOutput(_swigobj) (_swigobj->CloseOutput()) +static PyObject *_wrap_wxProcess_CloseOutput(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_CloseOutput",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_CloseOutput. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_CloseOutput(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef misc2cMethods[] = { + { "wxProcess_CloseOutput", (PyCFunction) _wrap_wxProcess_CloseOutput, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetOutputStream", (PyCFunction) _wrap_wxProcess_GetOutputStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetErrorStream", (PyCFunction) _wrap_wxProcess_GetErrorStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetInputStream", (PyCFunction) _wrap_wxProcess_GetInputStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Detach", (PyCFunction) _wrap_wxProcess_Detach, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_IsRedirected", (PyCFunction) _wrap_wxProcess_IsRedirected, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Redirect", (PyCFunction) _wrap_wxProcess_Redirect, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_base_OnTerminate", (PyCFunction) _wrap_wxProcess_base_OnTerminate, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess__setSelf", (PyCFunction) _wrap_wxProcess__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Destroy", (PyCFunction) _wrap_wxProcess_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "new_wxProcess", (PyCFunction) _wrap_new_wxProcess, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_exitcode_get", (PyCFunction) _wrap_wxProcessEvent_m_exitcode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_exitcode_set", (PyCFunction) _wrap_wxProcessEvent_m_exitcode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_pid_get", (PyCFunction) _wrap_wxProcessEvent_m_pid_get, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_pid_set", (PyCFunction) _wrap_wxProcessEvent_m_pid_set, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_GetExitCode", (PyCFunction) _wrap_wxProcessEvent_GetExitCode, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_GetPid", (PyCFunction) _wrap_wxProcessEvent_GetPid, METH_VARARGS | METH_KEYWORDS }, + { "new_wxProcessEvent", (PyCFunction) _wrap_new_wxProcessEvent, METH_VARARGS | METH_KEYWORDS }, { "delete_wxLogNull", (PyCFunction) _wrap_delete_wxLogNull, METH_VARARGS | METH_KEYWORDS }, { "new_wxLogNull", (PyCFunction) _wrap_new_wxLogNull, METH_VARARGS | METH_KEYWORDS }, { "wxLogWindow_PassMessages", (PyCFunction) _wrap_wxLogWindow_PassMessages, METH_VARARGS | METH_KEYWORDS }, @@ -4178,6 +4922,8 @@ static PyMethodDef misc2cMethods[] = { { "wxTipProvider_GetCurrentTip", (PyCFunction) _wrap_wxTipProvider_GetCurrentTip, METH_VARARGS | METH_KEYWORDS }, { "wxTipProvider_GetTip", (PyCFunction) _wrap_wxTipProvider_GetTip, METH_VARARGS | METH_KEYWORDS }, { "delete_wxTipProvider", (PyCFunction) _wrap_delete_wxTipProvider, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxWindowDisabler", (PyCFunction) _wrap_delete_wxWindowDisabler, METH_VARARGS | METH_KEYWORDS }, + { "new_wxWindowDisabler", (PyCFunction) _wrap_new_wxWindowDisabler, METH_VARARGS | METH_KEYWORDS }, { "delete_wxBusyCursor", (PyCFunction) _wrap_delete_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, { "new_wxBusyCursor", (PyCFunction) _wrap_new_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, { "wxFontEnumerator_GetFacenames", (PyCFunction) _wrap_wxFontEnumerator_GetFacenames, METH_VARARGS | METH_KEYWORDS }, @@ -4206,6 +4952,7 @@ static PyMethodDef misc2cMethods[] = { { "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS }, { "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS }, { "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS }, + { "wxExecute", (PyCFunction) _wrap_wxExecute, METH_VARARGS | METH_KEYWORDS }, { "wxLogSysError", (PyCFunction) _wrap_wxLogSysError, METH_VARARGS | METH_KEYWORDS }, { "wxLogStatusFrame", (PyCFunction) _wrap_wxLogStatusFrame, METH_VARARGS | METH_KEYWORDS }, { "wxLogStatus", (PyCFunction) _wrap_wxLogStatus, METH_VARARGS | METH_KEYWORDS }, @@ -4223,6 +4970,7 @@ static PyMethodDef misc2cMethods[] = { { "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS }, { "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS }, { "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS }, + { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS }, { "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS }, { "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS }, @@ -4264,13 +5012,17 @@ static PyMethodDef misc2cMethods[] = { */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, + { "_wxEvent","_class_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_wxEvent","_wxProcessEvent",SwigwxProcessEventTowxEvent}, { "_wxEvent","_class_wxEvent",0}, { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -4279,15 +5031,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, + { "_class_wxEvtHandler","_class_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_class_wxEvtHandler","_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, { "_class_wxEvtHandler","_wxEvtHandler",0}, { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, { "_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, { "_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, { "_wxLog","_class_wxLogGui",SwigwxLogGuiTowxLog}, @@ -4318,6 +5074,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -4351,18 +5108,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, + { "_class_wxEvent","_class_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_class_wxEvent","_wxProcessEvent",SwigwxProcessEventTowxEvent}, { "_class_wxEvent","_wxEvent",0}, { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, { "_class_wxLogWindow","_wxLogWindow",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -4388,13 +5149,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, @@ -4437,6 +5201,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, @@ -4450,6 +5215,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCursor","_wxCursor",0}, { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_class_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, { "_class_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, @@ -4464,6 +5230,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMenu","_wxMenu",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -4483,6 +5250,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -4492,6 +5260,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -4503,6 +5272,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxLogNull","_class_wxLogNull",0}, { "_wxSize","_class_wxSize",0}, @@ -4529,6 +5305,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -4552,6 +5329,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, + { "_wxEvtHandler","_class_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_wxEvtHandler","_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index 60be26b567..ab39918201 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/misc2.py @@ -10,6 +10,8 @@ from gdi import * from clip_dnd import * from events import * + +from streams import * class wxToolTipPtr : def __init__(self,this): self.this = this @@ -143,6 +145,23 @@ class wxBusyCursor(wxBusyCursorPtr): +class wxWindowDisablerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxWindowDisabler(self) + def __repr__(self): + return "" % (self.this,) +class wxWindowDisabler(wxWindowDisablerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxWindowDisabler,_args,_kwargs) + self.thisown = 1 + + + + class wxTipProviderPtr : def __init__(self,this): self.this = this @@ -372,6 +391,86 @@ class wxLogNull(wxLogNullPtr): +class wxProcessEventPtr(wxEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetPid(self, *_args, **_kwargs): + val = apply(misc2c.wxProcessEvent_GetPid,(self,) + _args, _kwargs) + return val + def GetExitCode(self, *_args, **_kwargs): + val = apply(misc2c.wxProcessEvent_GetExitCode,(self,) + _args, _kwargs) + return val + def __setattr__(self,name,value): + if name == "m_pid" : + misc2c.wxProcessEvent_m_pid_set(self,value) + return + if name == "m_exitcode" : + misc2c.wxProcessEvent_m_exitcode_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_pid" : + return misc2c.wxProcessEvent_m_pid_get(self) + if name == "m_exitcode" : + return misc2c.wxProcessEvent_m_exitcode_get(self) + raise AttributeError,name + def __repr__(self): + return "" % (self.this,) +class wxProcessEvent(wxProcessEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxProcessEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxProcessPtr(wxEvtHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Destroy(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Destroy,(self,) + _args, _kwargs) + return val + def _setSelf(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess__setSelf,(self,) + _args, _kwargs) + return val + def base_OnTerminate(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_base_OnTerminate,(self,) + _args, _kwargs) + return val + def Redirect(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Redirect,(self,) + _args, _kwargs) + return val + def IsRedirected(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_IsRedirected,(self,) + _args, _kwargs) + return val + def Detach(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Detach,(self,) + _args, _kwargs) + return val + def GetInputStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetInputStream,(self,) + _args, _kwargs) + return val + def GetErrorStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetErrorStream,(self,) + _args, _kwargs) + return val + def GetOutputStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetOutputStream,(self,) + _args, _kwargs) + if val: val = wxOutputStreamPtr(val) + return val + def CloseOutput(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_CloseOutput,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxProcess(wxProcessPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxProcess,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxProcess) + + + + #-------------- FUNCTION WRAPPERS ------------------ @@ -462,6 +561,8 @@ wxPostEvent = misc2c.wxPostEvent wxWakeUpIdle = misc2c.wxWakeUpIdle +wxSafeYield = misc2c.wxSafeYield + wxShowTip = misc2c.wxShowTip def wxCreateFileTipProvider(*_args, **_kwargs): @@ -511,6 +612,8 @@ wxLogStatusFrame = misc2c.wxLogStatusFrame wxLogSysError = misc2c.wxLogSysError +wxExecute = misc2c.wxExecute + wxLog_IsEnabled = misc2c.wxLog_IsEnabled wxLog_EnableLogging = misc2c.wxLog_EnableLogging diff --git a/wxPython/src/gtk/printfw.cpp b/wxPython/src/gtk/printfw.cpp index 5fda7ca28d..052fb1d191 100644 --- a/wxPython/src/gtk/printfw.cpp +++ b/wxPython/src/gtk/printfw.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -61,13 +62,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -84,23 +84,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -4357,6 +4357,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, @@ -4407,6 +4408,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -4453,6 +4455,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -4593,6 +4596,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -4623,6 +4627,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -4632,6 +4637,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -4643,6 +4649,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPrintPreview","_wxPrintPreview",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -4673,6 +4686,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/sizers.cpp b/wxPython/src/gtk/sizers.cpp index fab56de862..77f81c6be2 100644 --- a/wxPython/src/gtk/sizers.cpp +++ b/wxPython/src/gtk/sizers.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,13 +58,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -80,23 +80,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2827,7 +2827,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -2881,6 +2883,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2914,6 +2917,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -2928,6 +2932,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_wxBoxSizer","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxBoxSizer}, { "_wxBoxSizer","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxBoxSizer}, { "_wxBoxSizer","_class_wxBoxSizer",0}, @@ -3030,6 +3035,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3055,6 +3061,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3065,6 +3072,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3075,6 +3083,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -3104,6 +3119,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/sizers.py b/wxPython/src/gtk/sizers.py index 3305dda245..9dbce08acb 100644 --- a/wxPython/src/gtk/sizers.py +++ b/wxPython/src/gtk/sizers.py @@ -191,9 +191,9 @@ class wxSizerPtr : apply(self.AddWindow, args) def Insert(self, *args): - if type(args[0]) == type(1): + if type(args[1]) == type(1): apply(self.InsertSpacer, args) - elif string.find(args[0].this, 'Sizer') != -1: + elif string.find(args[1].this, 'Sizer') != -1: apply(self.InsertSizer, args) else: apply(self.InsertWindow, args) diff --git a/wxPython/src/gtk/stattool.cpp b/wxPython/src/gtk/stattool.cpp index acc65d8d9d..9bf88a5e35 100644 --- a/wxPython/src/gtk/stattool.cpp +++ b/wxPython/src/gtk/stattool.cpp @@ -1,5 +1,5 @@ /* - * FILE : gtk/stattool.cpp + * FILE : src/gtk/stattool.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,13 +60,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -82,23 +82,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1358,11 +1358,11 @@ static void *SwigwxToolBarBaseTowxEvtHandler(void *ptr) { return (void *) dest; } -static wxToolBarToolBase * wxToolBarBase_AddTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int toggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { +static wxToolBarToolBase * wxToolBarBase_AddTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int isToggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->AddTool(id, bitmap, pushedBitmap, (bool)toggle, + return self->AddTool(id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1382,7 +1382,7 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO PyObject * _obj5 = 0; PyObject * _obj6 = 0; PyObject * _obj7 = 0; - char *_kwnames[] = { "self","id","bitmap","pushedBitmap","toggle","clientData","shortHelpString","longHelpString", NULL }; + char *_kwnames[] = { "self","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; char _ptemp[128]; self = self; @@ -1452,8 +1452,8 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_AddSimpleTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int toggle) { - return self->AddTool(id, bitmap, wxNullBitmap, toggle, NULL, +static wxToolBarToolBase * wxToolBarBase_AddSimpleTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int isToggle) { + return self->AddTool(id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1469,7 +1469,7 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg PyObject * _argo2 = 0; PyObject * _obj3 = 0; PyObject * _obj4 = 0; - char *_kwnames[] = { "self","id","bitmap","shortHelpString","longHelpString","toggle", NULL }; + char *_kwnames[] = { "self","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; char _ptemp[128]; self = self; @@ -1528,11 +1528,11 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int toggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { +static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int isToggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)toggle, + return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1553,7 +1553,7 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject * _obj6 = 0; PyObject * _obj7 = 0; PyObject * _obj8 = 0; - char *_kwnames[] = { "self","pos","id","bitmap","pushedBitmap","toggle","clientData","shortHelpString","longHelpString", NULL }; + char *_kwnames[] = { "self","pos","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; char _ptemp[128]; self = self; @@ -1623,8 +1623,8 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_InsertSimpleTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int toggle) { - return self->InsertTool(pos, id, bitmap, wxNullBitmap, toggle, NULL, +static wxToolBarToolBase * wxToolBarBase_InsertSimpleTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int isToggle) { + return self->InsertTool(pos, id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1641,7 +1641,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * PyObject * _argo3 = 0; PyObject * _obj4 = 0; PyObject * _obj5 = 0; - char *_kwnames[] = { "self","pos","id","bitmap","shortHelpString","longHelpString","toggle", NULL }; + char *_kwnames[] = { "self","pos","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; char _ptemp[128]; self = self; @@ -3130,7 +3130,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -3176,6 +3178,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -3210,6 +3213,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -3224,6 +3228,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -3339,6 +3344,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3361,6 +3367,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3370,6 +3377,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3380,6 +3388,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -3419,6 +3434,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/streams.cpp b/wxPython/src/gtk/streams.cpp new file mode 100644 index 0000000000..0be2ad0fa4 --- /dev/null +++ b/wxPython/src/gtk/streams.cpp @@ -0,0 +1,855 @@ +/* + * FILE : src/gtk/streams.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 810) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initstreamsc + +#define SWIG_name "streamsc" + +#include "helpers.h" +#include +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + // C++ +// definitions of wxStringPtrList and wxPyInputStream +#include +WX_DEFINE_LIST(wxStringPtrList); + + +void wxPyInputStream::close() { + /* do nothing */ +} + +void wxPyInputStream::flush() { + /*do nothing*/ +} + +bool wxPyInputStream::eof() { + if (wxi) + return wxi->Eof(); + else + return TRUE; +} + +wxPyInputStream::~wxPyInputStream() { + /*do nothing*/ +} + +wxString* wxPyInputStream::read(int size) { + wxString* s = NULL; + const int BUFSIZE = 1024; + + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + if (size < 0) { + // init buffers + char * buf = new char[BUFSIZE]; + if (!buf) { + PyErr_NoMemory(); + return NULL; + } + + s = new wxString(); + if (!s) { + delete buf; + PyErr_NoMemory(); + return NULL; + } + + // read until EOF + wxPy_BEGIN_ALLOW_THREADS; + while (! wxi->Eof()) { + wxi->Read(buf, BUFSIZE); + //*s += wxString(buf, wxi->LastRead()); + s->Append(buf, wxi->LastRead()); + } + delete buf; + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + + } else { // Read only size number of characters + s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read size bytes + wxPy_BEGIN_ALLOW_THREADS; + wxi->Read(s->GetWriteBuf(size+1), size); + s->UngetWriteBuf(wxi->LastRead()); + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + } + return s; +} + + +wxString* wxPyInputStream::readline (int size) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init buffer + int i; + char ch; + wxString* s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read until \n or byte limit reached + wxPy_BEGIN_ALLOW_THREADS; + for (i=ch=0; (ch != '\n') && (!wxi->Eof()) && ((size < 0) || (i < size)); i++) { + *s += ch = wxi->GetC(); + } + wxPy_END_ALLOW_THREADS; + + // errorcheck + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return s; +} + + +wxStringPtrList* wxPyInputStream::readlines (int sizehint) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init list + wxStringPtrList* l = new wxStringPtrList(); + if (!l) { + PyErr_NoMemory(); + return NULL; + } + + // read sizehint bytes or until EOF + wxPy_BEGIN_ALLOW_THREADS; + int i; + for (i=0; (!wxi->Eof()) && ((sizehint < 0) || (i < sizehint));) { + wxString* s = readline(); + if (s == NULL) { + l->DeleteContents(TRUE); + l->Clear(); + return NULL; + } + l->Append(s); + i = i + s->Length(); + } + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + l->DeleteContents(TRUE); + l->Clear(); + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return l; +} + + +void wxPyInputStream::seek(int offset, int whence) { + if (wxi) + wxi->SeekI(offset, wxSeekMode(whence)); +} + +int wxPyInputStream::tell(){ + if (wxi) + return wxi->TellI(); +} + + + +// wxInputStream which operates on a Python file-like object +class wxPyCBInputStream : public wxInputStream { +protected: + PyObject* read; + PyObject* seek; + PyObject* tell; + PyObject* py; + + virtual size_t OnSysRead(void *buffer, size_t bufsize) { + if (bufsize == 0) + return 0; + + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("(i)", bufsize); + PyObject* result = PyEval_CallObject(read, arglist); + Py_DECREF(arglist); + + size_t o = 0; + if ((result != NULL) && PyString_Check(result)) { + o = PyString_Size(result); + if (o == 0) + m_lasterror = wxSTREAM_EOF; + if (o > bufsize) + o = bufsize; + strncpy((char*)buffer, PyString_AsString(result), o); + Py_DECREF(result); + + } + else + m_lasterror = wxSTREAM_READ_ERROR; + wxPySaveThread(doSave); + m_lastcount = o; + return o; + } + + virtual size_t OnSysWrite(const void *buffer, size_t bufsize){ + m_lasterror = wxSTREAM_WRITE_ERROR; + return 0; + } + + virtual off_t OnSysSeek(off_t off, wxSeekMode mode){ + bool doSave = wxPyRestoreThread(); + PyObject*arglist = Py_BuildValue("(ii)", off, mode); + PyObject*result = PyEval_CallObject(seek, arglist); + Py_DECREF(arglist); + Py_XDECREF(result); + wxPySaveThread(doSave); + return OnSysTell(); + } + + virtual off_t OnSysTell() const{ + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("()"); + PyObject* result = PyEval_CallObject(tell, arglist); + Py_DECREF(arglist); + off_t o = 0; + if (result != NULL) { + o = PyInt_AsLong(result); + Py_DECREF(result); + }; + wxPySaveThread(doSave); + return o; + } + + wxPyCBInputStream(PyObject *p, PyObject *r, PyObject *s, PyObject *t) + : py(p), read(r), seek(s), tell(t) + {} + +public: + ~wxPyCBInputStream() { + bool doSave = wxPyRestoreThread(); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + wxPySaveThread(doSave); + } + + virtual size_t GetSize() { + if (seek && tell) { + off_t temp = OnSysTell(); + off_t ret = OnSysSeek(0, wxFromEnd); + OnSysSeek(temp, wxFromStart); + return ret; + } + else + return 0; + } + + static wxPyCBInputStream* create(PyObject *py) { + PyObject* read; + PyObject* seek; + PyObject* tell; + + if (!PyInstance_Check(py) && !PyFile_Check(py)) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + return NULL; + } + read = getMethod(py, "read"); + seek = getMethod(py, "seek"); + tell = getMethod(py, "tell"); + + if (!read) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + return NULL; + } + return new wxPyCBInputStream(py, read, seek, tell); + } + + static PyObject* getMethod(PyObject* py, char* name) { + if (!PyObject_HasAttrString(py, name)) + return NULL; + PyObject* o = PyObject_GetAttrString(py, name); + if (!PyMethod_Check(o) && !PyCFunction_Check(o)) + return NULL; + return o; + } + +protected: + +}; + +#ifdef __cplusplus +extern "C" { +#endif +static wxPyInputStream *new_wxPyInputStream(PyObject *p) { + wxInputStream* wxi = wxPyCBInputStream::create(p); + if (wxi) + return new wxPyInputStream(wxi); + else + return NULL; + } + +static PyObject *_wrap_new_wxInputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _result; + PyObject * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxInputStream",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = _obj0; +} +{ + _result = (wxPyInputStream *)new_wxPyInputStream(_arg0); + +}{ + char _ptemp[128]; + if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyInputStream_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_close(_swigobj) (_swigobj->close()) +static PyObject *_wrap_wxInputStream_close(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_close",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_close. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_close(_arg0); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_flush(_swigobj) (_swigobj->flush()) +static PyObject *_wrap_wxInputStream_flush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_flush",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_flush. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_flush(_arg0); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_eof(_swigobj) (_swigobj->eof()) +static PyObject *_wrap_wxInputStream_eof(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_eof",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_eof. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (bool )wxInputStream_eof(_arg0); + +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxInputStream_read(_swigobj,_swigarg0) (_swigobj->read(_swigarg0)) +static PyObject *_wrap_wxInputStream_read(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_read",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_read. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxString *)wxInputStream_read(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_readline(_swigobj,_swigarg0) (_swigobj->readline(_swigarg0)) +static PyObject *_wrap_wxInputStream_readline(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readline",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readline. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxString *)wxInputStream_readline(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_readlines(_swigobj,_swigarg0) (_swigobj->readlines(_swigarg0)) +static PyObject *_wrap_wxInputStream_readlines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStringPtrList * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","sizehint", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readlines",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readlines. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxStringPtrList *)wxInputStream_readlines(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyList_New(_result->GetCount()); + wxStringPtrList::Node *node = _result->GetFirst(); + for (int i=0; node; i++) { + wxString *s = node->GetData(); + PyList_SetItem(_resultobj, i, PyString_FromStringAndSize(s->c_str(), s->Len())); + node = node->GetNext(); + delete s; + } + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_seek(_swigobj,_swigarg0,_swigarg1) (_swigobj->seek(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxInputStream_seek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + int _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","offset","whence", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxInputStream_seek",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_seek. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_seek(_arg0,_arg1,_arg2); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_tell(_swigobj) (_swigobj->tell()) +static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_tell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_tell. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (int )wxInputStream_tell(_arg0); + +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void wxOutputStream_write(wxOutputStream *self,const wxString & str) { + self->Write(str.c_str(), str.Length()); + } +static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxOutputStream * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxOutputStream_write",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxOutputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxOutputStream_write. Expected _wxOutputStream_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxOutputStream_write(_arg0,*_arg1); + +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyMethodDef streamscMethods[] = { + { "wxOutputStream_write", (PyCFunction) _wrap_wxOutputStream_write, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_tell", (PyCFunction) _wrap_wxInputStream_tell, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_seek", (PyCFunction) _wrap_wxInputStream_seek, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_readlines", (PyCFunction) _wrap_wxInputStream_readlines, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_readline", (PyCFunction) _wrap_wxInputStream_readline, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_read", (PyCFunction) _wrap_wxInputStream_read, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_eof", (PyCFunction) _wrap_wxInputStream_eof, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_flush", (PyCFunction) _wrap_wxInputStream_flush, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_close", (PyCFunction) _wrap_wxInputStream_close, METH_VARARGS | METH_KEYWORDS }, + { "new_wxInputStream", (PyCFunction) _wrap_new_wxInputStream, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initstreamsc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("streamsc", streamscMethods); + d = PyModule_GetDict(m); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/gtk/streams.py b/wxPython/src/gtk/streams.py new file mode 100644 index 0000000000..6394f60946 --- /dev/null +++ b/wxPython/src/gtk/streams.py @@ -0,0 +1,66 @@ +# This file was created automatically by SWIG. +import streamsc +import wx +import string +class wxInputStreamPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def close(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_close,(self,) + _args, _kwargs) + return val + def flush(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_flush,(self,) + _args, _kwargs) + return val + def eof(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_eof,(self,) + _args, _kwargs) + return val + def read(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_read,(self,) + _args, _kwargs) + return val + def readline(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_readline,(self,) + _args, _kwargs) + return val + def readlines(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_readlines,(self,) + _args, _kwargs) + return val + def seek(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_seek,(self,) + _args, _kwargs) + return val + def tell(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_tell,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxInputStream(wxInputStreamPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(streamsc.new_wxInputStream,_args,_kwargs) + self.thisown = 1 + + + + +class wxOutputStreamPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def write(self, *_args, **_kwargs): + val = apply(streamsc.wxOutputStream_write,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxOutputStream(wxOutputStreamPtr): + def __init__(self,this): + self.this = this + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + diff --git a/wxPython/src/gtk/utils.cpp b/wxPython/src/gtk/utils.cpp index 26d573d9de..e90f6a6068 100644 --- a/wxPython/src/gtk/utils.cpp +++ b/wxPython/src/gtk/utils.cpp @@ -1,5 +1,5 @@ /* - * FILE : gtk/utils.cpp + * FILE : src/gtk/utils.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,13 +61,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -83,23 +83,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2280,24 +2280,16 @@ static PyObject *_wrap_new_wxDateTime(PyObject *self, PyObject *args, PyObject * static PyObject *_wrap_new_wxDateTimeFromTimeT(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDateTime * _result; - time_t * _arg0; - PyObject * _argo0 = 0; + time_t _arg0; char *_kwnames[] = { "timet", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxDateTimeFromTimeT",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxDateTimeFromTimeT",_kwnames,&_arg0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_time_t_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDateTimeFromTimeT. Expected _time_t_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxDateTime *)new_wxDateTimeFromTimeT(*_arg0); + _result = (wxDateTime *)new_wxDateTimeFromTimeT(_arg0); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -2464,14 +2456,13 @@ static PyObject *_wrap_wxDateTime_SetTimeT(PyObject *self, PyObject *args, PyObj PyObject * _resultobj; wxDateTime * _result; wxDateTime * _arg0; - time_t * _arg1; + time_t _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; char *_kwnames[] = { "self","timet", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_SetTimeT",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetTimeT",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2480,16 +2471,9 @@ static PyObject *_wrap_wxDateTime_SetTimeT(PyObject *self, PyObject *args, PyObj return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_time_t_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SetTimeT. Expected _time_t_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPy_END_ALLOW_THREADS; @@ -3774,11 +3758,10 @@ static PyObject *_wrap_wxDateTime_IsValid(PyObject *self, PyObject *args, PyObje #define wxDateTime_GetTicks(_swigobj) (_swigobj->GetTicks()) static PyObject *_wrap_wxDateTime_GetTicks(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - time_t * _result; + time_t _result; wxDateTime * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetTicks",_kwnames,&_argo0)) @@ -3792,11 +3775,10 @@ static PyObject *_wrap_wxDateTime_GetTicks(PyObject *self, PyObject *args, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - _result = new time_t (wxDateTime_GetTicks(_arg0)); + _result = (time_t )wxDateTime_GetTicks(_arg0); wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_time_t_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -7363,18 +7345,66 @@ static PyMethodDef utilscMethods[] = { static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_long","_long",0}, { "_class_wxDateTime","_wxDateTime",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, { "_wxFileConfig","_class_wxFileConfig",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_wxConfig","_class_wxConfig",0}, { "_class_wxFileConfig","_wxFileConfig",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, { "_unsigned_long","_long",0}, { "_wxTimeSpan","_class_wxTimeSpan",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_wxDateSpan","_class_wxDateSpan",0}, + { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, { "_wxConfigBase","_class_wxFileConfig",SwigwxFileConfigTowxConfigBase}, { "_wxConfigBase","_wxFileConfig",SwigwxFileConfigTowxConfigBase}, @@ -7382,19 +7412,53 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxConfigBase","_wxConfig",SwigwxConfigTowxConfigBase}, { "_wxConfigBase","_class_wxConfigBase",0}, { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, { "_wxDateTime_t","_unsigned_short",0}, { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxConfigBase","_class_wxFileConfig",SwigwxFileConfigTowxConfigBase}, { "_class_wxConfigBase","_wxFileConfig",SwigwxFileConfigTowxConfigBase}, { "_class_wxConfigBase","_class_wxConfig",SwigwxConfigTowxConfigBase}, { "_class_wxConfigBase","_wxConfig",SwigwxConfigTowxConfigBase}, { "_class_wxConfigBase","_wxConfigBase",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, { "_class_wxDateSpan","_wxDateSpan",0}, { "_class_wxConfig","_wxConfig",0}, {0,0,0}}; diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index acf0b200c8..b345b25715 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -1,5 +1,5 @@ /* - * FILE : gtk/windows.cpp + * FILE : src/gtk/windows.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -161,6 +161,10 @@ IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow); IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); + wxWindow* wxWindow_FindFocus() { + return wxWindow::FindFocus(); + } + int wxWindow_NewControlId() { return wxWindow::NewControlId(); } @@ -208,6 +212,30 @@ static PyObject *_wrap_wxValidator_SetBellOnError(PyObject *self, PyObject *args return _resultobj; } +static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_FindFocus",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxWindow_FindFocus(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; @@ -261,6 +289,31 @@ static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, Py return _resultobj; } +#define new_wxEvtHandler() (new wxEvtHandler()) +static PyObject *_wrap_new_wxEvtHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvtHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxEvtHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxEvtHandler *)new_wxEvtHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxEvtHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxEvtHandler_ProcessEvent(_swigobj,_swigarg0) (_swigobj->ProcessEvent(_swigarg0)) static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7499,19 +7552,20 @@ static void *SwigwxMenuBarTowxEvtHandler(void *ptr) { return (void *) dest; } -#define new_wxMenuBar() (new wxMenuBar()) +#define new_wxMenuBar(_swigarg0) (new wxMenuBar(_swigarg0)) static PyObject *_wrap_new_wxMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxMenuBar * _result; - char *_kwnames[] = { NULL }; + long _arg0 = (long ) 0; + char *_kwnames[] = { "style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMenuBar",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|l:new_wxMenuBar",_kwnames,&_arg0)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMenuBar *)new_wxMenuBar(); + _result = (wxMenuBar *)new_wxMenuBar(_arg0); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -9216,9 +9270,11 @@ static PyMethodDef windowscMethods[] = { { "wxEvtHandler_GetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_GetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_AddPendingEvent", (PyCFunction) _wrap_wxEvtHandler_AddPendingEvent, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS }, + { "new_wxEvtHandler", (PyCFunction) _wrap_new_wxEvtHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_IsSilent", (PyCFunction) _wrap_wxValidator_IsSilent, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } @@ -9242,6 +9298,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -9281,6 +9338,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -9304,6 +9362,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -9386,6 +9445,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMenu","_wxMenu",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -9401,6 +9461,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -9409,12 +9470,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, @@ -9435,6 +9504,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_wxRegion","_class_wxRegion",0}, diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 935946452f..0f59d6a1f4 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -62,8 +62,9 @@ class wxEvtHandlerPtr : _prop_list_ = {} class wxEvtHandler(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windowsc.new_wxEvtHandler,_args,_kwargs) + self.thisown = 1 @@ -85,12 +86,6 @@ class wxValidatorPtr(wxEvtHandlerPtr): return val def __repr__(self): return "" % (self.this,) - - _prop_list_ = { - 'window' : ('GetWindow', 'SetWindow'), - } - _prop_list_.update(wxEvtHandler._prop_list_) - class wxValidator(wxValidatorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxValidator,_args,_kwargs) @@ -519,43 +514,24 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def __repr__(self): return "" % (self.this,) - # replaces broken shadow method + # replaces broken shadow methods def GetCaret(self, *_args, **_kwargs): from misc2 import wxCaretPtr val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs) if val: val = wxCaretPtr(val) return val - - - _prop_list_ = { - 'size' : ('GetSize', 'SetSize'), - 'enabled' : ('IsEnabled', 'Enable'), - 'background' : ('GetBackgroundColour', 'SetBackgroundColour'), - 'foreground' : ('GetForegroundColour', 'SetForegroundColour'), - 'children' : ('GetChildren', None), - 'charHeight' : ('GetCharHeight', None), - 'charWidth' : ('GetCharWidth', None), - 'clientSize' : ('GetClientSize', 'SetClientSize'), - 'font' : ('GetFont', 'SetFont'), - 'grandParent' : ('GetGrandParent', None), - 'handle' : ('GetHandle', None), - 'label' : ('GetLabel', 'SetLabel'), - 'name' : ('GetName', 'SetName'), - 'parent' : ('GetParent', None), - 'position' : ('GetPosition', 'SetPosition'), - 'title' : ('GetTitle', 'SetTitle'), - 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'), - 'visible' : ('IsShown', 'Show'), - 'toolTip' : ('GetToolTip', 'SetToolTip'), - 'sizer' : ('GetSizer', 'SetSizer'), - 'validator' : ('GetValidator', 'SetValidator'), - 'dropTarget' : ('GetDropTarget', 'SetDropTarget'), - 'caret' : ('GetCaret', 'SetCaret'), - 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'), - 'constraints' : ('GetConstraints', 'SetConstraints'), - - } - _prop_list_.update(wxEvtHandler._prop_list_) + + def GetSizer(self, *_args, **_kwargs): + from sizers import wxSizerPtr + val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) + if val: val = wxSizerPtr(val) + return val + + def GetToolTip(self, *_args, **_kwargs): + from misc2 import wxToolTipPtr + val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) + if val: val = wxToolTipPtr(val) + return val class wxWindow(wxWindowPtr): def __init__(self,*_args,**_kwargs): @@ -1002,6 +978,11 @@ wxValidator_IsSilent = windowsc.wxValidator_IsSilent wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError +def wxWindow_FindFocus(*_args, **_kwargs): + val = apply(windowsc.wxWindow_FindFocus,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + wxWindow_NewControlId = windowsc.wxWindow_NewControlId wxWindow_NextControlId = windowsc.wxWindow_NextControlId diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index 5e5135d448..f0efff548f 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/windows2.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -65,13 +66,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -88,23 +88,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -667,6 +667,76 @@ static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxNotebook_SetPageSize(_swigobj,_swigarg0) (_swigobj->SetPageSize(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPageSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPageSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageSize. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPageSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebook_SetPadding(_swigobj,_swigarg0) (_swigobj->SetPadding(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPadding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","padding", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPadding",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPadding. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPadding(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxNotebook_DeletePage(_swigobj,_swigarg0) (_swigobj->DeletePage(_swigarg0)) static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -801,6 +871,60 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxNotebook_InsertPage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->InsertPage(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + int _arg1; + wxWindow * _arg2; + wxString * _arg3; + bool _arg4 = (bool ) FALSE; + int _arg5 = (int ) -1; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + PyObject * _obj3 = 0; + int tempbool4 = (int) FALSE; + char *_kwnames[] = { "self","nPage","pPage","strText","bSelect","imageId", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO|ii:wxNotebook_InsertPage",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&tempbool4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_InsertPage. Expected _wxNotebook_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxNotebook_InsertPage. Expected _wxWindow_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); +} + _arg4 = (bool ) tempbool4; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxNotebook_GetPage(_swigobj,_swigarg0) (_swigobj->GetPage(_swigarg0)) static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1703,10 +1827,13 @@ static PyMethodDef windows2cMethods[] = { { "wxSplitterEvent_GetSashPosition", (PyCFunction) _wrap_wxSplitterEvent_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_ResizeChildren", (PyCFunction) _wrap_wxNotebook_ResizeChildren, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetPage", (PyCFunction) _wrap_wxNotebook_GetPage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_InsertPage", (PyCFunction) _wrap_wxNotebook_InsertPage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_AddPage", (PyCFunction) _wrap_wxNotebook_AddPage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_DeleteAllPages", (PyCFunction) _wrap_wxNotebook_DeleteAllPages, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_RemovePage", (PyCFunction) _wrap_wxNotebook_RemovePage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_DeletePage", (PyCFunction) _wrap_wxNotebook_DeletePage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPadding", (PyCFunction) _wrap_wxNotebook_SetPadding, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPageSize", (PyCFunction) _wrap_wxNotebook_SetPageSize, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetRowCount", (PyCFunction) _wrap_wxNotebook_GetRowCount, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_SetPageImage", (PyCFunction) _wrap_wxNotebook_SetPageImage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetPageImage", (PyCFunction) _wrap_wxNotebook_GetPageImage, METH_VARARGS | METH_KEYWORDS }, @@ -1752,6 +1879,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -1793,6 +1921,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1826,6 +1955,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1957,6 +2087,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1980,6 +2111,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxNotebook","_wxNotebook",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1989,6 +2121,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1999,6 +2132,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -2029,6 +2169,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/windows2.py b/wxPython/src/gtk/windows2.py index 54181fb2c6..9a14207ce9 100644 --- a/wxPython/src/gtk/windows2.py +++ b/wxPython/src/gtk/windows2.py @@ -76,6 +76,12 @@ class wxNotebookPtr(wxControlPtr): def GetRowCount(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_GetRowCount,(self,) + _args, _kwargs) return val + def SetPageSize(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPageSize,(self,) + _args, _kwargs) + return val + def SetPadding(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPadding,(self,) + _args, _kwargs) + return val def DeletePage(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_DeletePage,(self,) + _args, _kwargs) return val @@ -88,6 +94,9 @@ class wxNotebookPtr(wxControlPtr): def AddPage(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_AddPage,(self,) + _args, _kwargs) return val + def InsertPage(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_InsertPage,(self,) + _args, _kwargs) + return val def GetPage(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_GetPage,(self,) + _args, _kwargs) if val: val = wxWindowPtr(val) diff --git a/wxPython/src/gtk/windows3.cpp b/wxPython/src/gtk/windows3.cpp index f42c03cbce..5ff66549a1 100644 --- a/wxPython/src/gtk/windows3.cpp +++ b/wxPython/src/gtk/windows3.cpp @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,13 +60,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -82,23 +82,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1756,7 +1756,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -1800,6 +1802,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1840,6 +1843,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1864,6 +1868,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -1978,6 +1983,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2005,6 +2011,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxNotebook","_wxNotebook",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -2014,6 +2021,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -2024,6 +2032,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -2054,6 +2069,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index 641527dc1e..6fb949b752 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -1,5 +1,5 @@ /* - * FILE : gtk/wx.cpp + * FILE : src/gtk/wx.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,13 +58,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -80,23 +80,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -614,6 +614,10 @@ PyObject *ptrfree(PyObject *_PTRVALUE) { } + wxPyApp* wxGetApp() { + return wxPythonApp; + } + void wxApp_CleanUp() { __wxCleanup(); } @@ -640,6 +644,12 @@ extern "C" SWIGEXPORT(void) initutilsc(); extern "C" SWIGEXPORT(void) inithtmlc(); extern "C" SWIGEXPORT(void) inithtmlhelpc(); extern "C" SWIGEXPORT(void) initcalendarc(); +extern "C" SWIGEXPORT(void) initstreamsc(); +extern "C" SWIGEXPORT(void) initfilesysc(); + +extern "C" SWIGEXPORT(void) initglcanvasc(); +extern "C" SWIGEXPORT(void) initoglc(); +extern "C" SWIGEXPORT(void) initstc_c(); #ifdef __cplusplus extern "C" { #endif @@ -866,6 +876,30 @@ static PyObject *_wrap_wxPyDefaultSize_get() { return pyobj; } +static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyApp * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetApp",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyApp *)wxGetApp(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static PyObject *_wrap_wxApp_CleanUp(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; char *_kwnames[] = { NULL }; @@ -1619,6 +1653,7 @@ static PyMethodDef wxcMethods[] = { { "delete_wxPyApp", (PyCFunction) _wrap_delete_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyApp", (PyCFunction) _wrap_new_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "wxApp_CleanUp", (PyCFunction) _wrap_wxApp_CleanUp, METH_VARARGS | METH_KEYWORDS }, + { "wxGetApp", (PyCFunction) _wrap_wxGetApp, METH_VARARGS | METH_KEYWORDS }, { "_wxSetDictionary", (PyCFunction) __wxSetDictionary, METH_VARARGS | METH_KEYWORDS }, { "_wxStart", (PyCFunction) __wxStart, METH_VARARGS | METH_KEYWORDS }, { "ptrmap", (PyCFunction) _wrap_ptrmap, METH_VARARGS | METH_KEYWORDS }, @@ -1642,13 +1677,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1657,7 +1696,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -1670,11 +1711,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, @@ -1723,6 +1767,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1731,6 +1776,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -1749,6 +1795,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -1772,6 +1819,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1784,14 +1832,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, @@ -1802,14 +1854,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, + { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, @@ -1820,6 +1875,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, @@ -1835,7 +1891,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -1843,11 +1901,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, { "_class_wxTimerEvent","_wxTimerEvent",0}, @@ -1874,6 +1936,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScreenDC","_class_wxScreenDC",0}, { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -1883,10 +1946,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxBrush","_wxBrush",0}, { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -1904,6 +1970,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -1912,6 +1979,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, @@ -1921,8 +1989,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCursor","_wxCursor",0}, { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMenu","_wxMenu",0}, @@ -1930,6 +2000,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1940,6 +2011,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -1954,6 +2027,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, @@ -1963,6 +2037,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1973,6 +2048,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1981,19 +2057,37 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, @@ -2013,6 +2107,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -2020,6 +2115,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -2027,10 +2123,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -2045,11 +2144,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxListCtrl","_wxListCtrl",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler}, @@ -2062,6 +2163,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, + { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_wxColourData","_class_wxColourData",0}, @@ -2078,6 +2180,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; @@ -2764,6 +2869,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_DOUBLECLICKED)); PyDict_SetItemString(d,"wxEVT_NAVIGATION_KEY", PyInt_FromLong((long) wxEVT_NAVIGATION_KEY)); PyDict_SetItemString(d,"wxEVT_TIMER", PyInt_FromLong((long) wxEVT_TIMER)); + PyDict_SetItemString(d,"wxEVT_END_PROCESS", PyInt_FromLong((long) wxEVT_END_PROCESS)); PyDict_SetItemString(d,"__version__", PyString_FromString("0.0.0")); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); @@ -2793,12 +2899,18 @@ SWIGEXPORT(void) initwxc() { initprintfwc(); initsizersc(); initclip_dndc(); + initstreamsc(); + initfilesysc(); initgridc(); initutilsc(); inithtmlc(); inithtmlhelpc(); initcalendarc(); + + initglcanvasc(); + initoglc(); + initstc_c(); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index 1c1f08c9c8..4bcfb8da71 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * class wxPyAppPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this @@ -138,6 +144,11 @@ _wxStart = wxc._wxStart _wxSetDictionary = wxc._wxSetDictionary +def wxGetApp(*_args, **_kwargs): + val = apply(wxc.wxGetApp,_args,_kwargs) + if val: val = wxPyAppPtr(val) + return val + wxApp_CleanUp = wxc.wxApp_CleanUp @@ -818,6 +829,7 @@ wxEVT_COMMAND_SPLITTER_UNSPLIT = wxc.wxEVT_COMMAND_SPLITTER_UNSPLIT wxEVT_COMMAND_SPLITTER_DOUBLECLICKED = wxc.wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_NAVIGATION_KEY = wxc.wxEVT_NAVIGATION_KEY wxEVT_TIMER = wxc.wxEVT_TIMER +wxEVT_END_PROCESS = wxc.wxEVT_END_PROCESS __version__ = wxc.__version__ cvar = wxc.cvar wxPyDefaultPosition = wxPointPtr(wxc.cvar.wxPyDefaultPosition) @@ -1456,9 +1468,6 @@ def EVT_LIST_SET_INFO(win, id, func): def EVT_LIST_ITEM_SELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func) -def EVT_LIST_ITEM_ACTIVATED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) - def EVT_LIST_ITEM_DESELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func) @@ -1477,6 +1486,10 @@ def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func): def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func) +def EVT_LIST_ITEM_ACTIVATED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) + + #wxSplitterWindow @@ -1497,7 +1510,9 @@ def EVT_SPLITTER_DOUBLECLICKED(win, id, func): def EVT_TIMER(win, id, func): win.Connect(id, -1, wxEVT_TIMER, func) - +# wxProcess +def EVT_END_PROCESS(eh, id, func): + eh.Connect(id, -1, wxEVT_END_PROCESS, func) #---------------------------------------------------------------------- diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 32578bf5f6..6d0cb21730 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -170,7 +170,7 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args) char** argv = new char*[argc+1]; int x; for(x=0; xargc = argc; @@ -245,7 +245,9 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) //--------------------------------------------------------------------------- -PyObject* wxPyConstructObject(void* ptr, const char* className) { +PyObject* wxPyConstructObject(void* ptr, + const char* className, + int setThisOwn) { char buff[64]; // should always be big enough... char swigptr[64]; @@ -263,6 +265,10 @@ PyObject* wxPyConstructObject(void* ptr, const char* className) { PyObject* obj = PyInstance_New(classobj, arg, NULL); Py_DECREF(arg); + if (setThisOwn) { + PyObject_SetAttrString(obj, "thisown", PyInt_FromLong(1)); + } + return obj; } @@ -456,7 +462,7 @@ PyObject* wxPyCallbackHelper::callCallbackObj(PyObject* argTuple) const { //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // These classes can be derived from in Python and passed through the event -// system without loosing anything. They do this by keeping a reference to +// system without losing anything. They do this by keeping a reference to // themselves and some special case handling in wxPyCallback::EventThunker. diff --git a/wxPython/src/helpers.h b/wxPython/src/helpers.h index 38dd0cddc6..5030715b3e 100644 --- a/wxPython/src/helpers.h +++ b/wxPython/src/helpers.h @@ -67,7 +67,9 @@ PyObject* __wxSetDictionary(PyObject*, PyObject* args); void wxPyEventThunker(wxObject*, wxEvent& event); -HELPEREXPORT PyObject* wxPyConstructObject(void* ptr, const char* className); +HELPEREXPORT PyObject* wxPyConstructObject(void* ptr, + const char* className, + int setThisOwn=0); HELPEREXPORT bool wxPyRestoreThread(); HELPEREXPORT void wxPySaveThread(bool doSave); HELPEREXPORT PyObject* wxPy_ConvertList(wxListBase* list, const char* className); @@ -86,6 +88,44 @@ public: PyObject* m_obj; }; +//---------------------------------------------------------------------- +// Handle wxInputStreams by Joerg Baumann +// See stream.i for implementations + +// list class for return list of strings, e.g. readlines() +WX_DECLARE_LIST(wxString, wxStringPtrList); + + +// C++ class wxPyInputStream to act as base for python class wxInputStream +// Use it in python like a python file object +class wxPyInputStream{ +public: + // underlying wxInputStream + wxInputStream* wxi; + +public: + wxPyInputStream(wxInputStream* wxi_) : wxi(wxi_) {} + ~wxPyInputStream(); + + // python file object interface for input files (most of it) + void close(); + void flush(); + bool eof(); + wxString* read(int size=-1); + wxString* readline(int size=-1); + wxStringPtrList* readlines(int sizehint=-1); + void seek(int offset, int whence=0); + int tell(); + /* + bool isatty(); + int fileno(); + void truncate(int size=-1); + void write(wxString data); + void writelines(wxStringPtrList); + */ +}; + + //---------------------------------------------------------------------- // These are helpers used by the typemaps @@ -239,7 +279,7 @@ public: void _setSelf(PyObject* self, PyObject* _class, int incref=1) { \ m_myInst.setSelf(self, _class, incref); \ } \ - private: wxPyCallbackHelper m_myInst; + private: wxPyCallbackHelper m_myInst //--------------------------------------------------------------------------- @@ -285,6 +325,26 @@ public: //--------------------------------------------------------------------------- +#define DEC_PYCALLBACK_VOID_INTINT(CBNAME) \ + void CBNAME(int a, int b); \ + void base_##CBNAME(int a, int b); + + +#define IMP_PYCALLBACK_VOID_INTINT(CLASS, PCLASS, CBNAME) \ + void CLASS::CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback(Py_BuildValue("(ii)",a,b)); \ + else \ + PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + } \ + void CLASS::base_##CBNAME(int a, int b) { \ + PCLASS::CBNAME(a,b); \ + } + +//--------------------------------------------------------------------------- + #define DEC_PYCALLBACK_BOOL_INT(CBNAME) \ bool CBNAME(int a); \ bool base_##CBNAME(int a); @@ -672,6 +732,63 @@ public: //--------------------------------------------------------------------------- +#define DEC_PYCALLBACK_BOOL_STRING_pure(CBNAME) \ + bool CBNAME(const wxString& a); + \ +#define IMP_PYCALLBACK_BOOL_STRING_pure(CLASS, PCLASS, CBNAME) \ + bool CLASS::CBNAME(const wxString& a) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + rval = m_myInst.callCallback(Py_BuildValue("(s)", a.c_str())); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + +//--------------------------------------------------------------------------- + +#define DEC_PYCALLBACK_STRING_STRING_pure(CBNAME) \ + wxString CBNAME(const wxString& a); \ + +#define IMP_PYCALLBACK_STRING_STRING_pure(CLASS, PCLASS, CBNAME) \ + wxString CLASS::CBNAME(const wxString& a) { \ + wxString rval; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) { \ + PyObject* ro; \ + ro = m_myInst.callCallbackObj(Py_BuildValue("(s)", a.c_str())); \ + if (ro) { \ + rval = PyString_AsString(PyObject_Str(ro)); \ + Py_DECREF(ro); \ + } \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + +//--------------------------------------------------------------------------- + +#define DEC_PYCALLBACK_STRING_STRINGINT_pure(CBNAME) \ + wxString CBNAME(const wxString& a,int b); \ + +#define IMP_PYCALLBACK_STRING_STRINGINT_pure(CLASS, PCLASS, CBNAME) \ + wxString CLASS::CBNAME(const wxString& a,int b) { \ + wxString rval; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) { \ + PyObject* ro; \ + ro = m_myInst.callCallbackObj(Py_BuildValue("(si)", a.c_str(),b)); \ + if (ro) { \ + rval = PyString_AsString(PyObject_Str(ro)); \ + Py_DECREF(ro); \ + } \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + +//--------------------------------------------------------------------------- + #define DEC_PYCALLBACK_BOOL_STRINGSTRING(CBNAME) \ bool CBNAME(const wxString& a, const wxString& b); \ bool base_##CBNAME(const wxString& a, const wxString& b); @@ -867,6 +984,28 @@ public: //--------------------------------------------------------------------------- +#define DEC_PYCALLBACK_FSF_FSSTRING_pure(CBNAME) \ + wxFSFile* CBNAME(wxFileSystem& fs, const wxString& location); \ + +#define IMP_PYCALLBACK_FSF_FSSTRING_pure(CLASS, PCLASS, CBNAME) \ + wxFSFile* CLASS::CBNAME(wxFileSystem& a,const wxString& b) { \ + bool doSave = wxPyRestoreThread(); \ + wxFSFile* rval=0; \ + if (m_myInst.findCallback(#CBNAME)) { \ + PyObject* ro; \ + ro=m_myInst.callCallbackObj(Py_BuildValue("(Os)", \ + wxPyConstructObject(&a, "(wxFileSystemC"),b.c_str())); \ + if (ro) { \ + SWIG_GetPtrObj(ro, (void **)&rval, "_wxFSFILE_p"); \ + Py_DECREF(ro); \ + } \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + }; + +//--------------------------------------------------------------------------- + #define DEC_PYCALLBACK_BOOL_DR(CBNAME) \ bool CBNAME(wxDragResult a); \ bool base_##CBNAME(wxDragResult a); diff --git a/wxPython/src/html.i b/wxPython/src/html.i index 17db361382..bb4af6d866 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -579,16 +579,9 @@ public: inithtmlhelpc(); - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); - - // Until wxFileSystem is wrapped... - #if wxUSE_FS_ZIP - wxFileSystem::AddHandler(new wxZipFSHandler); - #endif - #if wxUSE_FS_INET -// wxFileSystem::AddHandler(new wxInternetFSHandler); - #endif + //wxClassInfo::CleanUpClasses(); + //wxClassInfo::InitializeClasses(); + %} //---------------------------------------------------------------------- diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index 6f0312e99e..94e2143b05 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -81,6 +81,21 @@ public: PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->y)); return tup; } + + wxRealPoint __add__(const wxRealPoint* p) { + if (! p) return *self; + return *self + *p; + } + + wxRealPoint __sub__(const wxRealPoint* p) { + if (! p) return *self; + return *self - *p; + } + + int __cmp__(const wxRealPoint* p) { + if (! p) return 0; + return *self == *p; + } } %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())" %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())" @@ -105,6 +120,21 @@ public: PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); return tup; } + + wxPoint __add__(const wxPoint* p) { + if (! p) return *self; + return *self + *p; + } + + wxPoint __sub__(const wxPoint* p) { + if (! p) return *self; + return *self - *p; + } + + int __cmp__(const wxPoint* p) { + if (! p) return 0; + return *self == *p; + } } %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())" %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())" @@ -246,7 +276,7 @@ void wxRegisterId(long id); void wxBell(); void wxDisplaySize(int *OUTPUT, int *OUTPUT); void wxEndBusyCursor(); -long wxExecute(const wxString& command, int sync = FALSE); + long wxGetElapsedTime(bool resetTimer = TRUE); #ifdef __WXMSW__ long wxGetFreeMemory(); @@ -257,10 +287,11 @@ wxString wxNow(); bool wxShell(const wxString& command = wxPyEmptyStr); void wxStartTimer(); int wxGetOsVersion(int *OUTPUT, int *OUTPUT); +wxString wxGetOsDescription(); void wxSleep(int secs); +void wxUsleep(unsigned long milliseconds); bool wxYield(); -bool wxSafeYield(); void wxEnableTopLevelWindows(bool enable); %inline %{ @@ -273,6 +304,15 @@ void wxEnableTopLevelWindows(bool enable); wxString wxStripMenuCodes(const wxString& in); + +wxString wxGetEmailAddress(); +wxString wxGetHostName(); +wxString wxGetFullHostName(); +wxString wxGetUserId(); +wxString wxGetUserName(); +wxString wxGetHomeDir(); + + //---------------------------------------------------------------------- enum wxEdge { wxLeft, wxTop, wxRight, wxBottom, wxWidth, wxHeight, @@ -333,7 +373,7 @@ enum wxRegionContain { class wxRegion { public: - wxRegion(); + wxRegion(long x=0, long y=0, long width=0, long height=0); ~wxRegion(); void Clear(); @@ -412,6 +452,7 @@ public: }; +wxAcceleratorEntry *wxGetAccelFromString(const wxString& label); %readonly %{ @@ -432,8 +473,7 @@ public: ~wxBusyInfo(); }; - - //--------------------------------------------------------------------------- + diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index 7a7f49ad58..8e80dd6a2a 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -21,6 +21,7 @@ #include #include #include +#include %} //---------------------------------------------------------------------- @@ -34,6 +35,7 @@ %import misc.i %import gdi.i %import events.i +%import streams.i //--------------------------------------------------------------------------- // Dialog Functions @@ -353,9 +355,19 @@ public: //---------------------------------------------------------------------- +class wxWindowDisabler { +public: + wxWindowDisabler(wxWindow *winToSkip = NULL); + ~wxWindowDisabler(); +}; + +//---------------------------------------------------------------------- + void wxPostEvent(wxEvtHandler *dest, wxEvent& event); void wxWakeUpIdle(); +bool wxSafeYield(wxWindow* win=NULL); + //---------------------------------------------------------------------- @@ -597,6 +609,64 @@ void wxLogStatus(const char *szFormat); void wxLogSysError(const char *szFormat); + +//---------------------------------------------------------------------- + +class wxProcessEvent : public wxEvent { +public: + wxProcessEvent(int id = 0, int pid = 0, int exitcode = 0); + int GetPid(); + int GetExitCode(); + int m_pid, m_exitcode; +}; + + + + +%{ // C++ version of wxProcess derived class + +class wxPyProcess : public wxProcess { +public: + wxPyProcess(wxEvtHandler *parent = NULL, int id = -1) + : wxProcess(parent, id) + {} + + DEC_PYCALLBACK_VOID_INTINT(OnTerminate); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate); +%} + + +%name(wxProcess)class wxPyProcess : public wxEvtHandler { +public: + wxPyProcess(wxEvtHandler *parent = NULL, int id = -1); + %addmethods { void Destroy() { delete self; } } + + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxProcess)" + + void base_OnTerminate(int pid, int status); + + void Redirect(); + bool IsRedirected(); + void Detach(); + + wxInputStream *GetInputStream(); + wxInputStream *GetErrorStream(); + wxOutputStream *GetOutputStream(); + + void CloseOutput(); +}; + + + +long wxExecute(const wxString& command, + int sync = FALSE, + wxPyProcess *process = NULL); + //---------------------------------------------------------------------- //---------------------------------------------------------------------- diff --git a/wxPython/src/msw/calendar.cpp b/wxPython/src/msw/calendar.cpp index 7970146209..48e24335e7 100644 --- a/wxPython/src/msw/calendar.cpp +++ b/wxPython/src/msw/calendar.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/calendar.cpp + * FILE : src/msw/calendar.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1684,6 +1684,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -1720,6 +1721,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1753,6 +1755,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1883,6 +1886,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1907,6 +1911,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1916,6 +1921,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1930,6 +1936,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -1964,6 +1977,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp index abf56480c1..edff43c1ff 100644 --- a/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/clip_dnd.cpp + * FILE : src/msw/clip_dnd.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,13 +61,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -83,23 +83,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -3397,6 +3397,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -3452,6 +3453,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -3502,6 +3504,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -3581,6 +3584,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3595,6 +3599,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3603,12 +3608,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPrinterDC","_wxPrinterDC",0}, @@ -3627,6 +3640,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_wxRegion","_class_wxRegion",0}, diff --git a/wxPython/src/msw/cmndlgs.cpp b/wxPython/src/msw/cmndlgs.cpp index 163ee87277..a6e15fdc90 100644 --- a/wxPython/src/msw/cmndlgs.cpp +++ b/wxPython/src/msw/cmndlgs.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/cmndlgs.cpp + * FILE : src/msw/cmndlgs.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -61,13 +62,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -84,23 +84,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2770,6 +2770,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, @@ -2825,6 +2826,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2888,6 +2890,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -3044,6 +3047,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3084,6 +3088,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3093,6 +3098,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3103,6 +3109,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -3133,6 +3146,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index 4698f3390c..9904e6e92f 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/controls.cpp + * FILE : src/msw/controls.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -74,13 +75,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -97,23 +97,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -7327,7 +7327,150 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define wxSpinCtrl_GetMax(_swigobj) (_swigobj->GetMax()) +static PyObject *_wrap_wxSpinCtrl_GetMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetMax. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_GetMin(_swigobj) (_swigobj->GetMin()) +static PyObject *_wrap_wxSpinCtrl_GetMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetMin. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_GetValue(_swigobj) (_swigobj->GetValue()) +static PyObject *_wrap_wxSpinCtrl_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetValue",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetValue. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetValue(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_SetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSpinCtrl_SetRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","min","max", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxSpinCtrl_SetRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_SetRange. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSpinCtrl_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) +static PyObject *_wrap_wxSpinCtrl_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSpinCtrl_SetValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_SetValue. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSpinCtrl_SetValue(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef controlscMethods[] = { + { "wxSpinCtrl_SetValue", (PyCFunction) _wrap_wxSpinCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_SetRange", (PyCFunction) _wrap_wxSpinCtrl_SetRange, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetValue", (PyCFunction) _wrap_wxSpinCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetMin", (PyCFunction) _wrap_wxSpinCtrl_GetMin, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetMax", (PyCFunction) _wrap_wxSpinCtrl_GetMax, METH_VARARGS | METH_KEYWORDS }, { "new_wxSpinCtrl", (PyCFunction) _wrap_new_wxSpinCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetValue", (PyCFunction) _wrap_wxSlider_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetTick", (PyCFunction) _wrap_wxSlider_SetTick, METH_VARARGS | METH_KEYWORDS }, @@ -7542,6 +7685,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -7618,6 +7762,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -7650,6 +7795,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -7850,6 +7996,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -7874,6 +8021,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -7883,6 +8031,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -7893,6 +8042,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxBitmapButton",SwigwxBitmapButtonTowxButton}, { "_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton}, @@ -7962,6 +8118,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/controls.py b/wxPython/src/msw/controls.py index 3e6a270097..974248219c 100644 --- a/wxPython/src/msw/controls.py +++ b/wxPython/src/msw/controls.py @@ -806,6 +806,21 @@ class wxSpinCtrlPtr(wxSpinButtonPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetMax(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetMax,(self,) + _args, _kwargs) + return val + def GetMin(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetMin,(self,) + _args, _kwargs) + return val + def GetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetValue,(self,) + _args, _kwargs) + return val + def SetRange(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_SetRange,(self,) + _args, _kwargs) + return val + def SetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_SetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxSpinCtrl(wxSpinCtrlPtr): diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index 7f23106db4..fab7392364 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/controls2.cpp + * FILE : src/msw/controls2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -62,13 +63,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -85,23 +85,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -132,15 +132,15 @@ extern wxValidator wxPyDefaultValidator; class wxPyTreeItemData : public wxTreeItemData { public: wxPyTreeItemData(PyObject* obj = NULL) { - if (obj == NULL) + if (obj == NULL) obj = Py_None; - Py_INCREF(obj); - m_obj = obj; + Py_INCREF(obj); + m_obj = obj; } ~wxPyTreeItemData() { bool doSave = wxPyRestoreThread(); - Py_DECREF(m_obj); + Py_DECREF(m_obj); wxPySaveThread(doSave); } @@ -150,7 +150,9 @@ public: } void SetData(PyObject* obj) { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_obj); + wxPySaveThread(doSave); m_obj = obj; Py_INCREF(obj); } @@ -1970,6 +1972,14 @@ static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args, Py return _resultobj; } +static void *SwigwxListEventTowxNotifyEvent(void *ptr) { + wxListEvent *src; + wxNotifyEvent *dest; + src = (wxListEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + static void *SwigwxListEventTowxCommandEvent(void *ptr) { wxListEvent *src; wxCommandEvent *dest; @@ -3862,8 +3872,8 @@ static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxListCtrl_InsertColumnWith(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxListCtrl_InsertColumnInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxListCtrl_InsertColumnInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; long _result; wxListCtrl * _arg0; @@ -3874,25 +3884,25 @@ static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *arg char *_kwnames[] = { "self","col","info", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnWith",_kwnames,&_argo0,&_arg1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnInfo",_kwnames,&_argo0,&_arg1,&_argo2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnWith. Expected _wxListCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnInfo. Expected _wxListCtrl_p."); return NULL; } } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnWith. Expected _wxListItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnInfo. Expected _wxListItem_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxListCtrl_InsertColumnWith(_arg0,_arg1,*_arg2); + _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("l",_result); @@ -4678,7 +4688,7 @@ static PyObject *_wrap_wxTreeItemId_IsOk(PyObject *self, PyObject *args, PyObjec } static int wxTreeItemId___cmp__(wxTreeItemId *self,wxTreeItemId * other) { - if (! other) return 0; + if (! other) return -1; return *self != *other; } static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -5780,7 +5790,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py static void wxPyTreeCtrl_SetItemData(wxPyTreeCtrl *self,const wxTreeItemId & item,wxPyTreeItemData * data) { data->SetId(item); // set the id self->SetItemData(item, data); - } + } static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTreeCtrl * _arg0; @@ -5833,7 +5843,7 @@ static PyObject * wxPyTreeCtrl_GetPyData(wxPyTreeCtrl *self,const wxTreeItemId & self->SetItemData(item, data); } return data->GetData(); - } + } static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; PyObject * _result; @@ -5879,7 +5889,7 @@ static void wxPyTreeCtrl_SetPyData(wxPyTreeCtrl *self,const wxTreeItemId & item self->SetItemData(item, data); } else data->SetData(obj); - } + } static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTreeCtrl * _arg0; @@ -6167,8 +6177,8 @@ static PyObject * wxPyTreeCtrl_GetSelections(wxPyTreeCtrl *self) { size_t num, x; num = self->GetSelections(array); for (x=0; x < num; x++) { - PyObject* item = wxPyConstructObject((void*)&array.Item(x), - "wxTreeItemId"); + wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); + PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE); PyList_Append(rval, item); } wxPySaveThread(doSave); @@ -7871,7 +7881,7 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_InsertStringItem", (PyCFunction) _wrap_wxListCtrl_InsertStringItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_InsertItem", (PyCFunction) _wrap_wxListCtrl_InsertItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_InsertColumn", (PyCFunction) _wrap_wxListCtrl_InsertColumn, METH_VARARGS | METH_KEYWORDS }, - { "wxListCtrl_InsertColumnWith", (PyCFunction) _wrap_wxListCtrl_InsertColumnWith, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_InsertColumnInfo", (PyCFunction) _wrap_wxListCtrl_InsertColumnInfo, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_HitTest", (PyCFunction) _wrap_wxListCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetTopItem", (PyCFunction) _wrap_wxListCtrl_GetTopItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_SetTextColour", (PyCFunction) _wrap_wxListCtrl_SetTextColour, METH_VARARGS | METH_KEYWORDS }, @@ -8021,6 +8031,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -8037,6 +8048,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, { "_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, + { "_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, @@ -8064,6 +8077,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -8097,6 +8111,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -8129,6 +8144,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, { "_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, @@ -8232,6 +8249,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -8255,6 +8273,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -8264,6 +8283,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -8275,6 +8295,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -8310,6 +8337,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index cc494e055b..6acc423c61 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -219,7 +219,7 @@ class wxListItem(wxListItemPtr): -class wxListEventPtr(wxCommandEventPtr): +class wxListEventPtr(wxNotifyEventPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -416,8 +416,8 @@ class wxListCtrlPtr(wxControlPtr): def HitTest(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_HitTest,(self,) + _args, _kwargs) return val - def InsertColumnWith(self, *_args, **_kwargs): - val = apply(controls2c.wxListCtrl_InsertColumnWith,(self,) + _args, _kwargs) + def InsertColumnInfo(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_InsertColumnInfo,(self,) + _args, _kwargs) return val def InsertColumn(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_InsertColumn,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/events.cpp b/wxPython/src/msw/events.cpp index fc50c1c4e4..47edfaf2de 100644 --- a/wxPython/src/msw/events.cpp +++ b/wxPython/src/msw/events.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/events.cpp + * FILE : src/msw/events.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2176,356 +2176,1315 @@ static PyObject *_wrap_wxMouseEvent_GetY(PyObject *self, PyObject *args, PyObjec return _resultobj; } -static void *SwigwxKeyEventTowxEvent(void *ptr) { - wxKeyEvent *src; - wxEvent *dest; - src = (wxKeyEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; +#define wxMouseEvent_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxMouseEvent_m_x_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_x_set. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_x_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; } -#define new_wxKeyEvent(_swigarg0) (new wxKeyEvent(_swigarg0)) -static PyObject *_wrap_new_wxKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_x_get(_swigobj) ((long ) _swigobj->m_x) +static PyObject *_wrap_wxMouseEvent_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxKeyEvent * _result; - int _arg0; - char *_kwnames[] = { "keyEventType", NULL }; - char _ptemp[128]; + long _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxKeyEvent",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_x_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_x_get. Expected _wxMouseEvent_p."); return NULL; + } + } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxKeyEvent *)new_wxKeyEvent(_arg0); + _result = (long )wxMouseEvent_m_x_get(_arg0); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxKeyEvent_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxMouseEvent_m_y_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_y_set. Expected _wxMouseEvent_p."); + return NULL; + } } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_y_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); return _resultobj; } -#define wxKeyEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) -static PyObject *_wrap_wxKeyEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_y_get(_swigobj) ((long ) _swigobj->m_y) +static PyObject *_wrap_wxMouseEvent_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxKeyEvent * _arg0; + long _result; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_ControlDown",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_y_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ControlDown. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_y_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_ControlDown(_arg0); + _result = (long )wxMouseEvent_m_y_get(_arg0); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); +} _resultobj = Py_BuildValue("l",_result); return _resultobj; } -#define wxKeyEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) -static PyObject *_wrap_wxKeyEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_leftDown_set(_swigobj,_swigval) (_swigobj->m_leftDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_leftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxKeyEvent * _arg0; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1; + char *_kwnames[] = { "self","m_leftDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_MetaDown",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_leftDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_MetaDown. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_leftDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_MetaDown(_arg0); + _result = (bool )wxMouseEvent_m_leftDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_AltDown(_swigobj) (_swigobj->AltDown()) -static PyObject *_wrap_wxKeyEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_leftDown_get(_swigobj) ((bool ) _swigobj->m_leftDown) +static PyObject *_wrap_wxMouseEvent_m_leftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxKeyEvent * _arg0; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_AltDown",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_leftDown_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_AltDown. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_leftDown_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_AltDown(_arg0); + _result = (bool )wxMouseEvent_m_leftDown_get(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) -static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_middleDown_set(_swigobj,_swigval) (_swigobj->m_middleDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_middleDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxKeyEvent * _arg0; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1; + char *_kwnames[] = { "self","m_middleDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_ShiftDown",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_middleDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ShiftDown. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_middleDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_ShiftDown(_arg0); + _result = (bool )wxMouseEvent_m_middleDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_KeyCode(_swigobj) (_swigobj->KeyCode()) -static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_middleDown_get(_swigobj) ((bool ) _swigobj->m_middleDown) +static PyObject *_wrap_wxMouseEvent_m_middleDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_KeyCode",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_middleDown_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_KeyCode. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_middleDown_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxKeyEvent_KeyCode(_arg0); + _result = (bool )wxMouseEvent_m_middleDown_get(_arg0); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) -static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_rightDown_set(_swigobj,_swigval) (_swigobj->m_rightDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_rightDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1; + char *_kwnames[] = { "self","m_rightDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetKeyCode",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_rightDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetKeyCode. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_rightDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxKeyEvent_GetKeyCode(_arg0); + _result = (bool )wxMouseEvent_m_rightDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_HasModifiers(_swigobj) (_swigobj->HasModifiers()) -static PyObject *_wrap_wxKeyEvent_HasModifiers(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_rightDown_get(_swigobj) ((bool ) _swigobj->m_rightDown) +static PyObject *_wrap_wxMouseEvent_m_rightDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxKeyEvent * _arg0; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_HasModifiers",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_rightDown_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_HasModifiers. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_rightDown_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxKeyEvent_HasModifiers(_arg0); + _result = (bool )wxMouseEvent_m_rightDown_get(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_controlDown_set(_swigobj,_swigval) (_swigobj->m_controlDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_controlDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1; + char *_kwnames[] = { "self","m_controlDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetX",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_controlDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetX. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_controlDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxKeyEvent_GetX(_arg0); + _result = (bool )wxMouseEvent_m_controlDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxKeyEvent_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_controlDown_get(_swigobj) ((bool ) _swigobj->m_controlDown) +static PyObject *_wrap_wxMouseEvent_m_controlDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetY",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_controlDown_get",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetY. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_controlDown_get. Expected _wxMouseEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxKeyEvent_GetY(_arg0); + _result = (bool )wxMouseEvent_m_controlDown_get(_arg0); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxKeyEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_shiftDown_set(_swigobj,_swigval) (_swigobj->m_shiftDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_shiftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxPoint * _result; - wxKeyEvent * _arg0; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; + int tempbool1; + char *_kwnames[] = { "self","m_shiftDown", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetPosition",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_shiftDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetPosition. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_shiftDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = new wxPoint (wxKeyEvent_GetPosition(_arg0)); + _result = (bool )wxMouseEvent_m_shiftDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxKeyEvent_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxKeyEvent_GetPositionTuple(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxMouseEvent_m_shiftDown_get(_swigobj) ((bool ) _swigobj->m_shiftDown) +static PyObject *_wrap_wxMouseEvent_m_shiftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxKeyEvent * _arg0; - long * _arg1; - long temp; - long * _arg2; - long temp0; + bool _result; + wxMouseEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_shiftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_shiftDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } { - _arg1 = &temp; -} -{ - _arg2 = &temp0; + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_shiftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; } - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetPositionTuple",_kwnames,&_argo0)) + +#define wxMouseEvent_m_altDown_set(_swigobj,_swigval) (_swigobj->m_altDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_altDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_altDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_altDown_set",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetPositionTuple. Expected _wxKeyEvent_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_altDown_set. Expected _wxMouseEvent_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - wxKeyEvent_GetPositionTuple(_arg0,_arg1,_arg2); + _result = (bool )wxMouseEvent_m_altDown_set(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_altDown_get(_swigobj) ((bool ) _swigobj->m_altDown) +static PyObject *_wrap_wxMouseEvent_m_altDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_altDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_altDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_altDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_metaDown_set(_swigobj,_swigval) (_swigobj->m_metaDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_metaDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_metaDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_metaDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_metaDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_metaDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_metaDown_get(_swigobj) ((bool ) _swigobj->m_metaDown) +static PyObject *_wrap_wxMouseEvent_m_metaDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_metaDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_metaDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_metaDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxKeyEventTowxEvent(void *ptr) { + wxKeyEvent *src; + wxEvent *dest; + src = (wxKeyEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxKeyEvent(_swigarg0) (new wxKeyEvent(_swigarg0)) +static PyObject *_wrap_new_wxKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxKeyEvent * _result; + int _arg0; + char *_kwnames[] = { "keyEventType", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxKeyEvent",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxKeyEvent *)new_wxKeyEvent(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxKeyEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxKeyEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) +static PyObject *_wrap_wxKeyEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_ControlDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ControlDown. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_ControlDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) +static PyObject *_wrap_wxKeyEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_MetaDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_MetaDown. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_MetaDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_AltDown(_swigobj) (_swigobj->AltDown()) +static PyObject *_wrap_wxKeyEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_AltDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_AltDown. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_AltDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) +static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_ShiftDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_ShiftDown. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_ShiftDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_KeyCode(_swigobj) (_swigobj->KeyCode()) +static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_KeyCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_KeyCode. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_KeyCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) +static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetKeyCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetKeyCode. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_GetKeyCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_HasModifiers(_swigobj) (_swigobj->HasModifiers()) +static PyObject *_wrap_wxKeyEvent_HasModifiers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_HasModifiers",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_HasModifiers. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_HasModifiers(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_GetX(_swigobj) (_swigobj->GetX()) +static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetX",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetX. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_GetX(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_GetY(_swigobj) (_swigobj->GetY()) +static PyObject *_wrap_wxKeyEvent_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetY",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetY. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_GetY(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxKeyEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetPosition. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxKeyEvent_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxKeyEvent_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxKeyEvent_GetPositionTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxKeyEvent * _arg0; + long * _arg1; + long temp; + long * _arg2; + long temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetPositionTuple",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetPositionTuple. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxKeyEvent_GetPositionTuple(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxKeyEvent_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_x_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_x_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_x_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_x_get(_swigobj) ((long ) _swigobj->m_x) +static PyObject *_wrap_wxKeyEvent_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_x_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_x_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_x_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_y_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_y_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_y_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_y_get(_swigobj) ((long ) _swigobj->m_y) +static PyObject *_wrap_wxKeyEvent_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_y_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_y_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_y_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_keyCode_set(_swigobj,_swigval) (_swigobj->m_keyCode = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_keyCode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_keyCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_keyCode_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_keyCode_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_keyCode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_keyCode_get(_swigobj) ((long ) _swigobj->m_keyCode) +static PyObject *_wrap_wxKeyEvent_m_keyCode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_keyCode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_keyCode_get. Expected _wxKeyEvent_p."); + return NULL; + } + } { - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_keyCode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; } + +#define wxKeyEvent_m_controlDown_set(_swigobj,_swigval) (_swigobj->m_controlDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_controlDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_controlDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_controlDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_controlDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; { - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_controlDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_controlDown_get(_swigobj) ((bool ) _swigobj->m_controlDown) +static PyObject *_wrap_wxKeyEvent_m_controlDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_controlDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_controlDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_controlDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_shiftDown_set(_swigobj,_swigval) (_swigobj->m_shiftDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_shiftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_shiftDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_shiftDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_shiftDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_shiftDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_shiftDown_get(_swigobj) ((bool ) _swigobj->m_shiftDown) +static PyObject *_wrap_wxKeyEvent_m_shiftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_shiftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_shiftDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_shiftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_altDown_set(_swigobj,_swigval) (_swigobj->m_altDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_altDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_altDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_altDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_altDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_altDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_altDown_get(_swigobj) ((bool ) _swigobj->m_altDown) +static PyObject *_wrap_wxKeyEvent_m_altDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_altDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_altDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_altDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_metaDown_set(_swigobj,_swigval) (_swigobj->m_metaDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_metaDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_metaDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_metaDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_metaDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_metaDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_metaDown_get(_swigobj) ((bool ) _swigobj->m_metaDown) +static PyObject *_wrap_wxKeyEvent_m_metaDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_metaDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_metaDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_metaDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_scanCode_set(_swigobj,_swigval) (_swigobj->m_scanCode = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_scanCode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_scanCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_scanCode_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_scanCode_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_scanCode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; } + +#define wxKeyEvent_m_scanCode_get(_swigobj) ((bool ) _swigobj->m_scanCode) +static PyObject *_wrap_wxKeyEvent_m_scanCode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_scanCode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_scanCode_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_scanCode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -5155,6 +6114,22 @@ static PyMethodDef eventscMethods[] = { { "wxNavigationKeyEvent_SetDirection", (PyCFunction) _wrap_wxNavigationKeyEvent_SetDirection, METH_VARARGS | METH_KEYWORDS }, { "wxNavigationKeyEvent_GetDirection", (PyCFunction) _wrap_wxNavigationKeyEvent_GetDirection, METH_VARARGS | METH_KEYWORDS }, { "new_wxNavigationKeyEvent", (PyCFunction) _wrap_new_wxNavigationKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_scanCode_get", (PyCFunction) _wrap_wxKeyEvent_m_scanCode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_scanCode_set", (PyCFunction) _wrap_wxKeyEvent_m_scanCode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_metaDown_get", (PyCFunction) _wrap_wxKeyEvent_m_metaDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_metaDown_set", (PyCFunction) _wrap_wxKeyEvent_m_metaDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_altDown_get", (PyCFunction) _wrap_wxKeyEvent_m_altDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_altDown_set", (PyCFunction) _wrap_wxKeyEvent_m_altDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_shiftDown_get", (PyCFunction) _wrap_wxKeyEvent_m_shiftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_shiftDown_set", (PyCFunction) _wrap_wxKeyEvent_m_shiftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_controlDown_get", (PyCFunction) _wrap_wxKeyEvent_m_controlDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_controlDown_set", (PyCFunction) _wrap_wxKeyEvent_m_controlDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_keyCode_get", (PyCFunction) _wrap_wxKeyEvent_m_keyCode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_keyCode_set", (PyCFunction) _wrap_wxKeyEvent_m_keyCode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_y_get", (PyCFunction) _wrap_wxKeyEvent_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_y_set", (PyCFunction) _wrap_wxKeyEvent_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_x_get", (PyCFunction) _wrap_wxKeyEvent_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_x_set", (PyCFunction) _wrap_wxKeyEvent_m_x_set, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetPositionTuple", (PyCFunction) _wrap_wxKeyEvent_GetPositionTuple, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetPosition", (PyCFunction) _wrap_wxKeyEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetY", (PyCFunction) _wrap_wxKeyEvent_GetY, METH_VARARGS | METH_KEYWORDS }, @@ -5167,6 +6142,24 @@ static PyMethodDef eventscMethods[] = { { "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_ControlDown", (PyCFunction) _wrap_wxKeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, { "new_wxKeyEvent", (PyCFunction) _wrap_new_wxKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_metaDown_get", (PyCFunction) _wrap_wxMouseEvent_m_metaDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_metaDown_set", (PyCFunction) _wrap_wxMouseEvent_m_metaDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_altDown_get", (PyCFunction) _wrap_wxMouseEvent_m_altDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_altDown_set", (PyCFunction) _wrap_wxMouseEvent_m_altDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_shiftDown_get", (PyCFunction) _wrap_wxMouseEvent_m_shiftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_shiftDown_set", (PyCFunction) _wrap_wxMouseEvent_m_shiftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_controlDown_get", (PyCFunction) _wrap_wxMouseEvent_m_controlDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_controlDown_set", (PyCFunction) _wrap_wxMouseEvent_m_controlDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_rightDown_get", (PyCFunction) _wrap_wxMouseEvent_m_rightDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_rightDown_set", (PyCFunction) _wrap_wxMouseEvent_m_rightDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_middleDown_get", (PyCFunction) _wrap_wxMouseEvent_m_middleDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_middleDown_set", (PyCFunction) _wrap_wxMouseEvent_m_middleDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_leftDown_get", (PyCFunction) _wrap_wxMouseEvent_m_leftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_leftDown_set", (PyCFunction) _wrap_wxMouseEvent_m_leftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_y_get", (PyCFunction) _wrap_wxMouseEvent_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_y_set", (PyCFunction) _wrap_wxMouseEvent_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_x_get", (PyCFunction) _wrap_wxMouseEvent_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_x_set", (PyCFunction) _wrap_wxMouseEvent_m_x_set, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetY", (PyCFunction) _wrap_wxMouseEvent_GetY, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetX", (PyCFunction) _wrap_wxMouseEvent_GetX, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetLogicalPosition", (PyCFunction) _wrap_wxMouseEvent_GetLogicalPosition, METH_VARARGS | METH_KEYWORDS }, @@ -5325,6 +6318,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, @@ -5343,6 +6337,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -5364,6 +6359,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -5518,6 +6514,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -5535,6 +6532,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -5544,6 +6542,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -5554,6 +6553,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, @@ -5575,6 +6581,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, diff --git a/wxPython/src/msw/events.py b/wxPython/src/msw/events.py index bea61f2861..4a44a50011 100644 --- a/wxPython/src/msw/events.py +++ b/wxPython/src/msw/events.py @@ -298,6 +298,55 @@ class wxMouseEventPtr(wxEventPtr): def GetY(self, *_args, **_kwargs): val = apply(eventsc.wxMouseEvent_GetY,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxMouseEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxMouseEvent_m_y_set(self,value) + return + if name == "m_leftDown" : + eventsc.wxMouseEvent_m_leftDown_set(self,value) + return + if name == "m_middleDown" : + eventsc.wxMouseEvent_m_middleDown_set(self,value) + return + if name == "m_rightDown" : + eventsc.wxMouseEvent_m_rightDown_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxMouseEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxMouseEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxMouseEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxMouseEvent_m_metaDown_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxMouseEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxMouseEvent_m_y_get(self) + if name == "m_leftDown" : + return eventsc.wxMouseEvent_m_leftDown_get(self) + if name == "m_middleDown" : + return eventsc.wxMouseEvent_m_middleDown_get(self) + if name == "m_rightDown" : + return eventsc.wxMouseEvent_m_rightDown_get(self) + if name == "m_controlDown" : + return eventsc.wxMouseEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxMouseEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxMouseEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxMouseEvent_m_metaDown_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxMouseEvent(wxMouseEventPtr): @@ -346,6 +395,50 @@ class wxKeyEventPtr(wxEventPtr): def GetPositionTuple(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_GetPositionTuple,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxKeyEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxKeyEvent_m_y_set(self,value) + return + if name == "m_keyCode" : + eventsc.wxKeyEvent_m_keyCode_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxKeyEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxKeyEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxKeyEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxKeyEvent_m_metaDown_set(self,value) + return + if name == "m_scanCode" : + eventsc.wxKeyEvent_m_scanCode_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxKeyEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxKeyEvent_m_y_get(self) + if name == "m_keyCode" : + return eventsc.wxKeyEvent_m_keyCode_get(self) + if name == "m_controlDown" : + return eventsc.wxKeyEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxKeyEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxKeyEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxKeyEvent_m_metaDown_get(self) + if name == "m_scanCode" : + return eventsc.wxKeyEvent_m_scanCode_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxKeyEvent(wxKeyEventPtr): diff --git a/wxPython/src/msw/filesys.cpp b/wxPython/src/msw/filesys.cpp new file mode 100644 index 0000000000..90cd522b88 --- /dev/null +++ b/wxPython/src/msw/filesys.cpp @@ -0,0 +1,2151 @@ +/* + * FILE : src/msw/filesys.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 810) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initfilesysc + +#define SWIG_name "filesysc" + +#include "helpers.h" +#include +#include +#include +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + +// wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling +// the callback functions +class wxPyFileSystemHandler : public wxFileSystemHandler { +public: + wxPyFileSystemHandler() : wxFileSystemHandler() {} + + DEC_PYCALLBACK_BOOL_STRING_pure(CanOpen); + DEC_PYCALLBACK_FSF_FSSTRING_pure(OpenFile); + DEC_PYCALLBACK_STRING_STRINGINT_pure(FindFirst); + DEC_PYCALLBACK_STRING__pure(FindNext); + + wxString GetProtocol(const wxString& location) { + return wxFileSystemHandler::GetProtocol(location); + } + + wxString GetLeftLocation(const wxString& location) { + return wxFileSystemHandler::GetLeftLocation(location); + } + + wxString GetAnchor(const wxString& location) { + return wxFileSystemHandler::GetAnchor(location); + } + + wxString GetRightLocation(const wxString& location) { + return wxFileSystemHandler::GetRightLocation(location); + } + + wxString GetMimeTypeFromExt(const wxString& location){ + return wxFileSystemHandler::GetMimeTypeFromExt(location); + } + + PYPRIVATE; +}; + + +IMP_PYCALLBACK_BOOL_STRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, CanOpen); +IMP_PYCALLBACK_FSF_FSSTRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, OpenFile); +IMP_PYCALLBACK_STRING_STRINGINT_pure(wxPyFileSystemHandler, wxFileSystemHandler, FindFirst); +IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext); + +void __wxMemoryFSHandler_AddFile_wxImage(const wxString& filename, + wxImage& image, + long type) { + wxMemoryFSHandler::AddFile(filename, image, type); +} + +void __wxMemoryFSHandler_AddFile_wxBitmap(const wxString& filename, + const wxBitmap& bitmap, + long type) { + wxMemoryFSHandler::AddFile(filename, bitmap, type); +} + +// void __wxMemoryFSHandler_AddFile_wxString(const wxString& filename, +// const wxString& textdata) { +// wxMemoryFSHandler::AddFile(filename, textdata); +// } + +void __wxMemoryFSHandler_AddFile_Data(const wxString& filename, + PyObject* data) { + + wxMemoryFSHandler::AddFile(filename, + (void*)PyString_AsString(data), + (size_t)PyString_Size(data)); +} +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxImage * _arg1; + long _arg2; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","image","type", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxImage",_kwnames,&_obj0,&_argo1,&_arg2)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxImage. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_wxImage(*_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxBitmap * _arg1; + long _arg2; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","bitmap","type", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxBitmap",_kwnames,&_obj0,&_argo1,&_arg2)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxBitmap. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_wxBitmap(*_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _arg1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "filename","data", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:__wxMemoryFSHandler_AddFile_Data",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_Data(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define new_wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxInputStream * _arg0; + wxString * _arg1; + wxString * _arg2; + wxString * _arg3; + wxDateTime * _arg4; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + PyObject * _argo4 = 0; + char *_kwnames[] = { "stream","loc","mimetype","anchor","modif", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOO:new_wxFSFile",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_argo4)) + return NULL; +{ + if (PyInstance_Check(_obj0)) { + wxPyInputStream* ptr; + if (SWIG_GetPtrObj(_obj0, (void **) &ptr,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } + _arg0 = ptr->wxi; + } else { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } +} +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); +} + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxFSFile. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)new_wxFSFile(_arg0,*_arg1,*_arg2,*_arg3,*_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxFSFile_GetStream(_swigobj) (_swigobj->GetStream()) +static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetStream. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxFSFile_GetStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject_SetAttrString(_resultobj, "thisown", PyInt_FromLong(1)); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxFSFile_GetMimeType(_swigobj) (_swigobj->GetMimeType()) +static PyObject *_wrap_wxFSFile_GetMimeType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetMimeType",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetMimeType. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetMimeType(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetLocation(_swigobj) (_swigobj->GetLocation()) +static PyObject *_wrap_wxFSFile_GetLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetLocation",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetLocation. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetLocation(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetAnchor(_swigobj) (_swigobj->GetAnchor()) +static PyObject *_wrap_wxFSFile_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetAnchor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetAnchor. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetAnchor(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetModificationTime(_swigobj) (_swigobj->GetModificationTime()) +static PyObject *_wrap_wxFSFile_GetModificationTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetModificationTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetModificationTime. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxFSFile_GetModificationTime(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static void *SwigwxPyFileSystemHandlerTowxFileSystemHandler(void *ptr) { + wxPyFileSystemHandler *src; + wxFileSystemHandler *dest; + src = (wxPyFileSystemHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxFileSystemHandler() (new wxPyFileSystemHandler()) +static PyObject *_wrap_new_wxFileSystemHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFileSystemHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFileSystemHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyFileSystemHandler *)new_wxFileSystemHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyFileSystemHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFileSystemHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFileSystemHandler * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler__setSelf. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystemHandler__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFileSystemHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_CanOpen. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFileSystemHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystemHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxPyFileSystemHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_OpenFile. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileSystemHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxFileSystemHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystemHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_FindFirst. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxFileSystemHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystemHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_FindNext. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetProtocol(_swigobj,_swigarg0) (_swigobj->GetProtocol(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetProtocol",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetProtocol. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetProtocol(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetLeftLocation(_swigobj,_swigarg0) (_swigobj->GetLeftLocation(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetLeftLocation",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetLeftLocation. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetLeftLocation(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetAnchor(_swigobj,_swigarg0) (_swigobj->GetAnchor(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetAnchor",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetAnchor. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetAnchor(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetRightLocation(_swigobj,_swigarg0) (_swigobj->GetRightLocation(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetRightLocation",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetRightLocation. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetRightLocation(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetMimeTypeFromExt(_swigobj,_swigarg0) (_swigobj->GetMimeTypeFromExt(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetMimeTypeFromExt",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetMimeTypeFromExt. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetMimeTypeFromExt(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define new_wxFileSystem() (new wxFileSystem()) +static PyObject *_wrap_new_wxFileSystem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystem * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFileSystem",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileSystem *)new_wxFileSystem(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileSystem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFileSystem_ChangePathTo(_swigobj,_swigarg0,_swigarg1) (_swigobj->ChangePathTo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystem_ChangePathTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystem * _arg0; + wxString * _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","location","is_dir", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystem_ChangePathTo",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_ChangePathTo. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem_ChangePathTo(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystem_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxFileSystem_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_GetPath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_GetPath. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_GetPath(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystem_OpenFile(_swigobj,_swigarg0) (_swigobj->OpenFile(_swigarg0)) +static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxFileSystem * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystem_OpenFile",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystem_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystem_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_FindFirst. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystem_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxFileSystem_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_FindNext. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxFileSystem_AddHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystemHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "handler", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_AddHandler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_AddHandler. Expected _wxFileSystemHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem::AddHandler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxFileSystem_CleanUpHandlers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFileSystem_CleanUpHandlers",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem::CleanUpHandlers(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxInternetFSHandlerTowxFileSystemHandler(void *ptr) { + wxInternetFSHandler *src; + wxFileSystemHandler *dest; + src = (wxInternetFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxInternetFSHandler() (new wxInternetFSHandler()) +static PyObject *_wrap_new_wxInternetFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInternetFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxInternetFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInternetFSHandler *)new_wxInternetFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxInternetFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxInternetFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxInternetFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxInternetFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxInternetFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxInternetFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInternetFSHandler_CanOpen. Expected _wxInternetFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxInternetFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxInternetFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxInternetFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxInternetFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxInternetFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInternetFSHandler_OpenFile. Expected _wxInternetFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxInternetFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +static void *SwigwxZipFSHandlerTowxFileSystemHandler(void *ptr) { + wxZipFSHandler *src; + wxFileSystemHandler *dest; + src = (wxZipFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxZipFSHandler() (new wxZipFSHandler()) +static PyObject *_wrap_new_wxZipFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxZipFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxZipFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxZipFSHandler *)new_wxZipFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxZipFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxZipFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxZipFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxZipFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxZipFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_CanOpen. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxZipFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxZipFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxZipFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxZipFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_OpenFile. Expected _wxZipFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxZipFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxZipFSHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxZipFSHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxZipFSHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_FindFirst. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxZipFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxZipFSHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxZipFSHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxZipFSHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxZipFSHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_FindNext. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxZipFSHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static void *SwigwxMemoryFSHandlerTowxFileSystemHandler(void *ptr) { + wxMemoryFSHandler *src; + wxFileSystemHandler *dest; + src = (wxMemoryFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxMemoryFSHandler() (new wxMemoryFSHandler()) +static PyObject *_wrap_new_wxMemoryFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMemoryFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMemoryFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMemoryFSHandler *)new_wxMemoryFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxMemoryFSHandler_RemoveFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "filename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_RemoveFile",_kwnames,&_obj0)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMemoryFSHandler::RemoveFile(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define wxMemoryFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxMemoryFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMemoryFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMemoryFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_CanOpen. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMemoryFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxMemoryFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxMemoryFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxMemoryFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_OpenFile. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxMemoryFSHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxMemoryFSHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxMemoryFSHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_FindFirst. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxMemoryFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxMemoryFSHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxMemoryFSHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxMemoryFSHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_FindNext. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxMemoryFSHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyMethodDef filesyscMethods[] = { + { "wxMemoryFSHandler_FindNext", (PyCFunction) _wrap_wxMemoryFSHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_FindFirst", (PyCFunction) _wrap_wxMemoryFSHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_OpenFile", (PyCFunction) _wrap_wxMemoryFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_CanOpen", (PyCFunction) _wrap_wxMemoryFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_RemoveFile", (PyCFunction) _wrap_wxMemoryFSHandler_RemoveFile, METH_VARARGS | METH_KEYWORDS }, + { "new_wxMemoryFSHandler", (PyCFunction) _wrap_new_wxMemoryFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_FindNext", (PyCFunction) _wrap_wxZipFSHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_FindFirst", (PyCFunction) _wrap_wxZipFSHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_OpenFile", (PyCFunction) _wrap_wxZipFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_CanOpen", (PyCFunction) _wrap_wxZipFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "new_wxZipFSHandler", (PyCFunction) _wrap_new_wxZipFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxInternetFSHandler_OpenFile", (PyCFunction) _wrap_wxInternetFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxInternetFSHandler_CanOpen", (PyCFunction) _wrap_wxInternetFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "new_wxInternetFSHandler", (PyCFunction) _wrap_new_wxInternetFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_CleanUpHandlers", (PyCFunction) _wrap_wxFileSystem_CleanUpHandlers, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_AddHandler", (PyCFunction) _wrap_wxFileSystem_AddHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_FindNext", (PyCFunction) _wrap_wxFileSystem_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_FindFirst", (PyCFunction) _wrap_wxFileSystem_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_OpenFile", (PyCFunction) _wrap_wxFileSystem_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_GetPath", (PyCFunction) _wrap_wxFileSystem_GetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_ChangePathTo", (PyCFunction) _wrap_wxFileSystem_ChangePathTo, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileSystem", (PyCFunction) _wrap_new_wxFileSystem, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetMimeTypeFromExt", (PyCFunction) _wrap_wxFileSystemHandler_GetMimeTypeFromExt, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetRightLocation", (PyCFunction) _wrap_wxFileSystemHandler_GetRightLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetAnchor", (PyCFunction) _wrap_wxFileSystemHandler_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetLeftLocation", (PyCFunction) _wrap_wxFileSystemHandler_GetLeftLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetProtocol", (PyCFunction) _wrap_wxFileSystemHandler_GetProtocol, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_FindNext", (PyCFunction) _wrap_wxFileSystemHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_FindFirst", (PyCFunction) _wrap_wxFileSystemHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_OpenFile", (PyCFunction) _wrap_wxFileSystemHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_CanOpen", (PyCFunction) _wrap_wxFileSystemHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler__setSelf", (PyCFunction) _wrap_wxFileSystemHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileSystemHandler", (PyCFunction) _wrap_new_wxFileSystemHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetModificationTime", (PyCFunction) _wrap_wxFSFile_GetModificationTime, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetAnchor", (PyCFunction) _wrap_wxFSFile_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetLocation", (PyCFunction) _wrap_wxFSFile_GetLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetMimeType", (PyCFunction) _wrap_wxFSFile_GetMimeType, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetStream", (PyCFunction) _wrap_wxFSFile_GetStream, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFSFile", (PyCFunction) _wrap_new_wxFSFile, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_Data", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_Data, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_wxBitmap", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxBitmap, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_wxImage", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxImage, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, + { "_signed_long","_long",0}, + { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, + { "_wxBMPHandler","_class_wxBMPHandler",0}, + { "_wxImage","_class_wxImage",0}, + { "_class_wxDateTime","_wxDateTime",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxRegionIterator","_wxRegionIterator",0}, + { "_wxGIFHandler","_class_wxGIFHandler",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, + { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, + { "_wxCursor","_class_wxCursor",0}, + { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxMask","_class_wxMask",0}, + { "_wxPNGHandler","_class_wxPNGHandler",0}, + { "_wxPen","_class_wxPen",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_wxImageList","_class_wxImageList",0}, + { "_class_wxTIFFHandler","_wxTIFFHandler",0}, + { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_wxDC","_class_wxDC",0}, + { "_class_wxBMPHandler","_wxBMPHandler",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_class_wxRealPoint","_wxRealPoint",0}, + { "_wxPNMHandler","_class_wxPNMHandler",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, + { "_class_wxGIFHandler","_wxGIFHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, + { "_class_wxMask","_wxMask",0}, + { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxColour","_class_wxColour",0}, + { "_wxBrush","_class_wxBrush",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_wxRect","_class_wxRect",0}, + { "_class_wxImage","_wxImage",0}, + { "_wxPoint","_class_wxPoint",0}, + { "_class_wxPNMHandler","_wxPNMHandler",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, + { "_char","_wxChar",0}, + { "_wxBitmap","_class_wxBitmap",0}, + { "_wxWindowDC","_class_wxWindowDC",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, + { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_wxConfig","_class_wxConfig",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_class_wxRegion","_wxRegion",0}, + { "_wxFont","_class_wxFont",0}, + { "_wxFSFile","_class_wxFSFile",0}, + { "_unsigned_long","_long",0}, + { "_class_wxRect","_wxRect",0}, + { "_class_wxDC","_wxDC",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, + { "_wxScreenDC","_class_wxScreenDC",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, + { "_class_wxFont","_wxFont",0}, + { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxClientDC","_class_wxClientDC",0}, + { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, + { "_wxRealPoint","_class_wxRealPoint",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_wxMemoryDC","_class_wxMemoryDC",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, + { "_wxPaintDC","_class_wxPaintDC",0}, + { "_class_wxWindowDC","_wxWindowDC",0}, + { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, + { "_class_wxCursor","_wxCursor",0}, + { "_class_wxImageHandler","_wxImageHandler",0}, + { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_wxIcon","_class_wxIcon",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_class_wxPen","_wxPen",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_class_wxImageList","_wxImageList",0}, + { "_wxFileSystemHandler","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, + { "_wxPCXHandler","_class_wxPCXHandler",0}, + { "_wxJPEGHandler","_class_wxJPEGHandler",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_wxSize","_class_wxSize",0}, + { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, + { "_class_wxPaintDC","_wxPaintDC",0}, + { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, + { "_class_wxIcon","_wxIcon",0}, + { "_class_wxColour","_wxColour",0}, + { "_class_wxScreenDC","_wxScreenDC",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, + { "_wxPalette","_class_wxPalette",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxRegion","_class_wxRegion",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, + { "_class_wxPCXHandler","_wxPCXHandler",0}, + { "_wxTIFFHandler","_class_wxTIFFHandler",0}, + { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxClientDC","_wxClientDC",0}, + { "_class_wxSize","_wxSize",0}, + { "_class_wxBitmap","_wxBitmap",0}, + { "_class_wxMemoryDC","_wxMemoryDC",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, + { "_class_wxConfig","_wxConfig",0}, + { "_class_wxPalette","_wxPalette",0}, + { "_class_wxFileSystemHandler","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initfilesysc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("filesysc", filesyscMethods); + d = PyModule_GetDict(m); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/msw/filesys.py b/wxPython/src/msw/filesys.py new file mode 100644 index 0000000000..b0f442faea --- /dev/null +++ b/wxPython/src/msw/filesys.py @@ -0,0 +1,240 @@ +# This file was created automatically by SWIG. +import filesysc + +from utils import * + +from image import * + +from misc import * + +from gdi import * + +from streams import * +import wx +import string + +import types +def wxMemoryFSHandler_AddFile(filename, a, b=''): + if isinstance(a, wxImage): + __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) + elif isinstance(a, wxBitmap): + __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) + elif type(a) == types.StringType: + #__wxMemoryFSHandler_AddFile_wxString(filename, a) + __wxMemoryFSHandler_AddFile_Data(filename, a) + else: raise TypeError, 'wxImage, wxBitmap or string expected' + +class wxFSFilePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetStream(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetStream,(self,) + _args, _kwargs) + return val + def GetMimeType(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetMimeType,(self,) + _args, _kwargs) + return val + def GetLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetLocation,(self,) + _args, _kwargs) + return val + def GetAnchor(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetAnchor,(self,) + _args, _kwargs) + return val + def GetModificationTime(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetModificationTime,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __repr__(self): + return "" % (self.this,) +class wxFSFile(wxFSFilePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFSFile,_args,_kwargs) + self.thisown = 1 + + + + +class wxCPPFileSystemHandlerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxCPPFileSystemHandler(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + + + + +class wxFileSystemHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler__setSelf,(self,) + _args, _kwargs) + return val + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_FindNext,(self,) + _args, _kwargs) + return val + def GetProtocol(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetProtocol,(self,) + _args, _kwargs) + return val + def GetLeftLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetLeftLocation,(self,) + _args, _kwargs) + return val + def GetAnchor(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetAnchor,(self,) + _args, _kwargs) + return val + def GetRightLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetRightLocation,(self,) + _args, _kwargs) + return val + def GetMimeTypeFromExt(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetMimeTypeFromExt,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFileSystemHandler(wxFileSystemHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFileSystemHandler,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxFileSystemHandler) + + + + +class wxFileSystemPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def ChangePathTo(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_ChangePathTo,(self,) + _args, _kwargs) + return val + def GetPath(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_GetPath,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFileSystem(wxFileSystemPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFileSystem,_args,_kwargs) + self.thisown = 1 + + + + +class wxInternetFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxInternetFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxInternetFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxInternetFSHandler(wxInternetFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxInternetFSHandler,_args,_kwargs) + self.thisown = 1 + + + + +class wxZipFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxZipFSHandler(wxZipFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxZipFSHandler,_args,_kwargs) + self.thisown = 1 + + + + +class wxMemoryFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxMemoryFSHandler(wxMemoryFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxMemoryFSHandler,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +__wxMemoryFSHandler_AddFile_wxImage = filesysc.__wxMemoryFSHandler_AddFile_wxImage + +__wxMemoryFSHandler_AddFile_wxBitmap = filesysc.__wxMemoryFSHandler_AddFile_wxBitmap + +__wxMemoryFSHandler_AddFile_Data = filesysc.__wxMemoryFSHandler_AddFile_Data + +wxFileSystem_AddHandler = filesysc.wxFileSystem_AddHandler + +wxFileSystem_CleanUpHandlers = filesysc.wxFileSystem_CleanUpHandlers + +wxMemoryFSHandler_RemoveFile = filesysc.wxMemoryFSHandler_RemoveFile + + + +#-------------- VARIABLE WRAPPERS ------------------ + diff --git a/wxPython/src/msw/frames.cpp b/wxPython/src/msw/frames.cpp index 59c9ebffc9..3edef79eff 100644 --- a/wxPython/src/msw/frames.cpp +++ b/wxPython/src/msw/frames.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/frames.cpp + * FILE : src/msw/frames.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1205,6 +1205,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -1244,6 +1245,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1279,6 +1281,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1400,6 +1403,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1425,6 +1429,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1434,6 +1439,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1444,6 +1450,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -1474,6 +1487,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index 4b1c936e7d..450ae3ea02 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/gdi.cpp + * FILE : src/msw/gdi.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -62,13 +63,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -85,23 +85,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -8380,6 +8380,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, @@ -8407,6 +8408,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDC","_class_wxDC",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -8418,6 +8420,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBrush","_class_wxBrush",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -8484,6 +8487,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -8496,6 +8500,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -8504,12 +8509,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPrinterDC","_wxPrinterDC",0}, @@ -8526,6 +8539,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp index 1e6b206c65..e7acb3f64c 100644 --- a/wxPython/src/msw/grid.cpp +++ b/wxPython/src/msw/grid.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/grid.cpp + * FILE : src/msw/grid.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -595,7 +595,7 @@ public: } - wxGridCellEditor *Clone() const { + wxGridCellEditor*Clone() const { wxGridCellEditor* rval = NULL; bool doSave = wxPyRestoreThread(); if (m_myInst.findCallback("Clone")) { @@ -10936,7 +10936,7 @@ static PyObject *_wrap_wxGrid_SelectCol(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxGrid_SelectBlock(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SelectBlock(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +#define wxGrid_SelectBlock(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SelectBlock(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGrid * _arg0; @@ -10944,11 +10944,13 @@ static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObje int _arg2; int _arg3; int _arg4; + bool _arg5 = (bool ) FALSE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","topRow","leftCol","bottomRow","rightCol", NULL }; + int tempbool5 = (int) FALSE; + char *_kwnames[] = { "self","topRow","leftCol","bottomRow","rightCol","addToSelected", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxGrid_SelectBlock",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|i:wxGrid_SelectBlock",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10957,9 +10959,10 @@ static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObje return NULL; } } + _arg5 = (bool ) tempbool5; { wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4); + wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -12826,6 +12829,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -12877,6 +12881,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_WXGRIDSELECTIONMODES",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -12916,6 +12921,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_uint","_WXGRIDSELECTIONMODES",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -13013,6 +13019,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_WXGRIDSELECTIONMODES","_uint",0}, { "_WXGRIDSELECTIONMODES","_EBool",0}, { "_WXGRIDSELECTIONMODES","_size_t",0}, + { "_WXGRIDSELECTIONMODES","_time_t",0}, { "_WXGRIDSELECTIONMODES","_wxPrintQuality",0}, { "_WXGRIDSELECTIONMODES","_wxCoord",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, @@ -13118,6 +13125,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_int","_WXGRIDSELECTIONMODES",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -13144,6 +13152,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_WXGRIDSELECTIONMODES",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -13154,6 +13163,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_WXGRIDSELECTIONMODES",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -13164,6 +13174,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_WXGRIDSELECTIONMODES",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -13210,6 +13228,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/html.cpp b/wxPython/src/msw/html.cpp index 6259b3bde0..fd92146634 100644 --- a/wxPython/src/msw/html.cpp +++ b/wxPython/src/msw/html.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/html.cpp + * FILE : src/msw/html.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -65,13 +66,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -88,23 +88,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -5651,13 +5651,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxHtmlParser","_wxHtmlParser",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, @@ -5667,6 +5670,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, @@ -5683,12 +5687,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, { "_wxHtmlWidgetCell","_class_wxHtmlWidgetCell",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, @@ -5741,6 +5748,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -5750,6 +5758,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -5796,6 +5805,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -5808,8 +5818,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, @@ -5817,6 +5829,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_wxHtmlCell","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, { "_wxHtmlCell","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, { "_wxHtmlCell","_class_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, @@ -5835,6 +5848,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, @@ -5857,6 +5871,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, { "_wxPyHtmlTagHandler","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, { "_wxPyHtmlTagHandler","_class_wxPyHtmlTagHandler",0}, @@ -5876,7 +5891,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -5884,9 +5901,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_wxHtmlWinParser","_class_wxHtmlWinParser",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, @@ -5942,6 +5962,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, { "_class_wxWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, @@ -5961,6 +5982,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -5978,6 +6000,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, @@ -5986,11 +6009,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_class_wxHtmlTag","_wxHtmlTag",0}, { "_wxScrolledWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, { "_wxScrolledWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMetaFileDC","_wxMetaFileDC",0}, @@ -5999,6 +6024,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -6026,6 +6052,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_class_wxHtmlContainerCell","_wxHtmlContainerCell",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, @@ -6036,6 +6063,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -6046,6 +6074,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -6054,6 +6083,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, { "_wxDateTime_t","_unsigned_short",0}, @@ -6063,17 +6093,29 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, { "_wxDateTime","_class_wxDateTime",0}, { "_wxPyHtmlWinTagHandler","_class_wxPyHtmlWinTagHandler",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_wxHtmlDCRenderer","_class_wxHtmlDCRenderer",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -6102,6 +6144,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -6109,11 +6152,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -6132,12 +6177,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxPyHtmlWinTagHandler","_wxPyHtmlWinTagHandler",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_HtmlHistoryItem","_class_HtmlHistoryItem",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxEvtHandler}, @@ -6174,6 +6221,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; @@ -6212,16 +6262,9 @@ SWIGEXPORT(void) inithtmlc() { inithtmlhelpc(); - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); + //wxClassInfo::CleanUpClasses(); + //wxClassInfo::InitializeClasses(); - // Until wxFileSystem is wrapped... - #if wxUSE_FS_ZIP - wxFileSystem::AddHandler(new wxZipFSHandler); - #endif - #if wxUSE_FS_INET -// wxFileSystem::AddHandler(new wxInternetFSHandler); - #endif { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py index ebda9bbf3b..f8795bcd53 100644 --- a/wxPython/src/msw/html.py +++ b/wxPython/src/msw/html.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * import wx class wxHtmlLinkInfoPtr : def __init__(self,this): @@ -112,6 +118,7 @@ class wxHtmlParserPtr : return val def GetFS(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_GetFS,(self,) + _args, _kwargs) + if val: val = wxFileSystemPtr(val) return val def Parse(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_Parse,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/htmlhelp.cpp b/wxPython/src/msw/htmlhelp.cpp index b93b7860d9..9005f40f47 100644 --- a/wxPython/src/msw/htmlhelp.cpp +++ b/wxPython/src/msw/htmlhelp.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/htmlhelp.cpp + * FILE : src/msw/htmlhelp.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -63,13 +64,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -86,23 +86,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2642,13 +2642,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxHtmlParser","_wxHtmlParser",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, @@ -2658,6 +2661,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, @@ -2677,12 +2681,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, { "_wxHtmlWidgetCell","_class_wxHtmlWidgetCell",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, @@ -2734,6 +2741,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2743,6 +2751,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -2785,6 +2794,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -2797,8 +2807,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, @@ -2806,6 +2818,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_wxHtmlCell","_class_wxHtmlCell",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, @@ -2818,6 +2831,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, @@ -2841,6 +2855,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_wxPyHtmlTagHandler","_class_wxPyHtmlTagHandler",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -2858,7 +2873,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -2866,10 +2883,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_wxHtmlWinParser","_class_wxHtmlWinParser",0}, { "_wxHtmlSearchStatus","_class_wxHtmlSearchStatus",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, @@ -2923,6 +2943,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, { "_class_wxWindow","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, @@ -2942,6 +2963,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -2954,6 +2976,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxHtmlHelpData","_wxHtmlHelpData",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, @@ -2963,10 +2986,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_class_wxHtmlTag","_wxHtmlTag",0}, { "_class_wxHtmlBookRecord","_wxHtmlBookRecord",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMetaFileDC","_wxMetaFileDC",0}, @@ -2975,6 +3000,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3004,6 +3030,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxHtmlHelpFrame","_class_wxHtmlHelpFrame",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_class_wxHtmlContainerCell","_wxHtmlContainerCell",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, @@ -3016,6 +3043,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3026,6 +3054,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3034,6 +3063,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, { "_wxDateTime_t","_unsigned_short",0}, @@ -3043,17 +3073,29 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, { "_wxDateTime","_class_wxDateTime",0}, { "_wxPyHtmlWinTagHandler","_class_wxPyHtmlWinTagHandler",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_wxHtmlDCRenderer","_class_wxHtmlDCRenderer",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -3082,6 +3124,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -3089,12 +3132,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_class_wxHtmlHelpFrame","_wxHtmlHelpFrame",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -3111,12 +3156,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxPyHtmlWinTagHandler","_wxPyHtmlWinTagHandler",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_HtmlHistoryItem","_class_HtmlHistoryItem",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler}, @@ -3153,6 +3200,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, { "_class_wxFrame","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, { "_class_wxFrame","_wxFrame",0}, diff --git a/wxPython/src/msw/htmlhelp.py b/wxPython/src/msw/htmlhelp.py index a3634b13aa..848ed85489 100644 --- a/wxPython/src/msw/htmlhelp.py +++ b/wxPython/src/msw/htmlhelp.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * class wxHtmlHelpFrameCfgPtr : def __init__(self,this): self.this = this diff --git a/wxPython/src/msw/image.cpp b/wxPython/src/msw/image.cpp index f2d7423dd1..bbd2ad6a15 100644 --- a/wxPython/src/msw/image.cpp +++ b/wxPython/src/msw/image.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/image.cpp + * FILE : src/msw/image.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2014,6 +2014,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, @@ -2046,6 +2047,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2060,6 +2062,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBrush","_class_wxBrush",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -2129,6 +2132,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2143,6 +2147,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -2151,12 +2156,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPrinterDC","_wxPrinterDC",0}, @@ -2173,6 +2186,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, diff --git a/wxPython/src/msw/mdi.cpp b/wxPython/src/msw/mdi.cpp index beb1536cea..c414b5f1e9 100644 --- a/wxPython/src/msw/mdi.cpp +++ b/wxPython/src/msw/mdi.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/mdi.cpp + * FILE : src/msw/mdi.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,13 +58,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -80,23 +80,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -811,6 +811,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -852,6 +853,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -887,6 +889,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1014,6 +1017,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1041,6 +1045,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1050,6 +1055,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1060,6 +1066,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -1091,6 +1104,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index 2a5a097ebb..d92648165e 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/misc.cpp + * FILE : src/msw/misc.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,13 +61,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -83,23 +83,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -318,37 +318,6 @@ static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args, PyObject return _resultobj; } -static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxString * _arg0; - int _arg1 = (int ) FALSE; - PyObject * _obj0 = 0; - char *_kwnames[] = { "command","sync", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxExecute",_kwnames,&_obj0,&_arg1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxExecute(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - static PyObject *_wrap_wxGetElapsedTime(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; long _result; @@ -547,6 +516,28 @@ static PyObject *_wrap_wxGetOsVersion(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetOsDescription",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetOsDescription()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _arg0; @@ -565,34 +556,35 @@ static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxUsleep(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - char *_kwnames[] = { NULL }; + unsigned long _arg0; + char *_kwnames[] = { "milliseconds", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxYield",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxUsleep",_kwnames,&_arg0)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxYield(); + wxUsleep(_arg0); wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; char *_kwnames[] = { NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSafeYield",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxYield",_kwnames)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSafeYield(); + _result = (bool )wxYield(); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); @@ -674,6 +666,175 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject return _resultobj; } +static PyObject *_wrap_wxGetEmailAddress(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetEmailAddress",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetEmailAddress()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetHostName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHostName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetHostName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetFullHostName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetFullHostName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetFullHostName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetUserId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserId",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetUserId()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetUserName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetUserName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHomeDir",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetHomeDir()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxAcceleratorEntry * _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "label", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGetAccelFromString",_kwnames,&_obj0)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + static int _wrap_wxNullAcceleratorTable_set(PyObject *val) { PyErr_SetString(PyExc_TypeError,"Variable wxNullAcceleratorTable is read-only."); @@ -1290,6 +1451,121 @@ static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObj return _resultobj; } +static wxRealPoint wxRealPoint___add__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return *self; + return *self + *p; + } +static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRealPoint * _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___add__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxRealPoint wxRealPoint___sub__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return *self; + return *self - *p; + } +static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRealPoint * _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___sub__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxRealPoint___cmp__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return 0; + return *self == *p; + } +static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___cmp__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxRealPoint___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPoint_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1513,6 +1789,121 @@ static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject return _resultobj; } +static wxPoint wxPoint___add__(wxPoint *self,const wxPoint * p) { + if (! p) return *self; + return *self + *p; + } +static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___add__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxPoint wxPoint___sub__(wxPoint *self,const wxPoint * p) { + if (! p) return *self; + return *self - *p; + } +static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___sub__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxPoint___cmp__(wxPoint *self,const wxPoint * p) { + if (! p) return 0; + return *self == *p; + } +static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___cmp__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPoint___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define new_wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3070,19 +3461,23 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a return _resultobj; } -#define new_wxRegion() (new wxRegion()) +#define new_wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxRegion * _result; - char *_kwnames[] = { NULL }; + long _arg0 = (long ) 0; + long _arg1 = (long ) 0; + long _arg2 = (long ) 0; + long _arg3 = (long ) 0; + char *_kwnames[] = { "x","y","width","height", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxRegion",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegion *)new_wxRegion(); + _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -4478,6 +4873,9 @@ static PyMethodDef misccMethods[] = { { "wxRect_GetX", (PyCFunction) _wrap_wxRect_GetX, METH_VARARGS | METH_KEYWORDS }, { "delete_wxRect", (PyCFunction) _wrap_delete_wxRect, METH_VARARGS | METH_KEYWORDS }, { "new_wxRect", (PyCFunction) _wrap_new_wxRect, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___cmp__", (PyCFunction) _wrap_wxPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___sub__", (PyCFunction) _wrap_wxPoint___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___add__", (PyCFunction) _wrap_wxPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_asTuple", (PyCFunction) _wrap_wxPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_Set", (PyCFunction) _wrap_wxPoint_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPoint", (PyCFunction) _wrap_delete_wxPoint, METH_VARARGS | METH_KEYWORDS }, @@ -4486,6 +4884,9 @@ static PyMethodDef misccMethods[] = { { "wxPoint_y_set", (PyCFunction) _wrap_wxPoint_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_get", (PyCFunction) _wrap_wxPoint_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_set", (PyCFunction) _wrap_wxPoint_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___cmp__", (PyCFunction) _wrap_wxRealPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___sub__", (PyCFunction) _wrap_wxRealPoint___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___add__", (PyCFunction) _wrap_wxRealPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_asTuple", (PyCFunction) _wrap_wxRealPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_Set", (PyCFunction) _wrap_wxRealPoint_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxRealPoint", (PyCFunction) _wrap_delete_wxRealPoint, METH_VARARGS | METH_KEYWORDS }, @@ -4512,12 +4913,20 @@ static PyMethodDef misccMethods[] = { { "wxSize_y_set", (PyCFunction) _wrap_wxSize_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_get", (PyCFunction) _wrap_wxSize_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_set", (PyCFunction) _wrap_wxSize_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS }, + { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserId", (PyCFunction) _wrap_wxGetUserId, METH_VARARGS | METH_KEYWORDS }, + { "wxGetFullHostName", (PyCFunction) _wrap_wxGetFullHostName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetHostName", (PyCFunction) _wrap_wxGetHostName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetEmailAddress", (PyCFunction) _wrap_wxGetEmailAddress, METH_VARARGS | METH_KEYWORDS }, { "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS }, { "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS }, { "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS }, - { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS }, + { "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS }, { "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS }, + { "wxGetOsDescription", (PyCFunction) _wrap_wxGetOsDescription, METH_VARARGS | METH_KEYWORDS }, { "wxGetOsVersion", (PyCFunction) _wrap_wxGetOsVersion, METH_VARARGS | METH_KEYWORDS }, { "wxStartTimer", (PyCFunction) _wrap_wxStartTimer, METH_VARARGS | METH_KEYWORDS }, { "wxShell", (PyCFunction) _wrap_wxShell, METH_VARARGS | METH_KEYWORDS }, @@ -4526,7 +4935,6 @@ static PyMethodDef misccMethods[] = { { "wxGetMousePosition", (PyCFunction) _wrap_wxGetMousePosition, METH_VARARGS | METH_KEYWORDS }, { "wxGetFreeMemory", (PyCFunction) _wrap_wxGetFreeMemory, METH_VARARGS | METH_KEYWORDS }, { "wxGetElapsedTime", (PyCFunction) _wrap_wxGetElapsedTime, METH_VARARGS | METH_KEYWORDS }, - { "wxExecute", (PyCFunction) _wrap_wxExecute, METH_VARARGS | METH_KEYWORDS }, { "wxEndBusyCursor", (PyCFunction) _wrap_wxEndBusyCursor, METH_VARARGS | METH_KEYWORDS }, { "wxDisplaySize", (PyCFunction) _wrap_wxDisplaySize, METH_VARARGS | METH_KEYWORDS }, { "wxBell", (PyCFunction) _wrap_wxBell, METH_VARARGS | METH_KEYWORDS }, @@ -4554,6 +4962,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_byte","_unsigned_char",0}, @@ -4562,6 +4971,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -4569,6 +4979,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -4607,6 +5018,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -4616,6 +5028,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_short","_signed_short",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -4624,12 +5037,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, @@ -4640,6 +5061,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, diff --git a/wxPython/src/msw/misc.py b/wxPython/src/msw/misc.py index e44aa7eaf6..e2ad047487 100644 --- a/wxPython/src/msw/misc.py +++ b/wxPython/src/msw/misc.py @@ -80,6 +80,17 @@ class wxRealPointPtr : def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxRealPoint_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___add__,(self,) + _args, _kwargs) + if val: val = wxRealPointPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___sub__,(self,) + _args, _kwargs) + if val: val = wxRealPointPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxRealPoint_x_set(self,value) @@ -119,6 +130,17 @@ class wxPointPtr : def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxPoint_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___add__,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___sub__,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxPoint_x_set(self,value) @@ -605,8 +627,6 @@ wxDisplaySize = miscc.wxDisplaySize wxEndBusyCursor = miscc.wxEndBusyCursor -wxExecute = miscc.wxExecute - wxGetElapsedTime = miscc.wxGetElapsedTime wxGetFreeMemory = miscc.wxGetFreeMemory @@ -623,11 +643,13 @@ wxStartTimer = miscc.wxStartTimer wxGetOsVersion = miscc.wxGetOsVersion +wxGetOsDescription = miscc.wxGetOsDescription + wxSleep = miscc.wxSleep -wxYield = miscc.wxYield +wxUsleep = miscc.wxUsleep -wxSafeYield = miscc.wxSafeYield +wxYield = miscc.wxYield wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows @@ -635,6 +657,23 @@ wxGetResource = miscc.wxGetResource wxStripMenuCodes = miscc.wxStripMenuCodes +wxGetEmailAddress = miscc.wxGetEmailAddress + +wxGetHostName = miscc.wxGetHostName + +wxGetFullHostName = miscc.wxGetFullHostName + +wxGetUserId = miscc.wxGetUserId + +wxGetUserName = miscc.wxGetUserName + +wxGetHomeDir = miscc.wxGetHomeDir + +def wxGetAccelFromString(*_args, **_kwargs): + val = apply(miscc.wxGetAccelFromString,_args,_kwargs) + if val: val = wxAcceleratorEntryPtr(val) + return val + #-------------- VARIABLE WRAPPERS ------------------ diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index d78be2fe56..2cb28625ff 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/misc2.cpp + * FILE : src/msw/misc2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,16 +60,16 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -85,23 +86,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -190,6 +191,20 @@ wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id) { return new wxGenericDragImage(listCtrl, id); } + // C++ version of wxProcess derived class + +class wxPyProcess : public wxProcess { +public: + wxPyProcess(wxEvtHandler *parent = NULL, int id = -1) + : wxProcess(parent, id) + {} + + DEC_PYCALLBACK_VOID_INTINT(OnTerminate); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate); #ifdef __cplusplus extern "C" { #endif @@ -1192,6 +1207,32 @@ static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxSafeYield",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSafeYield. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSafeYield(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; @@ -1656,6 +1697,46 @@ static PyObject *_wrap_wxLogSysError(PyObject *self, PyObject *args, PyObject *k return _resultobj; } +static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxString * _arg0; + int _arg1 = (int ) FALSE; + wxPyProcess * _arg2 = (wxPyProcess *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "command","sync","process", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxExecute",_kwnames,&_obj0,&_arg1,&_argo2)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxExecute. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxExecute(*_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + #define new_wxToolTip(_swigarg0) (new wxToolTip(_swigarg0)) static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2571,6 +2652,67 @@ static PyObject *_wrap_delete_wxBusyCursor(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define new_wxWindowDisabler(_swigarg0) (new wxWindowDisabler(_swigarg0)) +static PyObject *_wrap_new_wxWindowDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindowDisabler * _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "winToSkip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxWindowDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxWindowDisabler. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindowDisabler *)new_wxWindowDisabler(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindowDisabler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxWindowDisabler(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxWindowDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindowDisabler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxWindowDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindowDisabler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxWindowDisabler. Expected _wxWindowDisabler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxWindowDisabler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define delete_wxTipProvider(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_wxTipProvider(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4125,7 +4267,609 @@ static PyObject *_wrap_delete_wxLogNull(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxProcessEventTowxEvent(void *ptr) { + wxProcessEvent *src; + wxEvent *dest; + src = (wxProcessEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxProcessEvent(_swigarg0,_swigarg1,_swigarg2) (new wxProcessEvent(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxProcessEvent * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + char *_kwnames[] = { "id","pid","exitcode", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:new_wxProcessEvent",_kwnames,&_arg0,&_arg1,&_arg2)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxProcessEvent *)new_wxProcessEvent(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxProcessEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxProcessEvent_GetPid(_swigobj) (_swigobj->GetPid()) +static PyObject *_wrap_wxProcessEvent_GetPid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_GetPid",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_GetPid. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_GetPid(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_GetExitCode(_swigobj) (_swigobj->GetExitCode()) +static PyObject *_wrap_wxProcessEvent_GetExitCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_GetExitCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_GetExitCode. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_GetExitCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_pid_set(_swigobj,_swigval) (_swigobj->m_pid = _swigval,_swigval) +static PyObject *_wrap_wxProcessEvent_m_pid_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_pid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxProcessEvent_m_pid_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_pid_set. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_pid_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_pid_get(_swigobj) ((int ) _swigobj->m_pid) +static PyObject *_wrap_wxProcessEvent_m_pid_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_m_pid_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_pid_get. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_pid_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_exitcode_set(_swigobj,_swigval) (_swigobj->m_exitcode = _swigval,_swigval) +static PyObject *_wrap_wxProcessEvent_m_exitcode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_exitcode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxProcessEvent_m_exitcode_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_exitcode_set. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_exitcode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_exitcode_get(_swigobj) ((int ) _swigobj->m_exitcode) +static PyObject *_wrap_wxProcessEvent_m_exitcode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_m_exitcode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_exitcode_get. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_exitcode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxPyProcessTowxEvtHandler(void *ptr) { + wxPyProcess *src; + wxEvtHandler *dest; + src = (wxPyProcess *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxProcess(_swigarg0,_swigarg1) (new wxPyProcess(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxProcess(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _result; + wxEvtHandler * _arg0 = (wxEvtHandler *) NULL; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "parent","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|Oi:new_wxProcess",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxProcess. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyProcess *)new_wxProcess(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyProcess_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void wxPyProcess_Destroy(wxPyProcess *self) { delete self; } +static PyObject *_wrap_wxProcess_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Destroy. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyProcess_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxProcess__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxProcess__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess__setSelf. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_base_OnTerminate(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_OnTerminate(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxProcess_base_OnTerminate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pid","status", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxProcess_base_OnTerminate",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_base_OnTerminate. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_base_OnTerminate(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_Redirect(_swigobj) (_swigobj->Redirect()) +static PyObject *_wrap_wxProcess_Redirect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Redirect",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Redirect. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_Redirect(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_IsRedirected(_swigobj) (_swigobj->IsRedirected()) +static PyObject *_wrap_wxProcess_IsRedirected(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_IsRedirected",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_IsRedirected. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxProcess_IsRedirected(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcess_Detach(_swigobj) (_swigobj->Detach()) +static PyObject *_wrap_wxProcess_Detach(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Detach",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Detach. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_Detach(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_GetInputStream(_swigobj) (_swigobj->GetInputStream()) +static PyObject *_wrap_wxProcess_GetInputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetInputStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetInputStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxProcess_GetInputStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject_SetAttrString(_resultobj, "thisown", PyInt_FromLong(1)); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxProcess_GetErrorStream(_swigobj) (_swigobj->GetErrorStream()) +static PyObject *_wrap_wxProcess_GetErrorStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetErrorStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetErrorStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxProcess_GetErrorStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject_SetAttrString(_resultobj, "thisown", PyInt_FromLong(1)); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxProcess_GetOutputStream(_swigobj) (_swigobj->GetOutputStream()) +static PyObject *_wrap_wxProcess_GetOutputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxOutputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetOutputStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetOutputStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxOutputStream *)wxProcess_GetOutputStream(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxOutputStream_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxProcess_CloseOutput(_swigobj) (_swigobj->CloseOutput()) +static PyObject *_wrap_wxProcess_CloseOutput(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_CloseOutput",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_CloseOutput. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_CloseOutput(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef misc2cMethods[] = { + { "wxProcess_CloseOutput", (PyCFunction) _wrap_wxProcess_CloseOutput, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetOutputStream", (PyCFunction) _wrap_wxProcess_GetOutputStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetErrorStream", (PyCFunction) _wrap_wxProcess_GetErrorStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetInputStream", (PyCFunction) _wrap_wxProcess_GetInputStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Detach", (PyCFunction) _wrap_wxProcess_Detach, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_IsRedirected", (PyCFunction) _wrap_wxProcess_IsRedirected, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Redirect", (PyCFunction) _wrap_wxProcess_Redirect, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_base_OnTerminate", (PyCFunction) _wrap_wxProcess_base_OnTerminate, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess__setSelf", (PyCFunction) _wrap_wxProcess__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Destroy", (PyCFunction) _wrap_wxProcess_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "new_wxProcess", (PyCFunction) _wrap_new_wxProcess, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_exitcode_get", (PyCFunction) _wrap_wxProcessEvent_m_exitcode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_exitcode_set", (PyCFunction) _wrap_wxProcessEvent_m_exitcode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_pid_get", (PyCFunction) _wrap_wxProcessEvent_m_pid_get, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_pid_set", (PyCFunction) _wrap_wxProcessEvent_m_pid_set, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_GetExitCode", (PyCFunction) _wrap_wxProcessEvent_GetExitCode, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_GetPid", (PyCFunction) _wrap_wxProcessEvent_GetPid, METH_VARARGS | METH_KEYWORDS }, + { "new_wxProcessEvent", (PyCFunction) _wrap_new_wxProcessEvent, METH_VARARGS | METH_KEYWORDS }, { "delete_wxLogNull", (PyCFunction) _wrap_delete_wxLogNull, METH_VARARGS | METH_KEYWORDS }, { "new_wxLogNull", (PyCFunction) _wrap_new_wxLogNull, METH_VARARGS | METH_KEYWORDS }, { "wxLogWindow_PassMessages", (PyCFunction) _wrap_wxLogWindow_PassMessages, METH_VARARGS | METH_KEYWORDS }, @@ -4178,6 +4922,8 @@ static PyMethodDef misc2cMethods[] = { { "wxTipProvider_GetCurrentTip", (PyCFunction) _wrap_wxTipProvider_GetCurrentTip, METH_VARARGS | METH_KEYWORDS }, { "wxTipProvider_GetTip", (PyCFunction) _wrap_wxTipProvider_GetTip, METH_VARARGS | METH_KEYWORDS }, { "delete_wxTipProvider", (PyCFunction) _wrap_delete_wxTipProvider, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxWindowDisabler", (PyCFunction) _wrap_delete_wxWindowDisabler, METH_VARARGS | METH_KEYWORDS }, + { "new_wxWindowDisabler", (PyCFunction) _wrap_new_wxWindowDisabler, METH_VARARGS | METH_KEYWORDS }, { "delete_wxBusyCursor", (PyCFunction) _wrap_delete_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, { "new_wxBusyCursor", (PyCFunction) _wrap_new_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, { "wxFontEnumerator_GetFacenames", (PyCFunction) _wrap_wxFontEnumerator_GetFacenames, METH_VARARGS | METH_KEYWORDS }, @@ -4206,6 +4952,7 @@ static PyMethodDef misc2cMethods[] = { { "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS }, { "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS }, { "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS }, + { "wxExecute", (PyCFunction) _wrap_wxExecute, METH_VARARGS | METH_KEYWORDS }, { "wxLogSysError", (PyCFunction) _wrap_wxLogSysError, METH_VARARGS | METH_KEYWORDS }, { "wxLogStatusFrame", (PyCFunction) _wrap_wxLogStatusFrame, METH_VARARGS | METH_KEYWORDS }, { "wxLogStatus", (PyCFunction) _wrap_wxLogStatus, METH_VARARGS | METH_KEYWORDS }, @@ -4223,6 +4970,7 @@ static PyMethodDef misc2cMethods[] = { { "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS }, { "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS }, { "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS }, + { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS }, { "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS }, { "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS }, @@ -4264,13 +5012,17 @@ static PyMethodDef misc2cMethods[] = { */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, + { "_wxEvent","_class_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_wxEvent","_wxProcessEvent",SwigwxProcessEventTowxEvent}, { "_wxEvent","_class_wxEvent",0}, { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -4279,15 +5031,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, + { "_class_wxEvtHandler","_class_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_class_wxEvtHandler","_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, { "_class_wxEvtHandler","_wxEvtHandler",0}, { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, { "_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, { "_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, { "_wxLog","_class_wxLogGui",SwigwxLogGuiTowxLog}, @@ -4318,6 +5074,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -4351,18 +5108,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, + { "_class_wxEvent","_class_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_class_wxEvent","_wxProcessEvent",SwigwxProcessEventTowxEvent}, { "_class_wxEvent","_wxEvent",0}, { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, { "_class_wxLogWindow","_wxLogWindow",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxWindowDC","_class_wxWindowDC",0}, @@ -4388,13 +5149,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, @@ -4438,6 +5202,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, @@ -4450,6 +5215,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_class_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, { "_class_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, @@ -4465,6 +5231,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMenu","_wxMenu",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -4484,6 +5251,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -4493,6 +5261,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -4504,6 +5273,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxLogNull","_class_wxLogNull",0}, { "_wxSize","_class_wxSize",0}, @@ -4531,6 +5307,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -4554,6 +5331,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, + { "_wxEvtHandler","_class_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_wxEvtHandler","_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, diff --git a/wxPython/src/msw/misc2.py b/wxPython/src/msw/misc2.py index 60be26b567..ab39918201 100644 --- a/wxPython/src/msw/misc2.py +++ b/wxPython/src/msw/misc2.py @@ -10,6 +10,8 @@ from gdi import * from clip_dnd import * from events import * + +from streams import * class wxToolTipPtr : def __init__(self,this): self.this = this @@ -143,6 +145,23 @@ class wxBusyCursor(wxBusyCursorPtr): +class wxWindowDisablerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxWindowDisabler(self) + def __repr__(self): + return "" % (self.this,) +class wxWindowDisabler(wxWindowDisablerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxWindowDisabler,_args,_kwargs) + self.thisown = 1 + + + + class wxTipProviderPtr : def __init__(self,this): self.this = this @@ -372,6 +391,86 @@ class wxLogNull(wxLogNullPtr): +class wxProcessEventPtr(wxEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetPid(self, *_args, **_kwargs): + val = apply(misc2c.wxProcessEvent_GetPid,(self,) + _args, _kwargs) + return val + def GetExitCode(self, *_args, **_kwargs): + val = apply(misc2c.wxProcessEvent_GetExitCode,(self,) + _args, _kwargs) + return val + def __setattr__(self,name,value): + if name == "m_pid" : + misc2c.wxProcessEvent_m_pid_set(self,value) + return + if name == "m_exitcode" : + misc2c.wxProcessEvent_m_exitcode_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_pid" : + return misc2c.wxProcessEvent_m_pid_get(self) + if name == "m_exitcode" : + return misc2c.wxProcessEvent_m_exitcode_get(self) + raise AttributeError,name + def __repr__(self): + return "" % (self.this,) +class wxProcessEvent(wxProcessEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxProcessEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxProcessPtr(wxEvtHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Destroy(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Destroy,(self,) + _args, _kwargs) + return val + def _setSelf(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess__setSelf,(self,) + _args, _kwargs) + return val + def base_OnTerminate(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_base_OnTerminate,(self,) + _args, _kwargs) + return val + def Redirect(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Redirect,(self,) + _args, _kwargs) + return val + def IsRedirected(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_IsRedirected,(self,) + _args, _kwargs) + return val + def Detach(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Detach,(self,) + _args, _kwargs) + return val + def GetInputStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetInputStream,(self,) + _args, _kwargs) + return val + def GetErrorStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetErrorStream,(self,) + _args, _kwargs) + return val + def GetOutputStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetOutputStream,(self,) + _args, _kwargs) + if val: val = wxOutputStreamPtr(val) + return val + def CloseOutput(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_CloseOutput,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxProcess(wxProcessPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxProcess,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxProcess) + + + + #-------------- FUNCTION WRAPPERS ------------------ @@ -462,6 +561,8 @@ wxPostEvent = misc2c.wxPostEvent wxWakeUpIdle = misc2c.wxWakeUpIdle +wxSafeYield = misc2c.wxSafeYield + wxShowTip = misc2c.wxShowTip def wxCreateFileTipProvider(*_args, **_kwargs): @@ -511,6 +612,8 @@ wxLogStatusFrame = misc2c.wxLogStatusFrame wxLogSysError = misc2c.wxLogSysError +wxExecute = misc2c.wxExecute + wxLog_IsEnabled = misc2c.wxLog_IsEnabled wxLog_EnableLogging = misc2c.wxLog_EnableLogging diff --git a/wxPython/src/msw/printfw.cpp b/wxPython/src/msw/printfw.cpp index 00aea76a57..b61c2601e1 100644 --- a/wxPython/src/msw/printfw.cpp +++ b/wxPython/src/msw/printfw.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/printfw.cpp + * FILE : src/msw/printfw.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -61,13 +62,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -84,23 +84,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -4357,6 +4357,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, @@ -4407,6 +4408,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -4453,6 +4455,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -4594,6 +4597,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -4624,6 +4628,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -4633,6 +4638,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -4644,6 +4650,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPrintPreview","_wxPrintPreview",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -4675,6 +4688,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/sizers.cpp b/wxPython/src/msw/sizers.cpp index 5a9d1b9af5..5c93701808 100644 --- a/wxPython/src/msw/sizers.cpp +++ b/wxPython/src/msw/sizers.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/sizers.cpp + * FILE : src/msw/sizers.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,13 +58,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -80,23 +80,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2827,6 +2827,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -2882,6 +2883,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2915,6 +2917,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -3033,6 +3036,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3058,6 +3062,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3068,6 +3073,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3078,6 +3084,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -3108,6 +3121,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/sizers.py b/wxPython/src/msw/sizers.py index 3305dda245..9dbce08acb 100644 --- a/wxPython/src/msw/sizers.py +++ b/wxPython/src/msw/sizers.py @@ -191,9 +191,9 @@ class wxSizerPtr : apply(self.AddWindow, args) def Insert(self, *args): - if type(args[0]) == type(1): + if type(args[1]) == type(1): apply(self.InsertSpacer, args) - elif string.find(args[0].this, 'Sizer') != -1: + elif string.find(args[1].this, 'Sizer') != -1: apply(self.InsertSizer, args) else: apply(self.InsertWindow, args) diff --git a/wxPython/src/msw/stattool.cpp b/wxPython/src/msw/stattool.cpp index 52d8e0963d..f1c8308492 100644 --- a/wxPython/src/msw/stattool.cpp +++ b/wxPython/src/msw/stattool.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/stattool.cpp + * FILE : src/msw/stattool.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,13 +60,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -82,23 +82,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1358,11 +1358,11 @@ static void *SwigwxToolBarBaseTowxEvtHandler(void *ptr) { return (void *) dest; } -static wxToolBarToolBase * wxToolBarBase_AddTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int toggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { +static wxToolBarToolBase * wxToolBarBase_AddTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int isToggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->AddTool(id, bitmap, pushedBitmap, (bool)toggle, + return self->AddTool(id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1382,7 +1382,7 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO PyObject * _obj5 = 0; PyObject * _obj6 = 0; PyObject * _obj7 = 0; - char *_kwnames[] = { "self","id","bitmap","pushedBitmap","toggle","clientData","shortHelpString","longHelpString", NULL }; + char *_kwnames[] = { "self","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; char _ptemp[128]; self = self; @@ -1452,8 +1452,8 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_AddSimpleTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int toggle) { - return self->AddTool(id, bitmap, wxNullBitmap, toggle, NULL, +static wxToolBarToolBase * wxToolBarBase_AddSimpleTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int isToggle) { + return self->AddTool(id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1469,7 +1469,7 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg PyObject * _argo2 = 0; PyObject * _obj3 = 0; PyObject * _obj4 = 0; - char *_kwnames[] = { "self","id","bitmap","shortHelpString","longHelpString","toggle", NULL }; + char *_kwnames[] = { "self","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; char _ptemp[128]; self = self; @@ -1528,11 +1528,11 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int toggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { +static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int isToggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)toggle, + return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1553,7 +1553,7 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject * _obj6 = 0; PyObject * _obj7 = 0; PyObject * _obj8 = 0; - char *_kwnames[] = { "self","pos","id","bitmap","pushedBitmap","toggle","clientData","shortHelpString","longHelpString", NULL }; + char *_kwnames[] = { "self","pos","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; char _ptemp[128]; self = self; @@ -1623,8 +1623,8 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_InsertSimpleTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int toggle) { - return self->InsertTool(pos, id, bitmap, wxNullBitmap, toggle, NULL, +static wxToolBarToolBase * wxToolBarBase_InsertSimpleTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int isToggle) { + return self->InsertTool(pos, id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1641,7 +1641,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * PyObject * _argo3 = 0; PyObject * _obj4 = 0; PyObject * _obj5 = 0; - char *_kwnames[] = { "self","pos","id","bitmap","shortHelpString","longHelpString","toggle", NULL }; + char *_kwnames[] = { "self","pos","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; char _ptemp[128]; self = self; @@ -3130,6 +3130,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -3177,6 +3178,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -3211,6 +3213,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -3342,6 +3345,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3364,6 +3368,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3373,6 +3378,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3383,6 +3389,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -3423,6 +3436,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/streams.cpp b/wxPython/src/msw/streams.cpp new file mode 100644 index 0000000000..fbea578e45 --- /dev/null +++ b/wxPython/src/msw/streams.cpp @@ -0,0 +1,855 @@ +/* + * FILE : src/msw/streams.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 810) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initstreamsc + +#define SWIG_name "streamsc" + +#include "helpers.h" +#include +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + // C++ +// definitions of wxStringPtrList and wxPyInputStream +#include +WX_DEFINE_LIST(wxStringPtrList); + + +void wxPyInputStream::close() { + /* do nothing */ +} + +void wxPyInputStream::flush() { + /*do nothing*/ +} + +bool wxPyInputStream::eof() { + if (wxi) + return wxi->Eof(); + else + return TRUE; +} + +wxPyInputStream::~wxPyInputStream() { + /*do nothing*/ +} + +wxString* wxPyInputStream::read(int size) { + wxString* s = NULL; + const int BUFSIZE = 1024; + + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + if (size < 0) { + // init buffers + char * buf = new char[BUFSIZE]; + if (!buf) { + PyErr_NoMemory(); + return NULL; + } + + s = new wxString(); + if (!s) { + delete buf; + PyErr_NoMemory(); + return NULL; + } + + // read until EOF + wxPy_BEGIN_ALLOW_THREADS; + while (! wxi->Eof()) { + wxi->Read(buf, BUFSIZE); + //*s += wxString(buf, wxi->LastRead()); + s->Append(buf, wxi->LastRead()); + } + delete buf; + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + + } else { // Read only size number of characters + s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read size bytes + wxPy_BEGIN_ALLOW_THREADS; + wxi->Read(s->GetWriteBuf(size+1), size); + s->UngetWriteBuf(wxi->LastRead()); + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + } + return s; +} + + +wxString* wxPyInputStream::readline (int size) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init buffer + int i; + char ch; + wxString* s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read until \n or byte limit reached + wxPy_BEGIN_ALLOW_THREADS; + for (i=ch=0; (ch != '\n') && (!wxi->Eof()) && ((size < 0) || (i < size)); i++) { + *s += ch = wxi->GetC(); + } + wxPy_END_ALLOW_THREADS; + + // errorcheck + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return s; +} + + +wxStringPtrList* wxPyInputStream::readlines (int sizehint) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init list + wxStringPtrList* l = new wxStringPtrList(); + if (!l) { + PyErr_NoMemory(); + return NULL; + } + + // read sizehint bytes or until EOF + wxPy_BEGIN_ALLOW_THREADS; + int i; + for (i=0; (!wxi->Eof()) && ((sizehint < 0) || (i < sizehint));) { + wxString* s = readline(); + if (s == NULL) { + l->DeleteContents(TRUE); + l->Clear(); + return NULL; + } + l->Append(s); + i = i + s->Length(); + } + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + l->DeleteContents(TRUE); + l->Clear(); + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return l; +} + + +void wxPyInputStream::seek(int offset, int whence) { + if (wxi) + wxi->SeekI(offset, wxSeekMode(whence)); +} + +int wxPyInputStream::tell(){ + if (wxi) + return wxi->TellI(); +} + + + +// wxInputStream which operates on a Python file-like object +class wxPyCBInputStream : public wxInputStream { +protected: + PyObject* read; + PyObject* seek; + PyObject* tell; + PyObject* py; + + virtual size_t OnSysRead(void *buffer, size_t bufsize) { + if (bufsize == 0) + return 0; + + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("(i)", bufsize); + PyObject* result = PyEval_CallObject(read, arglist); + Py_DECREF(arglist); + + size_t o = 0; + if ((result != NULL) && PyString_Check(result)) { + o = PyString_Size(result); + if (o == 0) + m_lasterror = wxSTREAM_EOF; + if (o > bufsize) + o = bufsize; + strncpy((char*)buffer, PyString_AsString(result), o); + Py_DECREF(result); + + } + else + m_lasterror = wxSTREAM_READ_ERROR; + wxPySaveThread(doSave); + m_lastcount = o; + return o; + } + + virtual size_t OnSysWrite(const void *buffer, size_t bufsize){ + m_lasterror = wxSTREAM_WRITE_ERROR; + return 0; + } + + virtual off_t OnSysSeek(off_t off, wxSeekMode mode){ + bool doSave = wxPyRestoreThread(); + PyObject*arglist = Py_BuildValue("(ii)", off, mode); + PyObject*result = PyEval_CallObject(seek, arglist); + Py_DECREF(arglist); + Py_XDECREF(result); + wxPySaveThread(doSave); + return OnSysTell(); + } + + virtual off_t OnSysTell() const{ + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("()"); + PyObject* result = PyEval_CallObject(tell, arglist); + Py_DECREF(arglist); + off_t o = 0; + if (result != NULL) { + o = PyInt_AsLong(result); + Py_DECREF(result); + }; + wxPySaveThread(doSave); + return o; + } + + wxPyCBInputStream(PyObject *p, PyObject *r, PyObject *s, PyObject *t) + : py(p), read(r), seek(s), tell(t) + {} + +public: + ~wxPyCBInputStream() { + bool doSave = wxPyRestoreThread(); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + wxPySaveThread(doSave); + } + + virtual size_t GetSize() { + if (seek && tell) { + off_t temp = OnSysTell(); + off_t ret = OnSysSeek(0, wxFromEnd); + OnSysSeek(temp, wxFromStart); + return ret; + } + else + return 0; + } + + static wxPyCBInputStream* create(PyObject *py) { + PyObject* read; + PyObject* seek; + PyObject* tell; + + if (!PyInstance_Check(py) && !PyFile_Check(py)) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + return NULL; + } + read = getMethod(py, "read"); + seek = getMethod(py, "seek"); + tell = getMethod(py, "tell"); + + if (!read) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + return NULL; + } + return new wxPyCBInputStream(py, read, seek, tell); + } + + static PyObject* getMethod(PyObject* py, char* name) { + if (!PyObject_HasAttrString(py, name)) + return NULL; + PyObject* o = PyObject_GetAttrString(py, name); + if (!PyMethod_Check(o) && !PyCFunction_Check(o)) + return NULL; + return o; + } + +protected: + +}; + +#ifdef __cplusplus +extern "C" { +#endif +static wxPyInputStream *new_wxPyInputStream(PyObject *p) { + wxInputStream* wxi = wxPyCBInputStream::create(p); + if (wxi) + return new wxPyInputStream(wxi); + else + return NULL; + } + +static PyObject *_wrap_new_wxInputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _result; + PyObject * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxInputStream",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = _obj0; +} +{ + _result = (wxPyInputStream *)new_wxPyInputStream(_arg0); + +}{ + char _ptemp[128]; + if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyInputStream_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_close(_swigobj) (_swigobj->close()) +static PyObject *_wrap_wxInputStream_close(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_close",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_close. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_close(_arg0); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_flush(_swigobj) (_swigobj->flush()) +static PyObject *_wrap_wxInputStream_flush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_flush",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_flush. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_flush(_arg0); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_eof(_swigobj) (_swigobj->eof()) +static PyObject *_wrap_wxInputStream_eof(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_eof",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_eof. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (bool )wxInputStream_eof(_arg0); + +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxInputStream_read(_swigobj,_swigarg0) (_swigobj->read(_swigarg0)) +static PyObject *_wrap_wxInputStream_read(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_read",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_read. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxString *)wxInputStream_read(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_readline(_swigobj,_swigarg0) (_swigobj->readline(_swigarg0)) +static PyObject *_wrap_wxInputStream_readline(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readline",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readline. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxString *)wxInputStream_readline(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_readlines(_swigobj,_swigarg0) (_swigobj->readlines(_swigarg0)) +static PyObject *_wrap_wxInputStream_readlines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStringPtrList * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","sizehint", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readlines",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readlines. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxStringPtrList *)wxInputStream_readlines(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyList_New(_result->GetCount()); + wxStringPtrList::Node *node = _result->GetFirst(); + for (int i=0; node; i++) { + wxString *s = node->GetData(); + PyList_SetItem(_resultobj, i, PyString_FromStringAndSize(s->c_str(), s->Len())); + node = node->GetNext(); + delete s; + } + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_seek(_swigobj,_swigarg0,_swigarg1) (_swigobj->seek(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxInputStream_seek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + int _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","offset","whence", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxInputStream_seek",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_seek. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_seek(_arg0,_arg1,_arg2); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_tell(_swigobj) (_swigobj->tell()) +static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_tell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_tell. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (int )wxInputStream_tell(_arg0); + +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void wxOutputStream_write(wxOutputStream *self,const wxString & str) { + self->Write(str.c_str(), str.Length()); + } +static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxOutputStream * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxOutputStream_write",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxOutputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxOutputStream_write. Expected _wxOutputStream_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxOutputStream_write(_arg0,*_arg1); + +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyMethodDef streamscMethods[] = { + { "wxOutputStream_write", (PyCFunction) _wrap_wxOutputStream_write, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_tell", (PyCFunction) _wrap_wxInputStream_tell, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_seek", (PyCFunction) _wrap_wxInputStream_seek, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_readlines", (PyCFunction) _wrap_wxInputStream_readlines, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_readline", (PyCFunction) _wrap_wxInputStream_readline, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_read", (PyCFunction) _wrap_wxInputStream_read, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_eof", (PyCFunction) _wrap_wxInputStream_eof, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_flush", (PyCFunction) _wrap_wxInputStream_flush, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_close", (PyCFunction) _wrap_wxInputStream_close, METH_VARARGS | METH_KEYWORDS }, + { "new_wxInputStream", (PyCFunction) _wrap_new_wxInputStream, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initstreamsc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("streamsc", streamscMethods); + d = PyModule_GetDict(m); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/msw/streams.py b/wxPython/src/msw/streams.py new file mode 100644 index 0000000000..6394f60946 --- /dev/null +++ b/wxPython/src/msw/streams.py @@ -0,0 +1,66 @@ +# This file was created automatically by SWIG. +import streamsc +import wx +import string +class wxInputStreamPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def close(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_close,(self,) + _args, _kwargs) + return val + def flush(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_flush,(self,) + _args, _kwargs) + return val + def eof(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_eof,(self,) + _args, _kwargs) + return val + def read(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_read,(self,) + _args, _kwargs) + return val + def readline(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_readline,(self,) + _args, _kwargs) + return val + def readlines(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_readlines,(self,) + _args, _kwargs) + return val + def seek(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_seek,(self,) + _args, _kwargs) + return val + def tell(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_tell,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxInputStream(wxInputStreamPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(streamsc.new_wxInputStream,_args,_kwargs) + self.thisown = 1 + + + + +class wxOutputStreamPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def write(self, *_args, **_kwargs): + val = apply(streamsc.wxOutputStream_write,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxOutputStream(wxOutputStreamPtr): + def __init__(self,this): + self.this = this + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + diff --git a/wxPython/src/msw/utils.cpp b/wxPython/src/msw/utils.cpp index 9dc5e6359a..c594f0632a 100644 --- a/wxPython/src/msw/utils.cpp +++ b/wxPython/src/msw/utils.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/utils.cpp + * FILE : src/msw/utils.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,13 +61,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -83,23 +83,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -2280,24 +2280,16 @@ static PyObject *_wrap_new_wxDateTime(PyObject *self, PyObject *args, PyObject * static PyObject *_wrap_new_wxDateTimeFromTimeT(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDateTime * _result; - time_t * _arg0; - PyObject * _argo0 = 0; + time_t _arg0; char *_kwnames[] = { "timet", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxDateTimeFromTimeT",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxDateTimeFromTimeT",_kwnames,&_arg0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_time_t_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDateTimeFromTimeT. Expected _time_t_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxDateTime *)new_wxDateTimeFromTimeT(*_arg0); + _result = (wxDateTime *)new_wxDateTimeFromTimeT(_arg0); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -2464,14 +2456,13 @@ static PyObject *_wrap_wxDateTime_SetTimeT(PyObject *self, PyObject *args, PyObj PyObject * _resultobj; wxDateTime * _result; wxDateTime * _arg0; - time_t * _arg1; + time_t _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; char *_kwnames[] = { "self","timet", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_SetTimeT",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetTimeT",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2480,16 +2471,9 @@ static PyObject *_wrap_wxDateTime_SetTimeT(PyObject *self, PyObject *args, PyObj return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_time_t_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SetTimeT. Expected _time_t_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,*_arg1); + wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,_arg1); _result = (wxDateTime *) &_result_ref; wxPy_END_ALLOW_THREADS; @@ -3774,11 +3758,10 @@ static PyObject *_wrap_wxDateTime_IsValid(PyObject *self, PyObject *args, PyObje #define wxDateTime_GetTicks(_swigobj) (_swigobj->GetTicks()) static PyObject *_wrap_wxDateTime_GetTicks(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - time_t * _result; + time_t _result; wxDateTime * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetTicks",_kwnames,&_argo0)) @@ -3792,11 +3775,10 @@ static PyObject *_wrap_wxDateTime_GetTicks(PyObject *self, PyObject *args, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - _result = new time_t (wxDateTime_GetTicks(_arg0)); + _result = (time_t )wxDateTime_GetTicks(_arg0); wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_time_t_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -7363,18 +7345,66 @@ static PyMethodDef utilscMethods[] = { static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_long","_long",0}, { "_class_wxDateTime","_wxDateTime",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, { "_wxFileConfig","_class_wxFileConfig",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_wxConfig","_class_wxConfig",0}, { "_class_wxFileConfig","_wxFileConfig",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, { "_unsigned_long","_long",0}, { "_wxTimeSpan","_class_wxTimeSpan",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_wxDateSpan","_class_wxDateSpan",0}, + { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, { "_wxConfigBase","_class_wxFileConfig",SwigwxFileConfigTowxConfigBase}, { "_wxConfigBase","_wxFileConfig",SwigwxFileConfigTowxConfigBase}, @@ -7382,19 +7412,53 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxConfigBase","_wxConfig",SwigwxConfigTowxConfigBase}, { "_wxConfigBase","_class_wxConfigBase",0}, { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, { "_wxDateTime_t","_unsigned_short",0}, { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxTimeSpan","_wxTimeSpan",0}, { "_class_wxConfigBase","_class_wxFileConfig",SwigwxFileConfigTowxConfigBase}, { "_class_wxConfigBase","_wxFileConfig",SwigwxFileConfigTowxConfigBase}, { "_class_wxConfigBase","_class_wxConfig",SwigwxConfigTowxConfigBase}, { "_class_wxConfigBase","_wxConfig",SwigwxConfigTowxConfigBase}, { "_class_wxConfigBase","_wxConfigBase",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, { "_class_wxDateSpan","_wxDateSpan",0}, { "_class_wxConfig","_wxConfig",0}, {0,0,0}}; diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index 66532bc801..6fda8714f9 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/windows.cpp + * FILE : src/msw/windows.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,13 +59,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -81,23 +81,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -321,6 +321,31 @@ static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, Py return _resultobj; } +#define new_wxEvtHandler() (new wxEvtHandler()) +static PyObject *_wrap_new_wxEvtHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvtHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxEvtHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxEvtHandler *)new_wxEvtHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxEvtHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxEvtHandler_ProcessEvent(_swigobj,_swigarg0) (_swigobj->ProcessEvent(_swigarg0)) static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7589,19 +7614,20 @@ static void *SwigwxMenuBarTowxEvtHandler(void *ptr) { return (void *) dest; } -#define new_wxMenuBar() (new wxMenuBar()) +#define new_wxMenuBar(_swigarg0) (new wxMenuBar(_swigarg0)) static PyObject *_wrap_new_wxMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxMenuBar * _result; - char *_kwnames[] = { NULL }; + long _arg0 = (long ) 0; + char *_kwnames[] = { "style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMenuBar",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|l:new_wxMenuBar",_kwnames,&_arg0)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMenuBar *)new_wxMenuBar(); + _result = (wxMenuBar *)new_wxMenuBar(_arg0); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -9307,6 +9333,7 @@ static PyMethodDef windowscMethods[] = { { "wxEvtHandler_GetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_GetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_AddPendingEvent", (PyCFunction) _wrap_wxEvtHandler_AddPendingEvent, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS }, + { "new_wxEvtHandler", (PyCFunction) _wrap_new_wxEvtHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS }, @@ -9335,6 +9362,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -9374,6 +9402,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -9397,6 +9426,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -9480,6 +9510,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMenu","_wxMenu",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -9495,6 +9526,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -9503,12 +9535,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPrinterDC","_wxPrinterDC",0}, @@ -9530,6 +9570,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_wxRegion","_class_wxRegion",0}, diff --git a/wxPython/src/msw/windows.py b/wxPython/src/msw/windows.py index 6028fe3d55..18e98d8084 100644 --- a/wxPython/src/msw/windows.py +++ b/wxPython/src/msw/windows.py @@ -62,8 +62,9 @@ class wxEvtHandlerPtr : _prop_list_ = {} class wxEvtHandler(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windowsc.new_wxEvtHandler,_args,_kwargs) + self.thisown = 1 @@ -85,12 +86,6 @@ class wxValidatorPtr(wxEvtHandlerPtr): return val def __repr__(self): return "" % (self.this,) - - _prop_list_ = { - 'window' : ('GetWindow', 'SetWindow'), - } - _prop_list_.update(wxEvtHandler._prop_list_) - class wxValidator(wxValidatorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxValidator,_args,_kwargs) @@ -522,43 +517,24 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def __repr__(self): return "" % (self.this,) - # replaces broken shadow method + # replaces broken shadow methods def GetCaret(self, *_args, **_kwargs): from misc2 import wxCaretPtr val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs) if val: val = wxCaretPtr(val) return val - - - _prop_list_ = { - 'size' : ('GetSize', 'SetSize'), - 'enabled' : ('IsEnabled', 'Enable'), - 'background' : ('GetBackgroundColour', 'SetBackgroundColour'), - 'foreground' : ('GetForegroundColour', 'SetForegroundColour'), - 'children' : ('GetChildren', None), - 'charHeight' : ('GetCharHeight', None), - 'charWidth' : ('GetCharWidth', None), - 'clientSize' : ('GetClientSize', 'SetClientSize'), - 'font' : ('GetFont', 'SetFont'), - 'grandParent' : ('GetGrandParent', None), - 'handle' : ('GetHandle', None), - 'label' : ('GetLabel', 'SetLabel'), - 'name' : ('GetName', 'SetName'), - 'parent' : ('GetParent', None), - 'position' : ('GetPosition', 'SetPosition'), - 'title' : ('GetTitle', 'SetTitle'), - 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'), - 'visible' : ('IsShown', 'Show'), - 'toolTip' : ('GetToolTip', 'SetToolTip'), - 'sizer' : ('GetSizer', 'SetSizer'), - 'validator' : ('GetValidator', 'SetValidator'), - 'dropTarget' : ('GetDropTarget', 'SetDropTarget'), - 'caret' : ('GetCaret', 'SetCaret'), - 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'), - 'constraints' : ('GetConstraints', 'SetConstraints'), - } - _prop_list_.update(wxEvtHandler._prop_list_) + def GetSizer(self, *_args, **_kwargs): + from sizers import wxSizerPtr + val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) + if val: val = wxSizerPtr(val) + return val + + def GetToolTip(self, *_args, **_kwargs): + from misc2 import wxToolTipPtr + val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) + if val: val = wxToolTipPtr(val) + return val class wxWindow(wxWindowPtr): def __init__(self,*_args,**_kwargs): diff --git a/wxPython/src/msw/windows2.cpp b/wxPython/src/msw/windows2.cpp index 202bd9d833..110282526d 100644 --- a/wxPython/src/msw/windows2.cpp +++ b/wxPython/src/msw/windows2.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/windows2.cpp + * FILE : src/msw/windows2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -65,13 +66,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -88,23 +88,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -667,6 +667,76 @@ static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxNotebook_SetPageSize(_swigobj,_swigarg0) (_swigobj->SetPageSize(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPageSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPageSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageSize. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPageSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebook_SetPadding(_swigobj,_swigarg0) (_swigobj->SetPadding(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPadding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","padding", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPadding",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPadding. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPadding(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxNotebook_DeletePage(_swigobj,_swigarg0) (_swigobj->DeletePage(_swigarg0)) static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1890,7 +1960,63 @@ static PyObject *_wrap_wxTaskBarIcon_PopupMenu(PyObject *self, PyObject *args, P return _resultobj; } +#define wxTaskBarIcon_IsIconInstalled(_swigobj) (_swigobj->IsIconInstalled()) +static PyObject *_wrap_wxTaskBarIcon_IsIconInstalled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTaskBarIcon * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTaskBarIcon_IsIconInstalled",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTaskBarIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTaskBarIcon_IsIconInstalled. Expected _wxTaskBarIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTaskBarIcon_IsIconInstalled(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTaskBarIcon_IsOK(_swigobj) (_swigobj->IsOK()) +static PyObject *_wrap_wxTaskBarIcon_IsOK(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTaskBarIcon * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTaskBarIcon_IsOK",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTaskBarIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTaskBarIcon_IsOK. Expected _wxTaskBarIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTaskBarIcon_IsOK(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyMethodDef windows2cMethods[] = { + { "wxTaskBarIcon_IsOK", (PyCFunction) _wrap_wxTaskBarIcon_IsOK, METH_VARARGS | METH_KEYWORDS }, + { "wxTaskBarIcon_IsIconInstalled", (PyCFunction) _wrap_wxTaskBarIcon_IsIconInstalled, METH_VARARGS | METH_KEYWORDS }, { "wxTaskBarIcon_PopupMenu", (PyCFunction) _wrap_wxTaskBarIcon_PopupMenu, METH_VARARGS | METH_KEYWORDS }, { "wxTaskBarIcon_RemoveIcon", (PyCFunction) _wrap_wxTaskBarIcon_RemoveIcon, METH_VARARGS | METH_KEYWORDS }, { "wxTaskBarIcon_SetIcon", (PyCFunction) _wrap_wxTaskBarIcon_SetIcon, METH_VARARGS | METH_KEYWORDS }, @@ -1927,6 +2053,8 @@ static PyMethodDef windows2cMethods[] = { { "wxNotebook_DeleteAllPages", (PyCFunction) _wrap_wxNotebook_DeleteAllPages, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_RemovePage", (PyCFunction) _wrap_wxNotebook_RemovePage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_DeletePage", (PyCFunction) _wrap_wxNotebook_DeletePage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPadding", (PyCFunction) _wrap_wxNotebook_SetPadding, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPageSize", (PyCFunction) _wrap_wxNotebook_SetPageSize, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetRowCount", (PyCFunction) _wrap_wxNotebook_GetRowCount, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_SetPageImage", (PyCFunction) _wrap_wxNotebook_SetPageImage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetPageImage", (PyCFunction) _wrap_wxNotebook_GetPageImage, METH_VARARGS | METH_KEYWORDS }, @@ -1972,6 +2100,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -2015,6 +2144,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2048,6 +2178,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -2182,6 +2313,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2205,6 +2337,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxNotebook","_wxNotebook",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -2214,6 +2347,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -2224,6 +2358,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -2255,6 +2396,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/windows2.py b/wxPython/src/msw/windows2.py index 3e39408b67..9b1c01ba96 100644 --- a/wxPython/src/msw/windows2.py +++ b/wxPython/src/msw/windows2.py @@ -76,6 +76,12 @@ class wxNotebookPtr(wxControlPtr): def GetRowCount(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_GetRowCount,(self,) + _args, _kwargs) return val + def SetPageSize(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPageSize,(self,) + _args, _kwargs) + return val + def SetPadding(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPadding,(self,) + _args, _kwargs) + return val def DeletePage(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_DeletePage,(self,) + _args, _kwargs) return val @@ -225,6 +231,12 @@ class wxTaskBarIconPtr(wxEvtHandlerPtr): def PopupMenu(self, *_args, **_kwargs): val = apply(windows2c.wxTaskBarIcon_PopupMenu,(self,) + _args, _kwargs) return val + def IsIconInstalled(self, *_args, **_kwargs): + val = apply(windows2c.wxTaskBarIcon_IsIconInstalled,(self,) + _args, _kwargs) + return val + def IsOK(self, *_args, **_kwargs): + val = apply(windows2c.wxTaskBarIcon_IsOK,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxTaskBarIcon(wxTaskBarIconPtr): diff --git a/wxPython/src/msw/windows3.cpp b/wxPython/src/msw/windows3.cpp index 920ae40a10..ec6e100e57 100644 --- a/wxPython/src/msw/windows3.cpp +++ b/wxPython/src/msw/windows3.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/windows3.cpp + * FILE : src/msw/windows3.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,13 +60,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -82,23 +82,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1756,6 +1756,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -1801,6 +1802,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1841,6 +1843,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1983,6 +1986,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2010,6 +2014,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxNotebook","_wxNotebook",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -2019,6 +2024,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -2029,6 +2035,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -2060,6 +2073,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, diff --git a/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp index e07f35db10..8738b39e4c 100644 --- a/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/wx.cpp + * FILE : src/msw/wx.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -27,19 +27,20 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,13 +58,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -80,23 +80,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -614,6 +614,10 @@ PyObject *ptrfree(PyObject *_PTRVALUE) { } + wxPyApp* wxGetApp() { + return wxPythonApp; + } + void wxApp_CleanUp() { __wxCleanup(); } @@ -640,6 +644,12 @@ extern "C" SWIGEXPORT(void) initutilsc(); extern "C" SWIGEXPORT(void) inithtmlc(); extern "C" SWIGEXPORT(void) inithtmlhelpc(); extern "C" SWIGEXPORT(void) initcalendarc(); +extern "C" SWIGEXPORT(void) initstreamsc(); +extern "C" SWIGEXPORT(void) initfilesysc(); + +extern "C" SWIGEXPORT(void) initglcanvasc(); +extern "C" SWIGEXPORT(void) initoglc(); +extern "C" SWIGEXPORT(void) initstc_c(); #ifdef __cplusplus extern "C" { #endif @@ -866,6 +876,30 @@ static PyObject *_wrap_wxPyDefaultSize_get() { return pyobj; } +static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyApp * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetApp",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyApp *)wxGetApp(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static PyObject *_wrap_wxApp_CleanUp(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; char *_kwnames[] = { NULL }; @@ -1678,6 +1712,7 @@ static PyMethodDef wxcMethods[] = { { "delete_wxPyApp", (PyCFunction) _wrap_delete_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyApp", (PyCFunction) _wrap_new_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "wxApp_CleanUp", (PyCFunction) _wrap_wxApp_CleanUp, METH_VARARGS | METH_KEYWORDS }, + { "wxGetApp", (PyCFunction) _wrap_wxGetApp, METH_VARARGS | METH_KEYWORDS }, { "_wxSetDictionary", (PyCFunction) __wxSetDictionary, METH_VARARGS | METH_KEYWORDS }, { "_wxStart", (PyCFunction) __wxStart, METH_VARARGS | METH_KEYWORDS }, { "ptrmap", (PyCFunction) _wrap_ptrmap, METH_VARARGS | METH_KEYWORDS }, @@ -1701,13 +1736,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1716,6 +1755,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, @@ -1730,11 +1770,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, @@ -1783,6 +1826,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1792,6 +1836,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -1809,6 +1854,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -1832,6 +1878,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1844,8 +1891,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, @@ -1853,6 +1902,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, @@ -1864,14 +1914,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, + { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, @@ -1882,6 +1935,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, @@ -1897,7 +1951,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -1905,11 +1961,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, { "_class_wxTimerEvent","_wxTimerEvent",0}, @@ -1937,6 +1997,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScreenDC","_class_wxScreenDC",0}, { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -1946,10 +2007,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxBrush","_wxBrush",0}, { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -1967,6 +2031,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -1976,6 +2041,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, @@ -1984,8 +2050,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMetaFileDC","_wxMetaFileDC",0}, @@ -1994,6 +2062,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2004,6 +2073,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -2018,6 +2089,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, @@ -2027,6 +2099,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -2037,6 +2110,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -2045,20 +2119,38 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, @@ -2078,6 +2170,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -2085,6 +2178,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -2092,10 +2186,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -2110,11 +2207,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxListCtrl","_wxListCtrl",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler}, @@ -2127,6 +2226,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, + { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_wxColourData","_class_wxColourData",0}, @@ -2143,6 +2243,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; @@ -2829,6 +2932,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_DOUBLECLICKED)); PyDict_SetItemString(d,"wxEVT_NAVIGATION_KEY", PyInt_FromLong((long) wxEVT_NAVIGATION_KEY)); PyDict_SetItemString(d,"wxEVT_TIMER", PyInt_FromLong((long) wxEVT_TIMER)); + PyDict_SetItemString(d,"wxEVT_END_PROCESS", PyInt_FromLong((long) wxEVT_END_PROCESS)); PyDict_SetItemString(d,"__version__", PyString_FromString("0.0.0")); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); @@ -2858,12 +2962,18 @@ SWIGEXPORT(void) initwxc() { initprintfwc(); initsizersc(); initclip_dndc(); + initstreamsc(); + initfilesysc(); initgridc(); initutilsc(); inithtmlc(); inithtmlhelpc(); initcalendarc(); + + initglcanvasc(); + initoglc(); + initstc_c(); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/wx.py b/wxPython/src/msw/wx.py index 73eef5b12f..be3ac2ec4f 100644 --- a/wxPython/src/msw/wx.py +++ b/wxPython/src/msw/wx.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * class wxPyAppPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this @@ -144,6 +150,11 @@ _wxStart = wxc._wxStart _wxSetDictionary = wxc._wxSetDictionary +def wxGetApp(*_args, **_kwargs): + val = apply(wxc.wxGetApp,_args,_kwargs) + if val: val = wxPyAppPtr(val) + return val + wxApp_CleanUp = wxc.wxApp_CleanUp @@ -824,6 +835,7 @@ wxEVT_COMMAND_SPLITTER_UNSPLIT = wxc.wxEVT_COMMAND_SPLITTER_UNSPLIT wxEVT_COMMAND_SPLITTER_DOUBLECLICKED = wxc.wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_NAVIGATION_KEY = wxc.wxEVT_NAVIGATION_KEY wxEVT_TIMER = wxc.wxEVT_TIMER +wxEVT_END_PROCESS = wxc.wxEVT_END_PROCESS __version__ = wxc.__version__ cvar = wxc.cvar wxPyDefaultPosition = wxPointPtr(wxc.cvar.wxPyDefaultPosition) @@ -858,10 +870,10 @@ _wxSetDictionary(vars()) # Helper function to link python methods to wxWindows virtual # functions by name. -## def _checkForCallback(obj, name, event, theID=-1): -## try: cb = getattr(obj, name) -## except: pass -## else: obj.Connect(theID, -1, event, cb) +def _checkForCallback(obj, name, event, theID=-1): + try: cb = getattr(obj, name) + except: pass + else: obj.Connect(theID, -1, event, cb) ## def _StdWindowCallbacks(win): ## _checkForCallback(win, "OnChar", wxEVT_CHAR) @@ -1462,9 +1474,6 @@ def EVT_LIST_SET_INFO(win, id, func): def EVT_LIST_ITEM_SELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func) -def EVT_LIST_ITEM_ACTIVATED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) - def EVT_LIST_ITEM_DESELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func) @@ -1483,6 +1492,10 @@ def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func): def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func) +def EVT_LIST_ITEM_ACTIVATED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) + + #wxSplitterWindow @@ -1503,7 +1516,9 @@ def EVT_SPLITTER_DOUBLECLICKED(win, id, func): def EVT_TIMER(win, id, func): win.Connect(id, -1, wxEVT_TIMER, func) - +# wxProcess +def EVT_END_PROCESS(eh, id, func): + eh.Connect(id, -1, wxEVT_END_PROCESS, func) #---------------------------------------------------------------------- diff --git a/wxPython/src/sizers.i b/wxPython/src/sizers.i index 446de4c3ad..ab4bd97f15 100644 --- a/wxPython/src/sizers.i +++ b/wxPython/src/sizers.i @@ -168,9 +168,9 @@ public: apply(self.AddWindow, args) def Insert(self, *args): - if type(args[0]) == type(1): + if type(args[1]) == type(1): apply(self.InsertSpacer, args) - elif string.find(args[0].this, 'Sizer') != -1: + elif string.find(args[1].this, 'Sizer') != -1: apply(self.InsertSizer, args) else: apply(self.InsertWindow, args) diff --git a/wxPython/src/stattool.i b/wxPython/src/stattool.i index 37702d31f4..5d26a3d19e 100644 --- a/wxPython/src/stattool.i +++ b/wxPython/src/stattool.i @@ -152,14 +152,14 @@ public: wxToolBarToolBase *AddTool(int id, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - int toggle = FALSE, + int isToggle = FALSE, PyObject *clientData = NULL, const wxString& shortHelpString = wxPyEmptyStr, const wxString& longHelpString = wxPyEmptyStr) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->AddTool(id, bitmap, pushedBitmap, (bool)toggle, + return self->AddTool(id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } @@ -168,8 +168,8 @@ public: const wxBitmap& bitmap, const wxString& shortHelpString = wxPyEmptyStr, const wxString& longHelpString = wxPyEmptyStr, - int toggle = FALSE) { - return self->AddTool(id, bitmap, wxNullBitmap, toggle, NULL, + int isToggle = FALSE) { + return self->AddTool(id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } @@ -179,14 +179,14 @@ public: int id, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - int toggle = FALSE, + int isToggle = FALSE, PyObject *clientData = NULL, const wxString& shortHelpString = wxPyEmptyStr, const wxString& longHelpString = wxPyEmptyStr) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)toggle, + return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } @@ -196,8 +196,8 @@ public: const wxBitmap& bitmap, const wxString& shortHelpString = wxPyEmptyStr, const wxString& longHelpString = wxPyEmptyStr, - int toggle = FALSE) { - return self->InsertTool(pos, id, bitmap, wxNullBitmap, toggle, NULL, + int isToggle = FALSE) { + return self->InsertTool(pos, id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } } diff --git a/wxPython/src/streams.i b/wxPython/src/streams.i new file mode 100644 index 0000000000..2e87f237a9 --- /dev/null +++ b/wxPython/src/streams.i @@ -0,0 +1,503 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: streams.i +// Purpose: SWIG definitions of the wxFileSystem family of classes +// +// Author: Joerg Baumann +// +// Created: 25-Sept-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Joerg Baumann +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +%module streams + +%{ +#include "helpers.h" +#include +#include +%} + +//---------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +// Import some definitions of other classes, etc. +%import _defs.i + +%pragma(python) code = "import wx" +%pragma(python) code = "import string" + +//---------------------------------------------------------------------- +// typemaps for wxInputStream +%typemap(python,in) wxInputStream *stream { + if (PyInstance_Check($source)) { + wxPyInputStream* ptr; + if (SWIG_GetPtrObj($source, (void **) &ptr,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } + $target = ptr->wxi; + } else { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } +} + + +// typemaps for wxInputStream +%typemap(python,out) wxInputStream* { + wxPyInputStream * _ptr = NULL; + + if ($source) { + _ptr = new wxPyInputStream($source); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + $target = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + $target = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject_SetAttrString($target, "thisown", PyInt_FromLong(1)); + } + } else { + Py_INCREF(Py_None); + $target = Py_None; + } +} + +//---------------------------------------------------------------------- + +%{ // C++ +// definitions of wxStringPtrList and wxPyInputStream +#include +WX_DEFINE_LIST(wxStringPtrList); + + +void wxPyInputStream::close() { + /* do nothing */ +} + +void wxPyInputStream::flush() { + /*do nothing*/ +} + +bool wxPyInputStream::eof() { + if (wxi) + return wxi->Eof(); + else + return TRUE; +} + +wxPyInputStream::~wxPyInputStream() { + /*do nothing*/ +} + +wxString* wxPyInputStream::read(int size) { + wxString* s = NULL; + const int BUFSIZE = 1024; + + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + if (size < 0) { + // init buffers + char * buf = new char[BUFSIZE]; + if (!buf) { + PyErr_NoMemory(); + return NULL; + } + + s = new wxString(); + if (!s) { + delete buf; + PyErr_NoMemory(); + return NULL; + } + + // read until EOF + wxPy_BEGIN_ALLOW_THREADS; + while (! wxi->Eof()) { + wxi->Read(buf, BUFSIZE); + //*s += wxString(buf, wxi->LastRead()); + s->Append(buf, wxi->LastRead()); + } + delete buf; + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + + } else { // Read only size number of characters + s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read size bytes + wxPy_BEGIN_ALLOW_THREADS; + wxi->Read(s->GetWriteBuf(size+1), size); + s->UngetWriteBuf(wxi->LastRead()); + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + } + return s; +} + + +wxString* wxPyInputStream::readline (int size) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init buffer + int i; + char ch; + wxString* s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read until \n or byte limit reached + wxPy_BEGIN_ALLOW_THREADS; + for (i=ch=0; (ch != '\n') && (!wxi->Eof()) && ((size < 0) || (i < size)); i++) { + *s += ch = wxi->GetC(); + } + wxPy_END_ALLOW_THREADS; + + // errorcheck + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return s; +} + + +wxStringPtrList* wxPyInputStream::readlines (int sizehint) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init list + wxStringPtrList* l = new wxStringPtrList(); + if (!l) { + PyErr_NoMemory(); + return NULL; + } + + // read sizehint bytes or until EOF + wxPy_BEGIN_ALLOW_THREADS; + int i; + for (i=0; (!wxi->Eof()) && ((sizehint < 0) || (i < sizehint));) { + wxString* s = readline(); + if (s == NULL) { + l->DeleteContents(TRUE); + l->Clear(); + return NULL; + } + l->Append(s); + i = i + s->Length(); + } + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + l->DeleteContents(TRUE); + l->Clear(); + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return l; +} + + +void wxPyInputStream::seek(int offset, int whence) { + if (wxi) + wxi->SeekI(offset, wxSeekMode(whence)); +} + +int wxPyInputStream::tell(){ + if (wxi) + return wxi->TellI(); +} + + + +// wxInputStream which operates on a Python file-like object +class wxPyCBInputStream : public wxInputStream { +protected: + PyObject* read; + PyObject* seek; + PyObject* tell; + PyObject* py; + + virtual size_t OnSysRead(void *buffer, size_t bufsize) { + if (bufsize == 0) + return 0; + + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("(i)", bufsize); + PyObject* result = PyEval_CallObject(read, arglist); + Py_DECREF(arglist); + + size_t o = 0; + if ((result != NULL) && PyString_Check(result)) { + o = PyString_Size(result); + if (o == 0) + m_lasterror = wxSTREAM_EOF; + if (o > bufsize) + o = bufsize; + strncpy((char*)buffer, PyString_AsString(result), o); + Py_DECREF(result); + + } + else + m_lasterror = wxSTREAM_READ_ERROR; + wxPySaveThread(doSave); + m_lastcount = o; + return o; + } + + virtual size_t OnSysWrite(const void *buffer, size_t bufsize){ + m_lasterror = wxSTREAM_WRITE_ERROR; + return 0; + } + + virtual off_t OnSysSeek(off_t off, wxSeekMode mode){ + bool doSave = wxPyRestoreThread(); + PyObject*arglist = Py_BuildValue("(ii)", off, mode); + PyObject*result = PyEval_CallObject(seek, arglist); + Py_DECREF(arglist); + Py_XDECREF(result); + wxPySaveThread(doSave); + return OnSysTell(); + } + + virtual off_t OnSysTell() const{ + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("()"); + PyObject* result = PyEval_CallObject(tell, arglist); + Py_DECREF(arglist); + off_t o = 0; + if (result != NULL) { + o = PyInt_AsLong(result); + Py_DECREF(result); + }; + wxPySaveThread(doSave); + return o; + } + + wxPyCBInputStream(PyObject *p, PyObject *r, PyObject *s, PyObject *t) + : py(p), read(r), seek(s), tell(t) + {} + +public: + ~wxPyCBInputStream() { + bool doSave = wxPyRestoreThread(); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + wxPySaveThread(doSave); + } + + virtual size_t GetSize() { + if (seek && tell) { + off_t temp = OnSysTell(); + off_t ret = OnSysSeek(0, wxFromEnd); + OnSysSeek(temp, wxFromStart); + return ret; + } + else + return 0; + } + + static wxPyCBInputStream* create(PyObject *py) { + PyObject* read; + PyObject* seek; + PyObject* tell; + + if (!PyInstance_Check(py) && !PyFile_Check(py)) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + return NULL; + } + read = getMethod(py, "read"); + seek = getMethod(py, "seek"); + tell = getMethod(py, "tell"); + + if (!read) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + return NULL; + } + return new wxPyCBInputStream(py, read, seek, tell); + } + + static PyObject* getMethod(PyObject* py, char* name) { + if (!PyObject_HasAttrString(py, name)) + return NULL; + PyObject* o = PyObject_GetAttrString(py, name); + if (!PyMethod_Check(o) && !PyCFunction_Check(o)) + return NULL; + return o; + } + +protected: + +}; + +%} // End of the C++ +//---------------------------------------------------------------------- + + +// block threads for wxPyInputStream **** WHY? +%except(python) { + $function +} + + +// wxStringPtrList* to python list of strings typemap +%typemap(python, out) wxStringPtrList* { + if ($source) { + $target = PyList_New($source->GetCount()); + wxStringPtrList::Node *node = $source->GetFirst(); + for (int i=0; node; i++) { + wxString *s = node->GetData(); + PyList_SetItem($target, i, PyString_FromStringAndSize(s->c_str(), s->Len())); + node = node->GetNext(); + delete s; + } + delete $source; + } + else + $target=0; +} + + +// transport exceptions via %target=0 +%typemap(python, out) wxPyInputStream* { + char _ptemp[128]; + if ($source) { + SWIG_MakePtr(_ptemp, (char *) $source,"_wxPyInputStream_p"); + $target = Py_BuildValue("s",_ptemp); + } + else + $target=0; +} + + +// transport exceptions via %target=0 +%typemap(python, out) wxString* { + if ($source) { + $target = PyString_FromStringAndSize($source->c_str(), $source->Len()); + delete $source; + } + else + $target=0; +} + + + +%name(wxInputStream) class wxPyInputStream { +public: + %addmethods { + wxPyInputStream(PyObject* p) { + wxInputStream* wxi = wxPyCBInputStream::create(p); + if (wxi) + return new wxPyInputStream(wxi); + else + return NULL; + } + } + void close(); + void flush(); + bool eof(); + wxString* read(int size=-1); + wxString* readline(int size=-1); + wxStringPtrList* readlines(int sizehint=-1); + void seek(int offset, int whence=0); + int tell(); + /* + bool isatty(); + int fileno(); + void truncate(int size=-1); + void write(wxString data); + void writelines(wxStringPtrList); + */ +} + + + +// TODO: make a more fully implemented file interface... +class wxOutputStream { +public: + /* + void close(); + void flush(); + wxString* read(int size=-1); + wxString* readline(int size=-1); + wxStringPtrList* readlines(int sizehint=-1); + void seek(int offset, int whence=0); + int tell(); + bool isatty(); + int fileno(); + void truncate(int size=-1); + void write(wxString data); + void writelines(wxStringPtrList); + */ + + %addmethods { + void write(const wxString& str) { + self->Write(str.c_str(), str.Length()); + } + } +}; + + +// restore except and typemaps +%typemap(python,out) wxStringPtrList*; +%typemap(python,out) wxPyInputStream*; +%typemap(python, out) wxString* { + $target = PyString_FromStringAndSize($source->c_str(), $source->Len()); +} +%except(python) { + wxPy_BEGIN_ALLOW_THREADS; + $function + wxPy_END_ALLOW_THREADS; +} + + diff --git a/wxPython/src/utils.i b/wxPython/src/utils.i index 03fad77f9f..7566f336c7 100644 --- a/wxPython/src/utils.i +++ b/wxPython/src/utils.i @@ -4,7 +4,7 @@ // // Author: Robin Dunn // -// Created: 25-nov-1998 +// Created: 25-Nov-1998 // RCS-ID: $Id$ // Copyright: (c) 1998 by Total Control Software // Licence: wxWindows license @@ -25,6 +25,9 @@ %include typemaps.i %include my_typemaps.i +// Import some definitions of other classes, etc. +%import _defs.i + %pragma(python) code = "import string" diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index 6e95e8e5ab..f41accb044 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -35,6 +35,8 @@ class wxEvtHandler { public: + wxEvtHandler(); + bool ProcessEvent(wxEvent& event); void AddPendingEvent(wxEvent& event); //bool SearchEventTable(wxEventTable& table, wxEvent& event); @@ -105,13 +107,13 @@ public: wxWindow* GetWindow(); void SetWindow(wxWindow* window); - // Properties list - %pragma(python) addtoclass = " - _prop_list_ = { - 'window' : ('GetWindow', 'SetWindow'), - } - _prop_list_.update(wxEvtHandler._prop_list_) - " +// // Properties list +// %pragma(python) addtoclass = " +// _prop_list_ = { +// 'window' : ('GetWindow', 'SetWindow'), +// } +// _prop_list_.update(wxEvtHandler._prop_list_) +// " }; %inline %{ @@ -371,50 +373,61 @@ public: void SetCaret(wxCaret *caret); wxCaret *GetCaret(); - %pragma(python) addtoclass = "# replaces broken shadow method + %pragma(python) addtoclass = "# replaces broken shadow methods def GetCaret(self, *_args, **_kwargs): from misc2 import wxCaretPtr val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs) if val: val = wxCaretPtr(val) return val - " + def GetSizer(self, *_args, **_kwargs): + from sizers import wxSizerPtr + val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) + if val: val = wxSizerPtr(val) + return val - // Properties list - %pragma(python) addtoclass = " - _prop_list_ = { - 'size' : ('GetSize', 'SetSize'), - 'enabled' : ('IsEnabled', 'Enable'), - 'background' : ('GetBackgroundColour', 'SetBackgroundColour'), - 'foreground' : ('GetForegroundColour', 'SetForegroundColour'), - 'children' : ('GetChildren', None), - 'charHeight' : ('GetCharHeight', None), - 'charWidth' : ('GetCharWidth', None), - 'clientSize' : ('GetClientSize', 'SetClientSize'), - 'font' : ('GetFont', 'SetFont'), - 'grandParent' : ('GetGrandParent', None), - 'handle' : ('GetHandle', None), - 'label' : ('GetLabel', 'SetLabel'), - 'name' : ('GetName', 'SetName'), - 'parent' : ('GetParent', None), - 'position' : ('GetPosition', 'SetPosition'), - 'title' : ('GetTitle', 'SetTitle'), - 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'), - 'visible' : ('IsShown', 'Show'), - 'toolTip' : ('GetToolTip', 'SetToolTip'), - 'sizer' : ('GetSizer', 'SetSizer'), - 'validator' : ('GetValidator', 'SetValidator'), - 'dropTarget' : ('GetDropTarget', 'SetDropTarget'), - 'caret' : ('GetCaret', 'SetCaret'), - 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'), - 'constraints' : ('GetConstraints', 'SetConstraints'), - - } - _prop_list_.update(wxEvtHandler._prop_list_) + def GetToolTip(self, *_args, **_kwargs): + from misc2 import wxToolTipPtr + val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) + if val: val = wxToolTipPtr(val) + return val " + + +// // Properties list +// %pragma(python) addtoclass = " +// _prop_list_ = { +// 'size' : ('GetSize', 'SetSize'), +// 'enabled' : ('IsEnabled', 'Enable'), +// 'background' : ('GetBackgroundColour', 'SetBackgroundColour'), +// 'foreground' : ('GetForegroundColour', 'SetForegroundColour'), +// 'children' : ('GetChildren', None), +// 'charHeight' : ('GetCharHeight', None), +// 'charWidth' : ('GetCharWidth', None), +// 'clientSize' : ('GetClientSize', 'SetClientSize'), +// 'font' : ('GetFont', 'SetFont'), +// 'grandParent' : ('GetGrandParent', None), +// 'handle' : ('GetHandle', None), +// 'label' : ('GetLabel', 'SetLabel'), +// 'name' : ('GetName', 'SetName'), +// 'parent' : ('GetParent', None), +// 'position' : ('GetPosition', 'SetPosition'), +// 'title' : ('GetTitle', 'SetTitle'), +// 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'), +// 'visible' : ('IsShown', 'Show'), +// 'toolTip' : ('GetToolTip', 'SetToolTip'), +// 'sizer' : ('GetSizer', 'SetSizer'), +// 'validator' : ('GetValidator', 'SetValidator'), +// 'dropTarget' : ('GetDropTarget', 'SetDropTarget'), +// 'caret' : ('GetCaret', 'SetCaret'), +// 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'), +// 'constraints' : ('GetConstraints', 'SetConstraints'), + +// } +// _prop_list_.update(wxEvtHandler._prop_list_) +// " }; -//%clear int* x, int* y; @@ -432,7 +445,6 @@ def wxDLG_SZE(win, size_width, height=None): return win.ConvertDialogSizeToPixels(wxSize(size_width, height)) " -#ifdef __WXMSW__ %inline %{ wxWindow* wxWindow_FindFocus() { return wxWindow::FindFocus(); @@ -440,6 +452,7 @@ def wxDLG_SZE(win, size_width, height=None): %} +#ifdef __WXMSW__ %inline %{ wxWindow* wxWindow_FromHWND(unsigned long hWnd) { wxWindow* win = new wxWindow; @@ -628,7 +641,7 @@ public: class wxMenuBar : public wxWindow { public: - wxMenuBar(); + wxMenuBar(long style = 0); bool Append(wxMenu *menu, const wxString& title); bool Insert(size_t pos, wxMenu *menu, const wxString& title); diff --git a/wxPython/src/windows2.i b/wxPython/src/windows2.i index 0a0658dc6b..6428bb1666 100644 --- a/wxPython/src/windows2.i +++ b/wxPython/src/windows2.i @@ -275,8 +275,8 @@ public: bool SetPageImage(int nPage, int nImage); int GetRowCount(); - // LINK ERROR: void SetPageSize(const wxSize& size); - // LINK ERROR: void SetPadding(const wxSize& padding); + void SetPageSize(const wxSize& size); + void SetPadding(const wxSize& padding); bool DeletePage(int nPage); bool RemovePage(int nPage); bool DeleteAllPages(); @@ -284,13 +284,11 @@ public: const wxString& strText, int bSelect = FALSE, int imageId = -1); -#ifdef __WXMSW__ bool InsertPage(int nPage, /*wxNotebookPage*/ wxWindow *pPage, const wxString& strText, bool bSelect = FALSE, int imageId = -1); -#endif /*wxNotebookPage*/ wxWindow *GetPage(int nPage); %addmethods { @@ -380,6 +378,7 @@ public: wxTaskBarIcon(); ~wxTaskBarIcon(); + // We still use the magic methods here since that is the way it is documented... %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnMouseMove', wxEVT_TASKBAR_MOVE)" %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonDown', wxEVT_TASKBAR_LEFT_DOWN)" %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonUp', wxEVT_TASKBAR_LEFT_UP)" @@ -391,7 +390,8 @@ public: bool SetIcon(const wxIcon& icon, const char* tooltip = ""); bool RemoveIcon(void); bool PopupMenu(wxMenu *menu); - + bool IsIconInstalled(); + bool IsOK(); }; #endif diff --git a/wxPython/src/wx.i b/wxPython/src/wx.i index e2ee95c96d..27dbca27a0 100644 --- a/wxPython/src/wx.i +++ b/wxPython/src/wx.i @@ -43,7 +43,8 @@ %import image.i %import printfw.i %import sizers.i - +%import streams.i +%import filesys.i %native(_wxStart) __wxStart; %native(_wxSetDictionary) __wxSetDictionary; @@ -103,6 +104,11 @@ public: }; +%inline %{ + wxPyApp* wxGetApp() { + return wxPythonApp; + } +%} //---------------------------------------------------------------------- // this is used to cleanup after wxWindows when Python shuts down. @@ -140,6 +146,12 @@ extern "C" SWIGEXPORT(void) initutilsc(); extern "C" SWIGEXPORT(void) inithtmlc(); extern "C" SWIGEXPORT(void) inithtmlhelpc(); extern "C" SWIGEXPORT(void) initcalendarc(); +extern "C" SWIGEXPORT(void) initstreamsc(); +extern "C" SWIGEXPORT(void) initfilesysc(); + +extern "C" SWIGEXPORT(void) initglcanvasc(); +extern "C" SWIGEXPORT(void) initoglc(); +extern "C" SWIGEXPORT(void) initstc_c(); %} @@ -169,12 +181,18 @@ extern "C" SWIGEXPORT(void) initcalendarc(); initprintfwc(); initsizersc(); initclip_dndc(); + initstreamsc(); + initfilesysc(); initgridc(); initutilsc(); inithtmlc(); inithtmlhelpc(); initcalendarc(); + + initglcanvasc(); + initoglc(); + initstc_c(); %} //---------------------------------------------------------------------- diff --git a/wxPython/src/wxc.def b/wxPython/src/wxc.def deleted file mode 100644 index 87d2d233b6..0000000000 --- a/wxPython/src/wxc.def +++ /dev/null @@ -1,6 +0,0 @@ -EXPORTS - initwxc - SWIG_GetPtr - SWIG_MakePtr - SWIG_RegisterMapping - SWIG_newvarlink diff --git a/wxPython/tests/fs_test.py b/wxPython/tests/fs_test.py new file mode 100644 index 0000000000..f9712cd01b --- /dev/null +++ b/wxPython/tests/fs_test.py @@ -0,0 +1,41 @@ + + +from wxPython.wx import * +import glob + +class File2(wxFileSystemHandler): + + def CanOpen(self,location): + return self.GetProtocol(location) == "file2" + + def OpenFile(self,fs,location): + return wxFSFile(wxInputStream(open(self.GetRightLocation(location),"rb")), + location,"text/plain","",wxDateTime()) + + def FindFirst(self,location,flags): + # the flags are ignored + self.files = glob.glob(self.GetRightLocation(location)) + if len(self.files) == 0: + return "" + else: + return self.files[0] + + def FindNext(self): + self.files = self.files[1:] + if len(self.files) == 0: + return "" + else: + return self.files[0] + +# register new handler +wxFileSystem_AddHandler(File2()) +fs = wxFileSystem() + +# cat /etc/passwd +print fs.OpenFile("file2:/projects/files.lst").GetStream().read() + +# ls /etc/* +fn = fs.FindFirst("file2:/projects/*") +while fn: + print fn + fn = fs.FindNext() diff --git a/wxPython/tests/test2.py b/wxPython/tests/test2.py index 3c5bb4d0a7..647cb9727b 100644 --- a/wxPython/tests/test2.py +++ b/wxPython/tests/test2.py @@ -154,8 +154,8 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ -# Revision 1.2 2000/07/15 19:51:32 cvsuser -# merged 2.2 branch +# Revision 1.3 2000/10/30 21:05:22 robind +# Merged wxPython 2.2.2 over to the main branch # # Revision 1.1.2.1 2000/05/16 02:07:01 RD # diff --git a/wxPython/tests/test3.py b/wxPython/tests/test3.py index 8a83577f01..262563a8da 100644 --- a/wxPython/tests/test3.py +++ b/wxPython/tests/test3.py @@ -146,8 +146,8 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ -# Revision 1.2 2000/07/15 19:51:33 cvsuser -# merged 2.2 branch +# Revision 1.3 2000/10/30 21:05:22 robind +# Merged wxPython 2.2.2 over to the main branch # # Revision 1.1.2.1 2000/05/16 02:07:01 RD # diff --git a/wxPython/tests/test4.py b/wxPython/tests/test4.py index 52c23d61fc..9c16108828 100644 --- a/wxPython/tests/test4.py +++ b/wxPython/tests/test4.py @@ -998,8 +998,8 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ -# Revision 1.2 2000/07/15 19:51:33 cvsuser -# merged 2.2 branch +# Revision 1.3 2000/10/30 21:05:22 robind +# Merged wxPython 2.2.2 over to the main branch # # Revision 1.1.2.1 2000/05/16 02:07:02 RD # diff --git a/wxPython/wxPython/lib/activexwrapper.py b/wxPython/wxPython/lib/activexwrapper.py index f0af36b59d..479203e9bc 100644 --- a/wxPython/wxPython/lib/activexwrapper.py +++ b/wxPython/wxPython/lib/activexwrapper.py @@ -32,7 +32,7 @@ def MakeActiveXClass(CoClass, eventClass=None, eventObj=None): can be used just like the wxWindow class, but will also respond appropriately to the methods and properties of the COM object. If this class, a derived class or a mix-in class has method names - that match the COM objects event names, they will be called + that match the COM object's event names, they will be called automatically. CoClass -- A COM control class from a module generated by diff --git a/wxPython/wxPython/lib/editor/tokenizer.py b/wxPython/wxPython/lib/editor/tokenizer.py index aafe0aaeb5..1d8e18a8dd 100644 --- a/wxPython/wxPython/lib/editor/tokenizer.py +++ b/wxPython/wxPython/lib/editor/tokenizer.py @@ -31,7 +31,7 @@ class Tokenizer: tname = tok_name[type] if iskeyword(string): tname = "KEY" - self.toks.append(tname, string, b, e) + self.toks.append( (tname, string, b, e) ) def readline(self): t = self.text diff --git a/wxPython/wxPython/lib/filebrowsebutton.py b/wxPython/wxPython/lib/filebrowsebutton.py index a09e82fe15..731a48dd34 100644 --- a/wxPython/wxPython/lib/filebrowsebutton.py +++ b/wxPython/wxPython/lib/filebrowsebutton.py @@ -65,6 +65,12 @@ class FileBrowseButton(wxPanel): self.fileMode = fileMode self.changeCallback = changeCallback + # get background to match it + try: + self._bc = parent.GetBackgroundColour() + except: + pass + # create the dialog self.createDialog(parent, id, pos, size, style ) # Setting a value causes the changeCallback to be called. @@ -76,7 +82,11 @@ class FileBrowseButton(wxPanel): def createDialog( self, parent, id, pos, size, style ): """Setup the graphic representation of the dialog""" wxPanel.__init__ (self, parent, id, pos, size, style) - + # try to set the background colour + try: + self.SetBackgroundColour(self._bc) + except: + pass box = wxBoxSizer(wxHORIZONTAL) self.label = self.createLabel( ) @@ -99,6 +109,10 @@ class FileBrowseButton(wxPanel): if size.width != -1 or size.height != -1: self.SetSize(size) + def SetBackgroundColour(self,color): + wxPanel.SetBackgroundColour(self,color) + self.label.SetBackgroundColour(color) + def createLabel( self ): """Create the label/caption""" label = wxStaticText(self, -1, self.labelText, style =wxALIGN_RIGHT ) @@ -125,21 +139,27 @@ class FileBrowseButton(wxPanel): EVT_BUTTON(button, ID, self.OnBrowse) return button + def OnBrowse (self, event = None): """ Going to browse for file... """ - current = self.GetValue () + current = self.GetValue() directory = os.path.split(current) if os.path.isdir( current): directory = current + current = '' elif directory and os.path.isdir( directory[0] ): + current = directory[1] directory = directory [0] else: directory = self.startDirectory dlg = wxFileDialog(self, self.dialogTitle, directory, current, self.fileMask, self.fileMode) + if dlg.ShowModal() == wxID_OK: self.SetValue (dlg.GetPath()) dlg.Destroy() + + def GetValue (self): """ Convenient access to text control value """ return self.textControl.GetValue () diff --git a/wxPython/wxPython/lib/mvctree.py b/wxPython/wxPython/lib/mvctree.py index 9a8703e4cd..aa37dec0c8 100644 --- a/wxPython/wxPython/lib/mvctree.py +++ b/wxPython/wxPython/lib/mvctree.py @@ -616,7 +616,7 @@ class TreePainter(Painter): dc.SetPen(self.linepen) dc.SetBrush(self.bgbrush) dc.DrawRectangle(px -4, py-4, 9, 9) - self.knobs.append(kid, Rect(px -4, py -4, 9, 9)) + self.knobs.append( (kid, Rect(px -4, py -4, 9, 9)) ) dc.SetPen(self.textpen) if not kid.expanded: dc.DrawLine(px, py -2, px, py + 3) @@ -627,7 +627,7 @@ class TreePainter(Painter): dc.SetPen(self.linepen) dc.SetBrush(self.bgbrush) dc.DrawRectangle(px -4, py-4, 9, 9) - self.knobs.append(node, Rect(px -4, py -4, 9, 9)) + self.knobs.append( (node, Rect(px -4, py -4, 9, 9)) ) dc.SetPen(self.textpen) if not node.expanded: dc.DrawLine(px, py -2, px, py + 3) diff --git a/wxPython/wxPython/lib/pyshell.py b/wxPython/wxPython/lib/pyshell.py index 4df731fd46..229e2e5190 100644 --- a/wxPython/wxPython/lib/pyshell.py +++ b/wxPython/wxPython/lib/pyshell.py @@ -95,9 +95,10 @@ class PyShellWindow(wxStyledTextCtrl, InteractiveInterpreter): # copyright/banner message if banner is None: - self.write("Python %s on %s\n%s\n(%s)\n" % - (sys.version, sys.platform, sys.copyright, - self.__class__.__name__)) + self.write("Python %s on %s\n" % #%s\n(%s)\n" % + (sys.version, sys.platform, + #sys.copyright, self.__class__.__name__ + )) else: self.write("%s\n" % banner) @@ -143,17 +144,17 @@ class PyShellWindow(wxStyledTextCtrl, InteractiveInterpreter): self.StyleSetSpec(wxSTC_STYLE_BRACELIGHT, p['bracegood']) self.StyleSetSpec(wxSTC_STYLE_BRACEBAD, p['bracebad']) - self.StyleSetSpec(SCE_P_COMMENTLINE, p['comment']) - self.StyleSetSpec(SCE_P_NUMBER, p['number']) - self.StyleSetSpec(SCE_P_STRING, p['string']) - self.StyleSetSpec(SCE_P_CHARACTER, p['char']) - self.StyleSetSpec(SCE_P_WORD, p['keyword']) - self.StyleSetSpec(SCE_P_TRIPLE, p['triple']) - self.StyleSetSpec(SCE_P_TRIPLEDOUBLE, p['tripledouble']) - self.StyleSetSpec(SCE_P_CLASSNAME, p['class']) - self.StyleSetSpec(SCE_P_DEFNAME, p['def']) - self.StyleSetSpec(SCE_P_OPERATOR, p['operator']) - self.StyleSetSpec(SCE_P_COMMENTBLOCK, p['comment']) + self.StyleSetSpec(wxSTC_P_COMMENTLINE, p['comment']) + self.StyleSetSpec(wxSTC_P_NUMBER, p['number']) + self.StyleSetSpec(wxSTC_P_STRING, p['string']) + self.StyleSetSpec(wxSTC_P_CHARACTER, p['char']) + self.StyleSetSpec(wxSTC_P_WORD, p['keyword']) + self.StyleSetSpec(wxSTC_P_TRIPLE, p['triple']) + self.StyleSetSpec(wxSTC_P_TRIPLEDOUBLE, p['tripledouble']) + self.StyleSetSpec(wxSTC_P_CLASSNAME, p['class']) + self.StyleSetSpec(wxSTC_P_DEFNAME, p['def']) + self.StyleSetSpec(wxSTC_P_OPERATOR, p['operator']) + self.StyleSetSpec(wxSTC_P_COMMENTBLOCK, p['comment']) # used for writing to stdout, etc. @@ -162,7 +163,7 @@ class PyShellWindow(wxStyledTextCtrl, InteractiveInterpreter): pos = self.GetCurrentPos() self.AddText(text) self.StartStyling(pos, 0xFF) - self.SetStyleFor(len(text), style) + self.SetStyling(len(text), style) self.EnsureCaretVisible() wxYield() @@ -174,7 +175,7 @@ class PyShellWindow(wxStyledTextCtrl, InteractiveInterpreter): def Prompt(self): # is the current line non-empty? - text, pos = self.GetCurrentLineText() + text, pos = self.GetCurLine() if pos != 0: self.AddText('\n') self.AddText(self.props['ps1']) @@ -198,7 +199,7 @@ class PyShellWindow(wxStyledTextCtrl, InteractiveInterpreter): # if not on the last line, duplicate the current line if self.GetLineCount()-1 != self.GetCurrentLine(): - text, col = self.GetCurrentLineText() + text, col = self.GetCurLine() prompt = self.props['ps1'] lp = len(prompt) if text[:lp] == prompt: @@ -251,14 +252,14 @@ class PyShellWindow(wxStyledTextCtrl, InteractiveInterpreter): styleBefore = self.GetStyleAt(caretPos - 1) # check before - if charBefore and charBefore in "[]{}()" and ord(styleBefore) == SCE_P_OPERATOR: + if charBefore and chr(charBefore) in "[]{}()" and styleBefore == wxSTC_P_OPERATOR: braceAtCaret = caretPos - 1 # check after if braceAtCaret < 0: charAfter = self.GetCharAt(caretPos) styleAfter = self.GetStyleAt(caretPos) - if charAfter and charAfter in "[]{}()" and ord(styleAfter) == SCE_P_OPERATOR: + if charAfter and chr(charAfter) in "[]{}()" and styleAfter == wxSTC_P_OPERATOR: braceAtCaret = caretPos if braceAtCaret >= 0: diff --git a/wxPython/wxPython/lib/sizers/.cvsignore b/wxPython/wxPython/lib/sizers/.cvsignore deleted file mode 100644 index 2f78cf5b66..0000000000 --- a/wxPython/wxPython/lib/sizers/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.pyc - diff --git a/wxPython/wxPython/lib/sizers/__init__.py b/wxPython/wxPython/lib/sizers/__init__.py deleted file mode 100644 index d73718ade5..0000000000 --- a/wxPython/wxPython/lib/sizers/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -#---------------------------------------------------------------------------- -# Name: __init__.py -# Purpose: The presence of this file turns this directory into a -# Python package. -# -# Author: Robin Dunn -# -# Created: 18-May-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -from sizer import * -from box import * -from border import * -from shape import * - -#---------------------------------------------------------------------------- -_msg = """\ -Since the wxWindows library now includes its own sizers, the -classes in wxPython.lib.sizers have been deprecated. Please -see the Reference Manual for details of the new classes. - -To contiunue using wxPython.lib.sizers without this -message you can set the WXP_OLDSIZERS envronment -variable to any value. -""" - - -import os -from wxPython.wx import wxMessageDialog, wxOK, wxICON_EXCLAMATION, wxPlatform - -if not os.environ.has_key('WXP_OLDSIZERS'): - if wxPlatform == '__WXMSW__': - dlg = wxMessageDialog(None, _msg, - "Deprecated Feature", - wxOK | wxICON_EXCLAMATION) - dlg.ShowModal() - dlg.Destroy() - else: - print '\a' - print _msg - -#---------------------------------------------------------------------------- diff --git a/wxPython/wxPython/lib/sizers/border.py b/wxPython/wxPython/lib/sizers/border.py deleted file mode 100644 index fd054c632e..0000000000 --- a/wxPython/wxPython/lib/sizers/border.py +++ /dev/null @@ -1,109 +0,0 @@ -#---------------------------------------------------------------------- -# Name: wxPython.lib.sizers.border -# Purpose: A Sizer that wraps an empty border around its contents -# -# Author: Robin Dunn -# -# Created: 9-June-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------- - -from sizer import wxSizer - -wxNORTH = 1 -wxSOUTH = 2 -wxEAST = 4 -wxWEST = 8 -wxALL = wxNORTH | wxSOUTH | wxEAST | wxWEST - -#---------------------------------------------------------------------- - -class wxBorderSizer(wxSizer): - """ - wxBorderSizer - - This sizer provides an empty buffer on one or more sides of it's - contents. It can only hold a single widget, but that can be a - sizer containing other items if you wish. - - The sizer is constructed with a parameter specifying which sides - should have the border. You can use a logical OR of the following - values to specify the sides: - - wxNORTH -- the top side - wxSOUTH -- the bottom side - wxEAST -- the right side - wxWEST -- the left side - wxALL -- all sides - - The width in pixels of the border is specified when the child - widget is Added to the sizer. - - """ - def __init__(self, sides = wxALL): - wxSizer.__init__(self) - self.sides = sides - - - def Add(self, widget, borderSize): - if self.children: - raise ValueError("wxBorderSizer can only contain one child.") - - wxSizer.Add(self, widget, borderSize) - - - def CalcMin(self): - isSizer, widget, width, height, borderSize = self.children[0] - - if isSizer: - width, height = widget.CalcMin() - - if self.sides & wxEAST: - width = width + borderSize - - if self.sides & wxWEST: - width = width + borderSize - - if self.sides & wxNORTH: - height = height + borderSize - - if self.sides & wxSOUTH: - height = height + borderSize - - return width, height - - - def RecalcSizes(self): - isSizer, widget, width, height, borderSize = self.children[0] - width = self.size.width - height = self.size.height - px = self.origin.x - py = self.origin.y - - if self.sides & wxWEST: - width = width - borderSize - px = px + borderSize - if self.sides & wxEAST: - width = width - borderSize - - if self.sides & wxNORTH: - height = height - borderSize - py = py + borderSize - if self.sides & wxSOUTH: - height = height - borderSize - - widget.SetDimensions(px, py, width, height) - - -#---------------------------------------------------------------------- -# -# TODO... Make an abstract class wxBorder whose decendants can be added to -# a wxBorderSizer to provide drawing for the buffer area. Ideas are -# to provide a color border, beveled borders, rounded borders, etc. - - - - - diff --git a/wxPython/wxPython/lib/sizers/box.py b/wxPython/wxPython/lib/sizers/box.py deleted file mode 100644 index 64c9378565..0000000000 --- a/wxPython/wxPython/lib/sizers/box.py +++ /dev/null @@ -1,137 +0,0 @@ -#---------------------------------------------------------------------- -# Name: wxPython.lib.sizers.box -# Purpose: A sizer/layout managers for wxPython that places items in -# a stretchable box -# -# Author: Robin Dunn and Dirk Holtwick -# -# Created: 17-May-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------- - -from sizer import wxSizer -from wxPython.wx import wxVERTICAL, wxHORIZONTAL - -#---------------------------------------------------------------------- - - -class wxBoxSizer(wxSizer): - """ - wxBoxSizer - - A Sizer that lays components out in a box, in the order they are - added to the layout manager, with a given orientation. The - orientation is specified in the constructor with either wxVERTICAL - or wxHORIZONTAL. - - The optional parameter to the Add method (for this sizer it's - called the stretch flag) can be used to flag one or more components - as stretchable, meaning that they will expand to fill available - space in the given orientation. The default is zero, or not - stretchable. - - If the stretch flag is non-zero then the widget will stretch. If - the sizer holds more than one item that is stretchable then they - share the available space. - - If the strech flag is greater than 1 then it serves as a weighting - factor. Widgets with a flag of 2 will get twice as much space as - widgets with 1, etc. - """ - def __init__(self, orientation, size = None): - wxSizer.__init__(self, size) - self.orientation = orientation - - - def CalcMin(self): - self.stretchable = 0 # number of stretchable items - self.minWidth = 0 # minimal size - self.minHeight = 0 - self.fixedWidth = 0 # size without stretched widgets - self.fixedHeight = 0 - - # iterate through children - for (isSizer, widget, width, height, stretch) in self.children: - weight = 1 - if stretch: - weight = stretch - - if isSizer: - # let sub-sizers recalc their required space - width, height = widget.CalcMin() - - # minimal size - if self.orientation == wxVERTICAL: - self.minHeight = self.minHeight + (height * weight) - self.minWidth = max(self.minWidth, width) - else: - self.minWidth = self.minWidth + (width * weight) - self.minHeight = max(self.minHeight, height) - - # stretchable items - if stretch: - self.stretchable = self.stretchable + weight - else: - if self.orientation == wxVERTICAL: - self.fixedHeight = self.fixedHeight + height - self.fixedWidth = max(self.fixedWidth, width) - else: - self.fixedWidth = self.fixedWidth + width - self.fixedHeight = max(self.fixedHeight, height) - - return self.minWidth, self.minHeight - - - - def RecalcSizes(self): - # get current dimensions, save for performance - myWidth = self.size.width - myHeight = self.size.height - - # relative recent positions & sizes - px = self.origin.x - py = self.origin.y - newWidth = 0 - newHeight = 0 - - # calculate space for one stretched item - if self.stretchable: - if self.orientation == wxHORIZONTAL: - delta = (myWidth - self.fixedWidth) / self.stretchable - extra = (myWidth - self.fixedWidth) % self.stretchable - else: - delta = (myHeight - self.fixedHeight) / self.stretchable - extra = (myHeight - self.fixedHeight) % self.stretchable - - # iterate children ... - for (isSizer, widget, width, height, stretch) in self.children: - weight = 1 - if stretch: - weight = stretch - - if isSizer: - width, height = widget.CalcMin() - - # ... vertical - if self.orientation == wxVERTICAL: - newHeight = height - if stretch: - newHeight = (delta * weight) + extra # first stretchable gets extra pixels - extra = 0 - widget.SetDimensions(px, py, myWidth, newHeight) - - # ... horizontal - elif self.orientation == wxHORIZONTAL: - newWidth = width - if stretch: - newWidth = (delta * weight) + extra # first stretchable gets extra pixels - extra = 0 - widget.SetDimensions(px, py, newWidth, myHeight) - - px = px + newWidth - py = py + newHeight - - -#---------------------------------------------------------------------- diff --git a/wxPython/wxPython/lib/sizers/shape.py b/wxPython/wxPython/lib/sizers/shape.py deleted file mode 100644 index cd38c23421..0000000000 --- a/wxPython/wxPython/lib/sizers/shape.py +++ /dev/null @@ -1,97 +0,0 @@ -#---------------------------------------------------------------------- -# Name: wxPython.lib.sizers.shape -# Purpose: A Sizer that preserves the shape (proportions) -# of the managed window -# -# Created: 7-October-1999 -# RCS-ID: $Id$ -# Copyright: SIA "ANK" -# Licence: wxWindows license -#---------------------------------------------------------------------- - -from sizer import wxSizer - -wxANCHOR_NONE = 0 -wxANCHOR_NORTH = 1 -wxANCHOR_SOUTH = 2 -wxANCHOR_EAST = 4 -wxANCHOR_WEST = 8 -wxANCHOR_NW = wxANCHOR_NORTH | wxANCHOR_WEST -wxANCHOR_NE = wxANCHOR_NORTH | wxANCHOR_EAST -wxANCHOR_SW = wxANCHOR_SOUTH | wxANCHOR_WEST -wxANCHOR_SE = wxANCHOR_SOUTH | wxANCHOR_EAST - -#---------------------------------------------------------------------- - -class wxShapeSizer(wxSizer): - """ - wxShapeSizer - - This sizer preserves the proportional dimensions of the managed - window, leaving empty space either in horizontal or vertical - dimension. - - By default, the managed window is centered within allowed size. - You may specify an anchor parameter to leave all of the extra - space on one side: wxANCHOR_NORTH and wxANCHOR_SOUTH manage - vertical dimension, leaving extra space on the bottom or top side, - respectively; wxANCHOR_EAST and wxANCHOR_WEST do the same in - horizontal dimension. wxANCHOR_NW, wxANCHOR_NE, wxANCHOR_SW - and wxANCHOR_SE are short-cut names for combinations north+west, - north+east, south+west, south+east. - - If both anchors are specified in either direction, south and east - take precedence over north and west, respectively. (Because of - gravity, widgets tend to fall down.) - """ - def __init__(self, anchor =wxANCHOR_NONE): - wxSizer.__init__(self) - self.anchor =anchor - - def Add(self, widget): - if self.children: - raise ValueError("wxShapeSizer can only contain one child.") - - wxSizer.Add(self, widget) - - def CalcMin(self): - isSizer, widget, width, height, borderSize = self.children[0] - - if isSizer: - width, height = widget.CalcMin() - - return width, height - - def RecalcSizes(self): - isSizer, widget, width, height, borderSize = self.children[0] - width =self.size.width - height =self.size.height - px =self.origin.x - py =self.origin.y - anchor =self.anchor - # get current dimensions of the managed window - w, h =self.CalcMin() - ratio =float(w) /h - # in what direction space should be added: - # -1: horisontal - # 1: vertical - # 0: shape is ok - dir =cmp(ratio /width *height, 1) - if dir <0: - # recalculate width - old_width =width - width =height *ratio - if anchor & wxANCHOR_EAST: - px =px +old_width -width - elif not (anchor & wxANCHOR_WEST): - px =px +(old_width -width) /2 - elif dir >0: - # recalculate height - old_height =height - height =width /ratio - if anchor & wxANCHOR_SOUTH: - py =py +old_height -height - elif not (anchor & wxANCHOR_NORTH): - py =py +(old_height -height) /2 - - widget.SetDimensions(px, py, width, height) diff --git a/wxPython/wxPython/lib/sizers/sizer.py b/wxPython/wxPython/lib/sizers/sizer.py deleted file mode 100644 index 5cca29cbfe..0000000000 --- a/wxPython/wxPython/lib/sizers/sizer.py +++ /dev/null @@ -1,112 +0,0 @@ -#---------------------------------------------------------------------- -# Name: wxPython.lib.sizers.sizer -# Purpose: General purpose sizer/layout managers for wxPython -# -# Author: Robin Dunn and Dirk Holtwick -# -# Created: 17-May-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------- - -from wxPython.wx import wxPoint, wxSize - -#---------------------------------------------------------------------- - -class wxSizer: - """ - wxSizer - - An abstract base sizer class. A sizer is able to manage the size and - layout of windows and/or child sizers. - - Derived classes should implement CalcMin, and RecalcSizes. - - A window or sizer is added to this sizer with the Add method: - - def Add(self, widget, opt=0) - - The meaning of the opt parameter is different for each type of - sizer. It may be a single value or a collection of values. - """ - def __init__(self, size = None): - self.children = [] - self.origin = wxPoint(0, 0) - if not size: - size = wxSize(0,0) - self.size = size - - def Add(self, widget, opt=0): - """ - Add a window or a sizer to this sizer. The meaning of the opt - parameter is different for each type of sizer. It may be a single - value or a collection of values. - """ - size = widget.GetSize() - isSizer = isinstance(widget, wxSizer) - self.children.append( (isSizer, widget, size.width, size.height, opt) ) - - - def AddMany(self, widgets): - """ - Add a sequence (list, tuple, etc.) of widgets to this sizer. The - items in the sequence should be tuples containing valid args for - the Add method. - """ - for childinfo in widgets: - if type(childinfo) != type(()): - childinfo = (childinfo, ) - apply(self.Add, childinfo) - - - def SetDimensions(self, x, y, width, height): - self.origin = wxPoint(x, y) - self.size = wxSize(width, height) - self.RecalcSizes() - - def GetSize(self): - return self.size - - def GetPosition(self): - return self.origin - - def CalcMin(self): - raise NotImplementedError("Derived class should implement CalcMin") - - def RecalcSizes(self): - raise NotImplementedError("Derived class should implement RecalcSizes") - - - - def __getMinWindowSize(self, win): - """ - Calculate the best size window to hold this sizer, taking into - account the difference between client size and window size. - """ - min = self.GetMinSize() - a1,a2 = win.GetSizeTuple() - b1,b2 = win.GetClientSizeTuple() - w = min.width + (a1 - b1) - h = min.height + (a2 - b2) - return (w, h) - - - def GetMinSize(self): - minWidth, minHeight = self.CalcMin() - return wxSize(minWidth, minHeight) - - def SetWindowSizeHints(self, win): - w, h = self.__getMinWindowSize(win) - win.SetSizeHints(w,h) - - def FitWindow(self, win): - w, h = self.__getMinWindowSize(win) - win.SetSize(wxSize(w,h)) - - def Layout(self, size): - self.CalcMin() - self.SetDimensions(self.origin.x, self.origin.y, - size.width, size.height) - -#---------------------------------------------------------------------- diff --git a/wxPython/wxPython/lib/wxPlotCanvas.py b/wxPython/wxPython/lib/wxPlotCanvas.py index e302cb1010..7cd16a3c52 100644 --- a/wxPython/wxPython/lib/wxPlotCanvas.py +++ b/wxPython/wxPython/lib/wxPlotCanvas.py @@ -184,7 +184,7 @@ class PlotCanvas(wx.wxWindow): def OnPaint(self, event): pdc = wx.wxPaintDC(self) if self.last_draw is not None: - apply(self.draw, self.last_draw + (pdc,)) + apply(self.draw, self.last_draw + (pdc,)) def reconfigure(self, event): (new_width,new_height) = self.GetClientSizeTuple() @@ -342,7 +342,7 @@ class PlotCanvas(wx.wxWindow): ticks = [] t = -grid*Numeric.floor(-lower/grid) while t <= upper: - ticks.append(t, format % (t,)) + ticks.append( (t, format % (t,)) ) t = t + grid return ticks -- 2.45.2