comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Display.d @ 38:2e09b0e6857a

work on phobosfication
author Frank Benoit <benoit@tionex.de>
date Wed, 25 Mar 2009 11:18:25 +0100
parents d46287db17ed
children 0ecb2b338560
comparison
equal deleted inserted replaced
37:46c5f8f56b41 38:2e09b0e6857a
145 /* Windows and Events */ 145 /* Windows and Events */
146 Event [] eventQueue; 146 Event [] eventQueue;
147 //Callback windowCallback; 147 //Callback windowCallback;
148 //int windowProc_; 148 //int windowProc_;
149 int threadId; 149 int threadId;
150 TCHAR[] windowClass_, windowShadowClass; 150 StringT windowClass_, windowShadowClass;
151 static int WindowClassCount; 151 static int WindowClassCount;
152 static const String WindowName = "SWT_Window"; //$NON-NLS-1$ 152 static const String WindowName = "SWT_Window"; //$NON-NLS-1$
153 static const String WindowShadowName = "SWT_WindowShadow"; //$NON-NLS-1$ 153 static const String WindowShadowName = "SWT_WindowShadow"; //$NON-NLS-1$
154 EventTable eventTable, filterTable; 154 EventTable eventTable, filterTable;
155 155
2608 } 2608 }
2609 } 2609 }
2610 } 2610 }
2611 +/ 2611 +/
2612 int byteCount = windowClass_.length * TCHAR.sizeof; 2612 int byteCount = windowClass_.length * TCHAR.sizeof;
2613 lpWndClass.lpszClassName = cast(TCHAR*) OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount); 2613 auto buf = cast(TCHAR*) OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
2614 OS.MoveMemory (lpWndClass.lpszClassName, windowClass_.ptr, byteCount); 2614 lpWndClass.lpszClassName = buf;
2615 OS.MoveMemory (buf, windowClass_.ptr, byteCount);
2615 OS.RegisterClass (&lpWndClass); 2616 OS.RegisterClass (&lpWndClass);
2616 OS.HeapFree (hHeap, 0, lpWndClass.lpszClassName); 2617 OS.HeapFree (hHeap, 0, buf);
2617 2618
2618 /* Register the SWT drop shadow window class */ 2619 /* Register the SWT drop shadow window class */
2619 if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) { 2620 if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) {
2620 lpWndClass.style |= OS.CS_DROPSHADOW; 2621 lpWndClass.style |= OS.CS_DROPSHADOW;
2621 } 2622 }
2622 byteCount = windowShadowClass.length * TCHAR.sizeof; 2623 byteCount = windowShadowClass.length * TCHAR.sizeof;
2623 lpWndClass.lpszClassName = cast(TCHAR*) OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount); 2624 buf = cast(TCHAR*) OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
2624 OS.MoveMemory (lpWndClass.lpszClassName, windowShadowClass.ptr, byteCount); 2625 lpWndClass.lpszClassName = buf;
2626 OS.MoveMemory (buf, windowShadowClass.ptr, byteCount);
2625 OS.RegisterClass (&lpWndClass); 2627 OS.RegisterClass (&lpWndClass);
2626 OS.HeapFree (hHeap, 0, lpWndClass.lpszClassName); 2628 OS.HeapFree (hHeap, 0, buf);
2627 2629
2628 /* Create the message only HWND */ 2630 /* Create the message only HWND */
2629 hwndMessage = OS.CreateWindowEx (0, 2631 hwndMessage = OS.CreateWindowEx (0,
2630 windowClass_.ptr, 2632 windowClass_.ptr,
2631 null, 2633 null,