diff --git a/dlanguilib-win32.dproj b/dlanguilib-win32.dproj
new file mode 100644
index 00000000..5d31b389
--- /dev/null
+++ b/dlanguilib-win32.dproj
@@ -0,0 +1,256 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {440816C8-DBD6-454C-A0D7-B6E59CA1ED86}
+ true
+ true
+ true
+ DMD2
+
+
+ \home\lve\src\d\DerelictFT\source
+ \home\lve\src\d\DerelictGL3\source
+ \home\lve\src\d\DerelictUtil\source
+ \home\lve\src\d\dlangui\3rdparty\X11
+ \home\lve\src\d\dlangui\3rdparty\X11\xcb
+
+
+
+
+ true
+ bin\Debug
+ dlanguilib
+ obj/Debug
+ true
+ StaticLibrary
+ false
+ false
+ 0
+
+
+ USE_OPENGL
+ USE_SDL
+ Unicode
+
+
+
+
+ bin\Release
+ dlanguilib
+ obj/Release
+ true
+ StaticLibrary
+ -version=USE_OPENGL
+ false
+ false
+ 0
+
+
+ true
+ bin\Unittest
+ -unittest
+ obj/Unittest
+ dlanguilib
+ true
+ StaticLibrary
+ false
+ false
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3rdparty\DerelictFT\ft.d
+
+
+ 3rdparty\DerelictFT\functions.d
+
+
+ 3rdparty\DerelictFT\types.d
+
+
+ 3rdparty\DerelictGL3\arb.d
+
+
+ 3rdparty\DerelictGL3\cgl.d
+
+
+ 3rdparty\DerelictGL3\constants.d
+
+
+ 3rdparty\DerelictGL3\deprecatedConstants.d
+
+
+ 3rdparty\DerelictGL3\deprecatedFunctions.d
+
+
+ 3rdparty\DerelictGL3\ext.d
+
+
+ 3rdparty\DerelictGL3\functions.d
+
+
+ 3rdparty\DerelictGL3\gl.d
+
+
+ 3rdparty\DerelictGL3\gl3.d
+
+
+ 3rdparty\DerelictGL3\glx.d
+
+
+ 3rdparty\DerelictGL3\glxext.d
+
+
+ 3rdparty\DerelictGL3\internal.d
+
+
+ 3rdparty\DerelictGL3\types.d
+
+
+ 3rdparty\DerelictGL3\wgl.d
+
+
+ 3rdparty\DerelictGL3\wglext.d
+
+
+ 3rdparty\DerelictUtil\exception.d
+
+
+ 3rdparty\DerelictUtil\loader.d
+
+
+ 3rdparty\DerelictUtil\sharedlib.d
+
+
+ 3rdparty\DerelictUtil\system.d
+
+
+ 3rdparty\DerelictUtil\wintypes.d
+
+
+ 3rdparty\DerelictUtil\xtypes.d
+
+
+
+
+ 3rdparty\DerelictFI\freeimage.d
+
+
+ 3rdparty\DerelictFI\functions.d
+
+
+ 3rdparty\DerelictFI\types.d
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3rdparty\FreetypeSDL2\functions.d
+
+
+ 3rdparty\FreetypeSDL2\image.d
+
+
+ 3rdparty\FreetypeSDL2\mixer.d
+
+
+ 3rdparty\FreetypeSDL2\net.d
+
+
+ 3rdparty\FreetypeSDL2\sdl.d
+
+
+ 3rdparty\FreetypeSDL2\ttf.d
+
+
+ 3rdparty\FreetypeSDL2\types.d
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dlanguimonod-win32.sln b/dlanguimonod-win32.sln
new file mode 100644
index 00000000..615564d0
--- /dev/null
+++ b/dlanguimonod-win32.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{3947E667-4C90-4C3A-BEB9-7148D6FE0D7C}") = "dlanguilib-win32", "dlanguilib-win32.dproj", "{440816C8-DBD6-454C-A0D7-B6E59CA1ED86}"
+EndProject
+Project("{3947E667-4C90-4C3A-BEB9-7148D6FE0D7C}") = "example1", "examples\example1\example1.dproj", "{11EEFA98-AAC1-45BD-8972-C97571D2D196}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ Unittest|Any CPU = Unittest|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {440816C8-DBD6-454C-A0D7-B6E59CA1ED86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {440816C8-DBD6-454C-A0D7-B6E59CA1ED86}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {440816C8-DBD6-454C-A0D7-B6E59CA1ED86}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {440816C8-DBD6-454C-A0D7-B6E59CA1ED86}.Release|Any CPU.Build.0 = Release|Any CPU
+ {440816C8-DBD6-454C-A0D7-B6E59CA1ED86}.Unittest|Any CPU.ActiveCfg = Unittest|Any CPU
+ {440816C8-DBD6-454C-A0D7-B6E59CA1ED86}.Unittest|Any CPU.Build.0 = Unittest|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = examples\example1\example1.dproj
+ EndGlobalSection
+EndGlobal
diff --git a/examples/example1/example1.dproj b/examples/example1/example1.dproj
index 27c4112f..4f3bab68 100644
--- a/examples/example1/example1.dproj
+++ b/examples/example1/example1.dproj
@@ -3,7 +3,7 @@
Debug
AnyCPU
- 10.0.0
+ 8.0.30703
2.0
{11EEFA98-AAC1-45BD-8972-C97571D2D196}
true
@@ -22,12 +22,13 @@
- ../../src
- ../../../DerelictUtil/source
- ../../../DerelictFI/source
- ../../../DerelictFT/source
- ../../../DerelictSDL2/source
- ../../../DerelictGL3/source
+ ..\..\src
+ ..\..\..\DerelictUtil\source
+ ..\..\..\DerelictFI\source
+ ..\..\..\DerelictFT\source
+ ..\..\..\DerelictSDL2\source
+ ..\..\..\DerelictGL3\source
+ ..\..\3rdparty
diff --git a/src/dlangui/core/types.d b/src/dlangui/core/types.d
index 842f5632..a6f692a8 100644
--- a/src/dlangui/core/types.d
+++ b/src/dlangui/core/types.d
@@ -272,7 +272,7 @@ struct Ref(T) { // if (T is RefCountedObject)
//================================================================================
// some utility functions
-
+/*
string fromStringz(const(char[]) s) {
if (s is null)
return null;
@@ -290,6 +290,7 @@ string fromStringz(const(char*) s) {
i++;
return cast(string)(s[0..i].dup);
}
+*/
wstring fromWStringz(const(wchar[]) s) {
if (s is null)
diff --git a/src/dlangui/graphics/ftfonts.d b/src/dlangui/graphics/ftfonts.d
index 313fe4fd..ee985bcd 100644
--- a/src/dlangui/graphics/ftfonts.d
+++ b/src/dlangui/graphics/ftfonts.d
@@ -126,8 +126,8 @@ private class FreeTypeFontFile {
private static string familyName(FT_Face face)
{
- string faceName = fromStringz(face.family_name);
- string styleName = fromStringz(face.style_name);
+ string faceName = cast(string)fromStringz(face.family_name);
+ string styleName = cast(string)fromStringz(face.style_name);
if (faceName.equal("Arial") && styleName.equal("Narrow"))
faceName ~= " Narrow";
else if (styleName.equal("Condensed"))
diff --git a/src/dlangui/graphics/glsupport.d b/src/dlangui/graphics/glsupport.d
index 4023aa51..51f0b781 100644
--- a/src/dlangui/graphics/glsupport.d
+++ b/src/dlangui/graphics/glsupport.d
@@ -24,6 +24,7 @@ import dlangui.core.logger;
private import derelict.opengl3.gl3;
private import dlangui.core.types;
private import std.conv;
+private import std.string;
// utility function to fill 4-float array of vertex colors with converted CR 32bit color
private void LVGLFillColor(uint color, float * buf, int count) {
@@ -398,7 +399,7 @@ class GLProgram {
}
}
bool compile() {
- glslversion = fromStringz(glGetString(GL_SHADING_LANGUAGE_VERSION));
+ glslversion = cast(string)std.string.fromStringz(glGetString(GL_SHADING_LANGUAGE_VERSION));
vertexShader = compileShader(vertexSource, GL_VERTEX_SHADER);
fragmentShader = compileShader(fragmentSource, GL_FRAGMENT_SHADER);
if (!vertexShader || !fragmentShader) {
diff --git a/src/dlangui/platforms/sdl/sdlapp.d b/src/dlangui/platforms/sdl/sdlapp.d
index 721ac703..ab801b28 100644
--- a/src/dlangui/platforms/sdl/sdlapp.d
+++ b/src/dlangui/platforms/sdl/sdlapp.d
@@ -598,7 +598,7 @@ version(USE_SDL) {
}
bool processTextInput(const char * s) {
- string str = fromStringz(s);
+ string str = cast(string)fromStringz(s);
dstring ds = toUTF32(str);
uint flags = convertKeyFlags(SDL_GetModState());
bool res = dispatchKeyEvent(new KeyEvent(KeyAction.Text, 0, flags, ds));
@@ -910,7 +910,7 @@ version(USE_SDL) {
char * txt = SDL_GetClipboardText();
if (!txt)
return ""d;
- string s = fromStringz(txt);
+ string s = cast(string)fromStringz(txt);
SDL_free(txt);
return toUTF32(s);
}
@@ -983,12 +983,12 @@ version(USE_SDL) {
int myWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
- setFileLogger(std.stdio.File("ui.log", "w"));
+ Log.setFileLogger(std.stdio.File("ui.log", "w"));
Log.setLogLevel(LogLevel.Trace);
Log.d("myWinMain()");
string basePath = exePath();
Log.i("Current executable: ", exePath());
- string cmdline = fromStringz(lpCmdLine);
+ string cmdline = cast(string)fromStringz(lpCmdLine);
Log.i("Command line: ", cmdline);
string[] args = splitCmdLine(cmdline);
Log.i("Command line params: ", args);
diff --git a/src/dlangui/platforms/windows/win32fonts.d b/src/dlangui/platforms/windows/win32fonts.d
index 80355017..c108561a 100644
--- a/src/dlangui/platforms/windows/win32fonts.d
+++ b/src/dlangui/platforms/windows/win32fonts.d
@@ -415,7 +415,7 @@ extern(Windows) {
{
void * p = cast(void*)lParam;
Win32FontManager fontman = cast(Win32FontManager)p;
- string face = fromStringz(lf.lfFaceName.ptr);
+ string face = cast(string)fromStringz(lf.lfFaceName.ptr);
FontFamily family = pitchAndFamilyToFontFamily(lf.lfPitchAndFamily);
if (face.length < 2 || face[0] == '@')
return 1;