diff --git a/dlangui.sln b/dlangui.sln
index 9b032b25..398d18a2 100644
--- a/dlangui.sln
+++ b/dlangui.sln
@@ -27,6 +27,7 @@ Project("{002A2DE9-8BB6-484D-9802-7E4AD4084715}") = "libdparse", "..\dlangide\li
EndProject
Project("{002A2DE9-8BB6-484D-9802-7E4AD4084715}") = "dlanguisfml", "..\dsfml_project\dlanguisfml\dlanguisfml.visualdproj", "{5867E363-515A-4C7E-82C7-D1C1D35F55FC}"
ProjectSection(ProjectDependencies) = postProject
+ {5FF17402-9997-4D0E-8068-6D84B8769D98} = {5FF17402-9997-4D0E-8068-6D84B8769D98}
{DB490C05-D9F8-431C-91DD-CEE646A64FDA} = {DB490C05-D9F8-431C-91DD-CEE646A64FDA}
EndProjectSection
EndProject
diff --git a/dub.json b/dub.json
index c33e67de..c4cf105f 100644
--- a/dub.json
+++ b/dub.json
@@ -65,6 +65,19 @@
"derelict-sdl2": "~>1.9.1",
"gl3n": "~>1.0.1"
}
+ },
+ {
+ "name": "sfml",
+ "versions": ["USE_DSFML", "USE_OPENGL", "USE_FREETYPE", "EmbedStandardResources"],
+ "versions-windows": ["Unicode"],
+ "dependencies": {
+ "dlib": "~master",
+ "derelict-gl3": "~>1.0.12",
+ "derelict-ft": "~>1.0.0",
+ "derelict-sdl2": "~>1.9.1",
+ "gl3n": "~>1.0.1",
+ "dsfml": "~master"
+ }
}
]
}
diff --git a/examples/example1/example1.visualdproj b/examples/example1/example1.visualdproj
index 5430f72a..1a8dd99c 100644
--- a/examples/example1/example1.visualdproj
+++ b/examples/example1/example1.visualdproj
@@ -89,7 +89,7 @@
- dlangui.lib phobos.lib ole32.lib kernel32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib dlangui.lib
+ dlangui.lib phobos.lib ole32.lib kernel32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib
../../Debug ../../../DerelictOpenGL3/source
diff --git a/examples/helloworld/src/helloworld.d b/examples/helloworld/src/helloworld.d
index 97e3707e..c6396e8a 100644
--- a/examples/helloworld/src/helloworld.d
+++ b/examples/helloworld/src/helloworld.d
@@ -1,20 +1,20 @@
-module app;
-
-import dlangui;
-
-mixin APP_ENTRY_POINT;
-
-/// entry point for dlangui based application
-extern (C) int UIAppMain(string[] args) {
- // create window
- Window window = Platform.instance.createWindow("DlangUI example - HelloWorld", null);
-
+module app;
+
+import dlangui;
+
+mixin APP_ENTRY_POINT;
+
+/// entry point for dlangui based application
+extern (C) int UIAppMain(string[] args) {
+ // create window
+ Window window = Platform.instance.createWindow("DlangUI example - HelloWorld", null);
+
// create some widget to show in window
- window.mainWidget = (new Button()).text("Hello, world!"d).margins(Rect(20,20,20,20));
-
+ window.mainWidget = (new Button()).text("Hello, world!"d).margins(Rect(20,20,20,20));
+
// show window
- window.show();
-
- // run message loop
- return Platform.instance.enterMessageLoop();
-}
+ window.show();
+
+ // run message loop
+ return Platform.instance.enterMessageLoop();
+}
diff --git a/src/dlangui/platforms/common/platform.d b/src/dlangui/platforms/common/platform.d
index b0ce2a5f..c11c134d 100644
--- a/src/dlangui/platforms/common/platform.d
+++ b/src/dlangui/platforms/common/platform.d
@@ -182,6 +182,10 @@ class Window {
abstract @property void windowCaption(dstring caption);
/// sets window icon
abstract @property void windowIcon(DrawBufRef icon);
+ /// request window redraw
+ abstract void invalidate();
+ /// close window
+ abstract void close();
/// requests layout for main widget and popups
void requestLayout() {
@@ -1035,10 +1039,6 @@ class Window {
}
debug(DebugRedraw) Log.d("checkUpdateNeeded returned needDraw=", needDraw, " needLayout=", needLayout, " animationActive=", animationActive);
}
- /// request window redraw
- abstract void invalidate();
- /// close window
- abstract void close();
protected bool _actionsUpdateRequested = true;
diff --git a/src/dlangui/platforms/windows/winapp.d b/src/dlangui/platforms/windows/winapp.d
index f9575aaf..1a121603 100644
--- a/src/dlangui/platforms/windows/winapp.d
+++ b/src/dlangui/platforms/windows/winapp.d
@@ -21,6 +21,7 @@ Authors: Vadim Lopatin, coolreader.org@gmail.com
*/
module dlangui.platforms.windows.winapp;
version (USE_SDL) { }
+else version (USE_DSFML) { }
else version (Windows) {
import core.runtime;