mirror of https://github.com/buggins/dlangui.git
fix DUB build of library under windows
This commit is contained in:
parent
27d7fd7dd8
commit
85b8f895b9
66
dub.json
66
dub.json
|
@ -1,14 +1,72 @@
|
|||
{
|
||||
"name": "dlangui",
|
||||
"description": "D language GUI library",
|
||||
"description": "D language cross platform GUI library, inspired by Android UI API. Supports OpenGL based hardware acceleration, i18n, styles and themes.",
|
||||
"homepage": "https://github.com/buggins/dlangui",
|
||||
"license": "Boost",
|
||||
"authors": [
|
||||
"Vadim Lopatin"
|
||||
],
|
||||
"authors": ["Vadim Lopatin"],
|
||||
|
||||
"targetName": "dlangui",
|
||||
"targetPath": "lib",
|
||||
"targetType": "staticLibrary",
|
||||
|
||||
"sourceFiles-windows": [
|
||||
"3rdparty/win32/basetsd.d",
|
||||
"3rdparty/win32/basetyps.d",
|
||||
"3rdparty/win32/cderr.d",
|
||||
"3rdparty/win32/cguid.d",
|
||||
"3rdparty/win32/commdlg.d",
|
||||
"3rdparty/win32/commctrl.d",
|
||||
"3rdparty/win32/core.d",
|
||||
"3rdparty/win32/dde.d",
|
||||
"3rdparty/win32/ddeml.d",
|
||||
"3rdparty/win32/dlgs.d",
|
||||
"3rdparty/win32/imm.d",
|
||||
"3rdparty/win32/lzexpand.d",
|
||||
"3rdparty/win32/mmsystem.d",
|
||||
"3rdparty/win32/nb30.d",
|
||||
"3rdparty/win32/oaidl.d",
|
||||
"3rdparty/win32/objbase.d",
|
||||
"3rdparty/win32/objfwd.d",
|
||||
"3rdparty/win32/objidl.d",
|
||||
"3rdparty/win32/ole.d",
|
||||
"3rdparty/win32/ole2.d",
|
||||
"3rdparty/win32/oleauto.d",
|
||||
"3rdparty/win32/olectlid.d",
|
||||
"3rdparty/win32/oleidl.d",
|
||||
"3rdparty/win32/prsht.d",
|
||||
"3rdparty/win32/rpc.d",
|
||||
"3rdparty/win32/rpcdce.d",
|
||||
"3rdparty/win32/rpcdcep.d",
|
||||
"3rdparty/win32/rpcndr.d",
|
||||
"3rdparty/win32/rpcnsi.d",
|
||||
"3rdparty/win32/rpcnsip.d",
|
||||
"3rdparty/win32/rpcnterr.d",
|
||||
"3rdparty/win32/shellapi.d",
|
||||
"3rdparty/win32/shlobj.d",
|
||||
"3rdparty/win32/shlguid.d",
|
||||
"3rdparty/win32/unknwn.d",
|
||||
"3rdparty/win32/uuid.d",
|
||||
"3rdparty/win32/w32api.d",
|
||||
"3rdparty/win32/winbase.d",
|
||||
"3rdparty/win32/wincon.d",
|
||||
"3rdparty/win32/windef.d",
|
||||
"3rdparty/win32/windows.d",
|
||||
"3rdparty/win32/winerror.d",
|
||||
"3rdparty/win32/wingdi.d",
|
||||
"3rdparty/win32/winnetwk.d",
|
||||
"3rdparty/win32/winnls.d",
|
||||
"3rdparty/win32/winnt.d",
|
||||
"3rdparty/win32/winperf.d",
|
||||
"3rdparty/win32/winsock2.d",
|
||||
"3rdparty/win32/winspool.d",
|
||||
"3rdparty/win32/winsvc.d",
|
||||
"3rdparty/win32/winuser.d",
|
||||
"3rdparty/win32/winver.d",
|
||||
"3rdparty/win32/ws2tcpip.d",
|
||||
"3rdparty/win32/wtypes.d",
|
||||
],
|
||||
|
||||
"versions-windows": ["USE_OPENGL", "Unicode"],
|
||||
|
||||
"dependencies": {
|
||||
"derelict-gl3": "~master",
|
||||
|
|
|
@ -28,7 +28,7 @@ private struct FontDef {
|
|||
const bool opEquals(ref const FontDef v) {
|
||||
return _family == v._family && _italic == v._italic && _weight == v._weight && _face.equal(v._face);
|
||||
}
|
||||
const hash_t toHash() {
|
||||
const hash_t toHash() const nothrow @safe {
|
||||
hash_t res = 123;
|
||||
res = res * 31 + cast(hash_t)_italic;
|
||||
res = res * 31 + cast(hash_t)_weight;
|
||||
|
|
|
@ -22,11 +22,16 @@ Authors: $(WEB coolreader.org, Vadim Lopatin)
|
|||
*/
|
||||
module dlangui.graphics.images;
|
||||
|
||||
immutable bool USE_LIBPNG = false;
|
||||
immutable bool USE_FREEIMAGE = true;
|
||||
|
||||
import dlangui.core.logger;
|
||||
import dlangui.core.types;
|
||||
import dlangui.graphics.drawbuf;
|
||||
import std.stream;
|
||||
import libpng.png;
|
||||
static if (USE_LIBPNG) {
|
||||
import libpng.png;
|
||||
}
|
||||
|
||||
/// load and decode image from file to ColorDrawBuf, returns null if loading or decoding is failed
|
||||
ColorDrawBuf loadImage(string filename) {
|
||||
|
@ -57,9 +62,6 @@ class ImageDecodingException : Exception {
|
|||
}
|
||||
}
|
||||
|
||||
immutable bool USE_LIBPNG = false;
|
||||
immutable bool USE_FREEIMAGE = true;
|
||||
|
||||
shared static this() {
|
||||
//import derelict.freeimage.freeimage;
|
||||
//DerelictFI.load();
|
||||
|
@ -126,6 +128,8 @@ static if (USE_FREEIMAGE) {
|
|||
switch (pixelSize) {
|
||||
case 4:
|
||||
a = src[3] ^ 255;
|
||||
// fall through
|
||||
goto case;
|
||||
case 3:
|
||||
r = src[2];
|
||||
g = src[1];
|
||||
|
|
Loading…
Reference in New Issue