From 4e5fa02802494fb47ac760cc3d92e19c94f64c02 Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Thu, 3 Dec 2015 12:30:25 +0300 Subject: [PATCH] Update configuration settings --- 3rdparty/win32/commctrl.d | 1 + 3rdparty/win32/commdlg.d | 1 + 3rdparty/win32/ddeml.d | 1 + 3rdparty/win32/imm.d | 1 + 3rdparty/win32/lzexpand.d | 1 + 3rdparty/win32/mmsystem.d | 1 + 3rdparty/win32/prsht.d | 1 + 3rdparty/win32/psapi.d | 1 + 3rdparty/win32/rpcdce.d | 1 + 3rdparty/win32/rpcdcep.d | 1 + 3rdparty/win32/rpcnsi.d | 1 + 3rdparty/win32/shellapi.d | 1 + 3rdparty/win32/shlobj.d | 1 + 3rdparty/win32/w32api.d | 1 + 3rdparty/win32/winbase.d | 1 + 3rdparty/win32/wincon.d | 1 + 3rdparty/win32/windef.d | 2 +- 3rdparty/win32/wingdi.d | 1 + 3rdparty/win32/winnetwk.d | 1 + 3rdparty/win32/winnls.d | 1 + 3rdparty/win32/winnt.d | 1 + 3rdparty/win32/winsock2.d | 1 + 3rdparty/win32/winspool.d | 1 + 3rdparty/win32/winsvc.d | 1 + 3rdparty/win32/winuser.d | 1 + 3rdparty/win32/winver.d | 1 + 3rdparty/win32/ws2tcpip.d | 1 + dlangui-msvc.visualdproj | 9 ++--- examples/d3d/d3d-msvc.visualdproj | 8 ++--- examples/dmledit/dmledit-msvc.visualdproj | 8 ++--- examples/example1/example1-msvc.visualdproj | 8 ++--- .../helloworld/helloworld-msvc.visualdproj | 8 ++--- .../spreadsheet/spreadsheet-msvc.visualdproj | 8 ++--- examples/tetris/tetris-msvc.visualdproj | 8 ++--- src/dlangui/core/config.d | 35 +++++++++++++++++++ src/dlangui/core/types.d | 2 ++ src/dlangui/graphics/drawbuf.d | 1 + src/dlangui/graphics/fonts.d | 2 ++ src/dlangui/graphics/ftfonts.d | 1 + src/dlangui/graphics/gldrawbuf.d | 1 + src/dlangui/graphics/glsupport.d | 1 + src/dlangui/graphics/images.d | 2 ++ src/dlangui/platforms/common/platform.d | 11 +----- src/dlangui/platforms/common/startup.d | 1 + src/dlangui/platforms/dsfml/dsfmlapp.d | 2 ++ src/dlangui/platforms/sdl/sdlapp.d | 1 + src/dlangui/platforms/windows/win32drawbuf.d | 9 ++--- src/dlangui/platforms/windows/win32fonts.d | 1 + src/dlangui/platforms/windows/winapp.d | 4 ++- src/dlangui/platforms/x11/x11app.d | 1 + 50 files changed, 116 insertions(+), 44 deletions(-) create mode 100644 src/dlangui/core/config.d diff --git a/3rdparty/win32/commctrl.d b/3rdparty/win32/commctrl.d index b78dad4e..775fb3aa 100644 --- a/3rdparty/win32/commctrl.d +++ b/3rdparty/win32/commctrl.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.commctrl; version(Windows): +version = Unicode; pragma(lib, "comctl32"); private import win32.w32api, win32.windef, win32.winuser; diff --git a/3rdparty/win32/commdlg.d b/3rdparty/win32/commdlg.d index 03bb9d91..aaabe17b 100644 --- a/3rdparty/win32/commdlg.d +++ b/3rdparty/win32/commdlg.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.commdlg; version(Windows): +version = Unicode; pragma(lib, "comdlg32"); private import win32.w32api; diff --git a/3rdparty/win32/ddeml.d b/3rdparty/win32/ddeml.d index fc46f078..780de123 100644 --- a/3rdparty/win32/ddeml.d +++ b/3rdparty/win32/ddeml.d @@ -10,6 +10,7 @@ \***********************************************************************/ module win32.ddeml; version(Windows): +version = Unicode; pragma(lib, "user32"); private import win32.basetsd, win32.windef, win32.winnt; diff --git a/3rdparty/win32/imm.d b/3rdparty/win32/imm.d index d49cee1f..578b1815 100644 --- a/3rdparty/win32/imm.d +++ b/3rdparty/win32/imm.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.imm; version(Windows): +version = Unicode; pragma(lib, "imm32"); import win32.windef, win32.wingdi; diff --git a/3rdparty/win32/lzexpand.d b/3rdparty/win32/lzexpand.d index 7201fd62..d4f64f56 100644 --- a/3rdparty/win32/lzexpand.d +++ b/3rdparty/win32/lzexpand.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.lzexpand; version(Windows): +version = Unicode; pragma(lib, "lz32"); private import win32.winbase, win32.windef; diff --git a/3rdparty/win32/mmsystem.d b/3rdparty/win32/mmsystem.d index 9a0368ca..d82e67d3 100644 --- a/3rdparty/win32/mmsystem.d +++ b/3rdparty/win32/mmsystem.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.mmsystem; version(Windows): +version = Unicode; pragma(lib, "winmm"); /* The #defines MAKEFOURCC, mmioFOURCC, sndAlias are used to define diff --git a/3rdparty/win32/prsht.d b/3rdparty/win32/prsht.d index 92a75bfd..1a2bc989 100644 --- a/3rdparty/win32/prsht.d +++ b/3rdparty/win32/prsht.d @@ -10,6 +10,7 @@ \***********************************************************************/ module win32.prsht; version(Windows): +version = Unicode; pragma(lib, "comctl32"); private import win32.w32api, win32.windef, win32.winuser; diff --git a/3rdparty/win32/psapi.d b/3rdparty/win32/psapi.d index f84175a0..bab39233 100644 --- a/3rdparty/win32/psapi.d +++ b/3rdparty/win32/psapi.d @@ -14,6 +14,7 @@ module win32.psapi; version(Windows): +version = Unicode; private import win32.w32api; private import win32.winbase; diff --git a/3rdparty/win32/rpcdce.d b/3rdparty/win32/rpcdce.d index f55fc0bf..59129bc1 100644 --- a/3rdparty/win32/rpcdce.d +++ b/3rdparty/win32/rpcdce.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.rpcdce; version(Windows): +version = Unicode; pragma(lib, "Rpcrt4"); // TODO: I think MinGW got this wrong. RPC_UNICODE_SUPPORTED should be diff --git a/3rdparty/win32/rpcdcep.d b/3rdparty/win32/rpcdcep.d index a7098e94..e142d602 100644 --- a/3rdparty/win32/rpcdcep.d +++ b/3rdparty/win32/rpcdcep.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.rpcdcep; version(Windows): +version = Unicode; private import win32.basetyps; private import win32.w32api; diff --git a/3rdparty/win32/rpcnsi.d b/3rdparty/win32/rpcnsi.d index 62fb80c4..fd47a306 100644 --- a/3rdparty/win32/rpcnsi.d +++ b/3rdparty/win32/rpcnsi.d @@ -10,6 +10,7 @@ \***********************************************************************/ module win32.rpcnsi; version(Windows): +version = Unicode; pragma(lib, "rpcns4"); private import win32.basetyps, win32.rpcdcep, win32.rpcnsi, win32.rpcdce, diff --git a/3rdparty/win32/shellapi.d b/3rdparty/win32/shellapi.d index 25350bdd..028659eb 100644 --- a/3rdparty/win32/shellapi.d +++ b/3rdparty/win32/shellapi.d @@ -10,6 +10,7 @@ \***********************************************************************/ module win32.shellapi; version(Windows): +version = Unicode; pragma(lib, "shell32"); private import win32.w32api, win32.windef, win32.basetyps; diff --git a/3rdparty/win32/shlobj.d b/3rdparty/win32/shlobj.d index 7aaa90c6..1412adee 100644 --- a/3rdparty/win32/shlobj.d +++ b/3rdparty/win32/shlobj.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.shlobj; version(Windows): +version = Unicode; pragma(lib, "shell32"); // TODO: fix bitfields diff --git a/3rdparty/win32/w32api.d b/3rdparty/win32/w32api.d index c6ba5a0d..a1311d5f 100644 --- a/3rdparty/win32/w32api.d +++ b/3rdparty/win32/w32api.d @@ -10,6 +10,7 @@ \***********************************************************************/ module win32.w32api; version(Windows): +version = Unicode; enum __W32API_VERSION = 3.17; enum __W32API_MAJOR_VERSION = 3; diff --git a/3rdparty/win32/winbase.d b/3rdparty/win32/winbase.d index 567dbaff..8331e47d 100644 --- a/3rdparty/win32/winbase.d +++ b/3rdparty/win32/winbase.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.winbase; version(Windows): +version = Unicode; pragma(lib, "kernel32"); /** diff --git a/3rdparty/win32/wincon.d b/3rdparty/win32/wincon.d index 5d4c834f..81d07e5b 100644 --- a/3rdparty/win32/wincon.d +++ b/3rdparty/win32/wincon.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.wincon; version(Windows): +version = Unicode; pragma(lib, "kernel32"); private import win32.w32api, win32.windef; diff --git a/3rdparty/win32/windef.d b/3rdparty/win32/windef.d index ca5cfc7e..41386bc8 100644 --- a/3rdparty/win32/windef.d +++ b/3rdparty/win32/windef.d @@ -10,7 +10,7 @@ \***********************************************************************/ module win32.windef; version(Windows): - +version = Unicode; public import win32.winnt; private import win32.w32api; diff --git a/3rdparty/win32/wingdi.d b/3rdparty/win32/wingdi.d index 7e62fa97..8becb267 100644 --- a/3rdparty/win32/wingdi.d +++ b/3rdparty/win32/wingdi.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.wingdi; version(Windows): +version = Unicode; pragma(lib, "gdi32"); // FIXME: clean up Windows version support diff --git a/3rdparty/win32/winnetwk.d b/3rdparty/win32/winnetwk.d index d3809b61..2514daaa 100644 --- a/3rdparty/win32/winnetwk.d +++ b/3rdparty/win32/winnetwk.d @@ -10,6 +10,7 @@ \***********************************************************************/ module win32.winnetwk; version(Windows): +version = Unicode; pragma(lib, "mpr"); private import win32.winbase, win32.winerror, win32.winnt; diff --git a/3rdparty/win32/winnls.d b/3rdparty/win32/winnls.d index 610e4d19..5866ab5a 100644 --- a/3rdparty/win32/winnls.d +++ b/3rdparty/win32/winnls.d @@ -10,6 +10,7 @@ \***********************************************************************/ module win32.winnls; version(Windows): +version = Unicode; pragma(lib, "kernel32"); private import win32.basetsd, win32.w32api, win32.winbase, win32.windef; diff --git a/3rdparty/win32/winnt.d b/3rdparty/win32/winnt.d index 513b1660..ee85ddd3 100644 --- a/3rdparty/win32/winnt.d +++ b/3rdparty/win32/winnt.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.winnt; version(Windows): +version = Unicode; public import win32.basetsd, win32.windef, win32.winerror; private import win32.w32api; diff --git a/3rdparty/win32/winsock2.d b/3rdparty/win32/winsock2.d index a83c1414..f580ecf9 100644 --- a/3rdparty/win32/winsock2.d +++ b/3rdparty/win32/winsock2.d @@ -8,6 +8,7 @@ \***********************************************************************/ module win32.winsock2; version(Windows): +version = Unicode; pragma(lib, "Ws2_32"); /* diff --git a/3rdparty/win32/winspool.d b/3rdparty/win32/winspool.d index 9be719ca..61b87d4b 100644 --- a/3rdparty/win32/winspool.d +++ b/3rdparty/win32/winspool.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.winspool; version(Windows): +version = Unicode; pragma(lib, "winspool"); private import win32.w32api, win32.windef, win32.wingdi; diff --git a/3rdparty/win32/winsvc.d b/3rdparty/win32/winsvc.d index 033db4b4..4da4440d 100644 --- a/3rdparty/win32/winsvc.d +++ b/3rdparty/win32/winsvc.d @@ -10,6 +10,7 @@ \***********************************************************************/ module win32.winsvc; version(Windows): +version = Unicode; pragma(lib, "advapi32"); private import win32.w32api, win32.windef; diff --git a/3rdparty/win32/winuser.d b/3rdparty/win32/winuser.d index 351cad39..824c2ca4 100644 --- a/3rdparty/win32/winuser.d +++ b/3rdparty/win32/winuser.d @@ -9,6 +9,7 @@ \***********************************************************************/ module win32.winuser; version(Windows): +version = Unicode; pragma(lib, "user32"); // Conversion Notes: diff --git a/3rdparty/win32/winver.d b/3rdparty/win32/winver.d index dc17c022..55b59187 100644 --- a/3rdparty/win32/winver.d +++ b/3rdparty/win32/winver.d @@ -10,6 +10,7 @@ \***********************************************************************/ module win32.winver; version(Windows): +version = Unicode; pragma(lib, "version"); private import win32.windef; diff --git a/3rdparty/win32/ws2tcpip.d b/3rdparty/win32/ws2tcpip.d index 750ad4b7..422fe744 100644 --- a/3rdparty/win32/ws2tcpip.d +++ b/3rdparty/win32/ws2tcpip.d @@ -10,6 +10,7 @@ module win32.ws2tcpip; version(Windows): +version = Unicode; import win32.w32api; //import win32.winbase; diff --git a/dlangui-msvc.visualdproj b/dlangui-msvc.visualdproj index b9b124e3..acd884f3 100644 --- a/dlangui-msvc.visualdproj +++ b/dlangui-msvc.visualdproj @@ -72,7 +72,7 @@ 0 0 - Unicode EmbedStandardResources ForceLogs + EmbedStandardResources ForceLogs 0 0 0 @@ -174,7 +174,7 @@ 0 0 - Unicode EmbedStandardResources ForceLogs + EmbedStandardResources ForceLogs 0 0 0 @@ -276,7 +276,7 @@ 0 0 - Unicode EmbedStandardResources ForceLogs + EmbedStandardResources ForceLogs 0 0 0 @@ -378,7 +378,7 @@ 0 0 - Unicode EmbedStandardResources ForceLogs + EmbedStandardResources ForceLogs 0 0 0 @@ -561,6 +561,7 @@ + diff --git a/examples/d3d/d3d-msvc.visualdproj b/examples/d3d/d3d-msvc.visualdproj index b6a3df2c..8c874af7 100644 --- a/examples/d3d/d3d-msvc.visualdproj +++ b/examples/d3d/d3d-msvc.visualdproj @@ -72,7 +72,7 @@ 0 0 - Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources + EmbedStandardResources 0 0 0 @@ -174,7 +174,7 @@ 0 0 - Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources + EmbedStandardResources 0 0 0 @@ -276,7 +276,7 @@ 0 0 - Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources + EmbedStandardResources 0 0 0 @@ -378,7 +378,7 @@ 0 0 - Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources + EmbedStandardResources 0 0 0 diff --git a/examples/dmledit/dmledit-msvc.visualdproj b/examples/dmledit/dmledit-msvc.visualdproj index 739a44ee..c97328ad 100644 --- a/examples/dmledit/dmledit-msvc.visualdproj +++ b/examples/dmledit/dmledit-msvc.visualdproj @@ -72,7 +72,7 @@ 0 0 - Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources ForceLogs + USE_OPENGL EmbedStandardResources ForceLogs 0 0 0 @@ -174,7 +174,7 @@ 0 0 - Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources ForceLogs + USE_OPENGL EmbedStandardResources ForceLogs 0 0 0 @@ -276,7 +276,7 @@ 0 0 - Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources ForceLogs + USE_OPENGL EmbedStandardResources ForceLogs 0 0 0 @@ -378,7 +378,7 @@ 0 0 - Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources ForceLogs + USE_OPENGL EmbedStandardResources ForceLogs 0 0 0 diff --git a/examples/example1/example1-msvc.visualdproj b/examples/example1/example1-msvc.visualdproj index 4557b38b..a0153dc0 100644 --- a/examples/example1/example1-msvc.visualdproj +++ b/examples/example1/example1-msvc.visualdproj @@ -72,7 +72,7 @@ 0 0 - EmbedStandardResources Unicode ForceLogs + USE_OPENGL EmbedStandardResources ForceLogs 0 0 0 @@ -174,7 +174,7 @@ 0 0 - EmbedStandardResources Unicode ForceLogs + USE_OPENGL EmbedStandardResources ForceLogs 0 0 0 @@ -276,7 +276,7 @@ 0 0 - EmbedStandardResources Unicode ForceLogs + USE_OPENGL EmbedStandardResources ForceLogs 0 0 0 @@ -378,7 +378,7 @@ 0 0 - EmbedStandardResources Unicode ForceLogs + USE_OPENGL EmbedStandardResources ForceLogs 0 0 0 diff --git a/examples/helloworld/helloworld-msvc.visualdproj b/examples/helloworld/helloworld-msvc.visualdproj index 1682169e..fcfa59e8 100644 --- a/examples/helloworld/helloworld-msvc.visualdproj +++ b/examples/helloworld/helloworld-msvc.visualdproj @@ -72,7 +72,7 @@ 0 0 - EmbedStandardResources Unicode USE_FREETYPE + EmbedStandardResources 0 0 0 @@ -174,7 +174,7 @@ 0 0 - EmbedStandardResources Unicode USE_FREETYPE + EmbedStandardResources 0 0 0 @@ -276,7 +276,7 @@ 0 0 - EmbedStandardResources Unicode USE_FREETYPE + EmbedStandardResources 0 0 0 @@ -378,7 +378,7 @@ 0 0 - EmbedStandardResources Unicode USE_FREETYPE + EmbedStandardResources 0 0 0 diff --git a/examples/spreadsheet/spreadsheet-msvc.visualdproj b/examples/spreadsheet/spreadsheet-msvc.visualdproj index 16e8e2cf..d5ec4022 100644 --- a/examples/spreadsheet/spreadsheet-msvc.visualdproj +++ b/examples/spreadsheet/spreadsheet-msvc.visualdproj @@ -72,7 +72,7 @@ 0 0 - Unicode EmbedStandardResources + EmbedStandardResources 0 0 0 @@ -174,7 +174,7 @@ 0 0 - Unicode EmbedStandardResources + EmbedStandardResources 0 0 0 @@ -276,7 +276,7 @@ 0 0 - Unicode EmbedStandardResources + EmbedStandardResources 0 0 0 @@ -378,7 +378,7 @@ 0 0 - Unicode EmbedStandardResources + EmbedStandardResources 0 0 0 diff --git a/examples/tetris/tetris-msvc.visualdproj b/examples/tetris/tetris-msvc.visualdproj index 57fc3185..74ab211f 100644 --- a/examples/tetris/tetris-msvc.visualdproj +++ b/examples/tetris/tetris-msvc.visualdproj @@ -72,7 +72,7 @@ 0 0 - EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL + EmbedStandardResources 0 0 0 @@ -174,7 +174,7 @@ 0 0 - EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL + EmbedStandardResources 0 0 0 @@ -276,7 +276,7 @@ 0 0 - EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL + EmbedStandardResources 0 0 0 @@ -378,7 +378,7 @@ 0 0 - EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL + EmbedStandardResources 0 0 0 diff --git a/src/dlangui/core/config.d b/src/dlangui/core/config.d new file mode 100644 index 00000000..65890c70 --- /dev/null +++ b/src/dlangui/core/config.d @@ -0,0 +1,35 @@ +module dlangui.core.config; + +version (Windows) { + // force Unicode definition under Windows + version = Unicode; +} else { + version = USE_FREETYPE; +} + +// provide default configuratino definitions +version (USE_SDL) { + // SDL backend already selected +} else version (USE_X11) { + // X11 backend already selected +} else version (USE_DSFML) { + // DSFML backend already selected +} else { + version (Windows) { + // For Windows + // by default: no freetype + version = USE_OPENGL; + } else version(linux) { + // Default for Linux: use SDL and OpenGL + version = USE_SDL; + version = USE_OPENGL; + } else version(OSX) { + // Default: use SDL and OpenGL + version = USE_SDL; + version = USE_OPENGL; + } else { + // Unknown platform: use SDL and OpenGL + version = USE_SDL; + version = USE_OPENGL; + } +} diff --git a/src/dlangui/core/types.d b/src/dlangui/core/types.d index bdcc1b08..efc51282 100644 --- a/src/dlangui/core/types.d +++ b/src/dlangui/core/types.d @@ -41,6 +41,8 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.core.types; +public import dlangui.core.config; + import std.algorithm; /** 2D point */ diff --git a/src/dlangui/graphics/drawbuf.d b/src/dlangui/graphics/drawbuf.d index e02dfc61..82112222 100644 --- a/src/dlangui/graphics/drawbuf.d +++ b/src/dlangui/graphics/drawbuf.d @@ -17,6 +17,7 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.graphics.drawbuf; +public import dlangui.core.config; public import dlangui.core.types; import dlangui.core.logger; import dlangui.graphics.colors; diff --git a/src/dlangui/graphics/fonts.d b/src/dlangui/graphics/fonts.d index 39fccb35..d7eabd81 100644 --- a/src/dlangui/graphics/fonts.d +++ b/src/dlangui/graphics/fonts.d @@ -42,6 +42,8 @@ License: Boost License 1.0 Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.graphics.fonts; + +public import dlangui.core.config; public import dlangui.graphics.drawbuf; public import dlangui.core.types; public import dlangui.core.logger; diff --git a/src/dlangui/graphics/ftfonts.d b/src/dlangui/graphics/ftfonts.d index a7477e2f..59ec97bb 100644 --- a/src/dlangui/graphics/ftfonts.d +++ b/src/dlangui/graphics/ftfonts.d @@ -9,6 +9,7 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.graphics.ftfonts; +public import dlangui.core.config; version(USE_FREETYPE): import dlangui.graphics.fonts; diff --git a/src/dlangui/graphics/gldrawbuf.d b/src/dlangui/graphics/gldrawbuf.d index 80377410..057c182f 100644 --- a/src/dlangui/graphics/gldrawbuf.d +++ b/src/dlangui/graphics/gldrawbuf.d @@ -18,6 +18,7 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.graphics.gldrawbuf; +public import dlangui.core.config; version (USE_OPENGL): import dlangui.graphics.drawbuf; diff --git a/src/dlangui/graphics/glsupport.d b/src/dlangui/graphics/glsupport.d index dc28dc8c..82b3b5af 100644 --- a/src/dlangui/graphics/glsupport.d +++ b/src/dlangui/graphics/glsupport.d @@ -18,6 +18,7 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.graphics.glsupport; +public import dlangui.core.config; version(USE_OPENGL): import dlangui.core.logger; diff --git a/src/dlangui/graphics/images.d b/src/dlangui/graphics/images.d index e31d6b5d..13280100 100644 --- a/src/dlangui/graphics/images.d +++ b/src/dlangui/graphics/images.d @@ -20,6 +20,8 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.graphics.images; +public import dlangui.core.config; + //version = USE_DEIMAGE; version = USE_DLIBIMAGE; diff --git a/src/dlangui/platforms/common/platform.d b/src/dlangui/platforms/common/platform.d index 39ac1471..8b13ab9e 100644 --- a/src/dlangui/platforms/common/platform.d +++ b/src/dlangui/platforms/common/platform.d @@ -19,6 +19,7 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.platforms.common.platform; +public import dlangui.core.config; public import dlangui.core.events; import dlangui.core.collections; import dlangui.widgets.widget; @@ -1381,16 +1382,6 @@ mixin template APP_ENTRY_POINT() { version(USE_X11) { pragma(lib, "X11"); } - version (USE_XCB) { - //pragma(lib, "png"); - pragma(lib, "xcb"); - pragma(lib, "xcb-shm"); - pragma(lib, "xcb-image"); - pragma(lib, "xcb-keysyms"); - pragma(lib, "X11-xcb"); - pragma(lib, "X11"); - pragma(lib, "dl"); - } } /// workaround for link issue when WinMain is located in library diff --git a/src/dlangui/platforms/common/startup.d b/src/dlangui/platforms/common/startup.d index ec027cb6..8f04f590 100644 --- a/src/dlangui/platforms/common/startup.d +++ b/src/dlangui/platforms/common/startup.d @@ -1,5 +1,6 @@ module dlangui.platforms.common.startup; +public import dlangui.core.config; public import dlangui.core.events; public import dlangui.widgets.styles; public import dlangui.graphics.fonts; diff --git a/src/dlangui/platforms/dsfml/dsfmlapp.d b/src/dlangui/platforms/dsfml/dsfmlapp.d index b402a72e..9eb9712a 100644 --- a/src/dlangui/platforms/dsfml/dsfmlapp.d +++ b/src/dlangui/platforms/dsfml/dsfmlapp.d @@ -1,5 +1,7 @@ module dlangui.platforms.dsfml.dsfmlapp; +public import dlangui.core.config; + version(USE_DSFML): import dlangui.platforms.common.platform; diff --git a/src/dlangui/platforms/sdl/sdlapp.d b/src/dlangui/platforms/sdl/sdlapp.d index f8be874f..cbfd9747 100644 --- a/src/dlangui/platforms/sdl/sdlapp.d +++ b/src/dlangui/platforms/sdl/sdlapp.d @@ -17,6 +17,7 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.platforms.sdl.sdlapp; +public import dlangui.core.config; version(USE_SDL): import core.runtime; import std.conv; diff --git a/src/dlangui/platforms/windows/win32drawbuf.d b/src/dlangui/platforms/windows/win32drawbuf.d index 86507711..049a7da8 100644 --- a/src/dlangui/platforms/windows/win32drawbuf.d +++ b/src/dlangui/platforms/windows/win32drawbuf.d @@ -22,6 +22,7 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com module dlangui.platforms.windows.win32drawbuf; version(Windows): +public import dlangui.core.config; import win32.windows; import dlangui.core.logger; @@ -149,10 +150,10 @@ class Win32ColorDrawBuf : ColorDrawBufBase { } /// fill with solid color override void fill(uint color) { - if (hasClipping) { - fillRect(_clipRect, color); - return; - } + if (hasClipping) { + fillRect(_clipRect, color); + return; + } int len = _dx * _dy; //for (int i = 0; i < len; i++) // _pixels[i] = color; diff --git a/src/dlangui/platforms/windows/win32fonts.d b/src/dlangui/platforms/windows/win32fonts.d index 3e36e2b0..39de5430 100644 --- a/src/dlangui/platforms/windows/win32fonts.d +++ b/src/dlangui/platforms/windows/win32fonts.d @@ -22,6 +22,7 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com module dlangui.platforms.windows.win32fonts; version(Windows): +public import dlangui.core.config; import win32.windows; import dlangui.graphics.fonts; diff --git a/src/dlangui/platforms/windows/winapp.d b/src/dlangui/platforms/windows/winapp.d index d4e4a7d9..d4328c48 100644 --- a/src/dlangui/platforms/windows/winapp.d +++ b/src/dlangui/platforms/windows/winapp.d @@ -20,6 +20,8 @@ License: Boost License 1.0 Authors: Vadim Lopatin, coolreader.org@gmail.com */ module dlangui.platforms.windows.winapp; + +public import dlangui.core.config; version (USE_SDL) { } else version (USE_DSFML) { } else version (Windows) { @@ -224,7 +226,7 @@ class Win32Window : Window { //_gl = new GLSupport(); if (!_glSupport) { Log.v("Creating OpenGL support"); - _glSupport = new GLSupport(); + _glSupport = new GLSupport(true); Log.v("OpenGL support created"); } } diff --git a/src/dlangui/platforms/x11/x11app.d b/src/dlangui/platforms/x11/x11app.d index 5e3c3032..9201da24 100644 --- a/src/dlangui/platforms/x11/x11app.d +++ b/src/dlangui/platforms/x11/x11app.d @@ -1,5 +1,6 @@ module dlangui.platforms.x11.x11app; +public import dlangui.core.config; version (USE_X11): import dlangui.core.logger;