My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
/* Copyright (c) 2006-2007 Christopher J. W. Lloyd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */

// Original - Christopher Lloyd <cjwl@objc.net>
#import <AppKit/Win32Window.h>
#import <AppKit/Win32GraphicsContext.h>
#import <AppKit/Win32RenderingContext.h>
#import <AppKit/Win32Event.h>
#import <AppKit/Win32Application.h>
#import <AppKit/Win32Display.h>
#import <Foundation/NSString_win32.h>

#import <AppKit/NSWindow.h>
#import <AppKit/NSPanel.h>
#import <AppKit/NSApplication.h>
#import <AppKit/NSDrawerWindow.h>

@implementation Win32Window

-(float)primaryScreenHeight {
return GetSystemMetrics(SM_CYSCREEN);
}

-(NSRect)flipOnWin32Screen:(NSRect)rect {

rect.origin.y=[self primaryScreenHeight]-(rect.origin.y+rect.size.height);

return rect;
}

-(DWORD)win32ExtendedStyle {
DWORD result=0;

if(_styleMask==NSBorderlessWindowMask)
result=WS_EX_TOOLWINDOW;
else
result=WS_EX_ACCEPTFILES;

if(_styleMask&NSUtilityWindowMask)
result|=WS_EX_TOOLWINDOW;

return result/*|0x80000*/ ;
}

-(DWORD)win32Style {
DWORD result=WS_CLIPCHILDREN|WS_CLIPSIBLINGS;

if(_styleMask==NSBorderlessWindowMask)
result|=WS_POPUP;
else if(_styleMask==NSDocModalWindowMask)
result|=WS_POPUP;
else if(_styleMask==NSDrawerWindowMask)
result|=WS_THICKFRAME|WS_POPUP;
else {
result|=WS_OVERLAPPED;

if(_styleMask&NSTitledWindowMask)
result|=WS_CAPTION;
if(_styleMask&NSClosableWindowMask)
result|=WS_CAPTION;

if(_styleMask&NSMiniaturizableWindowMask && !_isPanel)
result|=WS_MINIMIZEBOX|WS_MAXIMIZEBOX;

if(_styleMask&NSResizableWindowMask)
result|=WS_THICKFRAME;

if(_isPanel){
result|=WS_CAPTION;// without CAPTION it puts space for a menu (???)
}

result|=WS_SYSMENU; // Is there a way to get a closebutton without SYSMENU for panels?
}

return result;
}

-(const char *)win32ClassName {
if(_styleMask==NSBorderlessWindowMask)
return "NSWin32PopUpWindow";
else
return "NSWin32StandardWindow";
}

-(RECT)win32FrameRECTFromContentRECT:(RECT)rect {
DWORD style=[self win32Style];
DWORD exStyle=[self win32ExtendedStyle];

AdjustWindowRectEx(&rect,style,NO,exStyle);

return rect;
}

-(NSRect)win32FrameForRect:(NSRect)frame {
NSRect moveTo=[self flipOnWin32Screen:frame];
RECT winRect;

winRect.top=moveTo.origin.y;
winRect.left=moveTo.origin.x;
winRect.bottom=moveTo.origin.y+moveTo.size.height;
winRect.right=moveTo.origin.x+moveTo.size.width;

winRect=[self win32FrameRECTFromContentRECT:winRect];

moveTo.origin.y=winRect.top;
moveTo.origin.x=winRect.left;
moveTo.size.width=(winRect.right-winRect.left);
moveTo.size.height=(winRect.bottom-winRect.top);

return moveTo;
}

-(RECT)win32ContentRECTFromFrameRECT:(RECT)rect {
DWORD style=[self win32Style];
DWORD exStyle=[self win32ExtendedStyle];
RECT delta;

delta.top=0;
delta.left=0;
delta.bottom=100;
delta.right=100;

AdjustWindowRectEx(&delta,style,NO,exStyle);

rect.top+=-delta.top;
rect.left+=-delta.left;
rect.bottom-=(delta.bottom-100);
rect.right-=(delta.right-100);

return rect;
}

-initWithFrame:(NSRect)frame styleMask:(unsigned)styleMask isPanel:(BOOL)isPanel backingType:(Win32BackingStoreType)backingType {
_styleMask=styleMask;
_isPanel=isPanel;

{
DWORD style=[self win32Style];
DWORD extendStyle=[self win32ExtendedStyle];
NSRect win32Frame=[self win32FrameForRect:frame];
const char *className=[self win32ClassName];

_handle=CreateWindowEx(extendStyle,className,"", style,
win32Frame.origin.x, win32Frame.origin.y,
win32Frame.size.width, win32Frame.size.height,
NULL,NULL, Win32ApplicationHandle(),NULL);
#if 0
// This is how alpha is set for the whole window, unfortunately a) it's incredibly slow b) we'd have to use a Win32 window per view to get the per view alpha of OSX c) you have to set the alpha for the whole view or chromakey it, it's not as general as OSX where you can just draw with alpha in the view and it works.
{
HANDLE library=LoadLibrary("USER32");
FARPROC setLayered =GetProcAddress(library,"SetLayeredWindowAttributes");

if(setLayered!=NULL)
setLayered(_handle,RGB(0,0,0),128,2);
}
#endif

}

SetProp(_handle,"self",self);

_renderingContext=[[Win32RenderingContext alloc] initWithWindowHandle:_handle];

_backingType=backingType;

if([[NSUserDefaults standardUserDefaults] boolForKey:@"NSAllWindowsRetained"])
_backingType=Win32BackingStoreRetained;

_backingSize=frame.size;
switch(_backingType){

case Win32BackingStoreRetained:
case Win32BackingStoreNonretained:
_backingContext=nil;
break;

case Win32BackingStoreBuffered:
_backingContext=[[Win32RenderingContext alloc] initWithPixelSize:_backingSize compatibleWithContext:_renderingContext];
break;
}

_ignoreMinMaxMessage=NO;
_sentBeginSizing=NO;

return self;
}

-(void)dealloc {
[self invalidate];
[super dealloc];
}

-(void)invalidate {
_delegate=nil;
SetProp(_handle,"self",nil);
DestroyWindow(_handle);
_handle=NULL;
[_renderingContext release];
_renderingContext=nil;
[_backingContext release];
_backingContext=nil;
}

-(void)setDelegate:delegate {
_delegate=delegate;
}

-delegate {
return _delegate;
}


-(HWND)windowHandle {
return _handle;
}

-(Win32RenderingContext *)renderingContext {
switch(_backingType){

case Win32BackingStoreRetained:
case Win32BackingStoreNonretained:
default:
return _renderingContext;

case Win32BackingStoreBuffered:
return _backingContext;
}
}

-(void)rebuildBackingContextWithSize:(NSSize)size forceRebuild:(BOOL)forceRebuild {
switch(_backingType){

case Win32BackingStoreRetained:
case Win32BackingStoreNonretained:
[_backingContext release];
_backingContext=nil;
break;

case Win32BackingStoreBuffered:
if(!NSEqualSizes(_backingSize,size) || _backingContext==nil || forceRebuild){
_backingSize=size;

[_backingContext release];
_backingContext=[[Win32RenderingContext alloc] initWithPixelSize:_backingSize compatibleWithContext:_renderingContext];
}
break;
}
}

-(void)rebuildBackingContextWithSize:(NSSize)size {
[self rebuildBackingContextWithSize:size forceRebuild:NO];
}


-(void)setTitle:(NSString *)title {
SetWindowTextW(_handle,NSNullTerminatedUnicodeFromString(title));
}

-(void)setFrame:(NSRect)frame {
NSRect moveTo=[self win32FrameForRect:frame];

_ignoreMinMaxMessage=YES;
MoveWindow([self windowHandle], moveTo.origin.x, moveTo.origin.y,
moveTo.size.width, moveTo.size.height,YES);
_ignoreMinMaxMessage=NO;

[self rebuildBackingContextWithSize:frame.size];
}

-(void)showWindowForAppActivation:(NSRect)frame {
[self showWindowWithoutActivation];
}

-(void)hideWindowForAppDeactivation:(NSRect)frame {
[self hideWindow];
}

-(void)hideWindow {
#if 0
// doesn't work, investigate
HANDLE library=LoadLibrary("USER32");
FARPROC animateWindow=GetProcAddress(library,"AnimateWindow");

if(animateWindow!=NULL)
animateWindow([self windowHandle],200,0x10000); // AW_HIDE
#endif

ShowWindow([self windowHandle],SW_HIDE);
}

-(void)showWindowWithoutActivation {
ShowWindow([self windowHandle],SW_SHOWNOACTIVATE);
}

-(void)bringToTop {
if(_styleMask==NSBorderlessWindowMask){
SetWindowPos([self windowHandle],HWND_TOPMOST,0,0,0,0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_SHOWWINDOW);
}
else {
SetWindowPos([self windowHandle],HWND_TOP,0,0,0,0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_SHOWWINDOW);
}
}

-(void)placeAboveWindow:(Win32Window *)other {
HWND otherHandle=[other windowHandle];

if(otherHandle==NULL)
otherHandle=(_styleMask==NSBorderlessWindowMask)?HWND_TOPMOST:HWND_TOP;

SetWindowPos([self windowHandle],otherHandle,0,0,0,0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_SHOWWINDOW);
}

-(void)placeBelowWindow:(Win32Window *)other {
HWND before=GetNextWindow([other windowHandle],GW_HWNDNEXT);

if(before==NULL)
before=HWND_BOTTOM;

SetWindowPos([self windowHandle],before,0,0,0,0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_SHOWWINDOW);
}

-(void)makeKey {
SetActiveWindow([self windowHandle]);
}

-(void)captureEvents {
SetCapture([self windowHandle]);
}

-(void)miniaturize {
ShowWindow([self windowHandle],SW_MINIMIZE);
}

-(void)deminiaturize {
ShowWindow([self windowHandle],SW_RESTORE);
}

-(void)flushBuffer {
switch(_backingType){

case Win32BackingStoreRetained:
case Win32BackingStoreNonretained:
break;

case Win32BackingStoreBuffered:
[_backingContext copyColorsToContext:_renderingContext size:_backingSize];
break;
}
}

-(NSPoint)convertPOINTLToBase:(POINTL)point {
NSPoint result;

result.x=point.x;
result.y=point.y;
result.y=[self primaryScreenHeight]-result.y;

return result;
}

-(NSPoint)mouseLocationOutsideOfEventStream {
POINT winPoint;
NSPoint point;

GetCursorPos(&winPoint);

point.x=winPoint.x;
point.y=winPoint.y;
point.y=[self primaryScreenHeight]-point.y;

return point;
}

-(void)sendEvent:(CGEvent *)eventX {
Win32Event *event=(Win32Event *)eventX;
MSG msg=[event msg];

DispatchMessage(&msg);
}

-(void)_GetWindowRect {
RECT windowRect;
RECT clientRect;
NSRect frame;

GetWindowRect(_handle,&windowRect);
windowRect=[self win32ContentRECTFromFrameRECT:windowRect];

GetClientRect(_handle,&clientRect);
windowRect.right=windowRect.left+clientRect.right;
windowRect.bottom=windowRect.top+clientRect.bottom;

frame=[self flipOnWin32Screen:NSRectFromRECT(windowRect)];

if(frame.size.width>0 && frame.size.height>0)
[_delegate platformWindow:self frameChanged:frame];
}

-(int)WM_SIZE_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
NSSize contentSize={LOWORD(lParam),HIWORD(lParam)};
// BOOL equalSizes=NSEqualSizes(_backingSize,contentSize);

if(contentSize.width>0 && contentSize.height>0){
[self rebuildBackingContextWithSize:contentSize];

[self _GetWindowRect];

// if(equalSizes)
// return 0;

switch(_backingType){

case Win32BackingStoreRetained:
case Win32BackingStoreNonretained:
break;

case Win32BackingStoreBuffered:
[_delegate platformWindow:self needsDisplayInRect:NSZeroRect];
break;
}
}

return 0;
}

-(int)WM_MOVE_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
[_delegate platformWindowWillMove:self];
[self _GetWindowRect];
[_delegate platformWindowDidMove:self];
return 0;
}

-(int)WM_PAINT_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
PAINTSTRUCT paintStruct;
RECT updateRECT;
// NSRect displayRect;

if(GetUpdateRect([self windowHandle],&updateRECT,NO)){
// The update rect is usually empty

switch(_backingType){

case Win32BackingStoreRetained:
case Win32BackingStoreNonretained:
BeginPaint([self windowHandle],&paintStruct);
[_delegate platformWindow:self needsDisplayInRect:NSZeroRect];
EndPaint([self windowHandle],&paintStruct);
break;

case Win32BackingStoreBuffered:
BeginPaint([self windowHandle],&paintStruct);
[self flushBuffer];
EndPaint([self windowHandle],&paintStruct);
break;
}
}

return 0;
}

-(int)WM_CLOSE_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
[_delegate platformWindowWillClose:self];
return 0;
}

-(int)WM_ACTIVATE_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
if(HIWORD(wParam)){ // minimized
if(LOWORD(wParam)){
[_delegate platformWindowDeminiaturized:self];
}
else {
[_delegate platformWindowMiniaturized:self];
}
}
else {
if(LOWORD(wParam))
[_delegate platformWindowActivated:self];
else
[_delegate platformWindowDeactivated:self checkForAppDeactivation:(lParam==0)];
}
return 0;
}

-(int)WM_MOUSEACTIVATE_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
if([_delegate canBecomeKeyWindow])
return MA_ACTIVATE;
else
return MA_NOACTIVATE;
}

-(int)WM_SETCURSOR_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
if([_delegate platformWindowSetCursorEvent:self])
return 0;

return DefWindowProc(_handle,WM_SETCURSOR,wParam,lParam);
}

-(int)WM_SIZING_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
RECT rect=[self win32ContentRECTFromFrameRECT:*(RECT *)lParam];
NSSize size=NSMakeSize(rect.right-rect.left,rect.bottom-rect.top);

if(!_sentBeginSizing)
[_delegate platformWindowWillBeginSizing:self];

_sentBeginSizing=YES;

size=[_delegate platformWindow:self frameSizeWillChange:size];

switch(wParam){
case WMSZ_LEFT:
case WMSZ_BOTTOMLEFT:
rect.bottom=rect.top+size.height;
rect.left=rect.right-size.width;
break;

case WMSZ_TOP:
case WMSZ_TOPRIGHT:
rect.top=rect.bottom-size.height;
rect.right=rect.left+size.width;
break;

case WMSZ_TOPLEFT:
rect.top=rect.bottom-size.height;
rect.left=rect.right-size.width;
break;

case WMSZ_RIGHT:
case WMSZ_BOTTOM:
case WMSZ_BOTTOMRIGHT:
rect.bottom=rect.top+size.height;
rect.right=rect.left+size.width;
break;
}

*(RECT *)lParam=[self win32FrameRECTFromContentRECT:rect];

return 0;
}

-(int)WM_GETMINMAXINFO_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
MINMAXINFO *info=(MINMAXINFO *)lParam;

if(_ignoreMinMaxMessage)
return 0;

if([_delegate minSize].width>0)
info->ptMinTrackSize.x=[_delegate minSize].width;
if([_delegate minSize].height>0)
info->ptMinTrackSize.y=[_delegate minSize].height;

return 0;
}

-(int)WM_ENTERSIZEMOVE_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
return 0;
}

-(int)WM_EXITSIZEMOVE_wParam:(WPARAM)wParam lParam:(LPARAM)lParam {
if(_sentBeginSizing)
[_delegate platformWindowDidEndSizing:self];

[_delegate platformWindowExitMove:self];

_sentBeginSizing=NO;

return 0;
}

-(LRESULT)windowProcedure:(UINT)message wParam:(WPARAM)wParam
lParam:(LPARAM)lParam {

if([_delegate platformWindowIgnoreModalMessages:self]){
// these messages are sent directly, so we can't drop them in NSApplication's modal run loop
switch(message){
case WM_SETCURSOR:
case WM_MOUSEACTIVATE:
return 0;

case WM_NCHITTEST:
return HTCLIENT;
}
}

switch(message){

case WM_ACTIVATE: return [self WM_ACTIVATE_wParam:wParam lParam:lParam];
case WM_MOUSEACTIVATE: return [self WM_MOUSEACTIVATE_wParam:wParam lParam:lParam];
case WM_SIZE: return [self WM_SIZE_wParam:wParam lParam:lParam];
case WM_MOVE: return [self WM_MOVE_wParam:wParam lParam:lParam];
case WM_PAINT: return [self WM_PAINT_wParam:wParam lParam:lParam];
case WM_CLOSE: return [self WM_CLOSE_wParam:wParam lParam:lParam];
case WM_SETCURSOR: return [self WM_SETCURSOR_wParam:wParam lParam:lParam];
case WM_SIZING: return [self WM_SIZING_wParam:wParam lParam:lParam];
case WM_GETMINMAXINFO: return [self WM_GETMINMAXINFO_wParam:wParam lParam:lParam];
case WM_ENTERSIZEMOVE: return [self WM_ENTERSIZEMOVE_wParam:wParam lParam:lParam];
case WM_EXITSIZEMOVE: return [self WM_EXITSIZEMOVE_wParam:wParam lParam:lParam];
case WM_SYSCOLORCHANGE:
[[Win32Display currentDisplay] invalidateSystemColors];
[_delegate platformWindowStyleChanged:self];
return 0;

#if 0
// doesn't seem to work
case WM_PALETTECHANGED:
[self rebuildBackingContextWithSize:_backingSize forceRebuild:YES];
[_delegate platformWindow:self needsDisplayInRect:NSZeroRect];
break;
#endif

default:
break;
}

return DefWindowProc(_handle,message,wParam,lParam);
}


static LRESULT CALLBACK windowProcedure(HWND handle,UINT message,WPARAM wParam,LPARAM lParam){
NSAutoreleasePool *pool=[NSAutoreleasePool new];
Win32Window *self=GetProp(handle,"self");
LRESULT result;

if(self==nil)
result=DefWindowProc(handle,message,wParam,lParam);
else
result=[self windowProcedure:message wParam:wParam lParam:lParam];

[pool release];

return result;
}

static void initializeWindowClass(WNDCLASS *class){
class->style=CS_HREDRAW|CS_VREDRAW|CS_OWNDC|CS_DBLCLKS;
class->lpfnWndProc=windowProcedure;
class->cbClsExtra=0;
class->cbWndExtra=0;
class->hInstance=NULL;
class->hIcon=NULL;
class->hCursor=LoadCursor(NULL,IDC_ARROW);
class->hbrBackground=NULL;
class->lpszMenuName=NULL;
class->lpszClassName=NULL;
}

+(void)initialize {
if(self==[Win32Window class]){
NSString *name=[[NSProcessInfo processInfo] processName];
NSString *path=[[NSBundle mainBundle] pathForResource:name ofType:@"ico"];
HICON icon=(path==nil)?NULL:LoadImage(NULL,[path fileSystemRepresentation],IMAGE_ICON,0,0,LR_DEFAULTCOLOR|LR_LOADFROMFILE);

static WNDCLASS _standardWindowClass,_popupWindowClass;


initializeWindowClass(&_standardWindowClass);
_standardWindowClass.lpszClassName="NSWin32StandardWindow";
_standardWindowClass.hIcon=icon;
if(RegisterClass(&_standardWindowClass)==0)
NSLog(@"RegisterClass failed");

initializeWindowClass(&_popupWindowClass);
_popupWindowClass.style|=CS_SAVEBITS;
_popupWindowClass.lpszClassName="NSWin32PopUpWindow";
if(RegisterClass(&_popupWindowClass)==0)
NSLog(@"RegisterClass failed");
}
}

@end

Change log

2470bd80abf4 by cocotron on Jan 1, 2007   Diff
Added templates for many missing classes,
updated copyright for 2007, +[NSValue
valueWithRange:],-[NSObject className]
Go to: 
Project members, sign in to write a code review

Older revisions

e5277a40a7e8 by cocotron on Dec 21, 2006   Diff
Original
All revisions of this file

File info

Size: 18459 bytes, 678 lines
Powered by Google Project Hosting