/platform/win/scaffold/color.d
http://github.com/wilkie/djehuty · D · 33 lines · 20 code · 5 blank · 8 comment · 1 complexity · 0e12d2b226de5d57a045c6aec1a62722 MD5 · raw file
- /*
- * color.d
- *
- * This file implements the Scaffold for platform specific Color for Windows.
- *
- * Author: Dave Wilkinson
- *
- */
- module scaffold.color;
- import platform.win.common;
- import platform.win.main;
- import core.color;
- import core.definitions;
- void ColorGetSystemColor(ref Color clr, SystemColor sysColorIndex)
- {
- switch (sysColorIndex)
- {
- case SystemColor.Window:
- uint clrInt = GetSysColor(15);
- double r, g, b;
- clr.red = r / 255.0;
- clr.blue = b / 255.0;
- clr.green = g / 255.0;
- clr.alpha = 1.0;
- break;
- default: break;
- }
- }