comparison dwt/graphics/Device.d @ 117:25f88bf5a6df

Only one file was damaged Backed out changeset 640928daee8c
author Frank Benoit <benoit@tionex.de>
date Mon, 11 Feb 2008 04:18:24 +0100
parents 640928daee8c
children f906dbcacee5
comparison
equal deleted inserted replaced
115:640928daee8c 117:25f88bf5a6df
193 if (disposed) DWT.error(DWT.ERROR_DEVICE_DISPOSED); 193 if (disposed) DWT.error(DWT.ERROR_DEVICE_DISPOSED);
194 } 194 }
195 195
196 void checkGDIP() { 196 void checkGDIP() {
197 if (gdipToken) return; 197 if (gdipToken) return;
198 if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 198 static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED);
199 int oldErrorMode = OS.SetErrorMode (OS.SEM_FAILCRITICALERRORS); 199 int oldErrorMode = OS.SetErrorMode (OS.SEM_FAILCRITICALERRORS);
200 try { 200 try {
201 ULONG_PTR token; 201 ULONG_PTR token;
202 GdiplusStartupInput input; 202 GdiplusStartupInput input;
203 input.GdiplusVersion = 1; 203 input.GdiplusVersion = 1;
671 * 671 *
672 * @see #create 672 * @see #create
673 */ 673 */
674 protected void init () { 674 protected void init () {
675 if (debug_) { 675 if (debug_) {
676 if (!OS.IsWinCE) OS.GdiSetBatchLimit(1); 676 static if (!OS.IsWinCE) OS.GdiSetBatchLimit(1);
677 } 677 }
678 678
679 /* Initialize scripts list */ 679 /* Initialize scripts list */
680 if (!OS.IsWinCE) { 680 static if (!OS.IsWinCE) {
681 SCRIPT_PROPERTIES** ppSp; 681 SCRIPT_PROPERTIES** ppSp;
682 int piNumScripts; 682 int piNumScripts;
683 OS.ScriptGetProperties (&ppSp, &piNumScripts); 683 OS.ScriptGetProperties (&ppSp, &piNumScripts);
684 scripts = ppSp[ 0 .. piNumScripts ].dup; 684 scripts = ppSp[ 0 .. piNumScripts ].dup;
685 } 685 }
700 } 700 }
701 701
702 int numReserved = OS.GetDeviceCaps (hDC, OS.NUMRESERVED); 702 int numReserved = OS.GetDeviceCaps (hDC, OS.NUMRESERVED);
703 int numEntries = OS.GetDeviceCaps (hDC, OS.SIZEPALETTE); 703 int numEntries = OS.GetDeviceCaps (hDC, OS.SIZEPALETTE);
704 704
705 if (OS.IsWinCE) { 705 static if (OS.IsWinCE) {
706 /* 706 /*
707 * Feature on WinCE. For some reason, certain 8 bit WinCE 707 * Feature on WinCE. For some reason, certain 8 bit WinCE
708 * devices return 0 for the number of reserved entries in 708 * devices return 0 for the number of reserved entries in
709 * the system palette. Their system palette correctly contains 709 * the system palette. Their system palette correctly contains
710 * the usual 20 system colors. The workaround is to assume 710 * the usual 20 system colors. The workaround is to assume