diff options
author | fowlmouth <phowl.mouth@gmail.com> | 2013-12-01 21:19:32 -0600 |
---|---|---|
committer | fowlmouth <phowl.mouth@gmail.com> | 2013-12-01 21:19:32 -0600 |
commit | 6577093d2d318b6351984a9f8f8166c6f37c6525 (patch) | |
tree | 7b506ad1972580915565d7183f5c4e1944d6f9c4 /examples | |
parent | 0b4805f3668d5babebf0532305b7caf58ca4817e (diff) | |
download | Nim-6577093d2d318b6351984a9f8f8166c6f37c6525.tar.gz |
Removed lua, python, tcl, cairo
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cairoex.nim | 15 | ||||
-rw-r--r-- | examples/luaex.nim | 15 | ||||
-rw-r--r-- | examples/pythonex.nim | 11 | ||||
-rw-r--r-- | examples/tclex.nim | 25 |
4 files changed, 0 insertions, 66 deletions
diff --git a/examples/cairoex.nim b/examples/cairoex.nim deleted file mode 100644 index 492428705..000000000 --- a/examples/cairoex.nim +++ /dev/null @@ -1,15 +0,0 @@ -import cairo - -var surface = image_surface_create(FORMAT_ARGB32, 240, 80) -var cr = create(surface) - -select_font_face(cr, "serif", FONT_SLANT_NORMAL, - FONT_WEIGHT_BOLD) -set_font_size(cr, 32.0) -set_source_rgb(cr, 0.0, 0.0, 1.0) -move_to(cr, 10.0, 50.0) -show_text(cr, "Hello, world") -destroy(cr) -discard write_to_png(surface, "hello.png") -destroy(surface) - diff --git a/examples/luaex.nim b/examples/luaex.nim deleted file mode 100644 index 7628ddd12..000000000 --- a/examples/luaex.nim +++ /dev/null @@ -1,15 +0,0 @@ -# Embedds Lua into a Nimrod application - -import - lua, lualib, lauxlib - -const - code = """ -print 'hi' -""" - -var L = newstate() -openlibs(L) -discard loadbuffer(L, code, code.len, "line") -discard pcall(L, 0, 0, 0) - diff --git a/examples/pythonex.nim b/examples/pythonex.nim deleted file mode 100644 index 310d80151..000000000 --- a/examples/pythonex.nim +++ /dev/null @@ -1,11 +0,0 @@ -# Example to embed Python into your application - -import python - -# IMPORTANT: Python on Windows does not like CR characters, so -# we use only \L here. - -Py_Initialize() -discard PyRun_SimpleString("from time import time,ctime\L" & - "print 'Today is',ctime(time())\L") -Py_Finalize() diff --git a/examples/tclex.nim b/examples/tclex.nim deleted file mode 100644 index daf2d52e2..000000000 --- a/examples/tclex.nim +++ /dev/null @@ -1,25 +0,0 @@ -# Example to embed TCL in Nimrod - -import tcl, os - -const - myScript = """puts "Hello, World - In quotes" """ - myScript2 = """ -package require Tk -pack [entry .e -textvar e -width 50] -bind .e <Return> { - set e [regsub { *=.*} $e ""] ;# remove evaluation (Chris) - catch {expr [string map {/ *1./} $e]} res - append e " = $res" -} -""" - -FindExecutable(getAppFilename()) -var interp = CreateInterp() -if interp == nil: quit("cannot create TCL interpreter") -if Init(interp) != TCL_OK: - quit("cannot init interpreter") -if tcl.Eval(interp, myScript) != TCL_OK: - quit("cannot execute script.tcl") - - |