mirror of https://github.com/buggins/dlangui.git
dsfml platform - initial support
This commit is contained in:
parent
bf9f438d0f
commit
045621a90e
|
@ -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
|
||||
|
|
13
dub.json
13
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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<cv2pdbOptions />
|
||||
<objfiles />
|
||||
<linkswitches />
|
||||
<libfiles>dlangui.lib phobos.lib ole32.lib kernel32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib dlangui.lib</libfiles>
|
||||
<libfiles>dlangui.lib phobos.lib ole32.lib kernel32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib</libfiles>
|
||||
<libpaths>../../Debug ../../../DerelictOpenGL3/source</libpaths>
|
||||
<deffile />
|
||||
<resfile />
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue