From d16f00afbbac707bba729eb3874fac4c52273a91 Mon Sep 17 00:00:00 2001 From: scuri Date: Wed, 16 Dec 2009 13:20:08 +0000 Subject: *** empty log message *** --- mak.vc9/cd.sln | 20 +- mak.vc9/cdcore.vcproj | 598 ++++++++++++++++++++++++++++++++++++++++++++++ mak.vc9/cdsimple.vcproj | 2 +- mak.vc9/cdtestgdk.vcproj | 160 +++++++++++++ mak.vc9/cdtestplus.vcproj | 160 +++++++++++++ src/Makefile | 8 +- src/config.mak | 26 +- src/make_uname | 1 + src/make_uname.bat | 1 + test/cdtest/cdtest.c | 21 +- test/cdtest/config.mak | 8 + test/simple/config.mak | 6 + test/simple/iupmain.c | 7 +- test/simple/simple.c | 2 +- 14 files changed, 991 insertions(+), 29 deletions(-) create mode 100644 mak.vc9/cdcore.vcproj create mode 100644 mak.vc9/cdtestgdk.vcproj create mode 100644 mak.vc9/cdtestplus.vcproj diff --git a/mak.vc9/cd.sln b/mak.vc9/cd.sln index d3a7047..165a240 100644 --- a/mak.vc9/cd.sln +++ b/mak.vc9/cd.sln @@ -2,6 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdwin", "cd.vcproj", "{01818D2C-65AF-4D5C-9452-4DFF401C6461}" ProjectSection(ProjectDependencies) = postProject + {01818D2C-1234-4D5C-ABCD-4DFF401C6461} = {01818D2C-1234-4D5C-ABCD-4DFF401C6461} {01818D2C-65AF-AFDC-4356-1234401C6461} = {01818D2C-65AF-AFDC-4356-1234401C6461} EndProjectSection EndProject @@ -71,7 +72,6 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdtest", "cdtest.vcproj", "{A7E49FB8-700A-45EC-9174-FB1C2C7E83C9}" ProjectSection(ProjectDependencies) = postProject {01818D2C-65AF-4D5C-9452-4DFF401C6461} = {01818D2C-65AF-4D5C-9452-4DFF401C6461} - {51A96255-7EAB-4F36-A6E5-1BAF6245FA18} = {51A96255-7EAB-4F36-A6E5-1BAF6245FA18} {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} EndProjectSection EndProject @@ -95,6 +95,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdsimplegdk", "cdsimplegdk. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdcore", "cdcore.vcproj", "{01818D2C-1234-4D5C-ABCD-4DFF401C6461}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdtestgdk", "cdtestgdk.vcproj", "{A7E49FB8-0000-45EC-1234-ABCDC7E83C00}" + ProjectSection(ProjectDependencies) = postProject + {01818D2C-AAAA-4D5C-ABCD-1234401C6461} = {01818D2C-AAAA-4D5C-ABCD-1234401C6461} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdtestplus", "cdtestplus.vcproj", "{A7E49FB8-5467-45EC-2211-FFAB7E83C100}" + ProjectSection(ProjectDependencies) = postProject + {51A96255-7EAB-4F36-A6E5-1BAF6245FA18} = {51A96255-7EAB-4F36-A6E5-1BAF6245FA18} + {8441F69D-7135-43B2-974F-45C6123C8467} = {8441F69D-7135-43B2-974F-45C6123C8467} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -134,6 +146,10 @@ Global {82BC36B1-DDDD-41D4-ABCD-A12312378CE6}.Debug|Win32.Build.0 = Debug|Win32 {01818D2C-1234-4D5C-ABCD-4DFF401C6461}.Debug|Win32.ActiveCfg = Debug|Win32 {01818D2C-1234-4D5C-ABCD-4DFF401C6461}.Debug|Win32.Build.0 = Debug|Win32 + {A7E49FB8-0000-45EC-1234-ABCDC7E83C00}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7E49FB8-0000-45EC-1234-ABCDC7E83C00}.Debug|Win32.Build.0 = Debug|Win32 + {A7E49FB8-5467-45EC-2211-FFAB7E83C100}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7E49FB8-5467-45EC-2211-FFAB7E83C100}.Debug|Win32.Build.0 = Debug|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -148,6 +164,8 @@ Global {A7E49FB8-700A-45EC-9174-FB1C2C7E83C9} = {162715BD-4DB3-4007-8B50-725C0BD11878} {82BC36B1-9F7A-41D4-A24F-DBE012378CE6} = {162715BD-4DB3-4007-8B50-725C0BD11878} {82BC36B1-DDDD-41D4-ABCD-A12312378CE6} = {162715BD-4DB3-4007-8B50-725C0BD11878} + {A7E49FB8-0000-45EC-1234-ABCDC7E83C00} = {162715BD-4DB3-4007-8B50-725C0BD11878} + {A7E49FB8-5467-45EC-2211-FFAB7E83C100} = {162715BD-4DB3-4007-8B50-725C0BD11878} EndGlobalSection GlobalSection(DevPartner Solution Properties) = postSolution EndGlobalSection diff --git a/mak.vc9/cdcore.vcproj b/mak.vc9/cdcore.vcproj new file mode 100644 index 0000000..ad3ac36 --- /dev/null +++ b/mak.vc9/cdcore.vcproj @@ -0,0 +1,598 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mak.vc9/cdsimple.vcproj b/mak.vc9/cdsimple.vcproj index 64edbe8..0afcf41 100644 --- a/mak.vc9/cdsimple.vcproj +++ b/mak.vc9/cdsimple.vcproj @@ -44,7 +44,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\include,..\..\iup\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;__CD__;simple;_CRT_SECURE_NO_DEPRECATE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;__CD__;simple;_CRT_SECURE_NO_DEPRECATE;USE_CONTEXTPLUS" BasicRuntimeChecks="3" RuntimeLibrary="1" PrecompiledHeaderFile=".\..\obj\cdsimple/cdsimple.pch" diff --git a/mak.vc9/cdtestgdk.vcproj b/mak.vc9/cdtestgdk.vcproj new file mode 100644 index 0000000..e9bd027 --- /dev/null +++ b/mak.vc9/cdtestgdk.vcproj @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mak.vc9/cdtestplus.vcproj b/mak.vc9/cdtestplus.vcproj new file mode 100644 index 0000000..dc3a9ad --- /dev/null +++ b/mak.vc9/cdtestplus.vcproj @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Makefile b/src/Makefile index f01667c..d2f5e0d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,12 +1,14 @@ -.PHONY: do_all cd_freetype cd cd_pdflib cdpdf cdcontextplus cdlua3 cdluapdf3 cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 -#do_all: cd_freetype cd cd_pdflib cdpdf cdcontextplus cdlua3 cdluapdf3 cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 -do_all: cd_freetype cd cd_pdflib cdpdf cdcontextplus cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 +.PHONY: do_all cd_freetype cd cdgdk cd_pdflib cdpdf cdcontextplus cdlua3 cdluapdf3 cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 +#do_all: cd_freetype cd cdgdk cd_pdflib cdpdf cdcontextplus cdlua3 cdluapdf3 cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 +do_all: cd_freetype cd cdgdk cd_pdflib cdpdf cdcontextplus cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 cd_freetype: @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=cd_freetype cd: @$(MAKE) --no-print-directory -f tecmake_compact.mak +cdgdk: + @$(MAKE) --no-print-directory -f tecmake_compact.mak USE_GDK=Yes cd_pdflib: @$(MAKE) --no-print-directory -f tecmake_compact.mak MF=cd_pdflib cdpdf: diff --git a/src/config.mak b/src/config.mak index 725b87d..a2296cb 100644 --- a/src/config.mak +++ b/src/config.mak @@ -12,15 +12,18 @@ SRCINTCGM = circle.c ellipse.c intcgm1.c \ sism.c tparse.c bparse.c SRCINTCGM := $(addprefix intcgm/, $(SRCINTCGM)) -SRCWIN32 = cdwclp.c cdwemf.c cdwimg.c cdwin.c cdwnative.c cdwprn.c cdwwmf.c wmf_emf.c cdwdbuf.c cdwdib.c -SRCWIN32 := $(addprefix win32/, $(SRCWIN32)) - SRCSIM := cdfontex.c sim.c cd_truetype.c sim_other.c sim_primitives.c sim_text.c sim_linepolyfill.c SRCSIM := $(addprefix sim/, $(SRCSIM)) +SRCWIN32 = cdwclp.c cdwemf.c cdwimg.c cdwin.c cdwnative.c cdwprn.c cdwwmf.c wmf_emf.c cdwdbuf.c cdwdib.c +SRCWIN32 := $(addprefix win32/, $(SRCWIN32)) + SRCX11 = cdx11.c cdxclp.c cdximg.c cdxnative.c cdxdbuf.c xvertex.c SRCX11 := $(addprefix x11/, $(SRCX11)) +SRCGDK = cdgdk.c cdgdkclp.c cdgdkdbuf.c cdgdkimg.c cdgdknative.c +SRCGDK := $(addprefix gdk/, $(SRCGDK)) + SRCDRV = cddgn.c cdcgm.c cgm.c cddxf.c cdirgb.c cdmf.c cdps.c cdpicture.c cddebug.c SRCDRV := $(addprefix drv/, $(SRCDRV)) @@ -33,11 +36,22 @@ SRCCOMM = cd.c wd.c wdhdcpy.c rgb2map.c cd_vectortext.c cd_active.c \ SRC = $(SRCCOMM) $(SRCSVG) $(SRCINTCGM) $(SRCDRV) $(SRCSIM) ifneq ($(findstring Win, $(TEC_SYSNAME)), ) - SRC += $(SRCWIN32) + ifdef USE_GDK + SRC += $(SRCGDK) + LIBNAME = cdgdk + else + SRC += $(SRCWIN32) + endif LIBS = freetype6 else - SRC += $(SRCNULL) $(SRCX11) - USE_X11 = Yes + ifdef USE_GDK + SRC += $(SRCGDK) + LIBNAME = cdgdk + else + SRC += $(SRCX11) + USE_X11 = Yes + endif + SRC += $(SRCNULL) LIBS = freetype endif diff --git a/src/make_uname b/src/make_uname index 6de18ef..8c2f35e 100644 --- a/src/make_uname +++ b/src/make_uname @@ -2,6 +2,7 @@ tecmake $1 MF=cd_freetype $2 $3 $4 $5 $6 $7 $8 tecmake $1 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 USE_GDK=Yes $2 $3 $4 $5 $6 $7 $8 tecmake $1 MF=cd_pdflib $2 $3 $4 $5 $6 $7 $8 tecmake $1 MF=cdpdf $2 $3 $4 $5 $6 $7 $8 #tecmake $1 MF=cdlua3 $2 $3 $4 $5 $6 $7 $8 diff --git a/src/make_uname.bat b/src/make_uname.bat index 70c3510..7ac2147 100644 --- a/src/make_uname.bat +++ b/src/make_uname.bat @@ -6,6 +6,7 @@ if "%1"=="vc-all" goto all-vc call tecmake %1 "MF=cd_freetype" %2 %3 %4 %5 %6 %7 %8 call tecmake %1 %2 %3 %4 %5 %6 %7 %8 +call tecmake %1 "USE_GDK=Yes" %1 %2 %3 %4 %5 %6 %7 %8 call tecmake %1 "MF=cd_pdflib" %2 %3 %4 %5 %6 %7 %8 call tecmake %1 "MF=cdpdf" %2 %3 %4 %5 %6 %7 %8 REM call tecmake %1 "MF=cdlua3" %2 %3 %4 %5 %6 %7 %8 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(); -- cgit v1.2.3