summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorscuri <scuri>2009-12-16 13:20:08 +0000
committerscuri <scuri>2009-12-16 13:20:08 +0000
commitd16f00afbbac707bba729eb3874fac4c52273a91 (patch)
tree3c92a5551573f4ba88cc525803d1756fff5e45fb /test
parent130c513d903cc7d3d67f9fcb82d9b1a964cf0f08 (diff)
*** empty log message ***
Diffstat (limited to 'test')
-rw-r--r--test/cdtest/cdtest.c21
-rw-r--r--test/cdtest/config.mak8
-rw-r--r--test/simple/config.mak6
-rw-r--r--test/simple/iupmain.c7
-rw-r--r--test/simple/simple.c2
5 files changed, 26 insertions, 18 deletions
diff --git a/test/cdtest/cdtest.c b/test/cdtest/cdtest.c
index f5aa9f4..1e6375b 100644
--- a/test/cdtest/cdtest.c
+++ b/test/cdtest/cdtest.c
@@ -38,12 +38,11 @@ tPixelPos pixel_pos;
tMarkPos mark_pos;
tArcPos arc_pos;
-//#define USE_GDIPLUS
-#ifdef USE_GDIPLUS
-static const int use_gdiplus = 1;
+#ifdef USE_CONTEXTPLUS
+static const int use_contextplus = 1;
#else
-static const int use_gdiplus = 0;
+static const int use_contextplus = 0;
#endif
static const int antialias = 1;
@@ -228,7 +227,7 @@ void CDTestInit(void)
{
memset(&ctgc, 0, sizeof(ctgc));
- if (use_gdiplus)
+ if (use_contextplus)
{
#ifdef USE_GDIPLUS
cdInitContextPlus();
@@ -245,11 +244,11 @@ void CDTestInit(void)
ColorBarInit(IupGetHandle("dlgMain"), IupGetHandle("cnvColorBar"), &ctgc.foreground, &ctgc.background);
/* cria o canvas do CD associado ao canvas do IUP */
- if (use_gdiplus) cdUseContextPlus(1);
+ if (use_contextplus) cdUseContextPlus(1);
ctgc.iup_canvas = cdCreateCanvas(CD_IUP, IupGetHandle("cnvMain"));
if (!antialias) cdCanvasSetAttribute(ctgc.iup_canvas, "ANTIALIAS", "0");
cdActivate(ctgc.iup_canvas);
- if (use_gdiplus) cdUseContextPlus(0);
+ if (use_contextplus) cdUseContextPlus(0);
/* associa os call-backs */
setcallbacks();
@@ -352,11 +351,11 @@ void CDTestInit(void)
IupMap(IupGetHandle("dlgPICCanvas"));
/* cria o canvas WD */
- if (use_gdiplus) cdUseContextPlus(1);
+ if (use_contextplus) cdUseContextPlus(1);
ctgc.wd_canvas = cdCreateCanvas(CD_IUP, IupGetHandle("cnvWDCanvas"));
ctgc.pic_canvas = cdCreateCanvas(CD_IUP, IupGetHandle("cnvPICCanvas"));
ctgc.picture = cdCreateCanvas(CD_PICTURE, "");
- if (use_gdiplus) cdUseContextPlus(0);
+ if (use_contextplus) cdUseContextPlus(0);
/* CDTEST default values */
cdActivate(ctgc.picture);
@@ -989,10 +988,10 @@ int fImageBuffer(Ihandle *self, int v)
/* prosegue como se nao houvesse o buffer anterior */
case NO_BUFFER:
/* cria o canvas do buffer */
- if (use_gdiplus) cdUseContextPlus(1);
+ if (use_contextplus) cdUseContextPlus(1);
ctgc.buffer_canvas = cdCreateCanvas(CD_DBUFFER, ctgc.iup_canvas);
if (!antialias) cdCanvasSetAttribute(ctgc.buffer_canvas, "ANTIALIAS", "0");
- if (use_gdiplus) cdUseContextPlus(0);
+ if (use_contextplus) cdUseContextPlus(0);
/* se nao consegui criar o canvas... */
if (!ctgc.buffer_canvas) {
/* desabilita o double-buffering */
diff --git a/test/cdtest/config.mak b/test/cdtest/config.mak
index fc1fb4a..201e44b 100644
--- a/test/cdtest/config.mak
+++ b/test/cdtest/config.mak
@@ -1,5 +1,13 @@
APPNAME = cdtest
+ifdef USE_GDK
+ APPNAME = cdtestgdk
+endif
+ifdef USE_CONTEXTPLUS
+ APPNAME = cdtestplus
+ DEFINES = USE_CONTEXTPLUS
+endif
+
SRC = cdtest.c cdtest_led.c colorbar.c drivers.c list.c rubber.c
ifeq "$(TEC_SYSNAME)" "Win32"
diff --git a/test/simple/config.mak b/test/simple/config.mak
index 9598d84..a929c97 100644
--- a/test/simple/config.mak
+++ b/test/simple/config.mak
@@ -1,5 +1,11 @@
APPNAME = simple
+ifdef USE_GDK
+ APPNAME = simplegdk
+else
+ DEFINES = USE_CONTEXTPLUS
+endif
+
SRC = simple.c simple_led.c iupmain.c
#DBG = Yes
diff --git a/test/simple/iupmain.c b/test/simple/iupmain.c
index 2f2efc1..daf058a 100644
--- a/test/simple/iupmain.c
+++ b/test/simple/iupmain.c
@@ -15,20 +15,15 @@ int main(int argc, char** argv)
{
IupOpen(&argc, &argv);
-#ifndef USE_GDK
+#ifdef USE_CONTEXTPLUS
cdInitContextPlus();
#endif
simple_loadled();
-#ifdef USE_GDK
- IupSetAttribute(IupGetHandle("SimpleCanvas"), "CD_GDK", "YES");
-#endif
-
IupSetAttribute(IupGetHandle("SimpleDialog"), "PLACEMENT", "MAXIMIZED");
IupShow(IupGetHandle("SimpleDialog"));
-
SimpleCreateCanvas((char*)IupGetHandle("SimpleCanvas"));
IupSetFunction("cmdExit", (Icallback) cmdExit);
diff --git a/test/simple/simple.c b/test/simple/simple.c
index 889185f..d04b96c 100644
--- a/test/simple/simple.c
+++ b/test/simple/simple.c
@@ -150,7 +150,7 @@ int SimpleTransform(void)
int SimpleContextPlus(void)
{
-#ifndef USE_GDK
+#ifdef USE_CONTEXTPLUS
gdpiplus = !gdpiplus;
SimpleKillCanvas();
SimpleCreateCanvasWindow();