/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. module scaffold.color;
  10. import platform.win.common;
  11. import platform.win.main;
  12. import core.color;
  13. import core.definitions;
  14. void ColorGetSystemColor(ref Color clr, SystemColor sysColorIndex)
  15. {
  16. switch (sysColorIndex)
  17. {
  18. case SystemColor.Window:
  19. uint clrInt = GetSysColor(15);
  20. double r, g, b;
  21. clr.red = r / 255.0;
  22. clr.blue = b / 255.0;
  23. clr.green = g / 255.0;
  24. clr.alpha = 1.0;
  25. break;
  26. default: break;
  27. }
  28. }