PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1/*
 2 * color.d
 3 *
 4 * This file implements the Scaffold for platform specific Color for Windows.
 5 *
 6 * Author: Dave Wilkinson
 7 *
 8 */
 9
10module scaffold.color;
11
12import platform.win.common;
13import platform.win.main;
14
15import core.color;
16import core.definitions;
17
18void ColorGetSystemColor(ref Color clr, SystemColor sysColorIndex)
19{
20	switch (sysColorIndex)
21	{
22		case SystemColor.Window:
23			uint clrInt = GetSysColor(15);
24			double r, g, b;
25			clr.red = r / 255.0;
26			clr.blue = b / 255.0;
27			clr.green = g / 255.0;
28			clr.alpha = 1.0;
29			break;
30		default: break;
31	}
32}
33