summaryrefslogtreecommitdiff
path: root/iup/srclua3
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:26:30 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:32:26 +0200
commit7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch)
treeb6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/srclua3
parente9a184546b18cf3b796bd560561f312934004c54 (diff)
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/srclua3')
-rwxr-xr-xiup/srclua3/config.mak19
-rwxr-xr-xiup/srclua3/iup_pplot.mak15
-rwxr-xr-xiup/srclua3/iupcd.mak19
-rwxr-xr-xiup/srclua3/iupcontrols.mak19
-rwxr-xr-xiup/srclua3/iupgl.mak12
-rwxr-xr-xiup/srclua3/iupim.mak12
-rwxr-xr-xiup/srclua3/iuplua.c8
-rwxr-xr-xiup/srclua3/iuplua_widgets.c9
-rwxr-xr-xiup/srclua3/iuplua_widgets.lua2
-rwxr-xr-xiup/srclua3/iupole.mak13
-rwxr-xr-xiup/srclua3/make_uname8
-rwxr-xr-xiup/srclua3/make_uname.bat10
12 files changed, 14 insertions, 132 deletions
diff --git a/iup/srclua3/config.mak b/iup/srclua3/config.mak
deleted file mode 100755
index a3ffb1d..0000000
--- a/iup/srclua3/config.mak
+++ /dev/null
@@ -1,19 +0,0 @@
-BUILD_IUP3 = Yes
-
-PROJNAME = iup
-LIBNAME = iuplua3
-OPT = YES
-
-LOHDIR = loh
-SRCLUA = iuplua.lua iuplua_widgets.lua constants.lua spin.lua \
- sbox.lua split.lua val.lua tree.lua tabs.lua
-SRC = iuplua.c iuplua_api.c iuplua_widgets.c il_scanf.c il_cbox.c \
- il_sbox.c il_split.c il_spin.c il_val.c il_tree.c il_tabs.c il_getcolor.c il_getparam.c
-
-USE_LUA = Yes
-
-DEFINES = IUPLUA_USELOH
-INCLUDES = ../include ../src
-LDIR = ../lib/$(TEC_UNAME)
-LIBS = iup
-
diff --git a/iup/srclua3/iup_pplot.mak b/iup/srclua3/iup_pplot.mak
deleted file mode 100755
index 66ee7db..0000000
--- a/iup/srclua3/iup_pplot.mak
+++ /dev/null
@@ -1,15 +0,0 @@
-PROJNAME = iup
-LIBNAME = iuplua_pplot3
-OPT = YES
-
-USE_LUA = Yes
-USE_CDLUA = Yes
-
-LOHDIR = loh
-SRCLUA = pplot.lua
-SRC = iuplua_pplot.c
-
-DEFINES = IUPLUA_USELOH
-INCLUDES = ../include
-LDIR = ../lib/$(TEC_UNAME)
-LIBS = iup iuplua3 iup_pplot iupcd
diff --git a/iup/srclua3/iupcd.mak b/iup/srclua3/iupcd.mak
deleted file mode 100755
index 36db871..0000000
--- a/iup/srclua3/iupcd.mak
+++ /dev/null
@@ -1,19 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluacd3
-OPT = YES
-
-DEF_FILE = iupluacd3.def
-SRC = iuplua_cd.c
-
-# Can not use USE_IUPLUA because Tecmake will include "iupluacd3" in linker
-
-INCLUDES = ../include
-LIBS = iuplua3
-LDIR = ../lib/$(TEC_UNAME)
-
-IUP := ..
-
-USE_CD = YES
-USE_IUP3 = YES
-USE_LUA = YES
-USE_CDLUA = YES
diff --git a/iup/srclua3/iupcontrols.mak b/iup/srclua3/iupcontrols.mak
deleted file mode 100755
index 4498ddf..0000000
--- a/iup/srclua3/iupcontrols.mak
+++ /dev/null
@@ -1,19 +0,0 @@
-BUILD_IUP3 = Yes
-
-PROJNAME = iup
-LIBNAME = iupluacontrols3
-OPT = YES
-
-USE_LUA = Yes
-USE_CDLUA = Yes
-
-LOHDIR = loh
-SRCLUA = dial.lua gauge.lua colorbar.lua \
- matrix.lua colorbrowser.lua cells.lua
-SRC = il_dial.c il_gauge.c il_colorbrowser.c il_colorbar.c il_cells.c \
- il_mask.c il_matrix.c iuplua_controls.c
-
-DEFINES = IUPLUA_USELOH
-INCLUDES = ../include
-LDIR = ../lib/$(TEC_UNAME)
-LIBS = iup iuplua3 iupcontrols iupcd
diff --git a/iup/srclua3/iupgl.mak b/iup/srclua3/iupgl.mak
deleted file mode 100755
index 3d65c48..0000000
--- a/iup/srclua3/iupgl.mak
+++ /dev/null
@@ -1,12 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluagl3
-OPT = YES
-
-USE_LUA = Yes
-USE_OPENGL = Yes
-
-SRC = iuplua_glcanvas.c
-
-INCLUDES = ../include
-LDIR = ../lib/$(TEC_UNAME)
-LIBS = iup iuplua3 iupgl
diff --git a/iup/srclua3/iupim.mak b/iup/srclua3/iupim.mak
deleted file mode 100755
index e4831ec..0000000
--- a/iup/srclua3/iupim.mak
+++ /dev/null
@@ -1,12 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluaim3
-OPT = YES
-
-USE_LUA = Yes
-USE_IM = Yes
-
-SRC = iuplua_im.c
-
-INCLUDES = ../include ../src
-LDIR = ../lib/$(TEC_UNAME)
-LIBS = iup iuplua3 iupim
diff --git a/iup/srclua3/iuplua.c b/iup/srclua3/iuplua.c
index 5563699..b243772 100755
--- a/iup/srclua3/iuplua.c
+++ b/iup/srclua3/iuplua.c
@@ -13,6 +13,7 @@
#include "iup.h"
#include "iupkey.h"
+#include "iup_str.h"
#include "iuplua.h"
#include "il.h"
@@ -372,13 +373,10 @@ int iuplua_dofile(char *filename)
return 0;
else
{
- int len = strlen(dir);
- char *full_name = malloc((len + strlen(filename) + 2) * sizeof(char));
+ char* full_name = iupStrFileMakeFileName(dir, filename);
if (!full_name)
return 0;
- strcpy(full_name, dir);
- strcat(full_name, "/");
- strcat(full_name, filename);
+
if (lua_dofile(full_name))
{
free(full_name);
diff --git a/iup/srclua3/iuplua_widgets.c b/iup/srclua3/iuplua_widgets.c
index 7591580..2186dea 100755
--- a/iup/srclua3/iuplua_widgets.c
+++ b/iup/srclua3/iuplua_widgets.c
@@ -200,6 +200,14 @@ static int dialog_trayclick(Ihandle *handle, int p1, int p2, int p3)
lua_pushnumber(p3);
return iuplua_call();
}
+
+static int dialog_copydata(Ihandle *handle, char* p1, int p2)
+{
+ iuplua_call_start(handle, "copydata");
+ lua_pushstring(p1);
+ lua_pushnumber(p2);
+ return iuplua_call();
+}
static int iupluaCanvasAction(Ihandle* handle, float x, float y)
{
@@ -619,6 +627,7 @@ int iupluawidgets_open(int tag)
{ "iup_destroy_cb", (lua_CFunction)iupluaDestroyCb},
{ "iup_dropfiles_cb", (lua_CFunction)iupluaDropfilesCb},
{ "iup_trayclick_cb", (lua_CFunction)dialog_trayclick},
+ { "iup_copydata_cb", (lua_CFunction)dialog_copydata},
{ "iup_getfocus_cb", (lua_CFunction)iupluaGetfocusCb},
{ "iup_killfocus_cb", (lua_CFunction)iupluaKillfocusCb},
{ "iup_k_any", (lua_CFunction)iupluaKanyCb},
diff --git a/iup/srclua3/iuplua_widgets.lua b/iup/srclua3/iuplua_widgets.lua
index a59bde6..a2af3ee 100755
--- a/iup/srclua3/iuplua_widgets.lua
+++ b/iup/srclua3/iuplua_widgets.lua
@@ -871,6 +871,7 @@ iup_callbacks =
scroll = {"SCROLL_CB", iup_scroll_cb},
trayclick = {"TRAYCLICK_CB", iup_trayclick_cb},
close = {"CLOSE_CB", iup_close_cb},
+ copydata = {"COPYDATA_CB", iup_copydata_cb},
open = {"OPEN_CB", iup_open_cb},
showcb = {"SHOW_CB", iup_show_cb},
mapcb = {"MAP_CB", iup_map_cb},
@@ -918,6 +919,7 @@ iup_callbacks.keypress_cb = iup_callbacks.keypress
iup_callbacks.scroll_cb = iup_callbacks.scroll
iup_callbacks.trayclick_cb = iup_callbacks.trayclick
iup_callbacks.close_cb = iup_callbacks.close
+iup_callbacks.copydata_cb = iup_callbacks.copydata
iup_callbacks.open_cb = iup_callbacks.open
iup_callbacks.show_cb = iup_callbacks.showcb
iup_callbacks.map_cb = iup_callbacks.mapcb
diff --git a/iup/srclua3/iupole.mak b/iup/srclua3/iupole.mak
deleted file mode 100755
index 30ea1f9..0000000
--- a/iup/srclua3/iupole.mak
+++ /dev/null
@@ -1,13 +0,0 @@
-PROJNAME = iup
-LIBNAME = iupluaole3
-OPT = YES
-
-USE_LUA = Yes
-USE_OPENGL = Yes
-
-SRC = iuplua_olecontrol.c
-
-INCLUDES = ../include
-LDIR = ../lib/$(TEC_UNAME)
-LIBS = iup iuplua3 iupole
-
diff --git a/iup/srclua3/make_uname b/iup/srclua3/make_uname
deleted file mode 100755
index f87a836..0000000
--- a/iup/srclua3/make_uname
+++ /dev/null
@@ -1,8 +0,0 @@
-#This builds all the libraries of the folder for 1 uname
-
-tecmake $1 $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iupcd $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iupcontrols $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iup_pplot $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iupgl $2 $3 $4 $5 $6 $7 $8
-tecmake $1 MF=iupim $2 $3 $4 $5 $6 $7 $8
diff --git a/iup/srclua3/make_uname.bat b/iup/srclua3/make_uname.bat
deleted file mode 100755
index 0cb97de..0000000
--- a/iup/srclua3/make_uname.bat
+++ /dev/null
@@ -1,10 +0,0 @@
-@echo off
-REM This builds all the libraries of the folder for 1 uname
-
-call tecmake %1 %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupcd" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupcontrols" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iup_pplot" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupgl" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupim" %2 %3 %4 %5 %6 %7 %8
-call tecmake %1 "MF=iupole" %2 %3 %4 %5 %6 %7 %8