├── .travis.yml ├── CMakeLists.txt ├── Makefile.in ├── apps ├── .cvsignore ├── Makefile.in ├── build │ ├── bakefiles │ │ ├── .cvsignore │ │ ├── apps.bkl │ │ └── options.bkl │ ├── msvc6 │ │ ├── apps.dsw │ │ ├── apps_app_lua.dsp │ │ ├── apps_app_luac.dsp │ │ ├── apps_app_wxlua.dsp │ │ ├── apps_app_wxluacan.dsp │ │ ├── apps_app_wxluaedit.dsp │ │ └── apps_app_wxluafreeze.dsp │ ├── msvc8 │ │ ├── apps.sln │ │ ├── apps_app_lua.vcproj │ │ ├── apps_app_luac.vcproj │ │ ├── apps_app_wxlua.vcproj │ │ ├── apps_app_wxluacan.vcproj │ │ ├── apps_app_wxluaedit.vcproj │ │ └── apps_app_wxluafreeze.vcproj │ └── msw │ │ ├── .cvsignore │ │ ├── makefile.bcc │ │ ├── makefile.gcc │ │ ├── makefile.vc │ │ └── makefile.wat ├── wxlua │ └── src │ │ ├── Makefile │ │ ├── editor.h │ │ ├── lconsole.cpp │ │ ├── lconsole.h │ │ ├── wxlua.cpp │ │ ├── wxlua.h │ │ └── wxlua.rc ├── wxluacan │ ├── scripts │ │ └── incircles.lua │ └── src │ │ ├── Makefile │ │ ├── cancom.cpp │ │ ├── cancom.h │ │ ├── canlua.cpp │ │ ├── canlua.h │ │ ├── cansim.cpp │ │ ├── cansim.h │ │ ├── cansim.rc │ │ ├── wxluacan.i │ │ ├── wxluacan_bind.cpp │ │ ├── wxluacan_bind.h │ │ └── wxluacan_rules.lua ├── wxluaedit │ ├── readme.txt │ └── src │ │ ├── Makefile │ │ ├── wxledit.cpp │ │ ├── wxledit.h │ │ ├── wxluaedit.cpp │ │ └── wxluaedit.rc └── wxluafreeze │ └── src │ ├── Makefile │ ├── readme.txt │ ├── wxluafreeze.cpp │ ├── wxluafreeze.lua │ └── wxluafreeze.rc ├── art ├── copy.xpm ├── cursors │ ├── copy_cur.cur │ ├── drag_cur.cur │ ├── edit_cur.cur │ └── move_cur.cur ├── cut.xpm ├── help.xpm ├── logoonly.svg ├── lualogo.svg ├── new.xpm ├── open.xpm ├── paste.xpm ├── play.xpm ├── save.xpm ├── saveall.xpm ├── stop.xpm ├── throbber.gif ├── wxlua.ico ├── wxlua.r ├── wxlua.xpm ├── wxlualarge.xpm ├── wxlualogo.svg ├── wxlualogo.xpm └── wxluasmall.xpm ├── bin ├── .cvsignore ├── copydlls.bat └── readme.txt ├── bindings ├── Makefile ├── genidocs.lua ├── genidocs_rules.lua ├── genwxbind.bat ├── genwxbind.lua ├── readme.txt ├── wxlua │ ├── Makefile │ ├── override.hpp │ ├── wxlua.i │ └── wxlua_rules.lua ├── wxluasocket │ ├── Makefile │ ├── override.hpp │ ├── wxluasocket.i │ └── wxluasocket_rules.lua └── wxwidgets │ ├── wx_datatypes.lua │ ├── wxadv_adv.i │ ├── wxadv_grid.i │ ├── wxadv_override.hpp │ ├── wxadv_rules.lua │ ├── wxaui_aui.i │ ├── wxaui_rules.lua │ ├── wxbase_base.i │ ├── wxbase_config.i │ ├── wxbase_data.i │ ├── wxbase_datetime.i │ ├── wxbase_file.i │ ├── wxbase_override.hpp │ ├── wxbase_rules.lua │ ├── wxclassref.txt │ ├── wxcore_appframe.i │ ├── wxcore_clipdrag.i │ ├── wxcore_controls.i │ ├── wxcore_core.i │ ├── wxcore_defsutils.i │ ├── wxcore_dialogs.i │ ├── wxcore_event.i │ ├── wxcore_gdi.i │ ├── wxcore_geometry.i │ ├── wxcore_help.i │ ├── wxcore_image.i │ ├── wxcore_mdi.i │ ├── wxcore_menutool.i │ ├── wxcore_override.hpp │ ├── wxcore_picker.i │ ├── wxcore_print.i │ ├── wxcore_rules.lua │ ├── wxcore_sizer.i │ ├── wxcore_windows.i │ ├── wxdatatypes_rules.lua │ ├── wxgl_gl.i │ ├── wxgl_rules.lua │ ├── wxhtml_html.i │ ├── wxhtml_override.hpp │ ├── wxhtml_rules.lua │ ├── wxmedia_media.i │ ├── wxmedia_rules.lua │ ├── wxnet_net.i │ ├── wxnet_override.hpp │ ├── wxnet_rules.lua │ ├── wxrichtext_richtext.i │ ├── wxrichtext_rules.lua │ ├── wxstc_override.hpp │ ├── wxstc_rules.lua │ ├── wxstc_stc.i │ ├── wxxml_override.hpp │ ├── wxxml_rules.lua │ ├── wxxml_xml.i │ ├── wxxrc_rules.lua │ └── wxxrc_xrc.i ├── build ├── Makefile_wx-config.in ├── Makefile_wx-config_targets.in ├── autoconf │ ├── .cvsignore │ ├── aclocal.m4 │ ├── acregen.sh │ ├── autoconf_inc.m4 │ ├── bakefile-dllar.m4 │ ├── bakefile-lang.m4 │ ├── bakefile.m4 │ ├── config.guess │ ├── config.sub │ ├── configure.ac │ ├── install.sh │ ├── utils.m4 │ ├── wxcodecheck.m4 │ ├── wxlua.pc.in │ └── wxwin.m4 ├── bakefiles │ ├── .cvsignore │ ├── Bakefiles.bkgen │ ├── mac_bundles.bkl │ ├── options.bkl │ ├── presets │ │ ├── wx.bkl │ │ ├── wx_unix.bkl │ │ └── wx_win32.bkl │ ├── wxbindcustom.bkgen │ ├── wxlua.bkl │ └── wxluabase.bkl ├── kdevelop │ ├── .cvsignore │ └── wxlua.kdevelop ├── msvc6 │ └── wxLua.dsw └── msw │ ├── .cvsignore │ ├── makefile.bcc │ ├── makefile.gcc │ ├── makefile.vc │ ├── makefile.wat │ └── nmake_wxLua.bat ├── cmake ├── FindLua.cmake ├── dist.cmake └── lua.cmake ├── configure ├── dist.info ├── distrib ├── announce.txt ├── autopackage │ ├── default.apspec.in │ ├── makeautopackage │ ├── wxlua.desktop │ └── wxlua.xml ├── innosetup │ ├── Readme.txt │ ├── modifypath.iss │ └── wxlua.iss └── macbundle │ ├── Info.plist.in │ ├── copydylibs.command │ ├── wxLua.icns │ ├── wxLuaFile.icns │ └── wxLuaFolder.icns ├── docs ├── FAQ.html ├── binding.html ├── changelog.txt ├── dirs.txt ├── doxygen.cfg ├── doxygen │ ├── .cvsignore │ └── readme.txt ├── install.html ├── licence.txt ├── readme.txt ├── wxlua.html └── wxluaref.html ├── lib ├── .cvsignore └── readme.txt ├── modules ├── .cvsignore ├── Makefile.in ├── build │ ├── bakefiles │ │ ├── .cvsignore │ │ ├── common.bkl │ │ ├── modules.bkl │ │ └── options.bkl │ ├── msvc6 │ │ ├── modules.dsw │ │ ├── modules_mod_lua.dsp │ │ ├── modules_mod_luamodule.dsp │ │ ├── modules_mod_luamodule_mono.dsp │ │ ├── modules_mod_wxbindadv.dsp │ │ ├── modules_mod_wxbindaui.dsp │ │ ├── modules_mod_wxbindbase.dsp │ │ ├── modules_mod_wxbindcore.dsp │ │ ├── modules_mod_wxbindgl.dsp │ │ ├── modules_mod_wxbindhtml.dsp │ │ ├── modules_mod_wxbindmedia.dsp │ │ ├── modules_mod_wxbindnet.dsp │ │ ├── modules_mod_wxbindrichtext.dsp │ │ ├── modules_mod_wxbindstc.dsp │ │ ├── modules_mod_wxbindxml.dsp │ │ ├── modules_mod_wxbindxrc.dsp │ │ ├── modules_mod_wxlua.dsp │ │ ├── modules_mod_wxluadebug.dsp │ │ └── modules_mod_wxluasocket.dsp │ ├── msvc8 │ │ ├── modules.sln │ │ ├── modules_mod_lua.vcproj │ │ ├── modules_mod_luamodule.vcproj │ │ ├── modules_mod_luamodule_mono.vcproj │ │ ├── modules_mod_wxbindadv.vcproj │ │ ├── modules_mod_wxbindaui.vcproj │ │ ├── modules_mod_wxbindbase.vcproj │ │ ├── modules_mod_wxbindcore.vcproj │ │ ├── modules_mod_wxbindgl.vcproj │ │ ├── modules_mod_wxbindhtml.vcproj │ │ ├── modules_mod_wxbindmedia.vcproj │ │ ├── modules_mod_wxbindnet.vcproj │ │ ├── modules_mod_wxbindrichtext.vcproj │ │ ├── modules_mod_wxbindstc.vcproj │ │ ├── modules_mod_wxbindxml.vcproj │ │ ├── modules_mod_wxbindxrc.vcproj │ │ ├── modules_mod_wxlua.vcproj │ │ ├── modules_mod_wxluadebug.vcproj │ │ └── modules_mod_wxluasocket.vcproj │ └── msw │ │ ├── .cvsignore │ │ ├── makefile.bcc │ │ ├── makefile.gcc │ │ ├── makefile.vc │ │ └── makefile.wat ├── lua │ ├── COPYRIGHT │ ├── HISTORY │ ├── INSTALL │ ├── Makefile │ ├── README │ ├── doc │ │ ├── contents.html │ │ ├── logo.gif │ │ ├── lua.1 │ │ ├── lua.css │ │ ├── lua.html │ │ ├── luac.1 │ │ ├── luac.html │ │ ├── manual.css │ │ ├── manual.html │ │ └── readme.html │ ├── etc │ │ ├── Makefile │ │ ├── README │ │ ├── all.c │ │ ├── bin2c.c │ │ ├── lua.hpp │ │ ├── lua.ico │ │ ├── lua.pc │ │ ├── lua.xpm │ │ ├── luavs.bat │ │ ├── min.c │ │ ├── noparser.c │ │ └── strict.lua │ ├── include │ │ ├── Makefile │ │ ├── lauxlib.h │ │ ├── lua.h │ │ ├── luaconf.h │ │ └── lualib.h │ ├── lslua50.def │ ├── lslua50m.def │ ├── src │ │ ├── Makefile │ │ ├── lapi.c │ │ ├── lapi.h │ │ ├── lauxlib.c │ │ ├── lauxlib.h │ │ ├── lbaselib.c │ │ ├── lcode.c │ │ ├── lcode.h │ │ ├── ldblib.c │ │ ├── ldebug.c │ │ ├── ldebug.h │ │ ├── ldo.c │ │ ├── ldo.h │ │ ├── ldump.c │ │ ├── lfunc.c │ │ ├── lfunc.h │ │ ├── lgc.c │ │ ├── lgc.h │ │ ├── linit.c │ │ ├── liolib.c │ │ ├── llex.c │ │ ├── llex.h │ │ ├── llimits.h │ │ ├── lmathlib.c │ │ ├── lmem.c │ │ ├── lmem.h │ │ ├── loadlib.c │ │ ├── lobject.c │ │ ├── lobject.h │ │ ├── lopcodes.c │ │ ├── lopcodes.h │ │ ├── loslib.c │ │ ├── lparser.c │ │ ├── lparser.h │ │ ├── lstate.c │ │ ├── lstate.h │ │ ├── lstring.c │ │ ├── lstring.h │ │ ├── lstrlib.c │ │ ├── ltable.c │ │ ├── ltable.h │ │ ├── ltablib.c │ │ ├── ltm.c │ │ ├── ltm.h │ │ ├── lua.c │ │ ├── lua.h │ │ ├── luac.c │ │ ├── luaconf.h │ │ ├── lualib.h │ │ ├── lundump.c │ │ ├── lundump.h │ │ ├── lvm.c │ │ ├── lvm.h │ │ ├── lzio.c │ │ ├── lzio.h │ │ └── print.c │ └── test │ │ ├── README │ │ ├── bisect.lua │ │ ├── cf.lua │ │ ├── echo.lua │ │ ├── env.lua │ │ ├── factorial.lua │ │ ├── fib.lua │ │ ├── fibfor.lua │ │ ├── globals.lua │ │ ├── hello.lua │ │ ├── life.lua │ │ ├── luac.lua │ │ ├── printf.lua │ │ ├── readonly.lua │ │ ├── sieve.lua │ │ ├── sort.lua │ │ ├── table.lua │ │ ├── trace-calls.lua │ │ ├── trace-globals.lua │ │ └── xd.lua ├── luamodule │ ├── include │ │ └── luamoduledefs.h │ └── src │ │ ├── Makefile │ │ └── luamodule.cpp ├── wxbind │ ├── build │ │ ├── makefile.bcc │ │ ├── makefile.gcc │ │ ├── makefile.gnu │ │ ├── makefile.vc │ │ ├── makefile.wat │ │ └── wxbindcustom.bkl │ ├── include │ │ ├── wxadv_bind.h │ │ ├── wxadv_wxladv.h │ │ ├── wxaui_bind.h │ │ ├── wxbase_bind.h │ │ ├── wxbinddefs.h │ │ ├── wxcore_bind.h │ │ ├── wxcore_wxlcore.h │ │ ├── wxgl_bind.h │ │ ├── wxhtml_bind.h │ │ ├── wxhtml_wxlhtml.h │ │ ├── wxmedia_bind.h │ │ ├── wxnet_bind.h │ │ ├── wxrichtext_bind.h │ │ ├── wxstc_bind.h │ │ ├── wxxml_bind.h │ │ └── wxxrc_bind.h │ ├── setup │ │ └── wxluasetup.h │ └── src │ │ ├── Makefile │ │ ├── Makefile_wxadv │ │ ├── Makefile_wxaui │ │ ├── Makefile_wxbase │ │ ├── Makefile_wxcore │ │ ├── Makefile_wxgl │ │ ├── Makefile_wxhtml │ │ ├── Makefile_wxmedia │ │ ├── Makefile_wxnet │ │ ├── Makefile_wxrichtext │ │ ├── Makefile_wxstc │ │ ├── Makefile_wxxml │ │ ├── Makefile_wxxrc │ │ ├── dummy.cpp │ │ ├── wxadv_bind.cpp │ │ ├── wxadv_wxladv.cpp │ │ ├── wxaui_bind.cpp │ │ ├── wxbase_base.cpp │ │ ├── wxbase_bind.cpp │ │ ├── wxbase_config.cpp │ │ ├── wxbase_data.cpp │ │ ├── wxbase_datetime.cpp │ │ ├── wxbase_file.cpp │ │ ├── wxcore_appframe.cpp │ │ ├── wxcore_bind.cpp │ │ ├── wxcore_clipdrag.cpp │ │ ├── wxcore_controls.cpp │ │ ├── wxcore_core.cpp │ │ ├── wxcore_defsutils.cpp │ │ ├── wxcore_dialogs.cpp │ │ ├── wxcore_event.cpp │ │ ├── wxcore_gdi.cpp │ │ ├── wxcore_geometry.cpp │ │ ├── wxcore_help.cpp │ │ ├── wxcore_image.cpp │ │ ├── wxcore_mdi.cpp │ │ ├── wxcore_menutool.cpp │ │ ├── wxcore_picker.cpp │ │ ├── wxcore_print.cpp │ │ ├── wxcore_sizer.cpp │ │ ├── wxcore_windows.cpp │ │ ├── wxcore_wxlcore.cpp │ │ ├── wxgl_bind.cpp │ │ ├── wxhtml_bind.cpp │ │ ├── wxhtml_wxlhtml.cpp │ │ ├── wxmedia_bind.cpp │ │ ├── wxnet_bind.cpp │ │ ├── wxrichtext_bind.cpp │ │ ├── wxstc_bind.cpp │ │ ├── wxxml_bind.cpp │ │ └── wxxrc_bind.cpp ├── wxlua │ ├── include │ │ ├── wxlbind.h │ │ ├── wxlcallb.h │ │ ├── wxldefs.h │ │ ├── wxlstate.h │ │ ├── wxlua.h │ │ └── wxlua_bind.h │ └── src │ │ ├── Makefile │ │ ├── dummy.cpp │ │ ├── wxlbind.cpp │ │ ├── wxlcallb.cpp │ │ ├── wxlstate.cpp │ │ └── wxlua_bind.cpp ├── wxluadebug │ ├── include │ │ ├── wxldebug.h │ │ ├── wxlstack.h │ │ └── wxluadebugdefs.h │ └── src │ │ ├── Makefile │ │ ├── dummy.cpp │ │ ├── wxldebug.cpp │ │ └── wxlstack.cpp └── wxluasocket │ ├── include │ ├── wxldserv.h │ ├── wxldtarg.h │ ├── wxlsock.h │ ├── wxluasocket_bind.h │ └── wxluasocketdefs.h │ └── src │ ├── Makefile │ ├── dummy.cpp │ ├── wxldserv.cpp │ ├── wxldtarg.cpp │ ├── wxlsock.cpp │ └── wxluasocket_bind.cpp ├── samples ├── auidemo.wx.lua ├── bindings.wx.lua ├── calculator.wx.lua ├── calculator.xrc ├── choices.wx.lua ├── controls.wx.lua ├── coroutine.wx.lua ├── dialog.wx.lua ├── editor.wx.lua ├── grid.wx.lua ├── gridtable.wx.lua ├── htmlwin.wx.lua ├── image │ ├── cmyk.jpg │ ├── horse.bmp │ ├── horse.cur │ ├── horse.gif │ ├── horse.ico │ ├── horse.jpg │ ├── horse.pcx │ ├── horse.png │ ├── horse.pnm │ ├── horse.tga │ ├── horse.tif │ ├── horse.xpm │ ├── horse3.ani │ ├── horse_ag.pnm │ ├── horse_rg.pnm │ ├── image.wx.lua │ ├── smile.xbm │ ├── smile.xpm │ └── toucan.png ├── luamodule.wx.lua ├── mdi.wx.lua ├── media.wx.lua ├── minimal.wx.lua ├── picker.wx.lua ├── printing.wx.lua ├── scribble.wx.lua ├── settings.wx.lua ├── sizer.wx.lua ├── tree.wx.lua ├── unittest.wx.lua ├── validator.wx.lua ├── veryminimal.wx.lua └── wxluasudoku.wx.lua └── util ├── bin2c └── bin2c.lua └── wrapmodule └── wrapmodule.wx.lua /.travis.yml: -------------------------------------------------------------------------------- 1 | # 2 | # LuaDist Travis-CI Hook 3 | # 4 | 5 | # We assume C build environments 6 | language: C 7 | 8 | # Try using multiple Lua Implementations 9 | env: 10 | - TOOL="gcc" # Use native compiler (GCC usually) 11 | - TOOL="clang" # Use clang 12 | - TOOL="i686-w64-mingw32" # 32bit MinGW 13 | - TOOL="x86_64-w64-mingw32" # 64bit MinGW 14 | - TOOL="arm-linux-gnueabihf" # ARM hard-float (hf), linux 15 | 16 | # Crosscompile builds may fail 17 | matrix: 18 | allow_failures: 19 | - env: TOOL="i686-w64-mingw32" 20 | - env: TOOL="x86_64-w64-mingw32" 21 | - env: TOOL="arm-linux-gnueabihf" 22 | 23 | # Install dependencies 24 | install: 25 | - git clone git://github.com/LuaDist/Tools.git ~/_tools 26 | - ~/_tools/travis/travis install 27 | 28 | # Bootstap 29 | before_script: 30 | - ~/_tools/travis/travis bootstrap 31 | 32 | # Build the module 33 | script: 34 | - ~/_tools/travis/travis build 35 | 36 | # Execute additional tests or commands 37 | after_script: 38 | - ~/_tools/travis/travis test 39 | 40 | # Only watch the master branch 41 | branches: 42 | only: 43 | - master 44 | 45 | # Notify the LuaDist Dev group if needed 46 | notifications: 47 | recipients: 48 | - luadist-dev@googlegroups.com 49 | email: 50 | on_success: change 51 | on_failure: always 52 | -------------------------------------------------------------------------------- /apps/.cvsignore: -------------------------------------------------------------------------------- 1 | config.* 2 | Makefile 3 | bk-deps 4 | *.o 5 | *.d 6 | .deps 7 | -------------------------------------------------------------------------------- /apps/build/bakefiles/.cvsignore: -------------------------------------------------------------------------------- 1 | *.state -------------------------------------------------------------------------------- /apps/build/msvc6/apps.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | Project: "app_lua"=apps_app_lua.dsp - Package Owner=<4> 6 | 7 | Package=<5> 8 | {{{ 9 | }}} 10 | 11 | Package=<4> 12 | {{{ 13 | }}} 14 | 15 | ############################################################################### 16 | 17 | Project: "app_luac"=apps_app_luac.dsp - Package Owner=<4> 18 | 19 | Package=<5> 20 | {{{ 21 | }}} 22 | 23 | Package=<4> 24 | {{{ 25 | }}} 26 | 27 | ############################################################################### 28 | 29 | Project: "app_wxlua"=apps_app_wxlua.dsp - Package Owner=<4> 30 | 31 | Package=<5> 32 | {{{ 33 | }}} 34 | 35 | Package=<4> 36 | {{{ 37 | }}} 38 | 39 | ############################################################################### 40 | 41 | Project: "app_wxluaedit"=apps_app_wxluaedit.dsp - Package Owner=<4> 42 | 43 | Package=<5> 44 | {{{ 45 | }}} 46 | 47 | Package=<4> 48 | {{{ 49 | }}} 50 | 51 | ############################################################################### 52 | 53 | Project: "app_wxluacan"=apps_app_wxluacan.dsp - Package Owner=<4> 54 | 55 | Package=<5> 56 | {{{ 57 | }}} 58 | 59 | Package=<4> 60 | {{{ 61 | }}} 62 | 63 | ############################################################################### 64 | 65 | Project: "app_wxluafreeze"=apps_app_wxluafreeze.dsp - Package Owner=<4> 66 | 67 | Package=<5> 68 | {{{ 69 | }}} 70 | 71 | Package=<4> 72 | {{{ 73 | }}} 74 | 75 | ############################################################################### 76 | 77 | -------------------------------------------------------------------------------- /apps/build/msw/.cvsignore: -------------------------------------------------------------------------------- 1 | bcc* 2 | vc* 3 | gcc* 4 | wat* 5 | *.vcproj 6 | *.user 7 | *.ncb 8 | *.suo 9 | *.opt 10 | *.obj 11 | *.plg 12 | -------------------------------------------------------------------------------- /apps/wxlua/src/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2004 4 | # Updated: 5 | # Copyright: (c) 2002. J Winwood 6 | # 7 | # Makefile for wxLua standalone sample using gmake 8 | 9 | # ---------------------------------------------------------------------------- 10 | # Set path to root of wxLua 11 | WXLUA_DIR = ../../.. 12 | 13 | # ---------------------------------------------------------------------------- 14 | # Include wxLua settings using wx-config for wxWidgets parameters 15 | 16 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 17 | 18 | # ---------------------------------------------------------------------------- 19 | 20 | PROGRAM = wxLua 21 | 22 | HEADERS = 23 | SOURCES = wxlua.cpp lconsole.cpp 24 | 25 | OBJECTS=$(SOURCES:.cpp=.o) 26 | DEPFILES=$(OBJECTS:.o=.d) 27 | 28 | #APPEXTRALIBS := -l$(WXSTC_LIB) $(APPEXTRALIBS) 29 | 30 | # ---------------------------------------------------------------------------- 31 | 32 | .cpp.o: 33 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 34 | 35 | all: $(wxLuaALL_TARGETS) $(PROGRAM) 36 | 37 | $(PROGRAM): $(OBJECTS) $(LUA_LIBS) 38 | $(CXX) -o $@ $(OBJECTS) $(LDLIBS) $(APPEXTRALIBS) 39 | 40 | editor: 41 | $(LUA) $(WXLUA_DIR)/util/bin2c/bin2c.lua -t -lf -n editor_wx_lua -o editor.h $(WXLUA_DIR)/samples/editor.wx.lua 42 | 43 | clean: 44 | rm -f $(OBJECTS) $(DEPFILES) $(PROGRAM) core 45 | 46 | # ---------------------------------------------------------------------------- 47 | # Include wxLua targets using wx-config for wxWidgets parameters 48 | 49 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 50 | 51 | -include $(DEPFILES) 52 | -------------------------------------------------------------------------------- /apps/wxlua/src/wxlua.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // Purpose: Standalone wxLua application 3 | // Author: Francis Irving 4 | // Created: 16/01/2002 5 | // Modified: J. Winwood. Added debugging support 6 | // May 2002. 7 | // Copyright: (c) 2002 Creature Labs. All rights reserved. 8 | // Copyright: (c) 2002 Lomtick Software. All rights reserved. 9 | // Licence: wxWidgets licence 10 | ///////////////////////////////////////////////////////////////////////////// 11 | 12 | #ifndef WX_LUAAPP_H 13 | #define WX_LUAAPP_H 14 | 15 | #include "wx/app.h" 16 | #include "wxluasocket/include/wxldtarg.h" 17 | #include "lconsole.h" 18 | 19 | class WXDLLIMPEXP_WXLUA wxLuaEvent; 20 | 21 | // ---------------------------------------------------------------------------- 22 | // wxLuaStandaloneApp 23 | // ---------------------------------------------------------------------------- 24 | 25 | class wxLuaStandaloneApp : public wxApp 26 | { 27 | public: 28 | // Override the base class virtual functions 29 | virtual bool OnInit(); 30 | virtual int OnExit(); 31 | 32 | void DisplayMessage(const wxString &msg, bool is_error, 33 | const wxLuaState& wxlState = wxNullLuaState); 34 | 35 | void OnLua(wxLuaEvent &event); 36 | 37 | wxString m_programName; 38 | wxLuaState m_wxlState; 39 | wxLuaConsoleWrapper m_luaConsoleWrapper; 40 | bool m_print_stdout; 41 | bool m_print_msgdlg; 42 | bool m_want_console; 43 | bool m_mem_bitmap_added; 44 | wxLuaDebugTarget* m_wxlDebugTarget; 45 | 46 | private: 47 | DECLARE_EVENT_TABLE(); 48 | }; 49 | 50 | DECLARE_APP(wxLuaStandaloneApp) 51 | 52 | #endif // WX_LUAAPP_H 53 | -------------------------------------------------------------------------------- /apps/wxlua/src/wxlua.rc: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // Purpose: Resources for wxLuaStandalone 3 | // Author: J Winwood 4 | // Created: 04/11/2001 5 | // RCS-ID: $Id: wxlua.rc,v 1.3 2006/02/20 22:20:30 frm Exp $ 6 | // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. 7 | // Licence: wxWidgets licence 8 | ///////////////////////////////////////////////////////////////////////////// 9 | 10 | lua ICON "..\\..\\..\\art\\wxlua.ico" 11 | //logo BITMAP "..\examples\bitmaps\wxLua.bmp" 12 | 13 | #include "wx/msw/wx.rc" 14 | 15 | // 1 24 "wxLua.manifest" // looks horrible! -------------------------------------------------------------------------------- /apps/wxluacan/src/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2004 4 | # Updated: 5 | # Copyright: (c) 2002. J Winwood 6 | # 7 | # Makefile for wxLuaCan app using gmake 8 | 9 | # ---------------------------------------------------------------------------- 10 | # Set path to root of wxLua 11 | WXLUA_DIR = ../../.. 12 | 13 | # ---------------------------------------------------------------------------- 14 | # Include wxLua settings using wx-config for wxWidgets parameters 15 | 16 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 17 | 18 | # ---------------------------------------------------------------------------- 19 | 20 | PROGRAM = wxLuaCan 21 | 22 | HEADERS = 23 | SOURCES = cancom.cpp canlua.cpp cansim.cpp wxluacan_bind.cpp 24 | 25 | OBJECTS=$(SOURCES:.cpp=.o) 26 | DEPFILES=$(OBJECTS:.o=.d) 27 | 28 | #APPEXTRALIBS := 29 | 30 | # ---------------------------------------------------------------------------- 31 | 32 | .cpp.o: 33 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 34 | 35 | all: $(wxLuaALL_TARGETS) $(PROGRAM) 36 | 37 | $(PROGRAM): $(OBJECTS) $(LUA_LIBS) 38 | $(CXX) -o $@ $(OBJECTS) $(LDLIBS) $(APPEXTRALIBS) 39 | 40 | genwxbind: 41 | $(LUA) -e"rulesFilename=\"wxluacan_rules.lua\"" $(WXLUA_DIR)/bindings/genwxbind.lua 42 | 43 | clean: 44 | rm -f $(OBJECTS) $(DEPFILES) $(PROGRAM) core 45 | 46 | # ---------------------------------------------------------------------------- 47 | # Include wxLua targets using wx-config for wxWidgets parameters 48 | 49 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 50 | 51 | -include $(DEPFILES) 52 | -------------------------------------------------------------------------------- /apps/wxluacan/src/cancom.cpp: -------------------------------------------------------------------------------- 1 | /*! \file cancom.cpp 2 | \brief see canvas/include/cancom.h 3 | 4 | \author Klaas Holwerda 5 | 6 | Copyright: 2001-2004 (c) Klaas Holwerda 7 | 8 | Licence: wxWidgets Licence 9 | 10 | RCS-ID: $Id: cancom.cpp,v 1.1 2006/02/03 17:06:15 titato Exp $ 11 | */ 12 | 13 | #include "wx/wxprec.h" 14 | 15 | #ifdef __BORLANDC__ 16 | #pragma hdrstop 17 | #endif 18 | 19 | #ifndef WX_PRECOMP 20 | #include "wx/wx.h" 21 | #endif 22 | 23 | #include "cancom.h" 24 | 25 | IMPLEMENT_CLASS( wxlLuaCanCmd, wxCommandProcessor ) 26 | 27 | wxlLuaCanCmd::wxlLuaCanCmd( wxlCan* canvas, int maxCommands ) 28 | : wxCommandProcessor( maxCommands ) 29 | { 30 | m_canvas = canvas; 31 | } 32 | 33 | wxlLuaCanCmd::~wxlLuaCanCmd() 34 | { 35 | } 36 | 37 | void wxlLuaCanCmd::MoveObject( int index, double x, double y ) 38 | { 39 | wxlCanObj* canobj = NULL; 40 | if ( index < 0 ) 41 | canobj = m_canvas->GetRootObject().m_objects.GetLast()->GetData(); 42 | else 43 | canobj = m_canvas->GetRootObject().GetItem( index ); 44 | canobj->SetPos( x, y ); 45 | } 46 | 47 | wxlMoveObjectCmd::wxlMoveObjectCmd( wxlCanObj* object, double x, double y ) 48 | :wxCommand( true, wxT("drag object") ) 49 | { 50 | m_object = object; 51 | m_x = x; 52 | m_y = y; 53 | }; 54 | 55 | wxlMoveObjectCmd::~wxlMoveObjectCmd() 56 | { 57 | } 58 | 59 | bool wxlMoveObjectCmd::Do(void) 60 | { 61 | double x,y; 62 | x = m_object->GetX(); 63 | y = m_object->GetY(); 64 | 65 | m_object->SetPos( m_x, m_y ); 66 | 67 | // store undo information 68 | m_x = x; 69 | m_y = y; 70 | 71 | return true; 72 | } 73 | 74 | bool wxlMoveObjectCmd::Undo(void) 75 | { 76 | double x,y; 77 | x = m_object->GetX(); 78 | y = m_object->GetY(); 79 | 80 | m_object->SetPos( m_x, m_y ); 81 | 82 | // store undo information 83 | m_x = x; 84 | m_y = y; 85 | 86 | return true; 87 | } 88 | -------------------------------------------------------------------------------- /apps/wxluacan/src/cancom.h: -------------------------------------------------------------------------------- 1 | /*! \file canvas/include/cancom.h 2 | \brief wxlCanCom for do, undo and redo changes in a wxlCan 3 | 4 | \author Klaas Holwerda 5 | 6 | Copyright: 2000-2004 (c) Klaas Holwerda 7 | 8 | Licence: wxWidgets Licence 9 | 10 | RCS-ID: $Id: cancom.h,v 1.1 2006/02/03 17:06:15 titato Exp $ 11 | */ 12 | 13 | #ifndef __WXLUACANCOM_H__ 14 | #define __WXLUACANCOM_H__ 15 | 16 | 17 | #ifndef WX_PRECOMP 18 | #include "wx/wx.h" 19 | #endif 20 | 21 | #include "canlua.h" 22 | 23 | #include "wx/cmdproc.h" 24 | 25 | //! a command interpreter 26 | /*! 27 | */ 28 | class wxlLuaCanCmd : public wxCommandProcessor 29 | { 30 | DECLARE_CLASS( wxlLuaCanCmd ) 31 | 32 | public: 33 | 34 | //! wxlLuaCanCmd 35 | wxlLuaCanCmd( wxlCan* canvas, int maxCommands = -1 ); 36 | 37 | //! destructor 38 | ~wxlLuaCanCmd(); 39 | 40 | void MoveObject( int index, double x, double y ); 41 | 42 | wxlCan* m_canvas; 43 | }; 44 | 45 | class wxlMoveObjectCmd: public wxCommand 46 | { 47 | 48 | public: 49 | 50 | wxlMoveObjectCmd( wxlCanObj* object, double x, double y ); 51 | 52 | ~wxlMoveObjectCmd(void); 53 | 54 | bool Do(void); 55 | bool Undo(void); 56 | 57 | protected: 58 | 59 | wxlCanObj* m_object; 60 | 61 | double m_x, m_y; 62 | }; 63 | 64 | #endif 65 | 66 | -------------------------------------------------------------------------------- /apps/wxluacan/src/cansim.rc: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // Purpose: Resources for wxLuaStandalone 3 | // Author: J Winwood 4 | // Created: 04/11/2001 5 | // RCS-ID: $Id: cansim.rc,v 1.2 2006/02/20 22:20:30 frm Exp $ 6 | // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. 7 | // Licence: wxWidgets licence 8 | ///////////////////////////////////////////////////////////////////////////// 9 | 10 | lua ICON "..\\..\\..\\art\\wxlua.ico" 11 | //logo BITMAP "..\examples\bitmaps\wxLua.bmp" 12 | 13 | #include "wx/msw/wx.rc" 14 | 15 | // 1 24 "wxLua.manifest" // looks horrible! -------------------------------------------------------------------------------- /apps/wxluacan/src/wxluacan.i: -------------------------------------------------------------------------------- 1 | 2 | %include "canlua.h" 3 | %include "cancom.h" 4 | %include "cansim.h" 5 | %include "wx/gdicmn.h" 6 | 7 | %class %noclassinfo wxlCanObj, wxObject 8 | wxlCanObj( double x = 0, double y = 0 ) 9 | void SetPos( double x, double y ) 10 | double GetX() 11 | double GetY() 12 | void SetPen( const wxPen& pen ) 13 | void SetBrush( const wxBrush& brush ) 14 | void SetPending( bool pending = true ) 15 | void AddObject( wxlCanObj *canobj ) 16 | %endclass 17 | 18 | %class %noclassinfo wxlCanObjRect, wxlCanObj 19 | wxlCanObjRect( double x, double y, double w, double h ) 20 | %endclass 21 | 22 | %class %noclassinfo wxlCanObjCircle, wxlCanObj 23 | wxlCanObjCircle( double x, double y, double r ) 24 | %endclass 25 | 26 | %class %noclassinfo wxlCanObjScript, wxlCanObj 27 | wxlCanObjScript( double x, double y, const wxString& name ) 28 | %endclass 29 | 30 | %class %noclassinfo wxlCanObjAddScript, wxlCanObj 31 | wxlCanObjAddScript( double x, double y, const wxString& script ) 32 | void SetScript( const wxString& script ) 33 | %endclass 34 | 35 | %class %noclassinfo wxlCan, wxScrolledWindow 36 | wxlCan( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize ) 37 | void AddObject( wxlCanObj *canobj ) 38 | bool GetYaxis() 39 | 40 | wxlLuaCanCmd* GetCmdh() 41 | %endclass 42 | 43 | %function wxlCan* GetCan() 44 | %function wxlLuaCanCmd* GetCmdhMain() 45 | 46 | %class %noclassinfo wxlLuaCanCmd, wxCommandProcessor 47 | wxlLuaCanCmd( wxlCan* canvas, int maxCommands = -1 ) 48 | void MoveObject( int index, double x, double y ) 49 | %endclass 50 | 51 | 52 | -------------------------------------------------------------------------------- /apps/wxluacan/src/wxluacan_bind.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | // wxluacan.h - headers and wxLua types for wxLua binding 3 | // 4 | // This file was generated by genwxbind.lua 5 | // Any changes made to this file will be lost when the file is regenerated 6 | // --------------------------------------------------------------------------- 7 | 8 | #ifndef __HOOK_WXLUA_wxluacan_H__ 9 | #define __HOOK_WXLUA_wxluacan_H__ 10 | 11 | #include "wxbind/include/wxcore_bind.h" 12 | 13 | #include "wxlua/include/wxlstate.h" 14 | #include "wxlua/include/wxlbind.h" 15 | 16 | // --------------------------------------------------------------------------- 17 | // Check if the version of binding generator used to create this is older than 18 | // the current version of the bindings. 19 | // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' 20 | #if WXLUA_BINDING_VERSION > 27 21 | # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." 22 | #endif //WXLUA_BINDING_VERSION > 27 23 | // --------------------------------------------------------------------------- 24 | 25 | // binding class 26 | class WXLUA_NO_DLLIMPEXP wxLuaBinding_wxluacan : public wxLuaBinding 27 | { 28 | public: 29 | wxLuaBinding_wxluacan(); 30 | 31 | 32 | private: 33 | DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxluacan) 34 | }; 35 | 36 | 37 | // initialize wxLuaBinding_wxluacan for all wxLuaStates 38 | extern WXLUA_NO_DLLIMPEXP bool wxLuaBinding_wxluacan_init(); 39 | 40 | // --------------------------------------------------------------------------- 41 | // Includes 42 | // --------------------------------------------------------------------------- 43 | 44 | #include "cancom.h" 45 | #include "canlua.h" 46 | #include "cansim.h" 47 | #include "wx/gdicmn.h" 48 | 49 | // --------------------------------------------------------------------------- 50 | // Lua Tag Method Values and Tables for each Class 51 | // --------------------------------------------------------------------------- 52 | 53 | extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCan; 54 | extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObj; 55 | extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObjAddScript; 56 | extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObjCircle; 57 | extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObjRect; 58 | extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlCanObjScript; 59 | extern WXLUA_NO_DLLIMPEXP_DATA(int) wxluatype_wxlLuaCanCmd; 60 | 61 | 62 | // --------------------------------------------------------------------------- 63 | // Encapsulation Declarations - need to be public for other bindings. 64 | // --------------------------------------------------------------------------- 65 | 66 | 67 | #endif // __HOOK_WXLUA_wxluacan_H__ 68 | 69 | -------------------------------------------------------------------------------- /apps/wxluaedit/readme.txt: -------------------------------------------------------------------------------- 1 | wxLuaEditor is an application and sample program that demonstrates an embedded 2 | wxLua interpreter. This means that wxLua is run in the same thread as the 3 | main program and "threading" is done by using lua's debug facility to run the 4 | wxWidgets message pump and see if the user has pressed stop. The editor 5 | itself can load/save/run lua programs and it also has a console for entering 6 | single line lua code for quick testing. 7 | 8 | ------------------------------------------------------------------------------ 9 | Building 10 | ------------------------------------------------------------------------------ 11 | 12 | wxLuaEditor depends on the wxcode.sourceforge.net component wxstedit for it's 13 | scintilla text editor functionality. You must have compiled wxstedit first and 14 | set the environment variable WXCODE to point to the root direction of wxCode. 15 | 16 | ------------------------------------------------------------------------------ 17 | Files 18 | ------------------------------------------------------------------------------ 19 | 20 | wxluaedit.cpp -- sample IDE type editor 21 | Makefile -- gmake for gcc to compile the wxluaedit program (unix) 22 | wxledit.cpp -- contains an editor, shell, console class 23 | wxLedit.h 24 | 25 | The two files wxledit.h/cpp can be easily used in another project by simply 26 | adding them to your project's build. 27 | -------------------------------------------------------------------------------- /apps/wxluaedit/src/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2004 4 | # Updated: 5 | # Copyright: (c) 2002. J Winwood 6 | # 7 | # Makefile for wxLuaEditor app using gmake 8 | 9 | # ---------------------------------------------------------------------------- 10 | # Set path to root of wxLua 11 | WXLUA_DIR = ../../.. 12 | 13 | # ---------------------------------------------------------------------------- 14 | # Include wxLua settings using wx-config for wxWidgets parameters 15 | 16 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 17 | 18 | # ---------------------------------------------------------------------------- 19 | 20 | PROGRAM = wxLuaEditor 21 | 22 | HEADERS = 23 | SOURCES = wxluaedit.cpp wxledit.cpp 24 | 25 | OBJECTS=$(SOURCES:.cpp=.o) 26 | DEPFILES=$(OBJECTS:.o=.d) 27 | 28 | APPEXTRALIBS := -l$(WXSTEDIT_LIB) $(APPEXTRALIBS) 29 | 30 | # ---------------------------------------------------------------------------- 31 | 32 | .cpp.o: 33 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 34 | 35 | all: $(wxLuaALL_TARGETS) wxStEdit $(PROGRAM) 36 | 37 | $(PROGRAM): $(OBJECTS) $(LUA_LIBS) 38 | $(CXX) -o $@ $(OBJECTS) $(LDLIBS) $(APPEXTRALIBS) 39 | 40 | clean: 41 | rm -f $(OBJECTS) $(DEPFILES) $(PROGRAM) core 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /apps/wxluaedit/src/wxluaedit.rc: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // Purpose: Resources for wxLuaEdit 3 | // Author: John Labenski 4 | // Created: 20/02/2006 5 | // RCS-ID: $Id: wxluaedit.rc,v 1.2 2006/02/20 22:20:30 frm Exp $ 6 | // Copyright: (c) 2006 John Labenski 7 | // Licence: wxWidgets licence 8 | ///////////////////////////////////////////////////////////////////////////// 9 | 10 | // put LUA icon before the wx resources so that windows will use the lua 11 | // icon as application's icon 12 | lua ICON "..\\..\\..\\art\\wxlua.ico" 13 | #include "wx/msw/wx.rc" 14 | -------------------------------------------------------------------------------- /apps/wxluafreeze/src/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2004 4 | # Updated: 5 | # Copyright: (c) 2002. J Winwood 6 | # 7 | # Makefile for wxLuaFreeze sample using gmake 8 | 9 | PROGRAM = wxLuaFreeze 10 | 11 | # ---------------------------------------------------------------------------- 12 | # Set path to root of wxLua 13 | WXLUA_DIR = ../../.. 14 | 15 | # ---------------------------------------------------------------------------- 16 | # Include wxLua settings using wx-config for wxWidgets parameters 17 | 18 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 19 | 20 | # ---------------------------------------------------------------------------- 21 | 22 | HEADERS = 23 | SOURCES = wxluafreeze.cpp 24 | 25 | OBJECTS=$(SOURCES:.cpp=.o) 26 | DEPFILES=$(OBJECTS:.o=.d) 27 | 28 | #APPEXTRALIBS := $(APPEXTRALIBS) 29 | 30 | # ---------------------------------------------------------------------------- 31 | 32 | .cpp.o: 33 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 34 | 35 | all: $(wxLuaALL_TARGETS) $(PROGRAM) 36 | 37 | $(PROGRAM): $(OBJECTS) $(LUA_LIBS) $(wxLuaALL_TARGETS) 38 | $(CXX) -o $@ $(OBJECTS) $(LDLIBS) $(APPEXTRALIBS) 39 | 40 | clean: 41 | rm -f $(OBJECTS) $(DEPFILES) $(PROGRAM) core 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /apps/wxluafreeze/src/readme.txt: -------------------------------------------------------------------------------- 1 | wxluafreeze readme.txt 2 | 3 | The wxLuaFreeze application creates the wxWidgets wxApp and then tries to load 4 | a script that has been attached to the executable using wxluafreeze.lua. It is 5 | a simple way make a single file wxlua application into an executable. 6 | 7 | 1) Compile the wxLuaFreeze application for the system of your choice. You'll 8 | want to compile it statically and in release mode so that all that's required 9 | for the resultant app is a single executable. 10 | 11 | 2) Run $lua wxluafreeze.lua to attach your single file wxlua script to the 12 | wxLuaFreeze application. To get help on using wxluafreeze.lua just run it 13 | without any command line parameters. 14 | 15 | For example in MSW in the wxLua\bin dir: 16 | lua.exe ..\apps\wxluafreeze\apps\wxluafreeze.lua wxluafreeze.exe myprogram.wx.lua myprogram.exe 17 | 18 | 3) Optionally use the program "upx" to compress the executable. The wxLuaFreeze 19 | program is ~4.5 Mb in release mode using the MSVC6, but after compression 20 | it's size is ~1.5 Mbytes, about 1/3 the size! 21 | -------------------------------------------------------------------------------- /apps/wxluafreeze/src/wxluafreeze.rc: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // Purpose: Resources for wxLuaFreeze 3 | // Author: J Winwood 4 | // Created: 04/11/2001 5 | // RCS-ID: 6 | // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. 7 | // Licence: wxWidgets licence 8 | ///////////////////////////////////////////////////////////////////////////// 9 | 10 | lua ICON "..\\..\\..\\art\\wxlua.ico" 11 | 12 | #include "wx/msw/wx.rc" 13 | 14 | // 1 24 "wxLua.manifest" // looks horrible! -------------------------------------------------------------------------------- /art/copy.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *copy_xpm[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "16 15 4 1", 5 | " c None", 6 | ". c Black", 7 | "X c Gray100", 8 | "o c #000080", 9 | /* pixels */ 10 | " ", 11 | " ...... ", 12 | " .XXXX.. ", 13 | " .XXXX.X. ", 14 | " .X..X.oooooo ", 15 | " .XXXXXoXXXXoo ", 16 | " .X....oXXXXoXo ", 17 | " .XXXXXoX..Xoooo", 18 | " .X....oXXXXXXXo", 19 | " .XXXXXoX.....Xo", 20 | " ......oXXXXXXXo", 21 | " oX.....Xo", 22 | " oXXXXXXXo", 23 | " ooooooooo", 24 | " " 25 | }; 26 | -------------------------------------------------------------------------------- /art/cursors/copy_cur.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/art/cursors/copy_cur.cur -------------------------------------------------------------------------------- /art/cursors/drag_cur.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/art/cursors/drag_cur.cur -------------------------------------------------------------------------------- /art/cursors/edit_cur.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/art/cursors/edit_cur.cur -------------------------------------------------------------------------------- /art/cursors/move_cur.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/art/cursors/move_cur.cur -------------------------------------------------------------------------------- /art/cut.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *cut_xpm[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "16 15 3 1", 5 | " c None", 6 | ". c Black", 7 | "X c #000080", 8 | /* pixels */ 9 | " ", 10 | " . . ", 11 | " . . ", 12 | " . . ", 13 | " .. .. ", 14 | " . . ", 15 | " ... ", 16 | " . ", 17 | " X.X ", 18 | " X XXX ", 19 | " XXX X X ", 20 | " X X X X ", 21 | " X X X X ", 22 | " X X XX ", 23 | " XX " 24 | }; 25 | -------------------------------------------------------------------------------- /art/help.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *help_xpm[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "16 15 4 1", 5 | " c None", 6 | ". c Black", 7 | "X c Blue", 8 | "o c #000080", 9 | /* pixels */ 10 | " ", 11 | " ...... ", 12 | " .XXXXX.. ", 13 | " .XX...oX.. ", 14 | " .X.. .X.. ", 15 | " .X.. .XX.. ", 16 | " .. .XX.. ", 17 | " .XX.. ", 18 | " .X.. ", 19 | " .X.. ", 20 | " .o.. ", 21 | " .. ", 22 | " .XX.. ", 23 | " .XX.. ", 24 | " ... " 25 | }; 26 | -------------------------------------------------------------------------------- /art/lualogo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | Lua 12 | 13 | 14 | -------------------------------------------------------------------------------- /art/new.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *new_xpm[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "16 15 3 1", 5 | " c None", 6 | ". c Black", 7 | "X c Gray100", 8 | /* pixels */ 9 | " ", 10 | " ........ ", 11 | " .XXXXXX.. ", 12 | " .XXXXXX.X. ", 13 | " .XXXXXX.... ", 14 | " .XXXXXXXXX. ", 15 | " .XXXXXXXXX. ", 16 | " .XXXXXXXXX. ", 17 | " .XXXXXXXXX. ", 18 | " .XXXXXXXXX. ", 19 | " .XXXXXXXXX. ", 20 | " .XXXXXXXXX. ", 21 | " .XXXXXXXXX. ", 22 | " ........... ", 23 | " " 24 | }; 25 | -------------------------------------------------------------------------------- /art/open.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *open_xpm[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "16 15 5 1", 5 | " c None", 6 | ". c Black", 7 | "X c Yellow", 8 | "o c Gray100", 9 | "O c #bfbf00", 10 | /* pixels */ 11 | " ", 12 | " ... ", 13 | " . . .", 14 | " ..", 15 | " ... ...", 16 | " .XoX....... ", 17 | " .oXoXoXoXo. ", 18 | " .XoXoXoXoX. ", 19 | " .oXoX..........", 20 | " .XoX.OOOOOOOOO.", 21 | " .oo.OOOOOOOOO. ", 22 | " .X.OOOOOOOOO. ", 23 | " ..OOOOOOOOO. ", 24 | " ........... ", 25 | " " 26 | }; 27 | -------------------------------------------------------------------------------- /art/paste.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *paste_xpm[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "16 15 6 1", 5 | " c None", 6 | ". c Black", 7 | "X c Yellow", 8 | "o c #808080", 9 | "O c #000080", 10 | "+ c Gray100", 11 | /* pixels */ 12 | " ", 13 | " .... ", 14 | " .....XX..... ", 15 | ".ooo.X..X.ooo. ", 16 | ".oo. .oo. ", 17 | ".oo........oo. ", 18 | ".oooooooooooo. ", 19 | ".oooooOOOOOOO. ", 20 | ".oooooO+++++OO ", 21 | ".oooooO+++++O+O ", 22 | ".oooooO+OOO+OOO ", 23 | ".oooooO+++++++O ", 24 | ".oooooO+OOOOO+O ", 25 | " .....O+++++++O ", 26 | " OOOOOOOOO " 27 | }; 28 | -------------------------------------------------------------------------------- /art/play.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *play_xpm[]={ 3 | "16 16 2 1", 4 | ". c None", 5 | "# c #000000", 6 | "................", 7 | "................", 8 | "....###.........", 9 | "....####........", 10 | "....#####.......", 11 | "....######......", 12 | "....#######.....", 13 | "....########....", 14 | "....########....", 15 | "....#######.....", 16 | "....######......", 17 | "....#####.......", 18 | "....####........", 19 | "....###.........", 20 | "................", 21 | "................"}; 22 | -------------------------------------------------------------------------------- /art/save.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *save_xpm[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "16 15 4 1", 5 | " c None", 6 | ". c Black", 7 | "X c #808000", 8 | "o c #808080", 9 | /* pixels */ 10 | " ", 11 | " .............. ", 12 | " .X. . . ", 13 | " .X. ... ", 14 | " .X. .X. ", 15 | " .X. .X. ", 16 | " .X. .X. ", 17 | " .X. .X. ", 18 | " .XX........oX. ", 19 | " .XXXXXXXXXXXX. ", 20 | " .XX.........X. ", 21 | " .XX...... .X. ", 22 | " .XX...... .X. ", 23 | " .XX...... .X. ", 24 | " ............. " 25 | }; 26 | -------------------------------------------------------------------------------- /art/saveall.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * saveall_xpm[] = { 3 | "16 15 4 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #808000", 7 | "@ c #C0C0C0", 8 | " ........... ", 9 | " .+.@@@@@.@. ", 10 | " ............. ", 11 | " .+.@@@@@.@.+. ", 12 | ".............+. ", 13 | ".+.@@@@@.@.+.+. ", 14 | ".+.@@@@@...+.+. ", 15 | ".+.@@@@@.+.+.+. ", 16 | ".+.@@@@@.+.+.+. ", 17 | ".++.....++.+.+. ", 18 | ".+++++++++.+... ", 19 | ".++......+.+. ", 20 | ".++....@.+... ", 21 | ".++....@.+. ", 22 | " .......... "}; 23 | -------------------------------------------------------------------------------- /art/stop.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char *stop_xpm[]={ 3 | "16 16 3 1", 4 | ". c None", 5 | "# c #000000", 6 | "a c #585858", 7 | "................", 8 | "................", 9 | "................", 10 | "....########....", 11 | "...#########a...", 12 | "...#########a...", 13 | "...#########a...", 14 | "...#########a...", 15 | "...#########a...", 16 | "...#########a...", 17 | "...#########a...", 18 | "...#########a...", 19 | "....aaaaaaaa....", 20 | "................", 21 | "................", 22 | "................"}; 23 | -------------------------------------------------------------------------------- /art/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/art/throbber.gif -------------------------------------------------------------------------------- /art/wxlua.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/art/wxlua.ico -------------------------------------------------------------------------------- /bin/.cvsignore: -------------------------------------------------------------------------------- 1 | *lua* 2 | bin2c* 3 | *.dll 4 | *_lib 5 | *_dll 6 | -------------------------------------------------------------------------------- /bin/copydlls.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM This little batch file can be used to copy 3 | REM the DLL in this folder, so that EXEs compiled 4 | REM against shared builds of wxLua can find them. 5 | REM Fix the directory name if you're using a different 6 | REM compiler (e.g. vc_dll -> bcc_dll) 7 | 8 | if "%1%" NEQ "" goto okay 9 | goto usage 10 | 11 | :okay 12 | echo Copying all DLLs from ..\lib\%1%_dll directory 13 | copy /Y ..\lib\%1%_dll\*.dll . 14 | goto end 15 | 16 | :usage 17 | echo Call this script with the name of the compiler you used 18 | echo to build the DLLs (vc,bcc,mingw)... 19 | goto end 20 | 21 | :end 22 | -------------------------------------------------------------------------------- /bin/readme.txt: -------------------------------------------------------------------------------- 1 | The output binaries are created here. 2 | -------------------------------------------------------------------------------- /bindings/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # Make all the bindings in linux using the other Makefiles 3 | 4 | # Note: run $make -B since for some reason make thinks wxwidgets, wxstc, 5 | # wxluasocket are all up to date. 6 | 7 | WXLUA_DIR = ../ 8 | 9 | 10 | # If we're using cygwin, lua maybe somewhere else, try some common places 11 | # note some other variables cygwin sets don't seem to be exported 12 | ifeq (Cygwin, $(findstring Cygwin, $(XTERM_VERSION))) 13 | LUA=$(WXLUA_DIR)/bin/vc_lib/lua.exe 14 | else 15 | LUA=$(WXLUA_DIR)/bin/lua 16 | endif 17 | 18 | 19 | # These have to be in order of their dependencies 20 | all: wxbase wxcore wxadv wxaui wxgl wxhtml wxnet wxmedia wxstc wxxml wxxrc wxrichtext wxlua wxluasocket wxluacan wxdatatypes 21 | 22 | 23 | wxadv: 24 | @echo Building wxAdv 25 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxadv_rules.lua\"" genwxbind.lua) 26 | 27 | wxaui: 28 | @echo Building wxAui 29 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxaui_rules.lua\"" genwxbind.lua) 30 | 31 | wxbase: 32 | @echo Building wxBase 33 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxbase_rules.lua\"" genwxbind.lua) 34 | 35 | wxcore: 36 | @echo Building wxCore 37 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxcore_rules.lua\"" genwxbind.lua) 38 | 39 | wxgl: 40 | @echo Building wxGL 41 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxgl_rules.lua\"" genwxbind.lua) 42 | 43 | wxhtml: 44 | @echo Building wxHtml 45 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxhtml_rules.lua\"" genwxbind.lua) 46 | 47 | wxmedia: 48 | @echo Building wxMedia 49 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxmedia_rules.lua\"" genwxbind.lua) 50 | 51 | wxnet: 52 | @echo Building wxNet 53 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxnet_rules.lua\"" genwxbind.lua) 54 | 55 | wxrichtext: 56 | @echo Building wxRichText 57 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxrichtext_rules.lua\"" genwxbind.lua) 58 | 59 | wxstc: 60 | @echo Building wxStc 61 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxstc_rules.lua\"" genwxbind.lua) 62 | 63 | wxxml: 64 | @echo Building wxXml 65 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxxml_rules.lua\"" genwxbind.lua) 66 | 67 | wxxrc: 68 | @echo Building wxXrc 69 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxxrc_rules.lua\"" genwxbind.lua) 70 | 71 | 72 | wxlua: 73 | @echo Building wxLua 74 | @($(LUA) -e"rulesFilename=\"wxlua/wxlua_rules.lua\"" genwxbind.lua) 75 | 76 | wxluasocket: 77 | @echo Building wxLuaSocket 78 | @($(LUA) -e"rulesFilename=\"wxluasocket/wxluasocket_rules.lua\"" genwxbind.lua) 79 | 80 | 81 | wxdatatypes: 82 | @echo Building wx DataTypes 83 | @($(LUA) -e"rulesFilename=\"wxwidgets/wxdatatypes_rules.lua\"" genwxbind.lua) 84 | 85 | 86 | wxluacan: 87 | @echo "Building wxLuaCan (ps. did you forget to run make -B)" 88 | @(cd $(WXLUA_DIR)/apps/wxluacan/src && make -e LUA=../../$(LUA) genwxbind) 89 | 90 | 91 | # make the wxluaref.htm documentation 92 | genidocs: 93 | @($(LUA) -e"rulesFilename=\"genidocs_rules.lua\"" genidocs.lua) 94 | 95 | 96 | # do nothing to clean 97 | clean: 98 | -------------------------------------------------------------------------------- /bindings/readme.txt: -------------------------------------------------------------------------------- 1 | bindings/readme.txt - describes generating the binding files for wxLua 2 | 3 | The bindings for wxLua provide information for lua to interface with 4 | the wxWindows C++ API. The binding files are a skeleton that the program 5 | genwxbind.lua parses and turns into C functions that are imported into lua. For 6 | more information about writing your own bindings see docs/binding.html. 7 | 8 | The output of the bindings are placed into modules/wxbind and modules/wxbindstc. 9 | 10 | If you have edited the *.i interface files you need to regenerate the bindings. 11 | The lua program must have been previously compiled for this to work. 12 | MSW: run genwxbind.bat 13 | Unix: run make in the bindings/ dir 14 | 15 | DO NOT EDIT the cpp files in modules/wxbind and modules/wxbindstc since any 16 | changes will be overwritten by the binding generator. You should make changes 17 | to the interface files and regenerate the bindings. 18 | -------------------------------------------------------------------------------- /bindings/wxlua/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002. J Winwood 6 | 7 | WXLUA_DIR = ../.. 8 | 9 | all: genwxbind 10 | 11 | genwxbind: 12 | @(cd $(WXLUA_DIR)/bindings && ../bin/lua -e"rulesFilename=\"wxlua/wxlua_rules.lua\"" genwxbind.lua) 13 | 14 | # do nothing to clean 15 | clean: 16 | -------------------------------------------------------------------------------- /bindings/wxluasocket/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002. J Winwood 6 | 7 | WXLUA_DIR = ../.. 8 | 9 | all: genwxbind 10 | 11 | genwxbind: 12 | @(cd $(WXLUA_DIR)/bindings && ../bin/lua -e"rulesFilename=\"wxluasocket/wxluasocket_rules.lua\"" genwxbind.lua) 13 | 14 | # do nothing to clean 15 | clean: 16 | -------------------------------------------------------------------------------- /bindings/wxluasocket/override.hpp: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------------- 2 | // Overridden functions for the wxLuaSocket binding for wxLua 3 | // 4 | // Please keep these functions in the same order as the .i file and in the 5 | // same order as the listing of the functions in that file. 6 | // ---------------------------------------------------------------------------- 7 | 8 | // ---------------------------------------------------------------------------- 9 | // Overrides for wxluasocket.i 10 | // ---------------------------------------------------------------------------- 11 | 12 | %override wxLua_function_LuaStackDialog 13 | // %function void LuaStackDialog() 14 | static int LUACALL wxLua_function_LuaStackDialog(lua_State *L) 15 | { 16 | // call StackDialog 17 | 18 | wxLuaStackDialog stackDialog(wxLuaState(L), NULL); 19 | stackDialog.ShowModal(); 20 | 21 | return 0; 22 | } 23 | %end 24 | -------------------------------------------------------------------------------- /bindings/wxwidgets/wxstc_override.hpp: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------------- 2 | // Overridden functions for the wxWidgets binding for wxLua 3 | // 4 | // Please keep these functions in the same order as the .i file and in the 5 | // same order as the listing of the functions in that file. 6 | // ---------------------------------------------------------------------------- 7 | 8 | // ---------------------------------------------------------------------------- 9 | // Overrides for wxstc_stc.i 10 | // ---------------------------------------------------------------------------- 11 | 12 | %override wxLua_wxStyledTextCtrl_GetCurLine 13 | // wxString GetCurLine(int* linePos=NULL) 14 | static int LUACALL wxLua_wxStyledTextCtrl_GetCurLine(lua_State *L) 15 | { 16 | int linePos; 17 | // get this 18 | wxStyledTextCtrl *self = (wxStyledTextCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxStyledTextCtrl); 19 | // call GetCurLine 20 | wxString returns = self->GetCurLine(&linePos); 21 | // push the result string 22 | lua_pushstring(L, wx2lua(returns)); 23 | lua_pushnumber(L, linePos); 24 | // return the number of parameters 25 | return 2; 26 | } 27 | %end 28 | 29 | %override wxLua_wxStyledTextCtrl_GetSelection 30 | // void GetSelection(int* startPos, int* endPos) 31 | static int LUACALL wxLua_wxStyledTextCtrl_GetSelection(lua_State *L) 32 | { 33 | int endPos; 34 | int startPos; 35 | // get this 36 | wxStyledTextCtrl *self = (wxStyledTextCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxStyledTextCtrl); 37 | // call GetSelection 38 | self->GetSelection(&startPos, &endPos); 39 | // push results 40 | lua_pushnumber(L, startPos); 41 | lua_pushnumber(L, endPos); 42 | // return the number of parameters 43 | return 2; 44 | } 45 | %end 46 | 47 | %override wxLua_wxStyledTextCtrl_SetStyleBytes 48 | // void SetStyleBytes(int length, const wxString &styleBytes) 49 | static int LUACALL wxLua_wxStyledTextCtrl_SetStyleBytes(lua_State *L) 50 | { 51 | // const wxString &styleBytes 52 | char* styleBytes = (char*)lua_tostring(L, 3); 53 | // int length 54 | int length = (int)lua_tonumber(L, 2); 55 | // get this 56 | wxStyledTextCtrl *self = (wxStyledTextCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxStyledTextCtrl); 57 | // call SetStyleBytes 58 | self->SetStyleBytes(length, styleBytes); 59 | // return the number of parameters 60 | return 0; 61 | } 62 | %end 63 | -------------------------------------------------------------------------------- /bindings/wxwidgets/wxxrc_xrc.i: -------------------------------------------------------------------------------- 1 | // =========================================================================== 2 | // Purpose: XRC Resource system 3 | // Author: J Winwood, John Labenski 4 | // Created: 14/11/2001 5 | // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. 6 | // Licence: wxWidgets licence 7 | // wxWidgets: Updated to 2.8.4 8 | // =========================================================================== 9 | 10 | %if wxLUA_USE_wxXRC && wxUSE_XRC 11 | 12 | %include "wx/xrc/xmlres.h" 13 | 14 | // --------------------------------------------------------------------------- 15 | // wxXmlResourceHandler - wxLua shouldn't need this 16 | 17 | //%class %noclassinfo wxXmlResourceHandler, wxObject 18 | //%endclass 19 | 20 | %enum wxXmlResourceFlags 21 | wxXRC_USE_LOCALE 22 | wxXRC_NO_SUBCLASSING 23 | wxXRC_NO_RELOADING 24 | %endenum 25 | 26 | // --------------------------------------------------------------------------- 27 | // wxXmlResource 28 | 29 | %class %delete %noclassinfo wxXmlResource, wxObject 30 | //wxXmlResource(); 31 | wxXmlResource(int flags = wxXRC_USE_LOCALE, const wxString& domain = ""); 32 | wxXmlResource(const wxString& filemask, int flags = wxXRC_USE_LOCALE, const wxString& domain = ""); 33 | 34 | //void AddHandler(wxXmlResourceHandler* handler); 35 | bool AttachUnknownControl(const wxString& name, wxWindow* control, wxWindow* parent = NULL); 36 | void ClearHandlers(); 37 | int CompareVersion(int major, int minor, int release, int revision) const; 38 | static wxXmlResource* Get(); 39 | int GetFlags() 40 | long GetVersion() const; 41 | static int GetXRCID(const wxString &stringID, int value_if_not_found = wxID_NONE); 42 | void InitAllHandlers(); 43 | 44 | bool Load(const wxString& filemask); 45 | wxBitmap LoadBitmap(const wxString& name); 46 | wxDialog* LoadDialog(wxWindow* parent, const wxString& name); 47 | bool LoadDialog(wxDialog* dlg, wxWindow *parent, const wxString &name); 48 | bool LoadFrame(wxFrame* frame, wxWindow* parent, const wxString& name); 49 | wxIcon LoadIcon(const wxString& name); 50 | wxMenu* LoadMenu(const wxString& name); 51 | wxMenuBar* LoadMenuBar(wxWindow* parent, const wxString& name); 52 | wxMenuBar* LoadMenuBar(const wxString& name); 53 | wxPanel* LoadPanel(wxWindow* parent, const wxString &name); 54 | bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString &name); 55 | wxToolBar* LoadToolBar(wxWindow *parent, const wxString& name); 56 | 57 | static %gc wxXmlResource* Set(%ungc wxXmlResource *res); 58 | void SetDomain(const wxString& domain) 59 | void SetFlags(int flags); 60 | bool Unload(const wxString& filename) 61 | %endclass 62 | 63 | %endif //wxLUA_USE_wxXRC && wxUSE_XRC 64 | -------------------------------------------------------------------------------- /build/autoconf/.cvsignore: -------------------------------------------------------------------------------- 1 | autom4te.cache 2 | wxlua.pc 3 | -------------------------------------------------------------------------------- /build/autoconf/aclocal.m4: -------------------------------------------------------------------------------- 1 | # generated automatically by aclocal 1.10 -*- Autoconf -*- 2 | 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 | # 2005, 2006 Free Software Foundation, Inc. 5 | # This file is free software; the Free Software Foundation 6 | # gives unlimited permission to copy and/or distribute it, 7 | # with or without modifications, as long as this notice is preserved. 8 | 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12 | # PARTICULAR PURPOSE. 13 | 14 | m4_include([bakefile-dllar.m4]) 15 | m4_include([bakefile-lang.m4]) 16 | m4_include([bakefile.m4]) 17 | m4_include([wxwin.m4]) 18 | -------------------------------------------------------------------------------- /build/autoconf/acregen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Author: Francesco Montorsi 4 | # RCS-ID: $Id: acregen.sh,v 1.6 2008/01/10 00:06:53 jrl1 Exp $ 5 | # Creation date: 14/9/2005 6 | # 7 | # A simple script to generate the configure script for a wxCode component 8 | # Some features of this version: 9 | # - automatic test for aclocal version 10 | # - able to be called from any folder 11 | # (i.e. you can call it typing 'build/acregen.sh', not only './acregen.sh') 12 | 13 | 14 | # called when an old version of aclocal is found 15 | function aclocalold() 16 | { 17 | echo "Your aclocal version is $aclocal_maj.$aclocal_min.$aclocal_rel" 18 | echo "Your automake installation is too old; please install automake >= $aclocal_minimal_maj.$aclocal_minimal_min.$aclocal_minimal_rel" 19 | echo "You can download automake from ftp://sources.redhat.com/pub/automake/" 20 | exit 1 21 | } 22 | 23 | # called when an old version of autoconf is found 24 | function autoconfold() 25 | { 26 | echo "Your autoconf version is $aclocal_maj.$aclocal_min.$aclocal_rel" 27 | echo "Your automake installation is too old; please install automake >= $aclocal_minimal_maj.$aclocal_minimal_min.$aclocal_minimal_rel" 28 | echo "You can download automake from ftp://sources.redhat.com/pub/automake/" 29 | exit 1 30 | } 31 | 32 | # first check if we have an ACLOCAL version recent enough 33 | aclocal_verfull=$(aclocal --version) 34 | aclocal_maj=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\1/'` 35 | aclocal_min=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\2/'` 36 | aclocal_rel=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\3/'` 37 | 38 | # the version may only be 1.10 instead of 1.10.0 39 | if [[ "x$aclocal_rel" = "x" ]]; then aclocal_rel=0; fi 40 | 41 | aclocal_minimal_maj=1 42 | aclocal_minimal_min=9 43 | aclocal_minimal_rel=6 44 | 45 | majok=$(expr $aclocal_maj \- $aclocal_minimal_maj) 46 | minok=$(expr $aclocal_min \- $aclocal_minimal_min) 47 | relok=$(expr $aclocal_rel \- $aclocal_minimal_rel) 48 | 49 | if [[ $majok < 0 ]]; then aclocalold; fi 50 | if [[ $majok = 0 && $minok < 0 ]]; then aclocalold; fi 51 | if [[ $majok = 0 && $minok = 0 && $relok < 0 ]]; then aclocalold; fi 52 | 53 | 54 | # check if we have an AUTOCONF version recent enough 55 | autoconf_verfull=$(autoconf --version) 56 | autoconf_maj=`echo $autoconf_verfull | sed 's/autoconf (GNU Autoconf) \([0-9]*\).\([0-9]*\).*/\1/'` 57 | autoconf_min=`echo $autoconf_verfull | sed 's/autoconf (GNU Autoconf) \([0-9]*\).\([0-9]*\).*/\2/'` 58 | 59 | autoconf_minimal_maj=2 60 | autoconf_minimal_min=60 61 | 62 | majok=$(expr $autoconf_maj \- $autoconf_minimal_maj) 63 | minok=$(expr $autoconf_min \- $autoconf_minimal_min) 64 | 65 | if [[ $majok < 0 ]]; then autoconfold; fi 66 | if [[ $majok = 0 && $minok < 0 ]]; then autoconfold; fi 67 | 68 | 69 | # we can safely proceed 70 | me=$(basename $0) 71 | path=${0%%/$me} # path from which the script has been launched 72 | current=$(pwd) 73 | cd $path 74 | aclocal -I . && autoconf && mv configure ../.. 75 | cd $current 76 | -------------------------------------------------------------------------------- /build/autoconf/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | -------------------------------------------------------------------------------- /build/autoconf/wxlua.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | # the include paths required to build something wxLua-based 7 | includepaths=${includedir} 8 | libpaths=${libdir} 9 | modnames="@WXLUA_MODNAMES@" 10 | libnames="@WXLUA_LIBNAMES@" 11 | wxlua_ldflags="@WXLUA_LDFLAGS@" 12 | 13 | Name: @PACKAGE_NAME@ 14 | Description: wxWidgets lua wrappers 15 | Version: @PACKAGE_VERSION@ 16 | Libs: -L${libdir} @WXLUA_LDFLAGS@ 17 | Cflags: -I${includedir} 18 | 19 | # in reality, wxLua requires wxWidgets; however wxWidgets does not 20 | # uses pkg-config utility and thus we cannot list it here; 21 | # so, you'll need to use `wx-config --cxxflags` and `wx-config --libs` 22 | # commands for the additional compiler & linker flags required. 23 | Requires: 24 | -------------------------------------------------------------------------------- /build/bakefiles/.cvsignore: -------------------------------------------------------------------------------- 1 | .bakefile* 2 | -------------------------------------------------------------------------------- /build/bakefiles/wxbindcustom.bkgen: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ../../modules/wxbind/build/wxbindcustom.bkl 13 | 14 | 15 | 16 | -I%WXWIN%/build/bakefiles/wxpresets 17 | 18 | 19 | 20 | 21 | 22 | 23 | msvc6prj,dmars,cbx_unix,cbuilderx 24 | 25 | 26 | 27 | borland,dmars,mingw,msvc,watcom,cbuilderx,cbx_unix,gnu 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -o$(INPUT_FILE_DIR)/makefile.bcc 38 | -o$(INPUT_FILE_DIR)/makefile.gcc 39 | -o$(INPUT_FILE_DIR)/makefile.vc 40 | -o$(INPUT_FILE_DIR)/makefile.wat 41 | -o$(INPUT_FILE_DIR)/makefile.gnu 42 | 43 | -------------------------------------------------------------------------------- /build/kdevelop/.cvsignore: -------------------------------------------------------------------------------- 1 | *.pcs 2 | *.kdevses -------------------------------------------------------------------------------- /build/msw/.cvsignore: -------------------------------------------------------------------------------- 1 | vc* 2 | bcc* 3 | mingw* 4 | -------------------------------------------------------------------------------- /dist.info: -------------------------------------------------------------------------------- 1 | --- This file is part of LuaDist project 2 | 3 | name = "wxlua" 4 | version = "2.8.10.0" 5 | 6 | desc = "wxLua is a lua scripting language wrapper around the wxWidgets cross-platform GUI library. It consists of an executable for running standalone wxLua scripts and a library for extending C++ programs with a fast, small, fully embeddable scripting language." 7 | author = "Francesco Montorsi, John Labenski, Paul Winwood, Ray Gilbert, Klaas Holwerda" 8 | license = "wxWindows Library Licence, Version 3" 9 | url = "http://wxlua.sourceforge.net" 10 | maintainer = "Peter Kapec, Peter Drahos" 11 | 12 | depends = { 13 | "lua ~> 5.1", 14 | "wxwidgets ~> 2.8", 15 | } 16 | -------------------------------------------------------------------------------- /distrib/announce.txt: -------------------------------------------------------------------------------- 1 | 2 | Places where to post the announce of a new wxLua release: 3 | --------------------------------------------------------- 4 | 5 | lua-users mailing list: lua@bazar2.conectiva.com.br 6 | wx-users mailing list: wx-users@lists.wxwidgets.org 7 | wx-announce mailing list: wx-announce@lists.wxwidgets.org 8 | 9 | wxLua news tracker: http://sourceforge.net/news/submit.php?group_id=140042 10 | wxForum announcement board: http://wxforum.shadonet.com/viewforum.php?f=10 11 | wxCommunity news: http://www.wxcommunity.com/modules.php?op=modload&name=Submit_News&file=index 12 | 13 | 14 | 15 | The announcement text: 16 | ---------------------- 17 | 18 | Here it is the announcement text used for last release of wxLua: 19 | 20 | 21 | 22 | 23 | Announcing wxLua 2.8.0.0: lua bindings to wxWidgets 24 | ---------------------------------------------------------------- 25 | 26 | The wxLua team is pleased to announce a new release of the lua bindings to wxWidgets cross-platform GUI library. This version supports wxWidgets 2.6.3 to 2.8.0 and uses lua 5.1. 27 | 28 | wxLua is a lua scripting language wrapper around the C++ wxWidgets cross-platform GUI library. It consists of an executable for running standalone wxLua scripts, a module for lua programs to load using require, and the source code to build a library for extending C++ programs with a fast, small, fully embeddable scripting language. 29 | 30 | wxWidgets is a cross-platform toolkit that lets developers create applications for Win32, Mac OS X, GTK+, X11, Motif, WinCE, and more using a single codebase. Unlike other cross-platform toolkits, wxWidgets applications look and feel native. This is because wxWidgets uses the platform's own native controls rather than emulating them. It's also extensive, free, open-source, and mature. 31 | 32 | wxLua wraps all the GUI controls that wxWidgets provides as well as common dialogs, drawing graphics, image loading, saving, manipulating, file functions, sound and media playback, printing, sockets, and more. 33 | 34 | 35 | To learn more about wxLua and to download it, please visit: 36 | 37 | http://wxlua.sourceforge.net 38 | 39 | To learn about wxWidgets visit: 40 | 41 | http://www.wxwidgets.org 42 | 43 | 44 | Feedback greatly appreciated ! 45 | 46 | The wxLua developers 47 | 48 | 49 | -------------------------------------------------------------------------------- /distrib/autopackage/default.apspec.in: -------------------------------------------------------------------------------- 1 | # -*-shell-script-*- 2 | 3 | [Meta] 4 | RootName: @wxlua.sourceforge.net/wxlua:$SOFTWAREVERSION 5 | DisplayName: Lua bindings for wxWidgets 6 | ShortName: wxlua 7 | Maintainer: Francesco Montorsi 8 | Packager: Francesco Montorsi 9 | Summary: wxLua provides Lua bindings to the wxWidgets toolkit 10 | URL: http://wxlua.sourceforge.net/ 11 | License: wxWindows license 12 | SoftwareVersion: @PACKAGE_VERSION@ 13 | Revision: 1 14 | PackageVersion: 1 15 | AutopackageTarget: 1.2 16 | PackageFileName: $SHORTNAME-$SOFTWAREVERSION-$PACKAGEVERSION.x86.package 17 | Compression: bzip2 18 | 19 | [BuildPrepare] 20 | # we must tell apgcc to resolve the -l options with (wx)Lua libraries 21 | # to their absolute path otherwise they will be considered as shared 22 | # and the order of the lib will be messed !! 23 | export APBUILD_RESOLVE_LIBPATH=".*stedit.* .*lua.*" 24 | export APBUILD_STATIC="tiff expat" 25 | export NO_WXLUAEDIT_CHECK=1 26 | prepareBuild --disable-shared --disable-debug --enable-unicode --disable-customwxbind-install --disable-precomp-headers --disable-systemlua 27 | 28 | [BuildUnprepare] 29 | unprepareBuild 30 | 31 | [Imports] 32 | rm -rf include lib # do not include headers & libraries ! 33 | echo '*' | import 34 | 35 | [Prepare] 36 | require @gtk.org/gtk 2.0 37 | 38 | # only wxGTK required: lua and wxStEdit are statically built in 39 | # NOTE: currently wxAutopackage does not provide STC stuff so we link 40 | # statically to all wxWidgets (STC cannot be built statically 41 | # against a shared build of wx) 42 | ##require @wxwidgets.org/wxgtk 28.0 43 | 44 | # remove the wxLua RPM/DEB/other native package format if installed 45 | removeOwningPackage $PREFIX/bin/wxlua 46 | 47 | 48 | [Install] 49 | installExe bin/* 50 | installData share/wxlua 51 | installIcon share/pixmaps/wxlualogo.xpm 52 | installMime share/mime/packages/wxlua.xml 53 | installMenuItem "Development" share/applications/wxlua.desktop 54 | 55 | [Uninstall] 56 | uninstallFromLog 57 | -------------------------------------------------------------------------------- /distrib/autopackage/makeautopackage: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # NB: you can also do "make autopackage" from the 4 | # main dir after you ran configure there 5 | 6 | currloc="http://wxlua.sourceforge.net/wxlua/" 7 | sshurl="shell.sf.net:/home/groups/w/wx/wxlua/htdocs/wxlua/" 8 | 9 | 10 | if [[ ! -f default.apspec ]]; then 11 | echo 12 | echo "Please first run the configure script (in the ../.. folder)" 13 | echo "in order to create the default.apspec file from default.apspec.in" 14 | echo 15 | exit 1 16 | fi 17 | 18 | # remove old stuff 19 | rm -rf toupload 20 | mkdir -p toupload 21 | rm -f toupload/*.xml toupload/*.meta toupload/*.package 22 | 23 | # build the package 24 | cd ../.. 25 | makepackage $@ distrib/autopackage/default.apspec 26 | if test $? = 0; then 27 | mv *.xml *.meta *.package distrib/autopackage/toupload 28 | 29 | packagename=`ls distrib/autopackage/toupload/*package` 30 | 31 | echo 32 | echo 33 | echo "= REMINDER ===================================================" 34 | echo "Now that the autopackage has been built successfully, remember" 35 | echo "to upload the .meta, .package and .xml files:" 36 | echo " scp toupload/*.xml toupload/*.meta toupload/*.package $sshurl" 37 | echo " curl -T toupload/*.package ftp://upload.sourceforge.net/incoming/$packagename" 38 | echo "==============================================================" 39 | fi 40 | -------------------------------------------------------------------------------- /distrib/autopackage/wxlua.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=wxLua Editor 3 | Comment=Editor for Lua script files 4 | Exec=wxluaedit %F 5 | Encoding=UTF-8 6 | Terminal=false 7 | Type=Application 8 | MimeType=application/lua; 9 | Categories=Application;Development; 10 | Icon=wxlualogo.xpm 11 | X-GNOME-DocPath= -------------------------------------------------------------------------------- /distrib/autopackage/wxlua.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Lua script 5 | 6 | 7 | 8 | wxlualogo.xpm 9 | 10 | -------------------------------------------------------------------------------- /distrib/innosetup/Readme.txt: -------------------------------------------------------------------------------- 1 | 2 | Notes about wxlua.iss 3 | ===================== 4 | 5 | To build the windows installer of wxLua you need: 6 | 1) InnoSetup and InnoSetup Preprocessor 7 | (http://www.jrsoftware.org/isinfo.php) 8 | 2) UPX (http://upx.sourceforge.net) 9 | 10 | To actually build do: 11 | 12 | 1) go in wxLua\build\msw and build with MSVC or BORLAND compiler 13 | the entire wxLua project using the USE_WXLUAEDIT=1 option 14 | 2) run the 'compress' utility target to optimize the .exe 15 | 3) run the 'docs' utility target to create doxygen docs 16 | 4) copy the MSVCR71.dll and MSVCP71.dll files in the "bin" folder 17 | so to include them in the final .exe package 18 | 5) open the wxLua\build\innosetup\wxlua.iss file 19 | 6) eventually update version numbers 20 | 7) click 'Compile' to create in wxLua\.. the installer. 21 | -------------------------------------------------------------------------------- /distrib/macbundle/Info.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleInfoDictionaryVersion 6 | 6.0 7 | CFBundleIdentifier 8 | net.sourceforge.wxlua.IDENTIFIER 9 | CFBundleDevelopmentRegion 10 | English 11 | CFBundleExecutable 12 | EXECUTABLE 13 | CFBundleIconFile 14 | wxLua.icns 15 | CFBundleName 16 | EXECUTABLE 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | VERSION 23 | CFBundleShortVersionString 24 | VERSION 25 | CFBundleGetInfoString 26 | EXECUTABLE version VERSION, (c) 2002-2006 wxWidgets 27 | CFBundleLongVersionString 28 | VERSION, (c) 2002-2006 wxWidgets 29 | NSHumanReadableCopyright 30 | Copyright 2002-2006 wxWidgets 31 | LSRequiresCarbon 32 | 33 | CSResourcesFileMapped 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /distrib/macbundle/copydylibs.command: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | DIR=`dirname "$0"`; cd "$DIR" 4 | 5 | # This little shell script can be used to copy 6 | # the DLL to this folder, so that EXEs compiled 7 | # against shared builds of wxLua can find them. 8 | 9 | PREFIX=/usr/local 10 | 11 | #cp $PREFIX/lib/libwx_macu-2.8.0.dylib . 12 | #cp $PREFIX/lib/libwx_macu_stc-2.8.0.dylib . 13 | 14 | cp -p ../lib/*.dylib . 15 | 16 | for dylib in lib*lua*.0.0.0.dylib; do 17 | lib=`echo $dylib | sed -e s/.0.0.0.dylib/.0.dylib/` 18 | test -L $lib && rm $lib # remove existing symlink 19 | mv $dylib $lib 20 | done 21 | 22 | for dylib in libwx_*.0.dylib liblua*.0.dylib libwxlua_*.0.dylib; do 23 | install_name_tool -id @executable_path/../../../$dylib $dylib 24 | 25 | for lib in libwx_*.0.dylib liblua*.0.dylib libwxlua_*.0.dylib; do 26 | install_name_tool -change $PREFIX/lib/$dylib @executable_path/../../../$dylib\ 27 | $lib 28 | done 29 | 30 | for app in wxLua wxLuaEdit wxLuaCan wxLuaFreeze; do 31 | install_name_tool -change $PREFIX/lib/$dylib @executable_path/../../../$dylib\ 32 | $app.app/Contents/MacOS/* 33 | done 34 | 35 | done 36 | 37 | -------------------------------------------------------------------------------- /distrib/macbundle/wxLua.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/distrib/macbundle/wxLua.icns -------------------------------------------------------------------------------- /distrib/macbundle/wxLuaFile.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/distrib/macbundle/wxLuaFile.icns -------------------------------------------------------------------------------- /distrib/macbundle/wxLuaFolder.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/distrib/macbundle/wxLuaFolder.icns -------------------------------------------------------------------------------- /docs/doxygen/.cvsignore: -------------------------------------------------------------------------------- 1 | html -------------------------------------------------------------------------------- /docs/doxygen/readme.txt: -------------------------------------------------------------------------------- 1 | This dir is filled with the output of running 2 | $doxygen doxygen.cfg in wxLua/docs. 3 | -------------------------------------------------------------------------------- /docs/licence.txt: -------------------------------------------------------------------------------- 1 | wxWindows Library Licence, Version 3 2 | ==================================== 3 | 4 | Copyright (c) 1998 Julian Smart, Robert Roebling et al 5 | 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this licence document, but changing it is not allowed. 8 | 9 | WXWINDOWS LIBRARY LICENCE 10 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 11 | 12 | This library is free software; you can redistribute it and/or modify it 13 | under the terms of the GNU Library General Public Licence as published by 14 | the Free Software Foundation; either version 2 of the Licence, or (at 15 | your option) any later version. 16 | 17 | This library is distributed in the hope that it will be useful, but 18 | WITHOUT ANY WARRANTY; without even the implied warranty of 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 20 | General Public Licence for more details. 21 | 22 | You should have received a copy of the GNU Library General Public Licence 23 | along with this software, usually in a file named COPYING.LIB. If not, 24 | write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 25 | Boston, MA 02111-1307 USA. 26 | 27 | EXCEPTION NOTICE 28 | 29 | 1. As a special exception, the copyright holders of this library give 30 | permission for additional uses of the text contained in this release of 31 | the library as licenced under the wxWindows Library Licence, applying 32 | either version 3 of the Licence, or (at your option) any later version of 33 | the Licence as published by the copyright holders of version 3 of the 34 | Licence document. 35 | 36 | 2. The exception is that you may use, copy, link, modify and distribute 37 | under the user's own terms, binary object code versions of works based 38 | on the Library. 39 | 40 | 3. If you copy code from files distributed under the terms of the GNU 41 | General Public Licence or the GNU Library General Public Licence into a 42 | copy of this library, as this licence permits, the exception does not 43 | apply to the code that you add in this way. To avoid misleading anyone as 44 | to the status of such modified files, you must delete this exception 45 | notice from such code and/or adjust the licensing conditions notice 46 | accordingly. 47 | 48 | 4. If you write modifications of your own for this library, it is your 49 | choice whether to permit this exception to apply to your modifications. 50 | If you do not wish that, you must delete the exception notice from such 51 | code and/or adjust the licensing conditions notice accordingly. 52 | 53 | 54 | -------------------------------------------------------------------------------- /docs/readme.txt: -------------------------------------------------------------------------------- 1 | wxLua readme.txt 2 | 3 | ------------------------------------------------------------------------------- 4 | wxLua is a lua scripting language wrapper around the wxWidgets cross-platform 5 | GUI library. It consists of an executable for running standalone wxLua scripts 6 | and a library for extending C++ programs with a fast, small, fully embeddable 7 | scripting language. 8 | 9 | References: 10 | http://wxlua.sourceforge.net 11 | http://www.lua.org 12 | http://www.wxwidgets.org 13 | 14 | ------------------------------------------------------------------------------- 15 | The wxLua "big picture" 16 | 17 | Lua is an ANSI C compatible scripting language that can load and run 18 | interpreted scripts as either files or strings. The language itself is very 19 | dynamic and contains a limited number of data types, mainly numbers, strings, 20 | and tables. Perhaps the most powerful feature of the lua language is that the 21 | tables can be used as either arrays or as hashtables that can contain numbers, 22 | strings, and/or subtables. 23 | 24 | wxLua adds to this small and elegant language the power of the wxWidgets 25 | cross-platform GUI library. This incudes the ability to create complex user 26 | interface dialogs, image manipulation, file manipulation, sockets, displaying 27 | HTML, and printing to name a few. 28 | -------------------------------------------------------------------------------- /lib/.cvsignore: -------------------------------------------------------------------------------- 1 | *_dll 2 | *_lib -------------------------------------------------------------------------------- /lib/readme.txt: -------------------------------------------------------------------------------- 1 | The output libraries are created here. 2 | -------------------------------------------------------------------------------- /modules/.cvsignore: -------------------------------------------------------------------------------- 1 | config.* 2 | Makefile 3 | bk-deps 4 | *.o 5 | *.d 6 | .deps 7 | -------------------------------------------------------------------------------- /modules/build/bakefiles/.cvsignore: -------------------------------------------------------------------------------- 1 | *.state -------------------------------------------------------------------------------- /modules/build/msw/.cvsignore: -------------------------------------------------------------------------------- 1 | bcc* 2 | vc* 3 | gcc* 4 | wat* 5 | *.vcproj 6 | *.user 7 | *.ncb 8 | *.suo 9 | *.opt 10 | *.obj 11 | *.plg 12 | -------------------------------------------------------------------------------- /modules/lua/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Lua License 2 | ----------- 3 | 4 | Lua is licensed under the terms of the MIT license reproduced below. 5 | This means that Lua is free software and can be used for both academic 6 | and commercial purposes at absolutely no cost. 7 | 8 | For details and rationale, see http://www.lua.org/license.html . 9 | 10 | =============================================================================== 11 | 12 | Copyright (C) 1994-2008 Lua.org, PUC-Rio. 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a copy 15 | of this software and associated documentation files (the "Software"), to deal 16 | in the Software without restriction, including without limitation the rights 17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the Software is 19 | furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 | THE SOFTWARE. 31 | 32 | =============================================================================== 33 | 34 | (end of COPYRIGHT) 35 | -------------------------------------------------------------------------------- /modules/lua/README: -------------------------------------------------------------------------------- 1 | README for Lua 5.1 2 | 3 | See INSTALL for installation instructions. 4 | See HISTORY for a summary of changes since the last released version. 5 | 6 | * What is Lua? 7 | ------------ 8 | Lua is a powerful, light-weight programming language designed for extending 9 | applications. Lua is also frequently used as a general-purpose, stand-alone 10 | language. Lua is free software. 11 | 12 | For complete information, visit Lua's web site at http://www.lua.org/ . 13 | For an executive summary, see http://www.lua.org/about.html . 14 | 15 | Lua has been used in many different projects around the world. 16 | For a short list, see http://www.lua.org/uses.html . 17 | 18 | * Availability 19 | ------------ 20 | Lua is freely available for both academic and commercial purposes. 21 | See COPYRIGHT and http://www.lua.org/license.html for details. 22 | Lua can be downloaded at http://www.lua.org/download.html . 23 | 24 | * Installation 25 | ------------ 26 | Lua is implemented in pure ANSI C, and compiles unmodified in all known 27 | platforms that have an ANSI C compiler. In most Unix-like platforms, simply 28 | do "make" with a suitable target. See INSTALL for detailed instructions. 29 | 30 | * Origin 31 | ------ 32 | Lua is developed at Lua.org, a laboratory of the Department of Computer 33 | Science of PUC-Rio (the Pontifical Catholic University of Rio de Janeiro 34 | in Brazil). 35 | For more information about the authors, see http://www.lua.org/authors.html . 36 | 37 | (end of README) 38 | -------------------------------------------------------------------------------- /modules/lua/doc/contents.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/modules/lua/doc/contents.html -------------------------------------------------------------------------------- /modules/lua/doc/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/modules/lua/doc/logo.gif -------------------------------------------------------------------------------- /modules/lua/doc/lua.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: #000000 ; 3 | background-color: #FFFFFF ; 4 | font-family: sans-serif ; 5 | text-align: justify ; 6 | margin-right: 20px ; 7 | margin-left: 20px ; 8 | } 9 | 10 | h1, h2, h3, h4 { 11 | font-weight: normal ; 12 | font-style: italic ; 13 | } 14 | 15 | a:link { 16 | color: #000080 ; 17 | background-color: inherit ; 18 | text-decoration: none ; 19 | } 20 | 21 | a:visited { 22 | background-color: inherit ; 23 | text-decoration: none ; 24 | } 25 | 26 | a:link:hover, a:visited:hover { 27 | color: #000080 ; 28 | background-color: #E0E0FF ; 29 | } 30 | 31 | a:link:active, a:visited:active { 32 | color: #FF0000 ; 33 | } 34 | 35 | hr { 36 | border: 0 ; 37 | height: 1px ; 38 | color: #a0a0a0 ; 39 | background-color: #a0a0a0 ; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /modules/lua/doc/manual.css: -------------------------------------------------------------------------------- 1 | h3 code { 2 | font-family: inherit ; 3 | } 4 | 5 | pre { 6 | font-size: 105% ; 7 | } 8 | 9 | span.apii { 10 | float: right ; 11 | font-family: inherit ; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /modules/lua/doc/readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Lua documentation 4 | 5 | 6 | 7 | 8 | 9 |
10 |

11 | Lua 12 | Documentation 13 |

14 | 15 | This is the documentation included in the source distribution of Lua 5.1.4. 16 | 17 | 25 | 26 | Lua's 27 | official web site 28 | contains updated documentation, 29 | especially the 30 | reference manual. 31 |

32 | 33 |


34 | 35 | Last update: 36 | Tue Aug 12 14:46:07 BRT 2008 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /modules/lua/etc/Makefile: -------------------------------------------------------------------------------- 1 | # makefile for Lua etc 2 | 3 | TOP= .. 4 | LIB= $(TOP)/src 5 | INC= $(TOP)/src 6 | BIN= $(TOP)/src 7 | SRC= $(TOP)/src 8 | TST= $(TOP)/test 9 | 10 | CC= gcc 11 | CFLAGS= -O2 -Wall -I$(INC) $(MYCFLAGS) 12 | MYCFLAGS= 13 | MYLDFLAGS= -Wl,-E 14 | MYLIBS= -lm 15 | #MYLIBS= -lm -Wl,-E -ldl -lreadline -lhistory -lncurses 16 | RM= rm -f 17 | 18 | default: 19 | @echo 'Please choose a target: min noparser one strict clean' 20 | 21 | min: min.c 22 | $(CC) $(CFLAGS) $@.c -L$(LIB) -llua $(MYLIBS) 23 | echo 'print"Hello there!"' | ./a.out 24 | 25 | noparser: noparser.o 26 | $(CC) noparser.o $(SRC)/lua.o -L$(LIB) -llua $(MYLIBS) 27 | $(BIN)/luac $(TST)/hello.lua 28 | -./a.out luac.out 29 | -./a.out -e'a=1' 30 | 31 | one: 32 | $(CC) $(CFLAGS) all.c $(MYLIBS) 33 | ./a.out $(TST)/hello.lua 34 | 35 | strict: 36 | -$(BIN)/lua -e 'print(a);b=2' 37 | -$(BIN)/lua -lstrict -e 'print(a)' 38 | -$(BIN)/lua -e 'function f() b=2 end f()' 39 | -$(BIN)/lua -lstrict -e 'function f() b=2 end f()' 40 | 41 | clean: 42 | $(RM) a.out core core.* *.o luac.out 43 | 44 | .PHONY: default min noparser one strict clean 45 | -------------------------------------------------------------------------------- /modules/lua/etc/README: -------------------------------------------------------------------------------- 1 | This directory contains some useful files and code. 2 | Unlike the code in ../src, everything here is in the public domain. 3 | 4 | If any of the makes fail, you're probably not using the same libraries 5 | used to build Lua. Set MYLIBS in Makefile accordingly. 6 | 7 | all.c 8 | Full Lua interpreter in a single file. 9 | Do "make one" for a demo. 10 | 11 | lua.hpp 12 | Lua header files for C++ using 'extern "C"'. 13 | 14 | lua.ico 15 | A Lua icon for Windows (and web sites: save as favicon.ico). 16 | Drawn by hand by Markus Gritsch . 17 | 18 | lua.pc 19 | pkg-config data for Lua 20 | 21 | luavs.bat 22 | Script to build Lua under "Visual Studio .NET Command Prompt". 23 | Run it from the toplevel as etc\luavs.bat. 24 | 25 | min.c 26 | A minimal Lua interpreter. 27 | Good for learning and for starting your own. 28 | Do "make min" for a demo. 29 | 30 | noparser.c 31 | Linking with noparser.o avoids loading the parsing modules in lualib.a. 32 | Do "make noparser" for a demo. 33 | 34 | strict.lua 35 | Traps uses of undeclared global variables. 36 | Do "make strict" for a demo. 37 | 38 | -------------------------------------------------------------------------------- /modules/lua/etc/all.c: -------------------------------------------------------------------------------- 1 | /* 2 | * all.c -- Lua core, libraries and interpreter in a single file 3 | */ 4 | 5 | #define luaall_c 6 | 7 | #include "lapi.c" 8 | #include "lcode.c" 9 | #include "ldebug.c" 10 | #include "ldo.c" 11 | #include "ldump.c" 12 | #include "lfunc.c" 13 | #include "lgc.c" 14 | #include "llex.c" 15 | #include "lmem.c" 16 | #include "lobject.c" 17 | #include "lopcodes.c" 18 | #include "lparser.c" 19 | #include "lstate.c" 20 | #include "lstring.c" 21 | #include "ltable.c" 22 | #include "ltm.c" 23 | #include "lundump.c" 24 | #include "lvm.c" 25 | #include "lzio.c" 26 | 27 | #include "lauxlib.c" 28 | #include "lbaselib.c" 29 | #include "ldblib.c" 30 | #include "liolib.c" 31 | #include "linit.c" 32 | #include "lmathlib.c" 33 | #include "loadlib.c" 34 | #include "loslib.c" 35 | #include "lstrlib.c" 36 | #include "ltablib.c" 37 | 38 | #include "lua.c" 39 | -------------------------------------------------------------------------------- /modules/lua/etc/bin2c.c: -------------------------------------------------------------------------------- 1 | /* 2 | * bin2c.c 3 | * convert files to byte arrays for automatic loading with lua_dobuffer 4 | * Luiz Henrique de Figueiredo (lhf@tecgraf.puc-rio.br) 5 | * 02 Apr 2003 20:44:31 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | static void dump(FILE* f, int n) 13 | { 14 | printf("static const unsigned char B%d[]={\n",n); 15 | for (n=1;;n++) 16 | { 17 | int c=getc(f); 18 | if (c==EOF) break; 19 | printf("%3u,",c); 20 | if (n==20) { putchar('\n'); n=0; } 21 | } 22 | printf("\n};\n\n"); 23 | } 24 | 25 | static void fdump(const char* fn, int n) 26 | { 27 | FILE* f= fopen(fn,"rb"); /* must open in binary mode */ 28 | if (f==NULL) 29 | { 30 | fprintf(stderr,"bin2c: cannot open "); 31 | perror(fn); 32 | exit(1); 33 | } 34 | else 35 | { 36 | printf("/* %s */\n",fn); 37 | dump(f,n); 38 | fclose(f); 39 | } 40 | } 41 | 42 | static void emit(const char* fn, int n) 43 | { 44 | printf(" lua_dobuffer(L,(const char*)B%d,sizeof(B%d),\"%s\");\n",n,n,fn); 45 | } 46 | 47 | int main(int argc, char* argv[]) 48 | { 49 | printf("/* code automatically generated by bin2c -- DO NOT EDIT */\n"); 50 | printf("{\n"); 51 | if (argc<2) 52 | { 53 | dump(stdin,0); 54 | emit("=stdin",0); 55 | } 56 | else 57 | { 58 | int i; 59 | printf("/* #include'ing this file in a C program is equivalent to calling\n"); 60 | for (i=1; i> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /modules/lua/etc/lua.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/modules/lua/etc/lua.ico -------------------------------------------------------------------------------- /modules/lua/etc/lua.pc: -------------------------------------------------------------------------------- 1 | # lua.pc -- pkg-config data for Lua 2 | 3 | # vars from install Makefile 4 | 5 | # grep '^V=' ../Makefile 6 | V= 5.1 7 | # grep '^R=' ../Makefile 8 | R= 5.1.4 9 | 10 | # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' 11 | prefix= /usr/local 12 | INSTALL_BIN= ${prefix}/bin 13 | INSTALL_INC= ${prefix}/include 14 | INSTALL_LIB= ${prefix}/lib 15 | INSTALL_MAN= ${prefix}/man/man1 16 | INSTALL_LMOD= ${prefix}/share/lua/${V} 17 | INSTALL_CMOD= ${prefix}/lib/lua/${V} 18 | 19 | # canonical vars 20 | exec_prefix=${prefix} 21 | libdir=${exec_prefix}/lib 22 | includedir=${prefix}/include 23 | 24 | Name: Lua 25 | Description: An Extensible Extension Language 26 | Version: ${R} 27 | Requires: 28 | Libs: -L${libdir} -llua -lm 29 | Cflags: -I${includedir} 30 | 31 | # (end of lua.pc) 32 | -------------------------------------------------------------------------------- /modules/lua/etc/lua.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *magick[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "32 32 6 1", 5 | " c Gray0", 6 | ". c #000000008080", 7 | "X c #808080808080", 8 | "o c #c0c0c0c0c0c0", 9 | "O c Gray100", 10 | "+ c None", 11 | /* pixels */ 12 | "++++++++++++++++++++++++++ooo+++", 13 | "++++++++++++++++++++++++oX...Xo+", 14 | "++++++++++++++++++++++++X.....X+", 15 | "+++++++++++++++++++++++o.......o", 16 | "+++++++++XX......XX++++o.......o", 17 | "+++++++X............X++o.......o", 18 | "+++++o................o+X.....X+", 19 | "++++X..................XoX...Xo+", 20 | "+++X..............XXX...X+ooo+++", 21 | "++o.............XoOOOoX..o++++++", 22 | "++..............oOOOOOo...++++++", 23 | "+X.............XOOOOOOOX..X+++++", 24 | "+..............XOOOOOOOX...+++++", 25 | "X..............XOOOOOOOX...X++++", 26 | "X...............oOOOOOo....X++++", 27 | "................XoOOOoX.....++++", 28 | "....XO............XXX.......++++", 29 | "....XO......................++++", 30 | "....XO.....OX..OX.XOOOo.....++++", 31 | "....XO.....OX..OX.OoXXOX....++++", 32 | "....XO.....OX..OX....XOX....++++", 33 | "X...XO.....OX..OX..OOoOX...X++++", 34 | "X...XO.....OX..OX.OX..OX...X++++", 35 | "+...XOXXXX.OoXoOX.OXXXOX...+++++", 36 | "+X..XOOOOO.XOOXOX.XOOOXo..X+++++", 37 | "++........................++++++", 38 | "++o......................o++++++", 39 | "+++X....................X+++++++", 40 | "++++X..................X++++++++", 41 | "+++++o................o+++++++++", 42 | "+++++++X............X+++++++++++", 43 | "+++++++++XX......XX+++++++++++++" 44 | }; 45 | -------------------------------------------------------------------------------- /modules/lua/etc/luavs.bat: -------------------------------------------------------------------------------- 1 | @rem Script to build Lua under "Visual Studio .NET Command Prompt". 2 | @rem Do not run from this directory; run it from the toplevel: etc\luavs.bat . 3 | @rem It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src. 4 | @rem (contributed by David Manura and Mike Pall) 5 | 6 | @setlocal 7 | @set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE 8 | @set MYLINK=link /nologo 9 | @set MYMT=mt /nologo 10 | 11 | cd src 12 | %MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c 13 | del lua.obj luac.obj 14 | %MYLINK% /DLL /out:lua51.dll l*.obj 15 | if exist lua51.dll.manifest^ 16 | %MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2 17 | %MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c 18 | %MYLINK% /out:lua.exe lua.obj lua51.lib 19 | if exist lua.exe.manifest^ 20 | %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe 21 | %MYCOMPILE% l*.c print.c 22 | del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^ 23 | loslib.obj ltablib.obj lstrlib.obj loadlib.obj 24 | %MYLINK% /out:luac.exe *.obj 25 | if exist luac.exe.manifest^ 26 | %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe 27 | del *.obj *.manifest 28 | cd .. 29 | -------------------------------------------------------------------------------- /modules/lua/etc/min.c: -------------------------------------------------------------------------------- 1 | /* 2 | * min.c -- a minimal Lua interpreter 3 | * loads stdin only with minimal error handling. 4 | * no interaction, and no standard library, only a "print" function. 5 | */ 6 | 7 | #include 8 | 9 | #include "lua.h" 10 | #include "lauxlib.h" 11 | 12 | static int print(lua_State *L) 13 | { 14 | int n=lua_gettop(L); 15 | int i; 16 | for (i=1; i<=n; i++) 17 | { 18 | if (i>1) printf("\t"); 19 | if (lua_isstring(L,i)) 20 | printf("%s",lua_tostring(L,i)); 21 | else if (lua_isnil(L,i)) 22 | printf("%s","nil"); 23 | else if (lua_isboolean(L,i)) 24 | printf("%s",lua_toboolean(L,i) ? "true" : "false"); 25 | else 26 | printf("%s:%p",luaL_typename(L,i),lua_topointer(L,i)); 27 | } 28 | printf("\n"); 29 | return 0; 30 | } 31 | 32 | int main(void) 33 | { 34 | lua_State *L=lua_open(); 35 | lua_register(L,"print",print); 36 | if (luaL_dofile(L,NULL)!=0) fprintf(stderr,"%s\n",lua_tostring(L,-1)); 37 | lua_close(L); 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /modules/lua/etc/noparser.c: -------------------------------------------------------------------------------- 1 | /* 2 | * The code below can be used to make a Lua core that does not contain the 3 | * parsing modules (lcode, llex, lparser), which represent 35% of the total core. 4 | * You'll only be able to load binary files and strings, precompiled with luac. 5 | * (Of course, you'll have to build luac with the original parsing modules!) 6 | * 7 | * To use this module, simply compile it ("make noparser" does that) and list 8 | * its object file before the Lua libraries. The linker should then not load 9 | * the parsing modules. To try it, do "make luab". 10 | * 11 | * If you also want to avoid the dump module (ldump.o), define NODUMP. 12 | * #define NODUMP 13 | */ 14 | 15 | #define LUA_CORE 16 | 17 | #include "llex.h" 18 | #include "lparser.h" 19 | #include "lzio.h" 20 | 21 | LUAI_FUNC void luaX_init (lua_State *L) { 22 | UNUSED(L); 23 | } 24 | 25 | LUAI_FUNC Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { 26 | UNUSED(z); 27 | UNUSED(buff); 28 | UNUSED(name); 29 | lua_pushliteral(L,"parser not loaded"); 30 | lua_error(L); 31 | return NULL; 32 | } 33 | 34 | #ifdef NODUMP 35 | #include "lundump.h" 36 | 37 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip) { 38 | UNUSED(f); 39 | UNUSED(w); 40 | UNUSED(data); 41 | UNUSED(strip); 42 | #if 1 43 | UNUSED(L); 44 | return 0; 45 | #else 46 | lua_pushliteral(L,"dumper not loaded"); 47 | lua_error(L); 48 | #endif 49 | } 50 | #endif 51 | -------------------------------------------------------------------------------- /modules/lua/etc/strict.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- strict.lua 3 | -- checks uses of undeclared global variables 4 | -- All global variables must be 'declared' through a regular assignment 5 | -- (even assigning nil will do) in a main chunk before being used 6 | -- anywhere or assigned to inside a function. 7 | -- 8 | 9 | local getinfo, error, rawset, rawget = debug.getinfo, error, rawset, rawget 10 | 11 | local mt = getmetatable(_G) 12 | if mt == nil then 13 | mt = {} 14 | setmetatable(_G, mt) 15 | end 16 | 17 | mt.__declared = {} 18 | 19 | local function what () 20 | local d = getinfo(3, "S") 21 | return d and d.what or "C" 22 | end 23 | 24 | mt.__newindex = function (t, n, v) 25 | if not mt.__declared[n] then 26 | local w = what() 27 | if w ~= "main" and w ~= "C" then 28 | error("assign to undeclared variable '"..n.."'", 2) 29 | end 30 | mt.__declared[n] = true 31 | end 32 | rawset(t, n, v) 33 | end 34 | 35 | mt.__index = function (t, n) 36 | if not mt.__declared[n] and what() ~= "C" then 37 | error("variable '"..n.."' is not declared", 2) 38 | end 39 | return rawget(t, n) 40 | end 41 | 42 | -------------------------------------------------------------------------------- /modules/lua/include/Makefile: -------------------------------------------------------------------------------- 1 | # makefile for Lua distribution (includes) 2 | 3 | LUA= .. 4 | 5 | include $(LUA)/config 6 | 7 | SRCS= lua.h lualib.h lauxlib.h 8 | 9 | all: 10 | 11 | clean: 12 | 13 | co: 14 | co -q -f -M $(SRCS) 15 | 16 | klean: clean 17 | rm -f $(SRCS) 18 | -------------------------------------------------------------------------------- /modules/lua/include/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.3 2006/06/12 03:50:37 jrl1 Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* Key to file-handle type */ 15 | #define LUA_FILEHANDLE "FILE*" 16 | 17 | 18 | #define LUA_COLIBNAME "coroutine" 19 | LUALIB_API int (luaopen_base) (lua_State *L); 20 | 21 | #define LUA_TABLIBNAME "table" 22 | LUALIB_API int (luaopen_table) (lua_State *L); 23 | 24 | #define LUA_IOLIBNAME "io" 25 | LUALIB_API int (luaopen_io) (lua_State *L); 26 | 27 | #define LUA_OSLIBNAME "os" 28 | LUALIB_API int (luaopen_os) (lua_State *L); 29 | 30 | #define LUA_STRLIBNAME "string" 31 | LUALIB_API int (luaopen_string) (lua_State *L); 32 | 33 | #define LUA_MATHLIBNAME "math" 34 | LUALIB_API int (luaopen_math) (lua_State *L); 35 | 36 | #define LUA_DBLIBNAME "debug" 37 | LUALIB_API int (luaopen_debug) (lua_State *L); 38 | 39 | #define LUA_LOADLIBNAME "package" 40 | LUALIB_API int (luaopen_package) (lua_State *L); 41 | 42 | 43 | /* open all previous libraries */ 44 | LUALIB_API void (luaL_openlibs) (lua_State *L); 45 | 46 | 47 | 48 | #ifndef lua_assert 49 | #define lua_assert(x) ((void)0) 50 | #endif 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /modules/lua/lslua50.def: -------------------------------------------------------------------------------- 1 | 2 | EXPORTS 3 | _lua_open 4 | _lua_close 5 | _lua_newthread 6 | _lua_atpanic 7 | 8 | _lua_gettop 9 | _lua_settop 10 | _lua_pushvalue 11 | _lua_remove 12 | _lua_insert 13 | _lua_replace 14 | _lua_checkstack 15 | 16 | _lua_xmove 17 | 18 | _lua_isnumber 19 | _lua_isstring 20 | _lua_iscfunction 21 | _lua_isuserdata 22 | _lua_type 23 | _lua_typename 24 | _lua_equal 25 | _lua_rawequal 26 | _lua_lessthan 27 | _lua_tonumber 28 | _lua_toboolean 29 | _lua_tostring 30 | _lua_strlen 31 | _lua_tocfunction 32 | _lua_touserdata 33 | _lua_tothread 34 | _lua_topointer 35 | 36 | _lua_pushnil 37 | _lua_pushnumber 38 | _lua_pushlstring 39 | _lua_pushstring 40 | _lua_pushvfstring 41 | _lua_pushfstring ; varargs 42 | _lua_pushcclosure 43 | _lua_pushboolean 44 | _lua_pushlightuserdata 45 | 46 | _lua_gettable 47 | _lua_rawget 48 | _lua_rawgeti 49 | _lua_newtable 50 | _lua_newuserdata 51 | _lua_getmetatable 52 | _lua_getfenv 53 | 54 | _lua_settable 55 | _lua_rawset 56 | _lua_rawseti 57 | _lua_setmetatable 58 | _lua_setfenv 59 | 60 | _lua_call 61 | _lua_pcall 62 | _lua_cpcall 63 | _lua_load 64 | _lua_dump 65 | 66 | _lua_yield 67 | _lua_resume 68 | 69 | _lua_getgcthreshold 70 | _lua_getgccount 71 | _lua_setgcthreshold 72 | 73 | _lua_version 74 | _lua_error 75 | _lua_next 76 | _lua_concat 77 | 78 | _lua_pushupvalues 79 | 80 | _lua_getstack 81 | _lua_getinfo 82 | _lua_getlocal 83 | _lua_setlocal 84 | _lua_getupvalue 85 | _lua_setupvalue 86 | 87 | _lua_sethook 88 | _lua_gethook 89 | _lua_gethookmask 90 | _lua_gethookcount 91 | 92 | _lua_dofile 93 | _lua_dostring 94 | _lua_dobuffer 95 | 96 | _luaL_openlib 97 | _luaL_getmetafield 98 | _luaL_callmeta 99 | _luaL_typerror 100 | _luaL_argerror 101 | _luaL_checklstring 102 | _luaL_optlstring 103 | _luaL_checknumber 104 | _luaL_optnumber 105 | 106 | _luaL_checkstack 107 | _luaL_checktype 108 | _luaL_checkany 109 | 110 | _luaL_newmetatable 111 | _luaL_getmetatable 112 | _luaL_checkudata 113 | 114 | _luaL_where 115 | _luaL_error ; varargs 116 | 117 | _luaL_findstring 118 | 119 | _luaL_ref 120 | _luaL_unref 121 | 122 | _luaL_getn 123 | _luaL_setn 124 | 125 | _luaL_loadfile 126 | _luaL_loadbuffer 127 | 128 | _luaL_buffinit 129 | _luaL_prepbuffer 130 | _luaL_addlstring 131 | _luaL_addstring 132 | _luaL_addvalue 133 | _luaL_pushresult 134 | 135 | _lua_dofile 136 | _lua_dostring 137 | _lua_dobuffer 138 | 139 | _luaopen_base 140 | _luaopen_table 141 | _luaopen_io 142 | _luaopen_string 143 | _luaopen_math 144 | _luaopen_debug 145 | _luaopen_loadlib 146 | 147 | 148 | -------------------------------------------------------------------------------- /modules/lua/lslua50m.def: -------------------------------------------------------------------------------- 1 | 2 | EXPORTS 3 | lua_open 4 | lua_close 5 | lua_newthread 6 | lua_atpanic 7 | 8 | lua_gettop 9 | lua_settop 10 | lua_pushvalue 11 | lua_remove 12 | lua_insert 13 | lua_replace 14 | lua_checkstack 15 | 16 | lua_xmove 17 | 18 | lua_isnumber 19 | lua_isstring 20 | lua_iscfunction 21 | lua_isuserdata 22 | lua_type 23 | lua_typename 24 | lua_equal 25 | lua_rawequal 26 | lua_lessthan 27 | lua_tonumber 28 | lua_toboolean 29 | lua_tostring 30 | lua_strlen 31 | lua_tocfunction 32 | lua_touserdata 33 | lua_tothread 34 | lua_topointer 35 | 36 | lua_pushnil 37 | lua_pushnumber 38 | lua_pushlstring 39 | lua_pushstring 40 | lua_pushvfstring 41 | lua_pushfstring ; varargs 42 | lua_pushcclosure 43 | lua_pushboolean 44 | lua_pushlightuserdata 45 | 46 | lua_gettable 47 | lua_rawget 48 | lua_rawgeti 49 | lua_newtable 50 | lua_newuserdata 51 | lua_getmetatable 52 | lua_getfenv 53 | 54 | lua_settable 55 | lua_rawset 56 | lua_rawseti 57 | lua_setmetatable 58 | lua_setfenv 59 | 60 | lua_call 61 | lua_pcall 62 | lua_cpcall 63 | lua_load 64 | lua_dump 65 | 66 | lua_yield 67 | lua_resume 68 | 69 | lua_getgcthreshold 70 | lua_getgccount 71 | lua_setgcthreshold 72 | 73 | lua_version 74 | lua_error 75 | lua_next 76 | lua_concat 77 | 78 | lua_pushupvalues 79 | 80 | lua_getstack 81 | lua_getinfo 82 | lua_getlocal 83 | lua_setlocal 84 | lua_getupvalue 85 | lua_setupvalue 86 | 87 | lua_sethook 88 | lua_gethook 89 | lua_gethookmask 90 | lua_gethookcount 91 | 92 | lua_dofile 93 | lua_dostring 94 | lua_dobuffer 95 | 96 | luaL_openlib 97 | luaL_getmetafield 98 | luaL_callmeta 99 | luaL_typerror 100 | luaL_argerror 101 | luaL_checklstring 102 | luaL_optlstring 103 | luaL_checknumber 104 | luaL_optnumber 105 | 106 | luaL_checkstack 107 | luaL_checktype 108 | luaL_checkany 109 | 110 | luaL_newmetatable 111 | luaL_getmetatable 112 | luaL_checkudata 113 | 114 | luaL_where 115 | luaL_error ; varargs 116 | 117 | luaL_findstring 118 | 119 | luaL_ref 120 | luaL_unref 121 | 122 | luaL_getn 123 | luaL_setn 124 | 125 | luaL_loadfile 126 | luaL_loadbuffer 127 | 128 | luaL_buffinit 129 | luaL_prepbuffer 130 | luaL_addlstring 131 | luaL_addstring 132 | luaL_addvalue 133 | luaL_pushresult 134 | 135 | lua_dofile 136 | lua_dostring 137 | lua_dobuffer 138 | 139 | luaopen_base 140 | luaopen_table 141 | luaopen_io 142 | luaopen_string 143 | luaopen_math 144 | luaopen_debug 145 | luaopen_loadlib 146 | -------------------------------------------------------------------------------- /modules/lua/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 1.3 2006/06/12 03:50:37 jrl1 Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | LUAI_FUNC void luaA_pushobject (lua_State *L, const TValue *o); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /modules/lua/src/lcode.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lcode.h,v 1.3 2006/06/12 03:50:37 jrl1 Exp $ 3 | ** Code generator for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lcode_h 8 | #define lcode_h 9 | 10 | #include "llex.h" 11 | #include "lobject.h" 12 | #include "lopcodes.h" 13 | #include "lparser.h" 14 | 15 | 16 | /* 17 | ** Marks the end of a patch list. It is an invalid value both as an absolute 18 | ** address, and as a list link (would link an element to itself). 19 | */ 20 | #define NO_JUMP (-1) 21 | 22 | 23 | /* 24 | ** grep "ORDER OPR" if you change these enums 25 | */ 26 | typedef enum BinOpr { 27 | OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, 28 | OPR_CONCAT, 29 | OPR_NE, OPR_EQ, 30 | OPR_LT, OPR_LE, OPR_GT, OPR_GE, 31 | OPR_AND, OPR_OR, 32 | OPR_NOBINOPR 33 | } BinOpr; 34 | 35 | 36 | typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; 37 | 38 | 39 | #define getcode(fs,e) ((fs)->f->code[(e)->u.s.info]) 40 | 41 | #define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) 42 | 43 | #define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) 44 | 45 | LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); 46 | LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); 47 | LUAI_FUNC void luaK_fixline (FuncState *fs, int line); 48 | LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); 49 | LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); 50 | LUAI_FUNC void luaK_checkstack (FuncState *fs, int n); 51 | LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s); 52 | LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r); 53 | LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e); 54 | LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e); 55 | LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e); 56 | LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e); 57 | LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e); 58 | LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); 59 | LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); 60 | LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); 61 | LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); 62 | LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); 63 | LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); 64 | LUAI_FUNC int luaK_jump (FuncState *fs); 65 | LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret); 66 | LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target); 67 | LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list); 68 | LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2); 69 | LUAI_FUNC int luaK_getlabel (FuncState *fs); 70 | LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v); 71 | LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); 72 | LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, expdesc *v2); 73 | LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); 74 | 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /modules/lua/src/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2); 24 | LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1, 25 | const TValue *p2); 26 | LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1, 27 | const TValue *p2); 28 | LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...); 29 | LUAI_FUNC void luaG_errormsg (lua_State *L); 30 | LUAI_FUNC int luaG_checkcode (const Proto *pt); 31 | LUAI_FUNC int luaG_checkopenop (Instruction i); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /modules/lua/src/ldo.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldo.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Stack and Call structure of Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldo_h 8 | #define ldo_h 9 | 10 | 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | #include "lzio.h" 14 | 15 | 16 | #define luaD_checkstack(L,n) \ 17 | if ((char *)L->stack_last - (char *)L->top <= (n)*(int)sizeof(TValue)) \ 18 | luaD_growstack(L, n); \ 19 | else condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1)); 20 | 21 | 22 | #define incr_top(L) {luaD_checkstack(L,1); L->top++;} 23 | 24 | #define savestack(L,p) ((char *)(p) - (char *)L->stack) 25 | #define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) 26 | 27 | #define saveci(L,p) ((char *)(p) - (char *)L->base_ci) 28 | #define restoreci(L,n) ((CallInfo *)((char *)L->base_ci + (n))) 29 | 30 | 31 | /* results from luaD_precall */ 32 | #define PCRLUA 0 /* initiated a call to a Lua function */ 33 | #define PCRC 1 /* did a call to a C function */ 34 | #define PCRYIELD 2 /* C funtion yielded */ 35 | 36 | 37 | /* type of protected functions, to be ran by `runprotected' */ 38 | typedef void (*Pfunc) (lua_State *L, void *ud); 39 | 40 | LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name); 41 | LUAI_FUNC void luaD_callhook (lua_State *L, int event, int line); 42 | LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults); 43 | LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults); 44 | LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, 45 | ptrdiff_t oldtop, ptrdiff_t ef); 46 | LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); 47 | LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); 48 | LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); 49 | LUAI_FUNC void luaD_growstack (lua_State *L, int n); 50 | 51 | LUAI_FUNC void luaD_throw (lua_State *L, int errcode); 52 | LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); 53 | 54 | LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop); 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /modules/lua/src/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lfunc.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 22 | LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); 23 | LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); 24 | LUAI_FUNC UpVal *luaF_newupval (lua_State *L); 25 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 26 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 27 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 28 | LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c); 29 | LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); 30 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 31 | int pc); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /modules/lua/src/linit.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: linit.c,v 1.1 2006/03/29 06:00:00 jrl1 Exp $ 3 | ** Initialization of libraries for lua.c 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #define linit_c 9 | #define LUA_LIB 10 | 11 | #include "lua.h" 12 | 13 | #include "lualib.h" 14 | #include "lauxlib.h" 15 | 16 | 17 | static const luaL_Reg lualibs[] = { 18 | {"", luaopen_base}, 19 | {LUA_LOADLIBNAME, luaopen_package}, 20 | {LUA_TABLIBNAME, luaopen_table}, 21 | {LUA_IOLIBNAME, luaopen_io}, 22 | {LUA_OSLIBNAME, luaopen_os}, 23 | {LUA_STRLIBNAME, luaopen_string}, 24 | {LUA_MATHLIBNAME, luaopen_math}, 25 | {LUA_DBLIBNAME, luaopen_debug}, 26 | {NULL, NULL} 27 | }; 28 | 29 | 30 | LUALIB_API void luaL_openlibs (lua_State *L) { 31 | const luaL_Reg *lib = lualibs; 32 | for (; lib->func; lib++) { 33 | lua_pushcfunction(L, lib->func); 34 | lua_pushstring(L, lib->name); 35 | lua_call(L, 1, 0); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /modules/lua/src/llex.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: llex.h,v 1.3 2006/06/12 03:50:37 jrl1 Exp $ 3 | ** Lexical Analyzer 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef llex_h 8 | #define llex_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | 14 | #define FIRST_RESERVED 257 15 | 16 | /* maximum length of a reserved word */ 17 | #define TOKEN_LEN (sizeof("function")/sizeof(char)) 18 | 19 | 20 | /* 21 | * WARNING: if you change the order of this enumeration, 22 | * grep "ORDER RESERVED" 23 | */ 24 | enum RESERVED { 25 | /* terminal symbols denoted by reserved words */ 26 | TK_AND = FIRST_RESERVED, TK_BREAK, 27 | TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, 28 | TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, 29 | TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, 30 | /* other terminal symbols */ 31 | TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_NUMBER, 32 | TK_NAME, TK_STRING, TK_EOS 33 | }; 34 | 35 | /* number of reserved words */ 36 | #define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) 37 | 38 | 39 | /* array with token `names' */ 40 | LUAI_DATA const char *const luaX_tokens []; 41 | 42 | 43 | typedef union { 44 | lua_Number r; 45 | TString *ts; 46 | } SemInfo; /* semantics information */ 47 | 48 | 49 | typedef struct Token { 50 | int token; 51 | SemInfo seminfo; 52 | } Token; 53 | 54 | 55 | typedef struct LexState { 56 | int current; /* current character (charint) */ 57 | int linenumber; /* input line counter */ 58 | int lastline; /* line of last token `consumed' */ 59 | Token t; /* current token */ 60 | Token lookahead; /* look ahead token */ 61 | struct FuncState *fs; /* `FuncState' is private to the parser */ 62 | struct lua_State *L; 63 | ZIO *z; /* input stream */ 64 | Mbuffer *buff; /* buffer for tokens */ 65 | TString *source; /* current source name */ 66 | char decpoint; /* locale decimal point */ 67 | } LexState; 68 | 69 | 70 | LUAI_FUNC void luaX_init (lua_State *L); 71 | LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, 72 | TString *source); 73 | LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); 74 | LUAI_FUNC void luaX_next (LexState *ls); 75 | LUAI_FUNC void luaX_lookahead (LexState *ls); 76 | LUAI_FUNC void luaX_lexerror (LexState *ls, const char *msg, int token); 77 | LUAI_FUNC void luaX_syntaxerror (LexState *ls, const char *s); 78 | LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); 79 | 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /modules/lua/src/llimits.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: llimits.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Limits, basic types, and some other `installation-dependent' definitions 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef llimits_h 8 | #define llimits_h 9 | 10 | 11 | #include 12 | #include 13 | 14 | 15 | #include "lua.h" 16 | 17 | 18 | typedef LUAI_UINT32 lu_int32; 19 | 20 | typedef LUAI_UMEM lu_mem; 21 | 22 | typedef LUAI_MEM l_mem; 23 | 24 | 25 | 26 | /* chars used as small naturals (so that `char' is reserved for characters) */ 27 | typedef unsigned char lu_byte; 28 | 29 | 30 | #define MAX_SIZET ((size_t)(~(size_t)0)-2) 31 | 32 | #define MAX_LUMEM ((lu_mem)(~(lu_mem)0)-2) 33 | 34 | 35 | #define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ 36 | 37 | /* 38 | ** conversion of pointer to integer 39 | ** this is for hashing only; there is no problem if the integer 40 | ** cannot hold the whole pointer value 41 | */ 42 | #define IntPoint(p) ((unsigned int)(lu_mem)(p)) 43 | 44 | 45 | 46 | /* type to ensure maximum alignment */ 47 | typedef LUAI_USER_ALIGNMENT_T L_Umaxalign; 48 | 49 | 50 | /* result of a `usual argument conversion' over lua_Number */ 51 | typedef LUAI_UACNUMBER l_uacNumber; 52 | 53 | 54 | /* internal assertions for in-house debugging */ 55 | #ifdef lua_assert 56 | 57 | #define check_exp(c,e) (lua_assert(c), (e)) 58 | #define api_check(l,e) lua_assert(e) 59 | 60 | #else 61 | 62 | #define lua_assert(c) ((void)0) 63 | #define check_exp(c,e) (e) 64 | #define api_check luai_apicheck 65 | 66 | #endif 67 | 68 | 69 | #ifndef UNUSED 70 | #define UNUSED(x) ((void)(x)) /* to avoid warnings */ 71 | #endif 72 | 73 | 74 | #ifndef cast 75 | #define cast(t, exp) ((t)(exp)) 76 | #endif 77 | 78 | #define cast_byte(i) cast(lu_byte, (i)) 79 | #define cast_num(i) cast(lua_Number, (i)) 80 | #define cast_int(i) cast(int, (i)) 81 | 82 | 83 | 84 | /* 85 | ** type for virtual-machine instructions 86 | ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) 87 | */ 88 | typedef lu_int32 Instruction; 89 | 90 | 91 | 92 | /* maximum stack for a Lua function */ 93 | #define MAXSTACK 250 94 | 95 | 96 | 97 | /* minimum size for the string table (must be power of 2) */ 98 | #ifndef MINSTRTABSIZE 99 | #define MINSTRTABSIZE 32 100 | #endif 101 | 102 | 103 | /* minimum size for string buffer */ 104 | #ifndef LUA_MINBUFFER 105 | #define LUA_MINBUFFER 32 106 | #endif 107 | 108 | 109 | #ifndef lua_lock 110 | #define lua_lock(L) ((void) 0) 111 | #define lua_unlock(L) ((void) 0) 112 | #endif 113 | 114 | #ifndef luai_threadyield 115 | #define luai_threadyield(L) {lua_unlock(L); lua_lock(L);} 116 | #endif 117 | 118 | 119 | /* 120 | ** macro to control inclusion of some hard tests on stack reallocation 121 | */ 122 | #ifndef HARDSTACKTESTS 123 | #define condhardstacktests(x) ((void)0) 124 | #else 125 | #define condhardstacktests(x) x 126 | #endif 127 | 128 | #endif 129 | -------------------------------------------------------------------------------- /modules/lua/src/lmem.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.c,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lmem_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "ldebug.h" 16 | #include "ldo.h" 17 | #include "lmem.h" 18 | #include "lobject.h" 19 | #include "lstate.h" 20 | 21 | 22 | 23 | /* 24 | ** About the realloc function: 25 | ** void * frealloc (void *ud, void *ptr, size_t osize, size_t nsize); 26 | ** (`osize' is the old size, `nsize' is the new size) 27 | ** 28 | ** Lua ensures that (ptr == NULL) iff (osize == 0). 29 | ** 30 | ** * frealloc(ud, NULL, 0, x) creates a new block of size `x' 31 | ** 32 | ** * frealloc(ud, p, x, 0) frees the block `p' 33 | ** (in this specific case, frealloc must return NULL). 34 | ** particularly, frealloc(ud, NULL, 0, 0) does nothing 35 | ** (which is equivalent to free(NULL) in ANSI C) 36 | ** 37 | ** frealloc returns NULL if it cannot create or reallocate the area 38 | ** (any reallocation to an equal or smaller size cannot fail!) 39 | */ 40 | 41 | 42 | 43 | #define MINSIZEARRAY 4 44 | 45 | 46 | void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, 47 | int limit, const char *errormsg) { 48 | void *newblock; 49 | int newsize; 50 | if (*size >= limit/2) { /* cannot double it? */ 51 | if (*size >= limit) /* cannot grow even a little? */ 52 | luaG_runerror(L, errormsg); 53 | newsize = limit; /* still have at least one free place */ 54 | } 55 | else { 56 | newsize = (*size)*2; 57 | if (newsize < MINSIZEARRAY) 58 | newsize = MINSIZEARRAY; /* minimum size */ 59 | } 60 | newblock = luaM_reallocv(L, block, *size, newsize, size_elems); 61 | *size = newsize; /* update only when everything else is OK */ 62 | return newblock; 63 | } 64 | 65 | 66 | void *luaM_toobig (lua_State *L) { 67 | luaG_runerror(L, "memory allocation error: block too big"); 68 | return NULL; /* to avoid warnings */ 69 | } 70 | 71 | 72 | 73 | /* 74 | ** generic allocation routine. 75 | */ 76 | void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { 77 | global_State *g = G(L); 78 | lua_assert((osize == 0) == (block == NULL)); 79 | block = (*g->frealloc)(g->ud, block, osize, nsize); 80 | if (block == NULL && nsize > 0) 81 | luaD_throw(L, LUA_ERRMEM); 82 | lua_assert((nsize == 0) == (block == NULL)); 83 | g->totalbytes = (g->totalbytes - osize) + nsize; 84 | return block; 85 | } 86 | 87 | -------------------------------------------------------------------------------- /modules/lua/src/lmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lmem_h 8 | #define lmem_h 9 | 10 | 11 | #include 12 | 13 | #include "llimits.h" 14 | #include "lua.h" 15 | 16 | #define MEMERRMSG "not enough memory" 17 | 18 | 19 | #define luaM_reallocv(L,b,on,n,e) \ 20 | ((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \ 21 | luaM_realloc_(L, (b), (on)*(e), (n)*(e)) : \ 22 | luaM_toobig(L)) 23 | 24 | #define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) 25 | #define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) 26 | #define luaM_freearray(L, b, n, t) luaM_reallocv(L, (b), n, 0, sizeof(t)) 27 | 28 | #define luaM_malloc(L,t) luaM_realloc_(L, NULL, 0, (t)) 29 | #define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) 30 | #define luaM_newvector(L,n,t) \ 31 | cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) 32 | 33 | #define luaM_growvector(L,v,nelems,size,t,limit,e) \ 34 | if ((nelems)+1 > (size)) \ 35 | ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) 36 | 37 | #define luaM_reallocvector(L, v,oldn,n,t) \ 38 | ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) 39 | 40 | 41 | LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, 42 | size_t size); 43 | LUAI_FUNC void *luaM_toobig (lua_State *L); 44 | LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, 45 | size_t size_elem, int limit, 46 | const char *errormsg); 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /modules/lua/src/lparser.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lparser.h,v 1.3 2006/06/12 03:50:37 jrl1 Exp $ 3 | ** Lua Parser 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lparser_h 8 | #define lparser_h 9 | 10 | #include "llimits.h" 11 | #include "lobject.h" 12 | #include "lzio.h" 13 | 14 | 15 | /* 16 | ** Expression descriptor 17 | */ 18 | 19 | typedef enum { 20 | VVOID, /* no value */ 21 | VNIL, 22 | VTRUE, 23 | VFALSE, 24 | VK, /* info = index of constant in `k' */ 25 | VKNUM, /* nval = numerical value */ 26 | VLOCAL, /* info = local register */ 27 | VUPVAL, /* info = index of upvalue in `upvalues' */ 28 | VGLOBAL, /* info = index of table; aux = index of global name in `k' */ 29 | VINDEXED, /* info = table register; aux = index register (or `k') */ 30 | VJMP, /* info = instruction pc */ 31 | VRELOCABLE, /* info = instruction pc */ 32 | VNONRELOC, /* info = result register */ 33 | VCALL, /* info = instruction pc */ 34 | VVARARG /* info = instruction pc */ 35 | } expkind; 36 | 37 | typedef struct expdesc { 38 | expkind k; 39 | union { 40 | struct { int info, aux; } s; 41 | lua_Number nval; 42 | } u; 43 | int t; /* patch list of `exit when true' */ 44 | int f; /* patch list of `exit when false' */ 45 | } expdesc; 46 | 47 | 48 | typedef struct upvaldesc { 49 | lu_byte k; 50 | lu_byte info; 51 | } upvaldesc; 52 | 53 | 54 | struct BlockCnt; /* defined in lparser.c */ 55 | 56 | 57 | /* state needed to generate code for a given function */ 58 | typedef struct FuncState { 59 | Proto *f; /* current function header */ 60 | Table *h; /* table to find (and reuse) elements in `k' */ 61 | struct FuncState *prev; /* enclosing function */ 62 | struct LexState *ls; /* lexical state */ 63 | struct lua_State *L; /* copy of the Lua state */ 64 | struct BlockCnt *bl; /* chain of current blocks */ 65 | int pc; /* next position to code (equivalent to `ncode') */ 66 | int lasttarget; /* `pc' of last `jump target' */ 67 | int jpc; /* list of pending jumps to `pc' */ 68 | int freereg; /* first free register */ 69 | int nk; /* number of elements in `k' */ 70 | int np; /* number of elements in `p' */ 71 | short nlocvars; /* number of elements in `locvars' */ 72 | lu_byte nactvar; /* number of active local variables */ 73 | upvaldesc upvalues[LUAI_MAXUPVALUES]; /* upvalues */ 74 | unsigned short actvar[LUAI_MAXVARS]; /* declared-variable stack */ 75 | } FuncState; 76 | 77 | 78 | LUAI_FUNC Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, 79 | const char *name); 80 | 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /modules/lua/src/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lstring.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | 11 | #include "lgc.h" 12 | #include "lobject.h" 13 | #include "lstate.h" 14 | 15 | 16 | #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) 17 | 18 | #define sizeudata(u) (sizeof(union Udata)+(u)->len) 19 | 20 | #define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) 21 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 22 | (sizeof(s)/sizeof(char))-1)) 23 | 24 | #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) 25 | 26 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 27 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); 28 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /modules/lua/src/ltable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltable.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Lua tables (hash) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltable_h 8 | #define ltable_h 9 | 10 | #include "lobject.h" 11 | 12 | 13 | #define gnode(t,i) (&(t)->node[i]) 14 | #define gkey(n) (&(n)->i_key.nk) 15 | #define gval(n) (&(n)->i_val) 16 | #define gnext(n) ((n)->i_key.nk.next) 17 | 18 | #define key2tval(n) (&(n)->i_key.tvk) 19 | 20 | 21 | LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); 22 | LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); 23 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 24 | LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); 25 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 26 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 27 | LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash); 28 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); 29 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); 30 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 31 | LUAI_FUNC int luaH_getn (Table *t); 32 | 33 | 34 | #if defined(LUA_DEBUG) 35 | LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); 36 | LUAI_FUNC int luaH_isdummy (Node *n); 37 | #endif 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /modules/lua/src/ltm.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.c,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define ltm_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "lobject.h" 16 | #include "lstate.h" 17 | #include "lstring.h" 18 | #include "ltable.h" 19 | #include "ltm.h" 20 | 21 | 22 | 23 | const char *const luaT_typenames[] = { 24 | "nil", "boolean", "userdata", "number", 25 | "string", "table", "function", "userdata", "thread", 26 | "proto", "upval" 27 | }; 28 | 29 | 30 | void luaT_init (lua_State *L) { 31 | static const char *const luaT_eventname[] = { /* ORDER TM */ 32 | "__index", "__newindex", 33 | "__gc", "__mode", "__eq", 34 | "__add", "__sub", "__mul", "__div", "__mod", 35 | "__pow", "__unm", "__len", "__lt", "__le", 36 | "__concat", "__call" 37 | }; 38 | int i; 39 | for (i=0; itmname[i] = luaS_new(L, luaT_eventname[i]); 41 | luaS_fix(G(L)->tmname[i]); /* never collect these names */ 42 | } 43 | } 44 | 45 | 46 | /* 47 | ** function to be used with macro "fasttm": optimized for absence of 48 | ** tag methods 49 | */ 50 | const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { 51 | const TValue *tm = luaH_getstr(events, ename); 52 | lua_assert(event <= TM_EQ); 53 | if (ttisnil(tm)) { /* no tag method? */ 54 | events->flags |= cast_byte(1u<metatable; 66 | break; 67 | case LUA_TUSERDATA: 68 | mt = uvalue(o)->metatable; 69 | break; 70 | default: 71 | mt = G(L)->mt[ttype(o)]; 72 | } 73 | return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject); 74 | } 75 | 76 | -------------------------------------------------------------------------------- /modules/lua/src/ltm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltm_h 8 | #define ltm_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | * WARNING: if you change the order of this enumeration, 16 | * grep "ORDER TM" 17 | */ 18 | typedef enum { 19 | TM_INDEX, 20 | TM_NEWINDEX, 21 | TM_GC, 22 | TM_MODE, 23 | TM_EQ, /* last tag method with `fast' access */ 24 | TM_ADD, 25 | TM_SUB, 26 | TM_MUL, 27 | TM_DIV, 28 | TM_MOD, 29 | TM_POW, 30 | TM_UNM, 31 | TM_LEN, 32 | TM_LT, 33 | TM_LE, 34 | TM_CONCAT, 35 | TM_CALL, 36 | TM_N /* number of elements in the enum */ 37 | } TMS; 38 | 39 | 40 | 41 | #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 42 | ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 43 | 44 | #define fasttm(l,et,e) gfasttm(G(l), et, e) 45 | 46 | LUAI_DATA const char *const luaT_typenames[]; 47 | 48 | 49 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 50 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, 51 | TMS event); 52 | LUAI_FUNC void luaT_init (lua_State *L); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /modules/lua/src/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.1 2006/03/29 06:00:00 jrl1 Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* Key to file-handle type */ 15 | #define LUA_FILEHANDLE "FILE*" 16 | 17 | 18 | #define LUA_COLIBNAME "coroutine" 19 | LUALIB_API int (luaopen_base) (lua_State *L); 20 | 21 | #define LUA_TABLIBNAME "table" 22 | LUALIB_API int (luaopen_table) (lua_State *L); 23 | 24 | #define LUA_IOLIBNAME "io" 25 | LUALIB_API int (luaopen_io) (lua_State *L); 26 | 27 | #define LUA_OSLIBNAME "os" 28 | LUALIB_API int (luaopen_os) (lua_State *L); 29 | 30 | #define LUA_STRLIBNAME "string" 31 | LUALIB_API int (luaopen_string) (lua_State *L); 32 | 33 | #define LUA_MATHLIBNAME "math" 34 | LUALIB_API int (luaopen_math) (lua_State *L); 35 | 36 | #define LUA_DBLIBNAME "debug" 37 | LUALIB_API int (luaopen_debug) (lua_State *L); 38 | 39 | #define LUA_LOADLIBNAME "package" 40 | LUALIB_API int (luaopen_package) (lua_State *L); 41 | 42 | 43 | /* open all previous libraries */ 44 | LUALIB_API void (luaL_openlibs) (lua_State *L); 45 | 46 | 47 | 48 | #ifndef lua_assert 49 | #define lua_assert(x) ((void)0) 50 | #endif 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /modules/lua/src/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | /* load one chunk; from lundump.c */ 14 | LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); 15 | 16 | /* make header; from lundump.c */ 17 | LUAI_FUNC void luaU_header (char* h); 18 | 19 | /* dump one chunk; from ldump.c */ 20 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); 21 | 22 | #ifdef luac_c 23 | /* print one chunk; from print.c */ 24 | LUAI_FUNC void luaU_print (const Proto* f, int full); 25 | #endif 26 | 27 | /* for header of binary files -- this is Lua 5.1 */ 28 | #define LUAC_VERSION 0x51 29 | 30 | /* for header of binary files -- this is the official format */ 31 | #define LUAC_FORMAT 0 32 | 33 | /* size of header of binary files */ 34 | #define LUAC_HEADERSIZE 12 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /modules/lua/src/lvm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lvm.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Lua virtual machine 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lvm_h 8 | #define lvm_h 9 | 10 | 11 | #include "ldo.h" 12 | #include "lobject.h" 13 | #include "ltm.h" 14 | 15 | 16 | #define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) 17 | 18 | #define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ 19 | (((o) = luaV_tonumber(o,n)) != NULL)) 20 | 21 | #define equalobj(L,o1,o2) \ 22 | (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2)) 23 | 24 | 25 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); 26 | LUAI_FUNC int luaV_equalval (lua_State *L, const TValue *t1, const TValue *t2); 27 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); 28 | LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); 29 | LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, 30 | StkId val); 31 | LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, 32 | StkId val); 33 | LUAI_FUNC void luaV_execute (lua_State *L, int nexeccalls); 34 | LUAI_FUNC void luaV_concat (lua_State *L, int total, int last); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /modules/lua/src/lzio.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.c,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** a generic input stream interface 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lzio_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "llimits.h" 16 | #include "lmem.h" 17 | #include "lstate.h" 18 | #include "lzio.h" 19 | 20 | 21 | int luaZ_fill (ZIO *z) { 22 | size_t size; 23 | lua_State *L = z->L; 24 | const char *buff; 25 | lua_unlock(L); 26 | buff = z->reader(L, z->data, &size); 27 | lua_lock(L); 28 | if (buff == NULL || size == 0) return EOZ; 29 | z->n = size - 1; 30 | z->p = buff; 31 | return char2int(*(z->p++)); 32 | } 33 | 34 | 35 | int luaZ_lookahead (ZIO *z) { 36 | if (z->n == 0) { 37 | if (luaZ_fill(z) == EOZ) 38 | return EOZ; 39 | else { 40 | z->n++; /* luaZ_fill removed first byte; put back it */ 41 | z->p--; 42 | } 43 | } 44 | return char2int(*z->p); 45 | } 46 | 47 | 48 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { 49 | z->L = L; 50 | z->reader = reader; 51 | z->data = data; 52 | z->n = 0; 53 | z->p = NULL; 54 | } 55 | 56 | 57 | /* --------------------------------------------------------------- read --- */ 58 | size_t luaZ_read (ZIO *z, void *b, size_t n) { 59 | while (n) { 60 | size_t m; 61 | if (luaZ_lookahead(z) == EOZ) 62 | return n; /* return number of missing bytes */ 63 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ 64 | memcpy(b, z->p, m); 65 | z->n -= m; 66 | z->p += m; 67 | b = (char *)b + m; 68 | n -= m; 69 | } 70 | return 0; 71 | } 72 | 73 | /* ------------------------------------------------------------------------ */ 74 | char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) { 75 | if (n > buff->buffsize) { 76 | if (n < LUA_MINBUFFER) n = LUA_MINBUFFER; 77 | luaZ_resizebuffer(L, buff, n); 78 | } 79 | return buff->buffer; 80 | } 81 | 82 | 83 | -------------------------------------------------------------------------------- /modules/lua/src/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.h,v 1.2 2006/03/29 05:48:11 jrl1 Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define char2int(c) cast(int, cast(unsigned char, (c))) 21 | 22 | #define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z)) 23 | 24 | typedef struct Mbuffer { 25 | char *buffer; 26 | size_t n; 27 | size_t buffsize; 28 | } Mbuffer; 29 | 30 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 31 | 32 | #define luaZ_buffer(buff) ((buff)->buffer) 33 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 34 | #define luaZ_bufflen(buff) ((buff)->n) 35 | 36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 37 | 38 | 39 | #define luaZ_resizebuffer(L, buff, size) \ 40 | (luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \ 41 | (buff)->buffsize = size) 42 | 43 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 44 | 45 | 46 | LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); 47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 48 | void *data); 49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ 50 | LUAI_FUNC int luaZ_lookahead (ZIO *z); 51 | 52 | 53 | 54 | /* --------- Private Part ------------------ */ 55 | 56 | struct Zio { 57 | size_t n; /* bytes still unread */ 58 | const char *p; /* current position in buffer */ 59 | lua_Reader reader; 60 | void* data; /* additional data */ 61 | lua_State *L; /* Lua state (for reader) */ 62 | }; 63 | 64 | 65 | LUAI_FUNC int luaZ_fill (ZIO *z); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /modules/lua/test/README: -------------------------------------------------------------------------------- 1 | These are simple tests for Lua. Some of them contain useful code. 2 | They are meant to be run to make sure Lua is built correctly and also 3 | to be read, to see how Lua programs look. 4 | 5 | Here is a one-line summary of each program: 6 | 7 | bisect.lua bisection method for solving non-linear equations 8 | cf.lua temperature conversion table (celsius to farenheit) 9 | echo.lua echo command line arguments 10 | env.lua environment variables as automatic global variables 11 | factorial.lua factorial without recursion 12 | fib.lua fibonacci function with cache 13 | fibfor.lua fibonacci numbers with coroutines and generators 14 | globals.lua report global variable usage 15 | hello.lua the first program in every language 16 | life.lua Conway's Game of Life 17 | luac.lua bare-bones luac 18 | printf.lua an implementation of printf 19 | readonly.lua make global variables readonly 20 | sieve.lua the sieve of of Eratosthenes programmed with coroutines 21 | sort.lua two implementations of a sort function 22 | table.lua make table, grouping all data for the same item 23 | trace-calls.lua trace calls 24 | trace-globals.lua trace assigments to global variables 25 | xd.lua hex dump 26 | 27 | -------------------------------------------------------------------------------- /modules/lua/test/bisect.lua: -------------------------------------------------------------------------------- 1 | -- bisection method for solving non-linear equations 2 | 3 | delta=1e-6 -- tolerance 4 | 5 | function bisect(f,a,b,fa,fb) 6 | local c=(a+b)/2 7 | io.write(n," c=",c," a=",a," b=",b,"\n") 8 | if c==a or c==b or math.abs(a-b)y end) 58 | show("after reverse selection sort",x) 59 | qsort(x,1,n,function (x,y) return x>> ",string.rep(" ",level)) 9 | if t~=nil and t.currentline>=0 then io.write(t.short_src,":",t.currentline," ") end 10 | t=debug.getinfo(2) 11 | if event=="call" then 12 | level=level+1 13 | else 14 | level=level-1 if level<0 then level=0 end 15 | end 16 | if t.what=="main" then 17 | if event=="call" then 18 | io.write("begin ",t.short_src) 19 | else 20 | io.write("end ",t.short_src) 21 | end 22 | elseif t.what=="Lua" then 23 | -- table.foreach(t,print) 24 | io.write(event," ",t.name or "(Lua)"," <",t.linedefined,":",t.short_src,">") 25 | else 26 | io.write(event," ",t.name or "(C)"," [",t.what,"] ") 27 | end 28 | io.write("\n") 29 | end 30 | 31 | debug.sethook(hook,"cr") 32 | level=0 33 | -------------------------------------------------------------------------------- /modules/lua/test/trace-globals.lua: -------------------------------------------------------------------------------- 1 | -- trace assigments to global variables 2 | 3 | do 4 | -- a tostring that quotes strings. note the use of the original tostring. 5 | local _tostring=tostring 6 | local tostring=function(a) 7 | if type(a)=="string" then 8 | return string.format("%q",a) 9 | else 10 | return _tostring(a) 11 | end 12 | end 13 | 14 | local log=function (name,old,new) 15 | local t=debug.getinfo(3,"Sl") 16 | local line=t.currentline 17 | io.write(t.short_src) 18 | if line>=0 then io.write(":",line) end 19 | io.write(": ",name," is now ",tostring(new)," (was ",tostring(old),")","\n") 20 | end 21 | 22 | local g={} 23 | local set=function (t,name,value) 24 | log(name,g[name],value) 25 | g[name]=value 26 | end 27 | setmetatable(getfenv(),{__index=g,__newindex=set}) 28 | end 29 | 30 | -- an example 31 | 32 | a=1 33 | b=2 34 | a=10 35 | b=20 36 | b=nil 37 | b=200 38 | print(a,b,c) 39 | -------------------------------------------------------------------------------- /modules/lua/test/xd.lua: -------------------------------------------------------------------------------- 1 | -- hex dump 2 | -- usage: lua xd.lua < file 3 | 4 | local offset=0 5 | while true do 6 | local s=io.read(16) 7 | if s==nil then return end 8 | io.write(string.format("%08X ",offset)) 9 | string.gsub(s,"(.)", 10 | function (c) io.write(string.format("%02X ",string.byte(c))) end) 11 | io.write(string.rep(" ",3*(16-string.len(s)))) 12 | io.write(" ",string.gsub(s,"%c","."),"\n") 13 | offset=offset+16 14 | end 15 | -------------------------------------------------------------------------------- /modules/luamodule/include/luamoduledefs.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Name: luamoduledefs.h 3 | // Purpose: definitions for luamodule 4 | // Author: Francesco Montorsi 5 | // Modified by: 6 | // Created: 20/5/2006 7 | // RCS-ID: $Id: luamoduledefs.h,v 1.2 2006/12/19 17:53:39 frm Exp $ 8 | // Copyright: (c) Francesco Montorsi 9 | // Licence: wxWidgets licence 10 | /////////////////////////////////////////////////////////////////////////////// 11 | 12 | #ifndef __WX_LUAMODULEDEFS_H__ 13 | #define __WX_LUAMODULEDEFS_H__ 14 | 15 | #include "wx/defs.h" 16 | 17 | // ---------------------------------------------------------------------------- 18 | // WXDLLIMPEXP macros 19 | // ---------------------------------------------------------------------------- 20 | 21 | #ifdef WXMAKINGDLL_LUAMODULE 22 | #define WXDLLIMPEXP_LUAMODULE WXEXPORT 23 | #define WXDLLIMPEXP_DATA_LUAMODULE(type) WXEXPORT type 24 | #elif defined(WXUSINGDLL) 25 | #define WXDLLIMPEXP_LUAMODULE WXIMPORT 26 | #define WXDLLIMPEXP_DATA_LUAMODULE(type) WXIMPORT type 27 | #else // not making nor using DLL 28 | #define WXDLLIMPEXP_LUAMODULE 29 | #define WXDLLIMPEXP_DATA_LUAMODULE(type) type 30 | #endif 31 | 32 | #endif // __WX_LUAMODULEDEFS_H__ 33 | -------------------------------------------------------------------------------- /modules/luamodule/src/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2004 4 | # Updated: 5 | # Copyright: (c) 2002. J Winwood 6 | # 7 | # Makefile for wxLua standalone sample using gmake 8 | 9 | # ---------------------------------------------------------------------------- 10 | # Set path to root of wxLua 11 | WXLUA_DIR = ../../.. 12 | 13 | # ---------------------------------------------------------------------------- 14 | # Include wxLua settings using wx-config for wxWidgets parameters 15 | 16 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 17 | 18 | # ---------------------------------------------------------------------------- 19 | 20 | #OBJECTS=luamodule.o 21 | #DEPFILES=$(OBJECTS:.o=.d) 22 | 23 | .cpp.o: 24 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 25 | 26 | all: $(wxLuaALL_TARGETS) wx.so 27 | 28 | wx.so: luamodule.cpp $(OBJECTS) $(LUA_LIBS) $(wxLuaALL_TARGETS) 29 | $(CXX) $(CXXFLAGS) $(APPEXTRADEFS) -g -O -shared -o wx.so -fPIC \ 30 | $(LDLIBS) $(APPEXTRALIBS) \ 31 | luamodule.cpp 32 | 33 | clean: 34 | rm -f $(OBJECTS) $(DEPFILES) $(PROGRAM) core 35 | 36 | # ---------------------------------------------------------------------------- 37 | # Include wxLua targets using wx-config for wxWidgets parameters 38 | 39 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 40 | 41 | -include $(DEPFILES) 42 | -------------------------------------------------------------------------------- /modules/wxbind/include/wxgl_bind.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | // wxgl.h - headers and wxLua types for wxLua binding 3 | // 4 | // This file was generated by genwxbind.lua 5 | // Any changes made to this file will be lost when the file is regenerated 6 | // --------------------------------------------------------------------------- 7 | 8 | #ifndef __HOOK_WXLUA_wxgl_H__ 9 | #define __HOOK_WXLUA_wxgl_H__ 10 | 11 | #include "wxbind/include/wxbinddefs.h" 12 | #include "wxluasetup.h" 13 | #include "wxbind/include/wxcore_bind.h" 14 | 15 | #include "wxlua/include/wxlstate.h" 16 | #include "wxlua/include/wxlbind.h" 17 | 18 | // --------------------------------------------------------------------------- 19 | // Check if the version of binding generator used to create this is older than 20 | // the current version of the bindings. 21 | // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' 22 | #if WXLUA_BINDING_VERSION > 27 23 | # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." 24 | #endif //WXLUA_BINDING_VERSION > 27 25 | // --------------------------------------------------------------------------- 26 | 27 | // binding class 28 | class WXDLLIMPEXP_BINDWXGL wxLuaBinding_wxgl : public wxLuaBinding 29 | { 30 | public: 31 | wxLuaBinding_wxgl(); 32 | 33 | 34 | private: 35 | DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxgl) 36 | }; 37 | 38 | 39 | // initialize wxLuaBinding_wxgl for all wxLuaStates 40 | extern WXDLLIMPEXP_BINDWXGL bool wxLuaBinding_wxgl_init(); 41 | 42 | // --------------------------------------------------------------------------- 43 | // Includes 44 | // --------------------------------------------------------------------------- 45 | 46 | #if wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS 47 | #include "wx/glcanvas.h" 48 | #endif // wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS 49 | 50 | // --------------------------------------------------------------------------- 51 | // Lua Tag Method Values and Tables for each Class 52 | // --------------------------------------------------------------------------- 53 | 54 | #if wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS 55 | extern WXDLLIMPEXP_DATA_BINDWXGL(int) wxluatype_wxGLCanvas; 56 | extern WXDLLIMPEXP_DATA_BINDWXGL(int) wxluatype_wxGLContext; 57 | #endif // wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS 58 | 59 | 60 | // --------------------------------------------------------------------------- 61 | // Encapsulation Declarations - need to be public for other bindings. 62 | // --------------------------------------------------------------------------- 63 | 64 | 65 | #endif // __HOOK_WXLUA_wxgl_H__ 66 | 67 | -------------------------------------------------------------------------------- /modules/wxbind/include/wxmedia_bind.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | // wxmedia.h - headers and wxLua types for wxLua binding 3 | // 4 | // This file was generated by genwxbind.lua 5 | // Any changes made to this file will be lost when the file is regenerated 6 | // --------------------------------------------------------------------------- 7 | 8 | #ifndef __HOOK_WXLUA_wxmedia_H__ 9 | #define __HOOK_WXLUA_wxmedia_H__ 10 | 11 | #include "wxbind/include/wxbinddefs.h" 12 | #include "wxluasetup.h" 13 | #include "wxbind/include/wxcore_bind.h" 14 | #include "wxbind/include/wxnet_bind.h" 15 | 16 | #include "wxlua/include/wxlstate.h" 17 | #include "wxlua/include/wxlbind.h" 18 | 19 | // --------------------------------------------------------------------------- 20 | // Check if the version of binding generator used to create this is older than 21 | // the current version of the bindings. 22 | // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' 23 | #if WXLUA_BINDING_VERSION > 27 24 | # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." 25 | #endif //WXLUA_BINDING_VERSION > 27 26 | // --------------------------------------------------------------------------- 27 | 28 | // binding class 29 | class WXDLLIMPEXP_BINDWXMEDIA wxLuaBinding_wxmedia : public wxLuaBinding 30 | { 31 | public: 32 | wxLuaBinding_wxmedia(); 33 | 34 | 35 | private: 36 | DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxmedia) 37 | }; 38 | 39 | 40 | // initialize wxLuaBinding_wxmedia for all wxLuaStates 41 | extern WXDLLIMPEXP_BINDWXMEDIA bool wxLuaBinding_wxmedia_init(); 42 | 43 | // --------------------------------------------------------------------------- 44 | // Includes 45 | // --------------------------------------------------------------------------- 46 | 47 | #if wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL 48 | #include "wx/mediactrl.h" 49 | #endif // wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL 50 | 51 | // --------------------------------------------------------------------------- 52 | // Lua Tag Method Values and Tables for each Class 53 | // --------------------------------------------------------------------------- 54 | 55 | #if wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL 56 | extern WXDLLIMPEXP_DATA_BINDWXMEDIA(int) wxluatype_wxMediaCtrl; 57 | extern WXDLLIMPEXP_DATA_BINDWXMEDIA(int) wxluatype_wxMediaEvent; 58 | #endif // wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL 59 | 60 | 61 | // --------------------------------------------------------------------------- 62 | // Encapsulation Declarations - need to be public for other bindings. 63 | // --------------------------------------------------------------------------- 64 | 65 | 66 | #endif // __HOOK_WXLUA_wxmedia_H__ 67 | 68 | -------------------------------------------------------------------------------- /modules/wxbind/include/wxrichtext_bind.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | // wxrichtext.h - headers and wxLua types for wxLua binding 3 | // 4 | // This file was generated by genwxbind.lua 5 | // Any changes made to this file will be lost when the file is regenerated 6 | // --------------------------------------------------------------------------- 7 | 8 | #ifndef __HOOK_WXLUA_wxrichtext_H__ 9 | #define __HOOK_WXLUA_wxrichtext_H__ 10 | 11 | #include "wxbind/include/wxbinddefs.h" 12 | #include "wxluasetup.h" 13 | #include "wxbind/include/wxcore_bind.h" 14 | 15 | #include "wxlua/include/wxlstate.h" 16 | #include "wxlua/include/wxlbind.h" 17 | 18 | // --------------------------------------------------------------------------- 19 | // Check if the version of binding generator used to create this is older than 20 | // the current version of the bindings. 21 | // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' 22 | #if WXLUA_BINDING_VERSION > 27 23 | # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." 24 | #endif //WXLUA_BINDING_VERSION > 27 25 | // --------------------------------------------------------------------------- 26 | 27 | // binding class 28 | class WXDLLIMPEXP_BINDWXRICHTEXT wxLuaBinding_wxrichtext : public wxLuaBinding 29 | { 30 | public: 31 | wxLuaBinding_wxrichtext(); 32 | 33 | 34 | private: 35 | DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxrichtext) 36 | }; 37 | 38 | 39 | // initialize wxLuaBinding_wxrichtext for all wxLuaStates 40 | extern WXDLLIMPEXP_BINDWXRICHTEXT bool wxLuaBinding_wxrichtext_init(); 41 | 42 | // --------------------------------------------------------------------------- 43 | // Includes 44 | // --------------------------------------------------------------------------- 45 | 46 | // --------------------------------------------------------------------------- 47 | // Lua Tag Method Values and Tables for each Class 48 | // --------------------------------------------------------------------------- 49 | 50 | 51 | // --------------------------------------------------------------------------- 52 | // Encapsulation Declarations - need to be public for other bindings. 53 | // --------------------------------------------------------------------------- 54 | 55 | 56 | #endif // __HOOK_WXLUA_wxrichtext_H__ 57 | 58 | -------------------------------------------------------------------------------- /modules/wxbind/include/wxstc_bind.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | // wxstc.h - headers and wxLua types for wxLua binding 3 | // 4 | // This file was generated by genwxbind.lua 5 | // Any changes made to this file will be lost when the file is regenerated 6 | // --------------------------------------------------------------------------- 7 | 8 | #ifndef __HOOK_WXLUA_wxstc_H__ 9 | #define __HOOK_WXLUA_wxstc_H__ 10 | 11 | #include "wxbind/include/wxbinddefs.h" 12 | #include "wxluasetup.h" 13 | #include "wxbind/include/wxcore_bind.h" 14 | 15 | #include "wxlua/include/wxlstate.h" 16 | #include "wxlua/include/wxlbind.h" 17 | 18 | // --------------------------------------------------------------------------- 19 | // Check if the version of binding generator used to create this is older than 20 | // the current version of the bindings. 21 | // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' 22 | #if WXLUA_BINDING_VERSION > 27 23 | # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." 24 | #endif //WXLUA_BINDING_VERSION > 27 25 | // --------------------------------------------------------------------------- 26 | 27 | // binding class 28 | class WXDLLIMPEXP_BINDWXSTC wxLuaBinding_wxstc : public wxLuaBinding 29 | { 30 | public: 31 | wxLuaBinding_wxstc(); 32 | 33 | 34 | private: 35 | DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxstc) 36 | }; 37 | 38 | 39 | // initialize wxLuaBinding_wxstc for all wxLuaStates 40 | extern WXDLLIMPEXP_BINDWXSTC bool wxLuaBinding_wxstc_init(); 41 | 42 | // --------------------------------------------------------------------------- 43 | // Includes 44 | // --------------------------------------------------------------------------- 45 | 46 | #include "wx/stc/stc.h" 47 | 48 | // --------------------------------------------------------------------------- 49 | // Lua Tag Method Values and Tables for each Class 50 | // --------------------------------------------------------------------------- 51 | 52 | extern WXDLLIMPEXP_DATA_BINDWXSTC(int) wxluatype_wxStyledTextCtrl; 53 | extern WXDLLIMPEXP_DATA_BINDWXSTC(int) wxluatype_wxStyledTextEvent; 54 | 55 | 56 | // --------------------------------------------------------------------------- 57 | // Encapsulation Declarations - need to be public for other bindings. 58 | // --------------------------------------------------------------------------- 59 | 60 | 61 | #endif // __HOOK_WXLUA_wxstc_H__ 62 | 63 | -------------------------------------------------------------------------------- /modules/wxbind/include/wxxml_bind.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | // wxxml.h - headers and wxLua types for wxLua binding 3 | // 4 | // This file was generated by genwxbind.lua 5 | // Any changes made to this file will be lost when the file is regenerated 6 | // --------------------------------------------------------------------------- 7 | 8 | #ifndef __HOOK_WXLUA_wxxml_H__ 9 | #define __HOOK_WXLUA_wxxml_H__ 10 | 11 | #include "wxbind/include/wxbinddefs.h" 12 | #include "wxluasetup.h" 13 | #include "wxbind/include/wxbase_bind.h" 14 | 15 | #include "wxlua/include/wxlstate.h" 16 | #include "wxlua/include/wxlbind.h" 17 | 18 | // --------------------------------------------------------------------------- 19 | // Check if the version of binding generator used to create this is older than 20 | // the current version of the bindings. 21 | // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' 22 | #if WXLUA_BINDING_VERSION > 27 23 | # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." 24 | #endif //WXLUA_BINDING_VERSION > 27 25 | // --------------------------------------------------------------------------- 26 | 27 | // binding class 28 | class WXDLLIMPEXP_BINDWXXML wxLuaBinding_wxxml : public wxLuaBinding 29 | { 30 | public: 31 | wxLuaBinding_wxxml(); 32 | 33 | 34 | private: 35 | DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxxml) 36 | }; 37 | 38 | 39 | // initialize wxLuaBinding_wxxml for all wxLuaStates 40 | extern WXDLLIMPEXP_BINDWXXML bool wxLuaBinding_wxxml_init(); 41 | 42 | // --------------------------------------------------------------------------- 43 | // Includes 44 | // --------------------------------------------------------------------------- 45 | 46 | #if (wxCHECK_VERSION(2,6,0)) && (wxLUA_USE_wxXML && wxUSE_XML) 47 | #include "wx/xml/xml.h" 48 | #endif // (wxCHECK_VERSION(2,6,0)) && (wxLUA_USE_wxXML && wxUSE_XML) 49 | 50 | // --------------------------------------------------------------------------- 51 | // Lua Tag Method Values and Tables for each Class 52 | // --------------------------------------------------------------------------- 53 | 54 | #if wxLUA_USE_wxXML && wxUSE_XML 55 | extern WXDLLIMPEXP_DATA_BINDWXXML(int) wxluatype_wxXmlDocument; 56 | extern WXDLLIMPEXP_DATA_BINDWXXML(int) wxluatype_wxXmlNode; 57 | extern WXDLLIMPEXP_DATA_BINDWXXML(int) wxluatype_wxXmlProperty; 58 | #endif // wxLUA_USE_wxXML && wxUSE_XML 59 | 60 | 61 | // --------------------------------------------------------------------------- 62 | // Encapsulation Declarations - need to be public for other bindings. 63 | // --------------------------------------------------------------------------- 64 | 65 | #if wxLUA_USE_wxXML && wxUSE_XML 66 | wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXXML, wxXmlNode, wxXmlNode) 67 | wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXXML, wxXmlProperty, wxXmlProperty) 68 | #endif // wxLUA_USE_wxXML && wxUSE_XML 69 | 70 | 71 | #endif // __HOOK_WXLUA_wxxml_H__ 72 | 73 | -------------------------------------------------------------------------------- /modules/wxbind/include/wxxrc_bind.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | // wxxrc.h - headers and wxLua types for wxLua binding 3 | // 4 | // This file was generated by genwxbind.lua 5 | // Any changes made to this file will be lost when the file is regenerated 6 | // --------------------------------------------------------------------------- 7 | 8 | #ifndef __HOOK_WXLUA_wxxrc_H__ 9 | #define __HOOK_WXLUA_wxxrc_H__ 10 | 11 | #include "wxbind/include/wxbinddefs.h" 12 | #include "wxluasetup.h" 13 | #include "wxbind/include/wxcore_bind.h" 14 | 15 | #include "wxlua/include/wxlstate.h" 16 | #include "wxlua/include/wxlbind.h" 17 | 18 | // --------------------------------------------------------------------------- 19 | // Check if the version of binding generator used to create this is older than 20 | // the current version of the bindings. 21 | // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' 22 | #if WXLUA_BINDING_VERSION > 27 23 | # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." 24 | #endif //WXLUA_BINDING_VERSION > 27 25 | // --------------------------------------------------------------------------- 26 | 27 | // binding class 28 | class WXDLLIMPEXP_BINDWXXRC wxLuaBinding_wxxrc : public wxLuaBinding 29 | { 30 | public: 31 | wxLuaBinding_wxxrc(); 32 | 33 | 34 | private: 35 | DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxxrc) 36 | }; 37 | 38 | 39 | // initialize wxLuaBinding_wxxrc for all wxLuaStates 40 | extern WXDLLIMPEXP_BINDWXXRC bool wxLuaBinding_wxxrc_init(); 41 | 42 | // --------------------------------------------------------------------------- 43 | // Includes 44 | // --------------------------------------------------------------------------- 45 | 46 | #if wxLUA_USE_wxXRC && wxUSE_XRC 47 | #include "wx/xrc/xmlres.h" 48 | #endif // wxLUA_USE_wxXRC && wxUSE_XRC 49 | 50 | // --------------------------------------------------------------------------- 51 | // Lua Tag Method Values and Tables for each Class 52 | // --------------------------------------------------------------------------- 53 | 54 | #if wxLUA_USE_wxXRC && wxUSE_XRC 55 | extern WXDLLIMPEXP_DATA_BINDWXXRC(int) wxluatype_wxXmlResource; 56 | #endif // wxLUA_USE_wxXRC && wxUSE_XRC 57 | 58 | 59 | // --------------------------------------------------------------------------- 60 | // Encapsulation Declarations - need to be public for other bindings. 61 | // --------------------------------------------------------------------------- 62 | 63 | 64 | #endif // __HOOK_WXLUA_wxxrc_H__ 65 | 66 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | .cpp.o: 24 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 25 | 26 | all: wxLuaBindAdvLib wxLuaBindAUILib wxLuaBindBaseLib wxLuaBindCoreLib wxLuaBindGLLib wxLuaBindHTMLLib wxLuaBindMediaLib wxLuaBindNetLib wxLuaBindSTCLib wxLuaBindXMLLib wxLuaBindXRCLib 27 | 28 | clean: cleanlib 29 | 30 | cleanwxbind: 31 | @(make -f Makefile_wxadv clean) 32 | @(make -f Makefile_wxaui clean) 33 | @(make -f Makefile_wxbase clean) 34 | @(make -f Makefile_wxcore clean) 35 | @(make -f Makefile_wxgl clean) 36 | @(make -f Makefile_wxhtml clean) 37 | @(make -f Makefile_wxmedia clean) 38 | @(make -f Makefile_wxnet clean) 39 | @(make -f Makefile_wxrichtext clean) 40 | @(make -f Makefile_wxstc clean) 41 | @(make -f Makefile_wxxml clean) 42 | @(make -f Makefile_wxxrc clean) 43 | 44 | 45 | # ---------------------------------------------------------------------------- 46 | # Include wxLua targets using wx-config for wxWidgets parameters 47 | 48 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 49 | 50 | -include $(DEPFILES) 51 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxadv: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDADV_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxadv_bind.cpp \ 30 | wxadv_wxladv.cpp 31 | 32 | OBJECTS=$(SOURCES:.cpp=.o) 33 | DEPFILES=$(OBJECTS:.o=.d) 34 | 35 | # ---------------------------------------------------------------------------- 36 | 37 | .cpp.o: 38 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 39 | 40 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 41 | 42 | clean: cleanlib 43 | 44 | # ---------------------------------------------------------------------------- 45 | # Include wxLua targets using wx-config for wxWidgets parameters 46 | 47 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 48 | 49 | -include $(DEPFILES) 50 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxaui: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDAUI_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxaui_bind.cpp 30 | 31 | OBJECTS=$(SOURCES:.cpp=.o) 32 | DEPFILES=$(OBJECTS:.o=.d) 33 | 34 | # ---------------------------------------------------------------------------- 35 | 36 | .cpp.o: 37 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 38 | 39 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 40 | 41 | clean: cleanlib 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxbase: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDBASE_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxbase_base.cpp \ 30 | wxbase_bind.cpp \ 31 | wxbase_config.cpp \ 32 | wxbase_data.cpp \ 33 | wxbase_datetime.cpp \ 34 | wxbase_file.cpp 35 | 36 | OBJECTS=$(SOURCES:.cpp=.o) 37 | DEPFILES=$(OBJECTS:.o=.d) 38 | 39 | # ---------------------------------------------------------------------------- 40 | 41 | .cpp.o: 42 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 43 | 44 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 45 | 46 | clean: cleanlib 47 | 48 | # A test to make a shared lib to test dependencies 49 | test: $(OBJECTS) $(LUA_LIBS) 50 | $(CXX) $(CXXFLAGS) $(APPEXTRADEFS) -g -O -o test -fPIC \ 51 | `wx-config --libs base` -l$(LUA_LIBS) -l$(WXLUA_LIB) test.cpp 52 | 53 | 54 | # ---------------------------------------------------------------------------- 55 | # Include wxLua targets using wx-config for wxWidgets parameters 56 | 57 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 58 | 59 | -include $(DEPFILES) 60 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxcore: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDCORE_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxcore_appframe.cpp \ 30 | wxcore_bind.cpp \ 31 | wxcore_clipdrag.cpp \ 32 | wxcore_controls.cpp \ 33 | wxcore_core.cpp \ 34 | wxcore_defsutils.cpp \ 35 | wxcore_dialogs.cpp \ 36 | wxcore_event.cpp \ 37 | wxcore_gdi.cpp \ 38 | wxcore_geometry.cpp \ 39 | wxcore_help.cpp \ 40 | wxcore_image.cpp \ 41 | wxcore_mdi.cpp \ 42 | wxcore_menutool.cpp \ 43 | wxcore_picker.cpp \ 44 | wxcore_print.cpp \ 45 | wxcore_sizer.cpp \ 46 | wxcore_windows.cpp \ 47 | wxcore_wxlcore.cpp 48 | 49 | OBJECTS=$(SOURCES:.cpp=.o) 50 | DEPFILES=$(OBJECTS:.o=.d) 51 | 52 | # ---------------------------------------------------------------------------- 53 | 54 | .cpp.o: 55 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 56 | 57 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 58 | 59 | clean: cleanlib 60 | 61 | # ---------------------------------------------------------------------------- 62 | # Include wxLua targets using wx-config for wxWidgets parameters 63 | 64 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 65 | 66 | -include $(DEPFILES) 67 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxgl: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDGL_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxgl_bind.cpp 30 | 31 | OBJECTS=$(SOURCES:.cpp=.o) 32 | DEPFILES=$(OBJECTS:.o=.d) 33 | 34 | # ---------------------------------------------------------------------------- 35 | 36 | .cpp.o: 37 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 38 | 39 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 40 | 41 | clean: cleanlib 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxhtml: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDHTML_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxhtml_bind.cpp \ 30 | wxhtml_wxlhtml.cpp 31 | 32 | OBJECTS=$(SOURCES:.cpp=.o) 33 | DEPFILES=$(OBJECTS:.o=.d) 34 | 35 | # ---------------------------------------------------------------------------- 36 | 37 | .cpp.o: 38 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 39 | 40 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 41 | 42 | clean: cleanlib 43 | 44 | # ---------------------------------------------------------------------------- 45 | # Include wxLua targets using wx-config for wxWidgets parameters 46 | 47 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 48 | 49 | -include $(DEPFILES) 50 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxmedia: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDMEDIA_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxmedia_bind.cpp 30 | 31 | OBJECTS=$(SOURCES:.cpp=.o) 32 | DEPFILES=$(OBJECTS:.o=.d) 33 | 34 | # ---------------------------------------------------------------------------- 35 | 36 | .cpp.o: 37 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 38 | 39 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 40 | 41 | clean: cleanlib 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxnet: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDNET_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxnet_bind.cpp 30 | 31 | OBJECTS=$(SOURCES:.cpp=.o) 32 | DEPFILES=$(OBJECTS:.o=.d) 33 | 34 | # ---------------------------------------------------------------------------- 35 | 36 | .cpp.o: 37 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 38 | 39 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 40 | 41 | clean: cleanlib 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxrichtext: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDRICHTEXT_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxrichtext_bind.cpp 30 | 31 | OBJECTS=$(SOURCES:.cpp=.o) 32 | DEPFILES=$(OBJECTS:.o=.d) 33 | 34 | # ---------------------------------------------------------------------------- 35 | 36 | .cpp.o: 37 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 38 | 39 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 40 | 41 | clean: cleanlib 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxstc: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDSTC_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxstc_bind.cpp 30 | 31 | OBJECTS=$(SOURCES:.cpp=.o) 32 | DEPFILES=$(OBJECTS:.o=.d) 33 | 34 | # ---------------------------------------------------------------------------- 35 | 36 | .cpp.o: 37 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 38 | 39 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 40 | 41 | clean: cleanlib 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxxml: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDXML_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxxml_bind.cpp 30 | 31 | OBJECTS=$(SOURCES:.cpp=.o) 32 | DEPFILES=$(OBJECTS:.o=.d) 33 | 34 | # ---------------------------------------------------------------------------- 35 | 36 | .cpp.o: 37 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 38 | 39 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 40 | 41 | clean: cleanlib 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /modules/wxbind/src/Makefile_wxxrc: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLuaBinding library using gmake 8 | 9 | # Override this on the command line to use your own wxluasetup.h 10 | WXLUASETUP = wxluasetup.h 11 | 12 | # ---------------------------------------------------------------------------- 13 | # Set path to root of wxLua 14 | WXLUA_DIR = ../../.. 15 | 16 | # ---------------------------------------------------------------------------- 17 | # Include wxLua settings using wx-config for wxWidgets parameters 18 | 19 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 20 | 21 | # ---------------------------------------------------------------------------- 22 | 23 | WXLUA_TARGET_LIBNAME = lib$(WXLUABINDXRC_LIB) 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | HEADERS = 28 | SOURCES = \ 29 | wxxrc_bind.cpp 30 | 31 | OBJECTS=$(SOURCES:.cpp=.o) 32 | DEPFILES=$(OBJECTS:.o=.d) 33 | 34 | # ---------------------------------------------------------------------------- 35 | 36 | .cpp.o: 37 | $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 38 | 39 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 40 | 41 | clean: cleanlib 42 | 43 | # ---------------------------------------------------------------------------- 44 | # Include wxLua targets using wx-config for wxWidgets parameters 45 | 46 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 47 | 48 | -include $(DEPFILES) 49 | -------------------------------------------------------------------------------- /modules/wxbind/src/dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * File: src/common/dummy.cpp 3 | * Purpose: See below 4 | * Author: Julian Smart 5 | * Created: 1993 6 | * Updated: 7 | * Copyright: (c) 1993, AIAI, University of Edinburgh 8 | */ 9 | 10 | /* A dummy file to include wx.h. If precompiling wx.h, 11 | * always start by compiling this and producing the PCH file. 12 | * Then subsequent source files use the PCH file. 13 | * 14 | * If precompiling wx.h for wxWidgets and derived apps, 15 | * link dummy.obj with your program. 16 | * 17 | * This will produce a big PCH file. 18 | */ 19 | 20 | #include "wx/wxprec.h" 21 | 22 | #ifdef __BORLANDC__ 23 | #pragma hdrstop 24 | #endif 25 | 26 | #ifdef __WXMSW__ 27 | #include "wx/msw/msvcrt.h" 28 | #endif 29 | 30 | #ifdef __VISAGECPP__ 31 | char wxDummyChar = 0; 32 | #endif 33 | -------------------------------------------------------------------------------- /modules/wxlua/include/wxlua.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // Name: wxlua.h 3 | // Purpose: Single header to include for wxLua 4 | // Author: J Winwood 5 | // Created: 14/11/2001 6 | // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. 7 | // Licence: wxWidgets licence 8 | ///////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef WX_LUA_H 11 | #define WX_LUA_H 12 | 13 | 14 | #include "wxlua/include/wxldefs.h" 15 | #include "wxlua/include/wxlstate.h" 16 | 17 | 18 | #endif // WX_LUA_H 19 | -------------------------------------------------------------------------------- /modules/wxlua/include/wxlua_bind.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | // wxlua.h - headers and wxLua types for wxLua binding 3 | // 4 | // This file was generated by genwxbind.lua 5 | // Any changes made to this file will be lost when the file is regenerated 6 | // --------------------------------------------------------------------------- 7 | 8 | #ifndef __HOOK_WXLUA_wxlua_H__ 9 | #define __HOOK_WXLUA_wxlua_H__ 10 | 11 | 12 | #include "wxlua/include/wxlstate.h" 13 | #include "wxlua/include/wxlbind.h" 14 | 15 | // --------------------------------------------------------------------------- 16 | // Check if the version of binding generator used to create this is older than 17 | // the current version of the bindings. 18 | // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' 19 | #if WXLUA_BINDING_VERSION > 27 20 | # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." 21 | #endif //WXLUA_BINDING_VERSION > 27 22 | // --------------------------------------------------------------------------- 23 | 24 | // binding class 25 | class WXDLLIMPEXP_WXLUA wxLuaBinding_wxlua : public wxLuaBinding 26 | { 27 | public: 28 | wxLuaBinding_wxlua(); 29 | 30 | virtual bool RegisterBinding(const wxLuaState& wxlState); 31 | 32 | private: 33 | DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxlua) 34 | }; 35 | 36 | 37 | // initialize wxLuaBinding_wxlua for all wxLuaStates 38 | extern WXDLLIMPEXP_WXLUA bool wxLuaBinding_wxlua_init(); 39 | 40 | // --------------------------------------------------------------------------- 41 | // Includes 42 | // --------------------------------------------------------------------------- 43 | 44 | #include "wxlua/include/wxlstate.h" 45 | 46 | // --------------------------------------------------------------------------- 47 | // Lua Tag Method Values and Tables for each Class 48 | // --------------------------------------------------------------------------- 49 | 50 | extern WXDLLIMPEXP_DATA_WXLUA(int) wxluatype_wxLuaObject; 51 | extern WXDLLIMPEXP_DATA_WXLUA(int) wxluatype_wxLuaState; 52 | 53 | 54 | // --------------------------------------------------------------------------- 55 | // Encapsulation Declarations - need to be public for other bindings. 56 | // --------------------------------------------------------------------------- 57 | 58 | 59 | #endif // __HOOK_WXLUA_wxlua_H__ 60 | 61 | -------------------------------------------------------------------------------- /modules/wxlua/src/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLua library using gmake 8 | 9 | # ---------------------------------------------------------------------------- 10 | # Set path to root of wxLua 11 | WXLUA_DIR = ../../.. 12 | 13 | # ---------------------------------------------------------------------------- 14 | # Include wxLua settings using wx-config for wxWidgets parameters 15 | 16 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 17 | 18 | # ---------------------------------------------------------------------------- 19 | 20 | WXLUA_TARGET_LIBNAME = lib$(WXLUA_LIB) 21 | 22 | # ---------------------------------------------------------------------------- 23 | 24 | HEADERS = \ 25 | ../include/wxldefs.h \ 26 | ../include/wxlua.h \ 27 | ../include/wxlbind.h \ 28 | ../include/wxlcallb.h \ 29 | ../include/wxlstate.h 30 | 31 | SOURCES = \ 32 | wxlbind.cpp \ 33 | wxlcallb.cpp \ 34 | wxlstate.cpp \ 35 | wxlua_bind.cpp 36 | 37 | OBJECTS=$(SOURCES:.cpp=.o) 38 | DEPFILES=$(OBJECTS:.o=.d) 39 | 40 | # ---------------------------------------------------------------------------- 41 | 42 | .cpp.o: 43 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 44 | 45 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 46 | 47 | clean: cleanlib 48 | 49 | # ---------------------------------------------------------------------------- 50 | # Include wxLua targets using wx-config for wxWidgets parameters 51 | 52 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 53 | 54 | -include $(DEPFILES) 55 | -------------------------------------------------------------------------------- /modules/wxlua/src/dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * File: src/common/dummy.cpp 3 | * Purpose: See below 4 | * Author: Julian Smart 5 | * Created: 1993 6 | * Updated: 7 | * Copyright: (c) 1993, AIAI, University of Edinburgh 8 | */ 9 | 10 | /* A dummy file to include wx.h. If precompiling wx.h, 11 | * always start by compiling this and producing the PCH file. 12 | * Then subsequent source files use the PCH file. 13 | * 14 | * If precompiling wx.h for wxWidgets and derived apps, 15 | * link dummy.obj with your program. 16 | * 17 | * This will produce a big PCH file. 18 | */ 19 | 20 | #include "wx/wxprec.h" 21 | 22 | #ifdef __BORLANDC__ 23 | #pragma hdrstop 24 | #endif 25 | 26 | #ifdef __WXMSW__ 27 | #include "wx/msw/msvcrt.h" 28 | #endif 29 | 30 | #ifdef __VISAGECPP__ 31 | char wxDummyChar = 0; 32 | #endif 33 | -------------------------------------------------------------------------------- /modules/wxluadebug/include/wxluadebugdefs.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Name: wxluadebugdefs.h 3 | // Purpose: definitions for wxLuaDebug module 4 | // Author: Francesco Montorsi 5 | // Modified by: 6 | // Created: 20/5/2006 7 | // RCS-ID: $Id: wxluadebugdefs.h,v 1.3 2006/09/04 18:07:55 jrl1 Exp $ 8 | // Copyright: (c) Francesco Montorsi 9 | // Licence: wxWidgets licence 10 | /////////////////////////////////////////////////////////////////////////////// 11 | 12 | #ifndef __WX_WXLUADEBUGDEFS_H__ 13 | #define __WX_WXLUADEBUGDEFS_H__ 14 | 15 | #include "wx/defs.h" 16 | 17 | #include "wxlua/include/wxldefs.h" 18 | 19 | // ---------------------------------------------------------------------------- 20 | // WXDLLIMPEXP macros 21 | // ---------------------------------------------------------------------------- 22 | 23 | #ifdef WXMAKINGDLL_WXLUADEBUG 24 | #define WXDLLIMPEXP_WXLUADEBUG WXEXPORT 25 | #define WXDLLIMPEXP_DATA_WXLUADEBUG(type) WXEXPORT type 26 | #elif defined(WXUSINGDLL) 27 | #define WXDLLIMPEXP_WXLUADEBUG WXIMPORT 28 | #define WXDLLIMPEXP_DATA_WXLUADEBUG(type) WXIMPORT type 29 | #else // not making nor using DLL 30 | #define WXDLLIMPEXP_WXLUADEBUG 31 | #define WXDLLIMPEXP_DATA_WXLUADEBUG(type) type 32 | #endif 33 | 34 | #endif // __WX_WXLUADEBUGDEFS_H__ 35 | -------------------------------------------------------------------------------- /modules/wxluadebug/src/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLua library using gmake 8 | 9 | # ---------------------------------------------------------------------------- 10 | # Set path to root of wxLua 11 | WXLUA_DIR = ../../.. 12 | 13 | # ---------------------------------------------------------------------------- 14 | # Include wxLua settings using wx-config for wxWidgets parameters 15 | 16 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 17 | 18 | # ---------------------------------------------------------------------------- 19 | 20 | WXLUA_TARGET_LIBNAME = lib$(WXLUADEBUG_LIB) 21 | 22 | # ---------------------------------------------------------------------------- 23 | 24 | HEADERS = \ 25 | ../include/wxldebug.h \ 26 | ../include/wxlstack.h 27 | 28 | SOURCES = \ 29 | wxldebug.cpp \ 30 | wxlstack.cpp 31 | 32 | OBJECTS=$(SOURCES:.cpp=.o) 33 | DEPFILES=$(OBJECTS:.o=.d) 34 | 35 | # ---------------------------------------------------------------------------- 36 | 37 | .cpp.o: 38 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 39 | 40 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 41 | 42 | clean: cleanlib 43 | 44 | # ---------------------------------------------------------------------------- 45 | # Include wxLua targets using wx-config for wxWidgets parameters 46 | 47 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 48 | 49 | -include $(DEPFILES) 50 | -------------------------------------------------------------------------------- /modules/wxluadebug/src/dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * File: src/common/dummy.cpp 3 | * Purpose: See below 4 | * Author: Julian Smart 5 | * Created: 1993 6 | * Updated: 7 | * Copyright: (c) 1993, AIAI, University of Edinburgh 8 | */ 9 | 10 | /* A dummy file to include wx.h. If precompiling wx.h, 11 | * always start by compiling this and producing the PCH file. 12 | * Then subsequent source files use the PCH file. 13 | * 14 | * If precompiling wx.h for wxWidgets and derived apps, 15 | * link dummy.obj with your program. 16 | * 17 | * This will produce a big PCH file. 18 | */ 19 | 20 | #include "wx/wxprec.h" 21 | 22 | #ifdef __BORLANDC__ 23 | #pragma hdrstop 24 | #endif 25 | 26 | #ifdef __WXMSW__ 27 | #include "wx/msw/msvcrt.h" 28 | #endif 29 | 30 | #ifdef __VISAGECPP__ 31 | char wxDummyChar = 0; 32 | #endif 33 | -------------------------------------------------------------------------------- /modules/wxluasocket/include/wxluasocket_bind.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | // wxluasocket.h - headers and wxLua types for wxLua binding 3 | // 4 | // This file was generated by genwxbind.lua 5 | // Any changes made to this file will be lost when the file is regenerated 6 | // --------------------------------------------------------------------------- 7 | 8 | #ifndef __HOOK_WXLUA_wxluasocket_H__ 9 | #define __HOOK_WXLUA_wxluasocket_H__ 10 | 11 | #include "wx/defs.h" 12 | #include "wxluasocket/include/wxluasocketdefs.h" 13 | #include "wxbind/include/wxcore_bind.h" 14 | 15 | #include "wxlua/include/wxlstate.h" 16 | #include "wxlua/include/wxlbind.h" 17 | 18 | // --------------------------------------------------------------------------- 19 | // Check if the version of binding generator used to create this is older than 20 | // the current version of the bindings. 21 | // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' 22 | #if WXLUA_BINDING_VERSION > 27 23 | # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." 24 | #endif //WXLUA_BINDING_VERSION > 27 25 | // --------------------------------------------------------------------------- 26 | 27 | // binding class 28 | class WXDLLIMPEXP_WXLUASOCKET wxLuaBinding_wxluasocket : public wxLuaBinding 29 | { 30 | public: 31 | wxLuaBinding_wxluasocket(); 32 | 33 | 34 | private: 35 | DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxluasocket) 36 | }; 37 | 38 | 39 | // initialize wxLuaBinding_wxluasocket for all wxLuaStates 40 | extern WXDLLIMPEXP_WXLUASOCKET bool wxLuaBinding_wxluasocket_init(); 41 | 42 | // --------------------------------------------------------------------------- 43 | // Includes 44 | // --------------------------------------------------------------------------- 45 | 46 | #include "wx/defs.h" 47 | #include "wx/object.h" 48 | #include "wxlua/include/wxlbind.h" 49 | #include "wxlua/include/wxlstate.h" 50 | #include "wxluasocket/include/wxldserv.h" 51 | 52 | // --------------------------------------------------------------------------- 53 | // Lua Tag Method Values and Tables for each Class 54 | // --------------------------------------------------------------------------- 55 | 56 | extern WXDLLIMPEXP_DATA_WXLUASOCKET(int) wxluatype_wxLuaDebuggerEvent; 57 | extern WXDLLIMPEXP_DATA_WXLUASOCKET(int) wxluatype_wxLuaDebuggerServer; 58 | 59 | 60 | // --------------------------------------------------------------------------- 61 | // Encapsulation Declarations - need to be public for other bindings. 62 | // --------------------------------------------------------------------------- 63 | 64 | 65 | #endif // __HOOK_WXLUA_wxluasocket_H__ 66 | 67 | -------------------------------------------------------------------------------- /modules/wxluasocket/include/wxluasocketdefs.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Name: wxluadebugdefs.h 3 | // Purpose: definitions for wxLuaDebug module 4 | // Author: Francesco Montorsi 5 | // Modified by: 6 | // Created: 20/5/2006 7 | // RCS-ID: $Id: wxluasocketdefs.h,v 1.5 2007/05/21 01:08:00 jrl1 Exp $ 8 | // Copyright: (c) Francesco Montorsi 9 | // Licence: wxWidgets licence 10 | /////////////////////////////////////////////////////////////////////////////// 11 | 12 | #ifndef __WX_WXLUASOCKETDEFS_H__ 13 | #define __WX_WXLUASOCKETDEFS_H__ 14 | 15 | #include "wx/defs.h" 16 | 17 | #include "wxlua/include/wxldefs.h" 18 | #include "wxluadebug/include/wxluadebugdefs.h" 19 | 20 | // ---------------------------------------------------------------------------- 21 | // WXDLLIMPEXP macros 22 | // ---------------------------------------------------------------------------- 23 | 24 | #ifdef WXMAKINGDLL_WXLUASOCKET 25 | #define WXDLLIMPEXP_WXLUASOCKET WXEXPORT 26 | #define WXDLLIMPEXP_DATA_WXLUASOCKET(type) WXEXPORT type 27 | #elif defined(WXUSINGDLL) 28 | #define WXDLLIMPEXP_WXLUASOCKET WXIMPORT 29 | #define WXDLLIMPEXP_DATA_WXLUASOCKET(type) WXIMPORT type 30 | #else // not making nor using DLL 31 | #define WXDLLIMPEXP_WXLUASOCKET 32 | #define WXDLLIMPEXP_DATA_WXLUASOCKET(type) type 33 | #endif 34 | 35 | // ---------------------------------------------------------------------------- 36 | // Defines for various things 37 | // ---------------------------------------------------------------------------- 38 | 39 | #define ID_WXLUA_SERVER 1200 40 | #define ID_WXLUA_SOCKET 1201 41 | 42 | #define WXLUA_SOCKET_PORT 1561 43 | 44 | #endif // __WX_WXLUASOCKETDEFS_H__ 45 | -------------------------------------------------------------------------------- /modules/wxluasocket/src/Makefile: -------------------------------------------------------------------------------- 1 | # File: Makefile 2 | # Author: John Labenski, J Winwood 3 | # Created: 2002 4 | # Updated: 5 | # Copyright: (c) 2002 Lomtick Software. All rights reserved. 6 | # 7 | # Makefile for wxLua library using gmake 8 | 9 | # ---------------------------------------------------------------------------- 10 | # Set path to root of wxLua 11 | WXLUA_DIR = ../../.. 12 | 13 | # ---------------------------------------------------------------------------- 14 | # Include wxLua settings using wx-config for wxWidgets parameters 15 | 16 | include $(WXLUA_DIR)/build/Makefile_wx-config.in 17 | 18 | # ---------------------------------------------------------------------------- 19 | 20 | WXLUA_TARGET_LIBNAME = lib$(WXLUASOCKET_LIB) 21 | 22 | # ---------------------------------------------------------------------------- 23 | 24 | HEADERS = \ 25 | ../include/wxldserv.h \ 26 | ../include/wxldtarg.h \ 27 | ../include/wxlsock.h \ 28 | ../include/wxluasocket.h 29 | 30 | SOURCES = \ 31 | wxldserv.cpp \ 32 | wxldtarg.cpp \ 33 | wxlsock.cpp \ 34 | wxluasocket_bind.cpp 35 | 36 | OBJECTS=$(SOURCES:.cpp=.o) 37 | DEPFILES=$(OBJECTS:.o=.d) 38 | 39 | # ---------------------------------------------------------------------------- 40 | 41 | .cpp.o: 42 | $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< 43 | 44 | all: $(WXLUA_TARGET_LIB_STATIC) $(WXLUA_TARGET_LIB_SHARED) 45 | 46 | clean: cleanlib 47 | 48 | # ---------------------------------------------------------------------------- 49 | # Include wxLua targets using wx-config for wxWidgets parameters 50 | 51 | include $(WXLUA_DIR)/build/Makefile_wx-config_targets.in 52 | 53 | -include $(DEPFILES) 54 | -------------------------------------------------------------------------------- /modules/wxluasocket/src/dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * File: src/common/dummy.cpp 3 | * Purpose: See below 4 | * Author: Julian Smart 5 | * Created: 1993 6 | * Updated: 7 | * Copyright: (c) 1993, AIAI, University of Edinburgh 8 | */ 9 | 10 | /* A dummy file to include wx.h. If precompiling wx.h, 11 | * always start by compiling this and producing the PCH file. 12 | * Then subsequent source files use the PCH file. 13 | * 14 | * If precompiling wx.h for wxWidgets and derived apps, 15 | * link dummy.obj with your program. 16 | * 17 | * This will produce a big PCH file. 18 | */ 19 | 20 | #include "wx/wxprec.h" 21 | 22 | #ifdef __BORLANDC__ 23 | #pragma hdrstop 24 | #endif 25 | 26 | #ifdef __WXMSW__ 27 | #include "wx/msw/msvcrt.h" 28 | #endif 29 | 30 | #ifdef __VISAGECPP__ 31 | char wxDummyChar = 0; 32 | #endif 33 | -------------------------------------------------------------------------------- /samples/grid.wx.lua: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- Name: grid.wx.lua 3 | -- Purpose: wxGrid wxLua sample 4 | -- Author: J Winwood 5 | -- Created: January 2002 6 | -- Copyright: (c) 2002 Lomtick Software. All rights reserved. 7 | -- Licence: wxWidgets licence 8 | ----------------------------------------------------------------------------- 9 | 10 | -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit 11 | package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" 12 | require("wx") 13 | 14 | local frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "wxLua wxGrid Sample", 15 | wx.wxPoint(25, 25), wx.wxSize(350, 250)) 16 | 17 | local fileMenu = wx.wxMenu("", wx.wxMENU_TEAROFF) 18 | fileMenu:Append(wx.wxID_EXIT, "E&xit\tCtrl-X", "Quit the program") 19 | 20 | local helpMenu = wx.wxMenu("", wx.wxMENU_TEAROFF) 21 | helpMenu:Append(wx.wxID_ABOUT, "&About\tCtrl-A", "About the Grid wxLua Application") 22 | 23 | local menuBar = wx.wxMenuBar() 24 | menuBar:Append(fileMenu, "&File") 25 | menuBar:Append(helpMenu, "&Help") 26 | 27 | frame:SetMenuBar(menuBar) 28 | 29 | frame:CreateStatusBar(1) 30 | frame:SetStatusText("Welcome to wxLua.") 31 | 32 | frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, 33 | function (event) 34 | frame:Close() 35 | end ) 36 | 37 | frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, 38 | function (event) 39 | wx.wxMessageBox('This is the "About" dialog of the wxGrid wxLua sample.\n'.. 40 | wxlua.wxLUA_VERSION_STRING.." built with "..wx.wxVERSION_STRING, 41 | "About wxLua", 42 | wx.wxOK + wx.wxICON_INFORMATION, 43 | frame ) 44 | end ) 45 | 46 | grid = wx.wxGrid(frame, wx.wxID_ANY) 47 | 48 | grid:CreateGrid(10, 8) 49 | grid:SetColSize(3, 200) 50 | grid:SetRowSize(4, 45) 51 | grid:SetCellValue(0, 0, "First cell") 52 | grid:SetCellValue(1, 1, "Another cell") 53 | grid:SetCellValue(2, 2, "Yet another cell") 54 | grid:SetCellFont(0, 0, wx.wxFont(10, wx.wxROMAN, wx.wxITALIC, wx.wxNORMAL)) 55 | grid:SetCellTextColour(1, 1, wx.wxRED) 56 | grid:SetCellBackgroundColour(2, 2, wx.wxCYAN) 57 | 58 | frame:Show(true) 59 | 60 | -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, 61 | -- otherwise the wxLua program will exit immediately. 62 | -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the 63 | -- MainLoop is already running or will be started by the C++ program. 64 | wx.wxGetApp():MainLoop() 65 | -------------------------------------------------------------------------------- /samples/image/cmyk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/cmyk.jpg -------------------------------------------------------------------------------- /samples/image/horse.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.bmp -------------------------------------------------------------------------------- /samples/image/horse.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.cur -------------------------------------------------------------------------------- /samples/image/horse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.gif -------------------------------------------------------------------------------- /samples/image/horse.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.ico -------------------------------------------------------------------------------- /samples/image/horse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.jpg -------------------------------------------------------------------------------- /samples/image/horse.pcx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.pcx -------------------------------------------------------------------------------- /samples/image/horse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.png -------------------------------------------------------------------------------- /samples/image/horse.pnm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.pnm -------------------------------------------------------------------------------- /samples/image/horse.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.tga -------------------------------------------------------------------------------- /samples/image/horse.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse.tif -------------------------------------------------------------------------------- /samples/image/horse3.ani: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse3.ani -------------------------------------------------------------------------------- /samples/image/horse_rg.pnm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/horse_rg.pnm -------------------------------------------------------------------------------- /samples/image/smile.xbm: -------------------------------------------------------------------------------- 1 | #define smile_width 32 2 | #define smile_height 32 3 | static unsigned char smile_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x1c, 0x1c, 0x00, 5 | 0x00, 0x03, 0x60, 0x00, 0x80, 0x00, 0x80, 0x00, 0x60, 0x00, 0x00, 0x03, 6 | 0x20, 0x00, 0x00, 0x04, 0x10, 0x08, 0x08, 0x04, 0x08, 0x14, 0x14, 0x08, 7 | 0x08, 0x22, 0x22, 0x10, 0x04, 0x01, 0x40, 0x10, 0x04, 0x08, 0x08, 0x10, 8 | 0x04, 0x08, 0x08, 0x10, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 9 | 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 0x02, 0x02, 0x20, 0x20, 10 | 0x04, 0x0e, 0x38, 0x10, 0x04, 0x3e, 0x3e, 0x10, 0x04, 0xf4, 0x1b, 0x10, 11 | 0x08, 0xd8, 0x0a, 0x10, 0x08, 0xb0, 0x07, 0x08, 0x10, 0xc0, 0x01, 0x04, 12 | 0x20, 0x00, 0x00, 0x04, 0x60, 0x00, 0x00, 0x03, 0x80, 0x00, 0x80, 0x00, 13 | 0x00, 0x03, 0x60, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0xe0, 0x03, 0x00, 14 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 15 | 16 | -------------------------------------------------------------------------------- /samples/image/smile.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *smile_xpm[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "32 32 4 1", 5 | ". c Black", 6 | "X c #FFFF00", 7 | " c None", 8 | "o c #C00000", 9 | /* pixels */ 10 | " ", 11 | " ..... ", 12 | " ...XXXXX... ", 13 | " ..XXXXXXXXXXX.. ", 14 | " .XXXXXXXXXXXXXXX. ", 15 | " ..XXXXXXXXXXXXXXXXX.. ", 16 | " .XXXXXXXXXXXXXXXXXXXX. ", 17 | " .XXXXXX.XXXXXXX.XXXXXX. ", 18 | " .XXXXXX.X.XXXXX.X.XXXXXX. ", 19 | " .XXXXX.XXX.XXX.XXX.XXXXXX. ", 20 | " .XXXXX.XXXXXXXXXXXXX.XXXXX. ", 21 | " .XXXXXXXX.XXXXXXX.XXXXXXXX. ", 22 | " .XXXXXXXX.XXXXXXX.XXXXXXXX. ", 23 | " .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", 24 | " .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", 25 | " .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", 26 | " .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ", 27 | " .XXXXXXX.XXXXXXXXXXX.XXXXXXX. ", 28 | " .XXXXXX...XXXXXXX...XXXXXX. ", 29 | " .XXXXXX.oo..XXX..oo.XXXXXX. ", 30 | " .XXXXXXX.ooo...ooo.XXXXXXX. ", 31 | " .XXXXXXX.ooooooo.XXXXXXXX. ", 32 | " .XXXXXXXX..ooo..XXXXXXXX. ", 33 | " .XXXXXXXXX...XXXXXXXXX. ", 34 | " .XXXXXXXXXXXXXXXXXXXX. ", 35 | " ..XXXXXXXXXXXXXXXXX.. ", 36 | " .XXXXXXXXXXXXXXX. ", 37 | " ..XXXXXXXXXXX.. ", 38 | " ...XXXXX... ", 39 | " ..... ", 40 | " ", 41 | " " 42 | }; 43 | -------------------------------------------------------------------------------- /samples/image/toucan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/wxlua/83649e035070ccd335ee9b3efe6eadd219f3cc8a/samples/image/toucan.png -------------------------------------------------------------------------------- /samples/luamodule.wx.lua: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- Name: luamodule.wx.lua 3 | -- Purpose: Minimal wxLua sample for use as a lua module using require 4 | -- Author: John Labenski 5 | -- Modified by: 6 | -- Created: 05/13/2006 7 | -- RCS-ID: 8 | -- Copyright: (c) 2001 John Labenski. All rights reserved. 9 | -- Licence: wxWidgets licence 10 | ----------------------------------------------------------------------------- 11 | 12 | -- to make this sample script work out-of-the-box, we need to add 13 | -- to the paths looked by require() all possible locations of the 14 | -- wx.dll/.so module when this script is run from the samples dir. 15 | -- Please also note that this sample can be executed only when 16 | -- wxLua has been compiled in shared mode (--enable-shared on Unix, 17 | -- SHARED=1 on Windows) 18 | package.cpath = ";;./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" 19 | require("wx") 20 | 21 | -- simple test of Non GUI elements 22 | p = wx.wxPoint(1,2) 23 | print("The point is", p:GetX(), p:GetY()) 24 | 25 | frame = wx.wxFrame(wx.NULL, -1, "wxLua module sample") 26 | 27 | -- create a simple file menu so you can exit the program nicely 28 | local fileMenu = wx.wxMenu() 29 | fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program") 30 | local menuBar = wx.wxMenuBar() 31 | menuBar:Append(fileMenu, "&File") 32 | frame:SetMenuBar(menuBar) 33 | frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, 34 | function (event) frame:Close(true) end ) 35 | 36 | frame:Show(true) 37 | 38 | -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, 39 | -- otherwise the wxLua program will exit immediately. 40 | -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the 41 | -- MainLoop is already running or will be started by the C++ program. 42 | wx.wxGetApp():MainLoop() 43 | 44 | -------------------------------------------------------------------------------- /samples/sizer.wx.lua: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- Name: sizer.wx.lua 3 | -- Purpose: Shows using sizers in wxLua 4 | -- Author: Francis Irving 5 | -- Created: 23/01/2002 6 | -- RCS-ID: $Id: sizer.wx.lua,v 1.8 2008/01/22 04:45:39 jrl1 Exp $ 7 | -- Copyright: (c) 2002 Creature Labs. All rights reserved. 8 | -- Licence: wxWidgets licence 9 | ----------------------------------------------------------------------------- 10 | 11 | -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit 12 | package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" 13 | require("wx") 14 | 15 | frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "wxLua sizer test frame") 16 | 17 | -- Create two controls (note that their parents are the _frame_ (not the sizer)) 18 | textEntry = wx.wxTextCtrl(frame, wx.wxID_ANY, "Enter URL"); 19 | button = wx.wxButton(frame, wx.wxID_ANY, "test") 20 | 21 | -- Put them in a vertical sizer, with ratio 3 units for the text entry, 5 for button 22 | -- and padding of 6 pixels. 23 | sizerTop = wx.wxBoxSizer(wx.wxVERTICAL) 24 | sizerTop:Add(textEntry, 3, wx.wxGROW + wx.wxALL, 6) 25 | sizerTop:Add(button, 5, wx.wxGROW + wx.wxALL, 6) 26 | 27 | -- Set up the frame to use that sizer to move/resize its children controls 28 | frame:SetAutoLayout(true) 29 | frame:SetSizer(sizerTop) 30 | 31 | -- Optional - these will set an initial minimal size, just enough to hold the 32 | -- controls (more useful for dialogs than a frame) 33 | sizerTop:SetSizeHints(frame) 34 | sizerTop:Fit(frame) 35 | 36 | -- Start the application 37 | wx.wxGetApp():SetTopWindow(frame) 38 | frame:Show(true) 39 | 40 | -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, 41 | -- otherwise the wxLua program will exit immediately. 42 | -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the 43 | -- MainLoop is already running or will be started by the C++ program. 44 | wx.wxGetApp():MainLoop() 45 | -------------------------------------------------------------------------------- /samples/veryminimal.wx.lua: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- Name: minimal.wx.lua 3 | -- Purpose: 'Minimal' wxLua sample 4 | -- Author: J Winwood 5 | -- Modified by: 6 | -- Created: 16/11/2001 7 | -- RCS-ID: $Id: veryminimal.wx.lua,v 1.7 2008/01/22 04:45:39 jrl1 Exp $ 8 | -- Copyright: (c) 2001 J Winwood. All rights reserved. 9 | -- Licence: wxWidgets licence 10 | ----------------------------------------------------------------------------- 11 | 12 | -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit 13 | package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" 14 | require("wx") 15 | 16 | frame = nil 17 | 18 | function main() 19 | 20 | -- create the frame window 21 | frame = wx.wxFrame( wx.NULL, wx.wxID_ANY, "wxLua Very Minimal Demo", 22 | wx.wxDefaultPosition, wx.wxSize(450, 450), 23 | wx.wxDEFAULT_FRAME_STYLE ) 24 | 25 | -- show the frame window 26 | frame:Show(true) 27 | end 28 | 29 | main() 30 | 31 | -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, 32 | -- otherwise the wxLua program will exit immediately. 33 | -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the 34 | -- MainLoop is already running or will be started by the C++ program. 35 | wx.wxGetApp():MainLoop() 36 | -------------------------------------------------------------------------------- /util/wrapmodule/wrapmodule.wx.lua: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- Name: wrapmodule.wx.lua 3 | -- Purpose: Allow running wxLua programs using require by "appending" wx.wxGetApp():MainLoop() 4 | -- Author: John Labenski 5 | -- Modified by: 6 | -- Created: 05/13/2006 7 | -- RCS-ID: 8 | -- Copyright: (c) 2001 John Labenski. All rights reserved. 9 | -- Licence: wxWidgets licence 10 | ----------------------------------------------------------------------------- 11 | 12 | -- Usage: $lua wrapmodule.wx.lua wxluaprogram.wx.lua 13 | 14 | require("wx") 15 | 16 | assert(arg and arg[1] and (type(arg[1]) == "string"), "Usage: $lua wrapmodule.wx.lua wxluaprogram.wx.lua") 17 | 18 | dofile(arg[1]) 19 | 20 | -- ALWAYS call wx.wxGetApp():MainLoop() last to keep the program active 21 | -- otherwise the lua program will exit immediately 22 | wx.wxGetApp():MainLoop() 23 | 24 | --------------------------------------------------------------------------------