Update configuration settings

This commit is contained in:
Vadim Lopatin 2015-12-03 12:30:25 +03:00
parent 8ab10544e5
commit 4e5fa02802
50 changed files with 116 additions and 44 deletions

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.commctrl;
version(Windows):
version = Unicode;
pragma(lib, "comctl32");
private import win32.w32api, win32.windef, win32.winuser;

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.commdlg;
version(Windows):
version = Unicode;
pragma(lib, "comdlg32");
private import win32.w32api;

View File

@ -10,6 +10,7 @@
\***********************************************************************/
module win32.ddeml;
version(Windows):
version = Unicode;
pragma(lib, "user32");
private import win32.basetsd, win32.windef, win32.winnt;

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.imm;
version(Windows):
version = Unicode;
pragma(lib, "imm32");
import win32.windef, win32.wingdi;

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.lzexpand;
version(Windows):
version = Unicode;
pragma(lib, "lz32");
private import win32.winbase, win32.windef;

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.mmsystem;
version(Windows):
version = Unicode;
pragma(lib, "winmm");
/* The #defines MAKEFOURCC, mmioFOURCC, sndAlias are used to define

View File

@ -10,6 +10,7 @@
\***********************************************************************/
module win32.prsht;
version(Windows):
version = Unicode;
pragma(lib, "comctl32");
private import win32.w32api, win32.windef, win32.winuser;

View File

@ -14,6 +14,7 @@
module win32.psapi;
version(Windows):
version = Unicode;
private import win32.w32api;
private import win32.winbase;

View File

@ -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

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.rpcdcep;
version(Windows):
version = Unicode;
private import win32.basetyps;
private import win32.w32api;

View File

@ -10,6 +10,7 @@
\***********************************************************************/
module win32.rpcnsi;
version(Windows):
version = Unicode;
pragma(lib, "rpcns4");
private import win32.basetyps, win32.rpcdcep, win32.rpcnsi, win32.rpcdce,

View File

@ -10,6 +10,7 @@
\***********************************************************************/
module win32.shellapi;
version(Windows):
version = Unicode;
pragma(lib, "shell32");
private import win32.w32api, win32.windef, win32.basetyps;

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.shlobj;
version(Windows):
version = Unicode;
pragma(lib, "shell32");
// TODO: fix bitfields

View File

@ -10,6 +10,7 @@
\***********************************************************************/
module win32.w32api;
version(Windows):
version = Unicode;
enum __W32API_VERSION = 3.17;
enum __W32API_MAJOR_VERSION = 3;

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.winbase;
version(Windows):
version = Unicode;
pragma(lib, "kernel32");
/**

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.wincon;
version(Windows):
version = Unicode;
pragma(lib, "kernel32");
private import win32.w32api, win32.windef;

View File

@ -10,7 +10,7 @@
\***********************************************************************/
module win32.windef;
version(Windows):
version = Unicode;
public import win32.winnt;
private import win32.w32api;

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.wingdi;
version(Windows):
version = Unicode;
pragma(lib, "gdi32");
// FIXME: clean up Windows version support

View File

@ -10,6 +10,7 @@
\***********************************************************************/
module win32.winnetwk;
version(Windows):
version = Unicode;
pragma(lib, "mpr");
private import win32.winbase, win32.winerror, win32.winnt;

View File

@ -10,6 +10,7 @@
\***********************************************************************/
module win32.winnls;
version(Windows):
version = Unicode;
pragma(lib, "kernel32");
private import win32.basetsd, win32.w32api, win32.winbase, win32.windef;

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.winnt;
version(Windows):
version = Unicode;
public import win32.basetsd, win32.windef, win32.winerror;
private import win32.w32api;

View File

@ -8,6 +8,7 @@
\***********************************************************************/
module win32.winsock2;
version(Windows):
version = Unicode;
pragma(lib, "Ws2_32");
/*

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.winspool;
version(Windows):
version = Unicode;
pragma(lib, "winspool");
private import win32.w32api, win32.windef, win32.wingdi;

View File

@ -10,6 +10,7 @@
\***********************************************************************/
module win32.winsvc;
version(Windows):
version = Unicode;
pragma(lib, "advapi32");
private import win32.w32api, win32.windef;

View File

@ -9,6 +9,7 @@
\***********************************************************************/
module win32.winuser;
version(Windows):
version = Unicode;
pragma(lib, "user32");
// Conversion Notes:

View File

@ -10,6 +10,7 @@
\***********************************************************************/
module win32.winver;
version(Windows):
version = Unicode;
pragma(lib, "version");
private import win32.windef;

View File

@ -10,6 +10,7 @@
module win32.ws2tcpip;
version(Windows):
version = Unicode;
import win32.w32api;
//import win32.winbase;

View File

@ -72,7 +72,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode EmbedStandardResources ForceLogs</versionids>
<versionids>EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -174,7 +174,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode EmbedStandardResources ForceLogs</versionids>
<versionids> EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -276,7 +276,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode EmbedStandardResources ForceLogs</versionids>
<versionids>EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -378,7 +378,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode EmbedStandardResources ForceLogs</versionids>
<versionids> EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -561,6 +561,7 @@
<Folder name="dlangui">
<Folder name="core">
<File path="src\dlangui\core\collections.d" />
<File path="src\dlangui\core\config.d" />
<File path="src\dlangui\core\editable.d" />
<File path="src\dlangui\core\events.d" />
<File path="src\dlangui\core\files.d" />

View File

@ -72,7 +72,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources</versionids>
<versionids> EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -174,7 +174,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources</versionids>
<versionids> EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -276,7 +276,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources</versionids>
<versionids> EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -378,7 +378,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources</versionids>
<versionids> EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>

View File

@ -72,7 +72,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources ForceLogs</versionids>
<versionids>USE_OPENGL EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -174,7 +174,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources ForceLogs</versionids>
<versionids>USE_OPENGL EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -276,7 +276,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources ForceLogs</versionids>
<versionids>USE_OPENGL EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -378,7 +378,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode USE_OPENGL USE_FREETYPE EmbedStandardResources ForceLogs</versionids>
<versionids>USE_OPENGL EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>

View File

@ -72,7 +72,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode ForceLogs</versionids>
<versionids>USE_OPENGL EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -174,7 +174,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode ForceLogs</versionids>
<versionids>USE_OPENGL EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -276,7 +276,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode ForceLogs</versionids>
<versionids>USE_OPENGL EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -378,7 +378,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode ForceLogs</versionids>
<versionids>USE_OPENGL EmbedStandardResources ForceLogs</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>

View File

@ -72,7 +72,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode USE_FREETYPE</versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -174,7 +174,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode USE_FREETYPE</versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -276,7 +276,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode USE_FREETYPE</versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -378,7 +378,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode USE_FREETYPE</versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>

View File

@ -72,7 +72,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode EmbedStandardResources</versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -174,7 +174,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode EmbedStandardResources</versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -276,7 +276,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode EmbedStandardResources</versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -378,7 +378,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>Unicode EmbedStandardResources</versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>

View File

@ -72,7 +72,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL </versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -174,7 +174,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL </versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -276,7 +276,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL </versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>
@ -378,7 +378,7 @@
<debuglevel>0</debuglevel>
<debugids />
<versionlevel>0</versionlevel>
<versionids>EmbedStandardResources Unicode USE_FREETYPE USE_OPENGL </versionids>
<versionids>EmbedStandardResources</versionids>
<dump_source>0</dump_source>
<mapverbosity>0</mapverbosity>
<createImplib>0</createImplib>

35
src/dlangui/core/config.d Normal file
View File

@ -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;
}
}

View File

@ -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 */

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -1,5 +1,7 @@
module dlangui.platforms.dsfml.dsfmlapp;
public import dlangui.core.config;
version(USE_DSFML):
import dlangui.platforms.common.platform;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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");
}
}

View File

@ -1,5 +1,6 @@
module dlangui.platforms.x11.x11app;
public import dlangui.core.config;
version (USE_X11):
import dlangui.core.logger;