mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
add space between function arguments for readability
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@24441 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cb05788788
commit
d530f8e5ba
11 changed files with 291 additions and 296 deletions
|
@ -11,14 +11,14 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
|
@ -51,12 +51,12 @@
|
|||
return output;
|
||||
}
|
||||
|
||||
[output appendFormat:@"%d From the EventQue\n-> ",c];
|
||||
[output appendFormat:@"%d From the EventQue\n-> ", c];
|
||||
|
||||
for (i=0;i<c;i++)
|
||||
{
|
||||
[output appendFormat:@"%d EventType %d\n-> "
|
||||
,i,[(NSEvent *)[event_queue objectAtIndex:i] type]];
|
||||
, i, [(NSEvent *)[event_queue objectAtIndex:i] type]];
|
||||
}
|
||||
[output appendString:@"\n"];
|
||||
return output;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* WIN32Server - Implements window handling for MSWindows
|
||||
|
||||
Copyright (C) 2002,2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Fred Kiefer <FredKiefer@gmx.de>
|
||||
Date: March 2002
|
||||
|
@ -14,14 +14,14 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
|
@ -63,9 +63,9 @@ static NSString *NSMenuWillTearOff = @"MenuWillTearOff";
|
|||
static NSString *NSMenuwillPopUP =@"MenuwillPopUP";
|
||||
static NSString *NSWindowDidCreateWindow =@"WindowDidCreateWindow";
|
||||
|
||||
static NSEvent *process_key_event(WIN32Server *svr,
|
||||
static NSEvent *process_key_event(WIN32Server *svr,
|
||||
HWND hwnd, WPARAM wParam, LPARAM lParam, NSEventType eventType);
|
||||
static NSEvent *process_mouse_event(WIN32Server *svr,
|
||||
static NSEvent *process_mouse_event(WIN32Server *svr,
|
||||
HWND hwnd, WPARAM wParam, LPARAM lParam, NSEventType eventType);
|
||||
|
||||
//static BOOL HAVE_MAIN_MENU = NO;
|
||||
|
@ -73,7 +73,7 @@ static BOOL handlesWindowDecorations = NO;
|
|||
|
||||
static void
|
||||
validateWindow(WIN32Server *svr, HWND hwnd, RECT rect);
|
||||
LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
||||
LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
||||
WPARAM wParam, LPARAM lParam);
|
||||
|
||||
@implementation WIN32Server
|
||||
|
@ -99,7 +99,8 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
|||
}
|
||||
else
|
||||
{
|
||||
// Don't translate messages, as this would give extra character messages.
|
||||
// Don't translate messages, as this would give
|
||||
// extra character messages.
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +148,7 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
|||
inMode: mode
|
||||
dequeue: flag];
|
||||
|
||||
printf("Got EventType %d\n",[theEvent type]);
|
||||
printf("Got EventType %d\n", [theEvent type]);
|
||||
return theEvent;
|
||||
#else
|
||||
|
||||
|
@ -163,14 +164,14 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
|||
{
|
||||
[self callback: nil];
|
||||
[super discardEventsMatchingMask: mask
|
||||
beforeEvent: limit];
|
||||
beforeEvent: limit];
|
||||
}
|
||||
|
||||
|
||||
// server
|
||||
|
||||
/* Initialize AppKit backend */
|
||||
+ (void)initializeBackend
|
||||
+ (void) initializeBackend
|
||||
{
|
||||
|
||||
#ifdef __debugServer__
|
||||
|
@ -264,28 +265,11 @@ printf("\n\n##############################################################\n");
|
|||
watcher: (id<RunLoopEvents>)self
|
||||
forMode: mode];
|
||||
#else
|
||||
#if 0
|
||||
NSTimer *timer;
|
||||
|
||||
timer = [NSTimer timerWithTimeInterval: 0.01
|
||||
target: self
|
||||
selector: @selector(callback:)
|
||||
userInfo: nil
|
||||
repeats: YES];
|
||||
[currentRunLoop addTimer: timer forMode: mode];
|
||||
#else
|
||||
|
||||
/* OBSOLETE
|
||||
[currentRunLoop addMsgTarget: self
|
||||
withMethod: @selector(callback:)
|
||||
forMode: mode];
|
||||
*/
|
||||
[currentRunLoop addEvent: (void*)0
|
||||
type: ET_WINMSG
|
||||
watcher: (id<RunLoopEvents>)self
|
||||
forMode: mode];
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -439,7 +423,7 @@ to control debug output... or log specific event to a log panel.
|
|||
NSTextField *theText;
|
||||
NSTextField *theText2;
|
||||
|
||||
rect = NSMakeRect (715,800,236,182);
|
||||
rect = NSMakeRect (715, 800, 236, 182);
|
||||
configWindow = RETAIN([[NSWindow alloc] initWithContentRect: rect
|
||||
styleMask: style
|
||||
backing: NSBackingStoreBuffered
|
||||
|
@ -448,7 +432,7 @@ to control debug output... or log specific event to a log panel.
|
|||
[configWindow setReleasedWhenClosed: NO];
|
||||
|
||||
content = [configWindow contentView];
|
||||
theText = [[NSTextField alloc] initWithFrame: NSMakeRect (27,155,190,22)];
|
||||
theText = [[NSTextField alloc] initWithFrame: NSMakeRect (27, 155, 190, 22)];
|
||||
[theText setStringValue: @"Win32 GNUStep Display Server"];
|
||||
[theText setEditable: NO];
|
||||
[theText setEnabled: NO];
|
||||
|
@ -461,7 +445,7 @@ to control debug output... or log specific event to a log panel.
|
|||
/*
|
||||
NSTextField *theText1;
|
||||
|
||||
theText1 = [[NSTextField alloc] initWithFrame: NSMakeRect (27,135,190,22)];
|
||||
theText1 = [[NSTextField alloc] initWithFrame: NSMakeRect (27, 135, 190, 22)];
|
||||
[theText1 setStringValue: @"Revitalized By Tom MacSween"];
|
||||
[theText1 setEditable: NO];
|
||||
[theText1 setEnabled: NO];
|
||||
|
@ -471,7 +455,7 @@ to control debug output... or log specific event to a log panel.
|
|||
[[theText1 cell] setBezeled: NO];
|
||||
[content addSubview: theText1];*/
|
||||
|
||||
theText2 = [[NSTextField alloc] initWithFrame: NSMakeRect (17,115,200,22)];
|
||||
theText2 = [[NSTextField alloc] initWithFrame: NSMakeRect (17, 115, 200, 22)];
|
||||
[theText2 setStringValue: Version];
|
||||
[theText2 setEditable: NO];
|
||||
[theText2 setEnabled: NO];
|
||||
|
@ -483,7 +467,7 @@ to control debug output... or log specific event to a log panel.
|
|||
|
||||
// popup for style
|
||||
styleButton
|
||||
= [[NSPopUpButton alloc] initWithFrame: NSMakeRect (30,80,171,22)];
|
||||
= [[NSPopUpButton alloc] initWithFrame: NSMakeRect (30, 80, 171, 22)];
|
||||
[styleButton setAutoenablesItems: YES];
|
||||
[styleButton setTarget: self];
|
||||
[styleButton setAction: @selector(setStyle:)];
|
||||
|
@ -499,14 +483,14 @@ to control debug output... or log specific event to a log panel.
|
|||
|
||||
|
||||
// check box for using taskbar
|
||||
taskbarButton = [[NSButton alloc] initWithFrame: NSMakeRect (30,55,171,22)];
|
||||
taskbarButton = [[NSButton alloc] initWithFrame: NSMakeRect (30, 55, 171, 22)];
|
||||
[taskbarButton setButtonType: NSSwitchButton];
|
||||
[taskbarButton setTitle: @"Use Win Taskbar"];
|
||||
[taskbarButton setTarget: self];
|
||||
[taskbarButton setAction: @selector(setTaskBar:)];
|
||||
[content addSubview: taskbarButton];
|
||||
// save to defaults
|
||||
saveButton = [[NSButton alloc] initWithFrame: NSMakeRect (30,25,171,22)];
|
||||
saveButton = [[NSButton alloc] initWithFrame: NSMakeRect (30, 25, 171, 22)];
|
||||
[saveButton setButtonType: NSMomentaryPushInButton];
|
||||
[saveButton setTitle: @"Save to defaults"];
|
||||
[saveButton setTarget: self];
|
||||
|
@ -577,9 +561,9 @@ to control debug output... or log specific event to a log panel.
|
|||
|
||||
// user must restart application for changes
|
||||
|
||||
NSRunInformationalAlertPanel(@"Server Preferences Changed",
|
||||
@"Changes will take affect on the next restart",
|
||||
@"OK",nil, nil);
|
||||
NSRunInformationalAlertPanel(@"Server Preferences Changed",
|
||||
@"Changes will take affect on the next restart",
|
||||
@"OK", nil, nil);
|
||||
flags.HAVE_SERVER_PREFS = YES;
|
||||
[configWindow close];
|
||||
[saveButton setEnabled: NO];
|
||||
|
@ -639,7 +623,7 @@ NSWindowDidEndSheetNotification
|
|||
notification does not contain a userInfo dictionary.
|
||||
|
||||
NSWindowDidExposeNotification
|
||||
Posted whenever a portion of a nonretained NSWindow is exposed,
|
||||
Posted whenever a portion of a nonretained NSWindow is exposed,
|
||||
whether by being ordered in front of other windows or by other
|
||||
windows being removed from in front of it. The notification
|
||||
object is the NSWindow that has been exposed. The userInfo
|
||||
|
@ -885,7 +869,7 @@ printf("\n\n##############################################################\n");
|
|||
if ((int)hwnd == win)
|
||||
{
|
||||
/*
|
||||
* If the window at the point we want is excluded,
|
||||
* If the window at the point we want is excluded,
|
||||
* we must look through ALL windows at a lower level
|
||||
* until we find one which contains the same point.
|
||||
*/
|
||||
|
@ -1259,12 +1243,12 @@ printf("\n\n##############################################################\n");
|
|||
if ([self displayEvent: uMsg]== YES)
|
||||
{
|
||||
printf("\n\n\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
||||
printf("+++ NEW EVENT CYCLE %u +++\n",uMsg);
|
||||
printf("+++ NEW EVENT CYCLE %u +++\n", uMsg);
|
||||
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
||||
#ifdef __W32_debug_Event_loop
|
||||
printf("Events Posted = %d\n",flags.eventQueCount);
|
||||
printf("EVENT Que Count = %d\n",(int)[GSCurrentServer() eventQueCount]);
|
||||
printf("%s",[[GSCurrentServer() dumpQue: 10] cString]);
|
||||
printf("Events Posted = %d\n", flags.eventQueCount);
|
||||
printf("EVENT Que Count = %d\n", (int)[GSCurrentServer() eventQueCount]);
|
||||
printf("%s", [[GSCurrentServer() dumpQue: 10] cString]);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -1493,7 +1477,7 @@ printf("\n\n##############################################################\n");
|
|||
default:
|
||||
// Process all other messages.
|
||||
#ifdef __W32_debug__
|
||||
printf("Uhandled message: %d on window %s\n",uMsg,[[GSWindowWithNumber((int)hwnd) className] cString]);
|
||||
printf("Uhandled message: %d on window %s\n", uMsg, [[GSWindowWithNumber((int)hwnd) className] cString]);
|
||||
#endif
|
||||
NSDebugLLog(@"NSEvent", @"Got unhandled Message %d for %d", uMsg, hwnd);
|
||||
break;
|
||||
|
@ -1514,9 +1498,9 @@ printf("\n\n##############################################################\n");
|
|||
#ifdef __W32_debug__
|
||||
if ([ev type]== NSAppKitDefined)
|
||||
{
|
||||
printf("uMsg %d ",uMsg);
|
||||
printf("Post event %s ",[[ev eventNameWithSubtype: YES] cString]);
|
||||
printf("on window %s\n",[[[ev window] className] cString]);
|
||||
printf("uMsg %d ", uMsg);
|
||||
printf("Post event %s ", [[ev eventNameWithSubtype: YES] cString]);
|
||||
printf("on window %s\n", [[[ev window] className] cString]);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
@ -1631,11 +1615,11 @@ printf("\n\n##############################################################\n");
|
|||
|
||||
#ifdef __debugServer__
|
||||
printf("\n\n##############################################################\n");
|
||||
printf("handlesWindowDecorations %s\n",handlesWindowDecorations ? "YES" : "NO");
|
||||
printf("checking for NSMiniaturizableWindowMask %u\n",(style & NSMiniaturizableWindowMask));
|
||||
printf("GS Window Style %u\n",style);
|
||||
printf("Extended Style %d [hex] %X\n",(int)estyle,(UINT)estyle);
|
||||
printf("Win32 Style picked %ld [hex] %X\n",wstyle,(unsigned int)wstyle);
|
||||
printf("handlesWindowDecorations %s\n", handlesWindowDecorations ? "YES" : "NO");
|
||||
printf("checking for NSMiniaturizableWindowMask %u\n", (style & NSMiniaturizableWindowMask));
|
||||
printf("GS Window Style %u\n", style);
|
||||
printf("Extended Style %d [hex] %X\n", (int)estyle, (UINT)estyle);
|
||||
printf("Win32 Style picked %ld [hex] %X\n", wstyle, (unsigned int)wstyle);
|
||||
printf("\n##############################################################\n");
|
||||
#endif
|
||||
|
||||
|
@ -1643,21 +1627,21 @@ printf("\n\n##############################################################\n");
|
|||
* from here down is reused and unmodified from WIN32EventServer.m
|
||||
* which has been removed form the subproject
|
||||
*/
|
||||
NSDebugLLog(@"WTrace", @"window: %@ : %d : %d : %d", NSStringFromRect(frame),
|
||||
NSDebugLLog(@"WTrace", @"window: %@ : %d : %d : %d", NSStringFromRect(frame),
|
||||
type, style, screen);
|
||||
NSDebugLLog(@"WTrace", @" device frame: %d, %d, %d, %d",
|
||||
r.left, r.top, r.right - r.left, r.bottom - r.top);
|
||||
hwnd = CreateWindowEx(estyle,
|
||||
"GNUstepWindowClass",
|
||||
"GNUstepWindow",
|
||||
hwnd = CreateWindowEx(estyle,
|
||||
"GNUstepWindowClass",
|
||||
"GNUstepWindow",
|
||||
wstyle,
|
||||
r.left,
|
||||
r.top,
|
||||
r.right - r.left,
|
||||
r.bottom - r.top,
|
||||
(HWND)NULL,
|
||||
(HMENU)NULL,
|
||||
hinstance,
|
||||
r.bottom - r.top,
|
||||
(HWND)NULL,
|
||||
(HMENU)NULL,
|
||||
hinstance,
|
||||
(void*)type);
|
||||
NSDebugLLog(@"WTrace", @" num/handle: %d", hwnd);
|
||||
|
||||
|
@ -1675,7 +1659,7 @@ printf("\n\n##############################################################\n");
|
|||
{
|
||||
DWORD wstyle = [self windowStyleForGSStyle: style];
|
||||
|
||||
NSAssert(handlesWindowDecorations,
|
||||
NSAssert(handlesWindowDecorations,
|
||||
@"-stylewindow: : called when handlesWindowDecorations == NO");
|
||||
|
||||
NSDebugLLog(@"WTrace", @"stylewindow: %d : %d", style, winNum);
|
||||
|
@ -1725,7 +1709,8 @@ printf("\n\n##############################################################\n");
|
|||
- (void) titlewindow: (NSString*)window_title : (int) winNum
|
||||
{
|
||||
NSDebugLLog(@"WTrace", @"titlewindow: %@ : %d", window_title, winNum);
|
||||
SetWindowText((HWND)winNum, [window_title cString]);
|
||||
SetWindowTextW((HWND)winNum, (const unichar*)
|
||||
[window_title cStringUsingEncoding: NSUnicodeStringEncoding]);
|
||||
}
|
||||
|
||||
- (void) miniwindow: (int) winNum
|
||||
|
@ -1843,7 +1828,7 @@ printf("\n\n##############################################################\n");
|
|||
r = GSScreenRectToMS(frame, [window styleMask], self);
|
||||
GetWindowRect((HWND)winNum, &r2);
|
||||
|
||||
SetWindowPos((HWND)winNum, NULL,
|
||||
SetWindowPos((HWND)winNum, NULL,
|
||||
r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_NOZORDER);
|
||||
|
||||
if ((win->useHDC)
|
||||
|
@ -1991,7 +1976,7 @@ printf("\n\n##############################################################\n");
|
|||
{
|
||||
/*
|
||||
If we don't handle decorations, all our windows are going to be
|
||||
border- and decorationless. In that case, -gui won't call this method,
|
||||
border- and decorationless. In that case, -gui won't call this method,
|
||||
but we still use it internally.
|
||||
*/
|
||||
*l = *r = *t = *b = 0.0;
|
||||
|
@ -2420,7 +2405,7 @@ process_mouse_event(WIN32Server *svr, HWND hwnd, WPARAM wParam, LPARAM lParam,
|
|||
}
|
||||
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
||||
LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
WIN32Server *ctxt = (WIN32Server *)GSCurrentServer();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* -*- mode:ObjC -*-
|
||||
Win32GLContext - backend implementation of NSOpenGLContext
|
||||
|
||||
Copyright (C) 1998,2002,2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 2002, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Xavier Glattard
|
||||
Date: Jan 2007
|
||||
|
@ -13,14 +13,15 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -39,9 +40,9 @@
|
|||
#define NSOPENGLSUBWINDOWNAME "NSOpenGLSubwindow"
|
||||
|
||||
extern LRESULT CALLBACK MainWndProc(
|
||||
HWND hWnd,
|
||||
UINT message,
|
||||
WPARAM wParam,
|
||||
HWND hWnd,
|
||||
UINT message,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam );
|
||||
|
||||
@interface Win32Subwindow : NSObject
|
||||
|
@ -59,9 +60,9 @@ int
|
|||
setupPixelFormat(HDC hDC, LPPIXELFORMATDESCRIPTOR ppfd );
|
||||
|
||||
LRESULT CALLBACK win32SubwindowProc(
|
||||
HWND hWnd,
|
||||
UINT message,
|
||||
WPARAM wParam,
|
||||
HWND hWnd,
|
||||
UINT message,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam );
|
||||
|
||||
@implementation Win32Subwindow
|
||||
|
@ -79,8 +80,8 @@ LRESULT CALLBACK win32SubwindowProc(
|
|||
wclss.cbClsExtra = 0;
|
||||
wclss.cbWndExtra = 0;
|
||||
wclss.hInstance = hInstance;
|
||||
wclss.hIcon = LoadIcon(NULL,IDI_APPLICATION);
|
||||
wclss.hCursor = LoadCursor(NULL,IDC_ARROW);
|
||||
wclss.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wclss.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wclss.hbrBackground = NULL;
|
||||
wclss.lpszMenuName = NULL;
|
||||
wclss.lpszClassName = NSOPENGLSUBWINDOWCLASS;
|
||||
|
@ -89,7 +90,7 @@ LRESULT CALLBACK win32SubwindowProc(
|
|||
atom = RegisterClass(&wclss);
|
||||
NSAssert(atom, @"Failed To Register The Win32Subwindow MS window class.");
|
||||
|
||||
NSDebugMLLog(@"WGL",@"MS window class initialized (%u)",atom);
|
||||
NSDebugMLLog(@"WGL", @"MS window class initialized (%u)", atom);
|
||||
}
|
||||
|
||||
- (id) initWithView: (NSOpenGLView *) view
|
||||
|
@ -142,7 +143,7 @@ LRESULT CALLBACK win32SubwindowProc(
|
|||
|
||||
/* Grab the window class we have registered on [+initialize] */
|
||||
atom = GetClassInfo( hInstance, NSOPENGLSUBWINDOWCLASS, &wclss );
|
||||
NSAssert(atom,@"MS window class not found !");
|
||||
NSAssert(atom, @"MS window class not found !");
|
||||
|
||||
RECT parent_rect;
|
||||
GetWindowRect((HWND)[win windowNumber], &parent_rect);
|
||||
|
@ -152,15 +153,15 @@ LRESULT CALLBACK win32SubwindowProc(
|
|||
width = NSWidth(rect);
|
||||
height = NSHeight(rect);
|
||||
|
||||
NSDebugMLLog(@"WGL",@"MS window creation (%d,%d,%u,%u)",x, y, width, height);
|
||||
NSDebugMLLog(@"WGL", @"MS window creation (%d, %d, %u, %u)", x, y, width, height);
|
||||
|
||||
winid = CreateWindow(
|
||||
NSOPENGLSUBWINDOWCLASS, NSOPENGLSUBWINDOWNAME,
|
||||
WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE,
|
||||
x, y, width, height,
|
||||
NSOPENGLSUBWINDOWCLASS, NSOPENGLSUBWINDOWNAME,
|
||||
WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE,
|
||||
x, y, width, height,
|
||||
(HWND)[win windowNumber], (HMENU)NULL, hInstance, (LPVOID)self);
|
||||
|
||||
NSAssert(winid,@"Failed to create a MS window");
|
||||
NSAssert(winid, @"Failed to create a MS window");
|
||||
|
||||
ShowCursor( TRUE );
|
||||
}
|
||||
|
@ -189,7 +190,7 @@ LRESULT CALLBACK win32SubwindowProc(
|
|||
win = [attached window];
|
||||
NSAssert1(win, @"%@'s window is nil now!", attached);
|
||||
|
||||
NSAssert1(![attached isRotatedOrScaledFromBase],
|
||||
NSAssert1(![attached isRotatedOrScaledFromBase],
|
||||
@"%@ is rotated or scaled, now!", attached);
|
||||
|
||||
server = GSServerForWindow(win);
|
||||
|
@ -227,7 +228,7 @@ LRESULT CALLBACK win32SubwindowProc(
|
|||
width = NSWidth(rect);
|
||||
height = NSHeight(rect);
|
||||
|
||||
MoveWindow(winid,x, y, width, height,/*FIXME*/TRUE);
|
||||
MoveWindow(winid, x, y, width, height, /*FIXME*/TRUE);
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
@ -361,7 +362,7 @@ static Win32GLContext *currentGLContext;
|
|||
[NSException raise: NSGenericException
|
||||
format: @"GL Context is not bind, cannot be made current"];
|
||||
|
||||
NSAssert(wgl_context && format->wgl_drawable,
|
||||
NSAssert(wgl_context && format->wgl_drawable,
|
||||
NSInternalInconsistencyException);
|
||||
|
||||
NSDebugMLLog(@"WGL", @"before wglMakeCurrent");
|
||||
|
@ -420,11 +421,11 @@ static Win32GLContext *currentGLContext;
|
|||
// GLXFBConfig *conf_tab;
|
||||
// int n_elem;
|
||||
// int attrs[] = {
|
||||
// GLX_DOUBLEBUFFER, 1,
|
||||
// GLX_DEPTH_SIZE, 16,
|
||||
// GLX_RED_SIZE, 1,
|
||||
// GLX_BLUE_SIZE, 1,
|
||||
// GLX_GREEN_SIZE, 1,
|
||||
// GLX_DOUBLEBUFFER, 1,
|
||||
// GLX_DEPTH_SIZE, 16,
|
||||
// GLX_RED_SIZE, 1,
|
||||
// GLX_BLUE_SIZE, 1,
|
||||
// GLX_GREEN_SIZE, 1,
|
||||
// None
|
||||
// };
|
||||
|
||||
|
@ -432,7 +433,7 @@ static Win32GLContext *currentGLContext;
|
|||
// if (n_elem > 0)
|
||||
// {
|
||||
// printf("found %d context\n", n_elem);
|
||||
// // win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 10, 10,
|
||||
// // win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 10, 10,
|
||||
// // 800, 600, 1, 0, 1);
|
||||
// glx_drawable = glXCreateWindow(dpy, *conf_tab, xsubwin->winid, NULL);
|
||||
|
||||
|
@ -446,7 +447,7 @@ static Win32GLContext *currentGLContext;
|
|||
//FIXME
|
||||
//The following line should be the good one. But it crashes my X server...
|
||||
|
||||
// glx_drawable = glXCreateWindow(dpy, *format->conf_tab, xsubwin->winid,
|
||||
// glx_drawable = glXCreateWindow(dpy, *format->conf_tab, xsubwin->winid,
|
||||
// NULL);
|
||||
NSDebugMLLog(@"WGL", @"wgl_window : %u", win);
|
||||
}
|
||||
|
@ -469,37 +470,37 @@ static Win32GLContext *currentGLContext;
|
|||
@end
|
||||
|
||||
LRESULT CALLBACK win32SubwindowProc(
|
||||
HWND hWnd,
|
||||
UINT message,
|
||||
WPARAM wParam,
|
||||
HWND hWnd,
|
||||
UINT message,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam )
|
||||
{
|
||||
Win32Subwindow *wsubwin;
|
||||
Win32GLContext* ctx = nil;
|
||||
|
||||
NSDebugFLLog(@"WGLEvents",@"Entering.");
|
||||
wsubwin = (Win32Subwindow*) GetWindowLongPtr(hWnd,GWLP_USERDATA);
|
||||
NSDebugFLLog(@"WGLEvents", @"Entering.");
|
||||
wsubwin = (Win32Subwindow*) GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
if(wsubwin) ctx = (Win32GLContext*)[wsubwin->attached openGLContext];
|
||||
|
||||
switch (message) {
|
||||
case WM_CREATE:
|
||||
NSDebugFLLog(@"WGLEvents",@"WM_CREATE event received.");
|
||||
NSDebugFLLog(@"WGLEvents", @"WM_CREATE event received.");
|
||||
wsubwin = (Win32Subwindow*)(((LPCREATESTRUCT) lParam)->lpCreateParams);
|
||||
ctx = (Win32GLContext*)[wsubwin->attached openGLContext];
|
||||
NSDebugFLLog(@"WGLEvents",@"subwindow : %@", wsubwin);
|
||||
NSDebugFLLog(@"WGLEvents", @"subwindow : %@", wsubwin);
|
||||
// initialize OpenGL rendering
|
||||
NSCAssert(wsubwin->hDC = GetDC(hWnd), @"No DC");
|
||||
[ctx->format _setDrawable: wsubwin->hDC];
|
||||
//TODO setupPalette(wsubwin->hDC);
|
||||
NSCAssert(
|
||||
ctx->wgl_context = wglCreateContext(wsubwin->hDC),
|
||||
ctx->wgl_context = wglCreateContext(wsubwin->hDC),
|
||||
@"wglCreateContext failed");
|
||||
// wglMakeCurrent(wsubwin->hDC, hGLRC)
|
||||
SetWindowLongPtr(hWnd,GWLP_USERDATA,(LONG_PTR)wsubwin);
|
||||
NSDebugFLLog(@"WGLEvents",@"WM_CREATE done.");
|
||||
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)wsubwin);
|
||||
NSDebugFLLog(@"WGLEvents", @"WM_CREATE done.");
|
||||
return 0;
|
||||
case WM_DESTROY:
|
||||
NSDebugFLLog(@"WGLEvents",@"WM_DESTROY event received.");
|
||||
NSDebugFLLog(@"WGLEvents", @"WM_DESTROY event received.");
|
||||
// finish OpenGL rendering
|
||||
|
||||
if(ctx->wgl_context) {
|
||||
|
@ -510,7 +511,7 @@ LRESULT CALLBACK win32SubwindowProc(
|
|||
DeleteObject(hPalette);
|
||||
}*/
|
||||
ReleaseDC(hWnd, wsubwin->hDC);
|
||||
NSDebugFLLog(@"WGLEvents",@"WM_DESTROY done.");
|
||||
NSDebugFLLog(@"WGLEvents", @"WM_DESTROY done.");
|
||||
return 0;
|
||||
/* case WM_SIZE:
|
||||
// track window size changes
|
||||
|
@ -562,12 +563,12 @@ LRESULT CALLBACK win32SubwindowProc(
|
|||
}
|
||||
break;*/
|
||||
default:
|
||||
NSDebugFLLog(@"WGLEvents",@"other event received (%u).",message);
|
||||
// return MainWndProc((HWND)GetWindowLongPtr(hWnd,GWLP_HWNDPARENT), message, wParam, lParam);
|
||||
NSDebugFLLog(@"WGLEvents", @"other event received (%u).", message);
|
||||
// return MainWndProc((HWND)GetWindowLongPtr(hWnd, GWLP_HWNDPARENT), message, wParam, lParam);
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
break;
|
||||
}
|
||||
NSDebugFLLog(@"WGLEvents",@"Failed.");
|
||||
NSDebugFLLog(@"WGLEvents", @"Failed.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* -*- mode:ObjC -*-
|
||||
Win32GLContext - backend implementation of NSOpenGLContext
|
||||
|
||||
Copyright (C) 1998,2002,2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 2002, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Xavier Glattard
|
||||
Date: Jan 2007
|
||||
|
@ -13,14 +13,15 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -165,24 +166,24 @@ static void attributesWGL2NS( LPPIXELFORMATDESCRIPTOR ppfd, NSOpenGLPixelFormatA
|
|||
|
||||
- (id)initWithAttributes: (NSOpenGLPixelFormatAttribute *) attribs
|
||||
{
|
||||
NSDebugMLLog(@"WGL",@"will init");
|
||||
NSDebugMLLog(@"WGL", @"will init");
|
||||
self = [super init];
|
||||
if(self)
|
||||
{
|
||||
wgl_drawable = 0;
|
||||
wgl_pixelformat = 0;
|
||||
|
||||
attributesNS2WGL(attribs,&pfd);
|
||||
attributesNS2WGL(attribs, &pfd);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#if 0
|
||||
//FIXME, what screen number ?
|
||||
if (GSglxMinorVersion (dpy) >= 3)
|
||||
conf.tab = glXChooseFBConfig(dpy, DefaultScreen(dpy), [data mutableBytes],
|
||||
conf.tab = glXChooseFBConfig(dpy, DefaultScreen(dpy), [data mutableBytes],
|
||||
&n_elem);
|
||||
else
|
||||
conf.visual = glXChooseVisual(dpy, DefaultScreen(dpy),
|
||||
conf.visual = glXChooseVisual(dpy, DefaultScreen(dpy),
|
||||
[data mutableBytes]);
|
||||
|
||||
if (((GSglxMinorVersion (dpy) >= 3)
|
||||
|
@ -238,14 +239,14 @@ static void attributesWGL2NS( LPPIXELFORMATDESCRIPTOR ppfd, NSOpenGLPixelFormatA
|
|||
- (void) _setDrawable: (HDC) aDrawable
|
||||
{
|
||||
NSCAssert(
|
||||
wgl_pixelformat = ChoosePixelFormat(aDrawable, &pfd),
|
||||
wgl_pixelformat = ChoosePixelFormat(aDrawable, &pfd),
|
||||
@"ChoosePixelFormat failed.");
|
||||
NSCAssert(
|
||||
SetPixelFormat(aDrawable, wgl_pixelformat, &pfd),
|
||||
SetPixelFormat(aDrawable, wgl_pixelformat, &pfd),
|
||||
@"SetPixelFormat failed.");
|
||||
wgl_drawable = aDrawable;
|
||||
|
||||
NSDebugFLLog(@"WGL",@"found : %u",wgl_pixelformat);
|
||||
NSDebugFLLog(@"WGL", @"found : %u", wgl_pixelformat);
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
|
|
@ -11,14 +11,15 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -67,13 +68,13 @@
|
|||
if ((int)lParam == flags.menuRef)
|
||||
target=YES;
|
||||
|
||||
printf("RECEIVER [hwnd]%s\n",[[EVENT_WINDOW(hwnd) className] cString]);
|
||||
printf("ON [lParam]%s\n",[[EVENT_WINDOW(lParam) className] cString]);
|
||||
printf("RECEIVER [hwnd]%s\n", [[EVENT_WINDOW(hwnd) className] cString]);
|
||||
printf("ON [lParam]%s\n", [[EVENT_WINDOW(lParam) className] cString]);
|
||||
|
||||
printf("[lParam] %s",[[self gswindowstate:EVENT_WINDOW(lParam)] cString]);
|
||||
printf("ACTIVATE_FLAG STATE %d \n",flags._last_WM_ACTIVATE);
|
||||
printf("[lParam] %s", [[self gswindowstate:EVENT_WINDOW(lParam)] cString]);
|
||||
printf("ACTIVATE_FLAG STATE %d \n", flags._last_WM_ACTIVATE);
|
||||
|
||||
printf("[hwnd] %s",[[self gswindowstate:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("[hwnd] %s", [[self gswindowstate:EVENT_WINDOW(hwnd)] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
|
@ -133,17 +134,17 @@
|
|||
|
||||
#ifdef __WM_ACTIVATEAPP__
|
||||
|
||||
printf("NSApp is:[%s]\n",active ? "active" : "inactive");
|
||||
printf("lParam is [%s]\n thread = [%u]\n w32_Class[%s] \n",
|
||||
(int)wParam ? "TRUE": "FALSE",
|
||||
(unsigned int)lParam,
|
||||
printf("NSApp is:[%s]\n", active ? "active" : "inactive");
|
||||
printf("lParam is [%s]\n thread = [%u]\n w32_Class[%s] \n",
|
||||
(int)wParam ? "TRUE": "FALSE",
|
||||
(unsigned int)lParam,
|
||||
[[self getNativeClassName:hwnd] cString]);
|
||||
// debug GS_state details
|
||||
printf("%s",[[self gswindowstate:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s",[[self gswindowstate:EVENT_WINDOW(wParam)] cString]);
|
||||
printf("eventHandled=[%s]\n",flags._eventHandled ? "YES" : "NO");
|
||||
printf("%s", [[self gswindowstate:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s", [[self gswindowstate:EVENT_WINDOW(wParam)] cString]);
|
||||
printf("eventHandled=[%s]\n", flags._eventHandled ? "YES" : "NO");
|
||||
|
||||
printf("REQUESTED STATE %d\n",flags._last_WM_ACTIVATE);
|
||||
printf("REQUESTED STATE %d\n", flags._last_WM_ACTIVATE);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -14,14 +14,15 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -37,9 +38,9 @@
|
|||
#ifdef __WM_NCCREATE__
|
||||
printf("WM_NCCREATE\n");
|
||||
#ifdef __W32_debug__
|
||||
printf("%s",[[self w32_createDetails:(LPCREATESTRUCT)lParam] cString]);
|
||||
printf("%s", [[self w32_createDetails:(LPCREATESTRUCT)lParam] cString]);
|
||||
#endif
|
||||
printf("\nRequested GS Window Style is %u\n",flags.currentGS_Style);
|
||||
printf("\nRequested GS Window Style is %u\n", flags.currentGS_Style);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
|
@ -86,18 +87,18 @@
|
|||
#ifdef __WM_CREATE__
|
||||
printf("WM_CREATE: *********************\n");
|
||||
#ifdef __W32_debug__
|
||||
printf("%s",[[self w32_createDetails:(LPCREATESTRUCT)lParam] cString]);
|
||||
printf("%s", [[self w32_createDetails:(LPCREATESTRUCT)lParam] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
|
||||
printf("Parent isa %s\n",[[self getNativeClassName:GetParent(hwnd)] cString]);
|
||||
printf("[hwnd]Native WindowType %s\n",[[self getNativeClassName:(HWND)hwnd] cString]);
|
||||
printf("[hwnd]GS WindowType %s:\n",[[EVENT_WINDOW(hwnd) className] cString]);
|
||||
printf("HAVE_MAIN_MENU = %s\n",flags.HAVE_MAIN_MENU ? "YES": "NO");
|
||||
printf("Main Menu Window Num: %d Currrent window Num: %d\n",
|
||||
[[[NSApp mainMenu] window] windowNumber],(int)hwnd);
|
||||
printf("Window Task bar flag %s\n",flags.useWMTaskBar ? "YES" : "NO");
|
||||
printf("Parent isa %s\n", [[self getNativeClassName:GetParent(hwnd)] cString]);
|
||||
printf("[hwnd]Native WindowType %s\n", [[self getNativeClassName:(HWND)hwnd] cString]);
|
||||
printf("[hwnd]GS WindowType %s:\n", [[EVENT_WINDOW(hwnd) className] cString]);
|
||||
printf("HAVE_MAIN_MENU = %s\n", flags.HAVE_MAIN_MENU ? "YES": "NO");
|
||||
printf("Main Menu Window Num: %d Currrent window Num: %d\n",
|
||||
[[[NSApp mainMenu] window] windowNumber], (int)hwnd);
|
||||
printf("Window Task bar flag %s\n", flags.useWMTaskBar ? "YES" : "NO");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -11,14 +11,15 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include "w32_Events.h"
|
||||
|
@ -40,10 +41,10 @@ static NSString * spacer =@"<BLANK_LINE>\n";
|
|||
printf("*******************testing Conversion \n\n\n");
|
||||
printf("MSScreenRectToGS GSScreenRectToMS\n");
|
||||
gsrect = MSScreenRectToGS(r, [window styleMask], self);
|
||||
msrect= GSScreenRectToMS(gsrect, [window styleMask],self);
|
||||
msrect= GSScreenRectToMS(gsrect, [window styleMask], self);
|
||||
printf("*************************test complete\n\n\n");
|
||||
|
||||
[self print_result:msrect and:gsrect and:r];
|
||||
[self print_result: msrect and: gsrect and: r];
|
||||
//TestsDone=YES;
|
||||
}
|
||||
|
||||
|
@ -51,20 +52,20 @@ static NSString * spacer =@"<BLANK_LINE>\n";
|
|||
{
|
||||
|
||||
printf("MS - Control\n");
|
||||
printf("MSrect = left %ld ",control.left);
|
||||
printf(" top %ld",control.top);
|
||||
printf(" right %ld",control.right);
|
||||
printf(" Bottom %ld\n",control.bottom);
|
||||
printf("MSrect = left %ld ", control.left);
|
||||
printf(" top %ld", control.top);
|
||||
printf(" right %ld", control.right);
|
||||
printf(" Bottom %ld\n", control.bottom);
|
||||
|
||||
printf("GS - Calculated\n");
|
||||
printf("NSRect = height %f width %f ",gsrect.size.height,gsrect.size.width);
|
||||
printf(" X %f Y %f\n",gsrect.origin.x,gsrect.origin.y);
|
||||
printf("NSRect = height %f width %f ", gsrect.size.height, gsrect.size.width);
|
||||
printf(" X %f Y %f\n", gsrect.origin.x, gsrect.origin.y);
|
||||
|
||||
printf("MS - Calculated\n");
|
||||
printf("MSrect = left %ld ",msrect.left);
|
||||
printf(" top %ld",msrect.top);
|
||||
printf(" right %ld",msrect.right);
|
||||
printf(" Bottom %ld\n",msrect.bottom);
|
||||
printf("MSrect = left %ld ", msrect.left);
|
||||
printf(" top %ld", msrect.top);
|
||||
printf(" right %ld", msrect.right);
|
||||
printf(" Bottom %ld\n", msrect.bottom);
|
||||
}
|
||||
|
||||
- (BOOL) displayEvent:(unsigned int)uMsg
|
||||
|
@ -169,25 +170,26 @@ typedef struct tagCREATESTRUCT {
|
|||
|
||||
- (NSMutableString *) w32_createDetails:(LPCREATESTRUCT)details
|
||||
{
|
||||
NSMutableString * output= [NSMutableString stringWithString: spacer];
|
||||
|
||||
NSMutableString * output= [NSMutableString stringWithString:spacer];
|
||||
[output appendString:@"\n\nLPCREATESTRUCT details\n"];
|
||||
|
||||
[output appendFormat:@"HINSTANCE %p ",details->hInstance];
|
||||
[output appendFormat:@"HINSTANCE %p ", details->hInstance];
|
||||
|
||||
[output appendFormat:@"HMENU %p\n",details->hMenu];
|
||||
[output appendFormat:@"HMENU %p\n", details->hMenu];
|
||||
|
||||
|
||||
[output appendFormat:@"Creating window: Parent is %s:\n",
|
||||
[self getNativeClassName:details->hwndParent]];
|
||||
[output appendFormat:@"Creating window: Parent is %s:\n",
|
||||
[self getNativeClassName: details->hwndParent]];
|
||||
|
||||
[output appendFormat:@"Co-ordanates:height[%d] width[%d] Pos[%d] Pox[%d]\n",
|
||||
details->cy,details->cx,details->y,details->x];
|
||||
[output appendFormat:@"Co-ordanates: height[%d] width[%d] Pos[%d] Pox[%d]\n",
|
||||
details->cy, details->cx, details->y, details->x];
|
||||
|
||||
[output appendFormat:@"Style %lu Name: %s Win32Class: %s Extended Style %ld\n\n\n",
|
||||
details->style,details->lpszName,
|
||||
details->lpszClass,details->dwExStyle];
|
||||
[output appendString:spacer];
|
||||
[output appendFormat:
|
||||
@"Style %lu Name: %s Win32Class: %s Extended Style %ld\n\n\n",
|
||||
details->style, details->lpszName,
|
||||
details->lpszClass, details->dwExStyle];
|
||||
[output appendString: spacer];
|
||||
|
||||
return output;
|
||||
}
|
||||
|
@ -198,24 +200,24 @@ typedef struct tagCREATESTRUCT {
|
|||
int c=[anArray count];
|
||||
|
||||
|
||||
NSMutableString * output= [NSMutableString stringWithString:spacer];
|
||||
NSMutableString * output= [NSMutableString stringWithString: spacer];
|
||||
|
||||
[output appendFormat:@"Application window count is: %d\n",c];
|
||||
[output appendFormat:@"Application window count is: %d\n", c];
|
||||
|
||||
for (i=0;i<c;i++)
|
||||
{
|
||||
NSWindow * theWindow=[anArray objectAtIndex:i];
|
||||
NSWindow * theWindow=[anArray objectAtIndex: i];
|
||||
|
||||
[output appendString:[self WindowDetail:theWindow]];
|
||||
[output appendString:[self WindowDetail: theWindow]];
|
||||
}
|
||||
[output appendString:spacer];
|
||||
[output appendString: spacer];
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
- (NSMutableString *) WindowDetail:(NSWindow *) theWindow
|
||||
{
|
||||
return [self gswindowstate:theWindow];
|
||||
return [self gswindowstate: theWindow];
|
||||
|
||||
}
|
||||
|
||||
|
@ -223,10 +225,10 @@ typedef struct tagCREATESTRUCT {
|
|||
{
|
||||
NSMutableString * output= [NSMutableString stringWithCString:"MSRect Details\n"];
|
||||
|
||||
[output appendFormat:@"left %ld ",aRect.left];
|
||||
[output appendFormat:@"top %ld ",aRect.top];
|
||||
[output appendFormat:@"right %ld ",aRect.right];
|
||||
[output appendFormat:@"Bottom %ld\n",aRect.bottom];
|
||||
[output appendFormat:@"left %ld ", aRect.left];
|
||||
[output appendFormat:@"top %ld ", aRect.top];
|
||||
[output appendFormat:@"right %ld ", aRect.right];
|
||||
[output appendFormat:@"Bottom %ld\n", aRect.bottom];
|
||||
|
||||
return output;
|
||||
}
|
||||
|
@ -236,10 +238,10 @@ typedef struct tagCREATESTRUCT {
|
|||
|
||||
NSMutableString * output= [NSMutableString stringWithString:@" "];
|
||||
|
||||
[output appendFormat:@"height %ld width %ld ",(int)aRect.size.height
|
||||
,(int)aRect.size.width];
|
||||
[output appendFormat:@" XPos %ld YPos %ld\n",(int)aRect.origin.x
|
||||
,(int)aRect.origin.y];
|
||||
[output appendFormat:@"height %ld width %ld ", (int)aRect.size.height
|
||||
, (int)aRect.size.width];
|
||||
[output appendFormat:@" XPos %ld YPos %ld\n", (int)aRect.origin.x
|
||||
, (int)aRect.origin.y];
|
||||
|
||||
return output;
|
||||
}
|
||||
|
@ -247,66 +249,66 @@ typedef struct tagCREATESTRUCT {
|
|||
- (NSMutableString *) gswindowstate:(NSWindow *)theWindow
|
||||
{
|
||||
// NSRect cvRect=[[theWindow contentView] frame];
|
||||
NSMutableString * output= [NSMutableString stringWithString:spacer];
|
||||
[output appendFormat:@"MenuRef = %d\n",flags.menuRef];
|
||||
[output appendFormat:@"Main Menu %s\n",flags._is_menu ? "YES" : "NO"];
|
||||
NSMutableString * output= [NSMutableString stringWithString: spacer];
|
||||
[output appendFormat:@"MenuRef = %d\n", flags.menuRef];
|
||||
[output appendFormat:@"Main Menu %s\n", flags._is_menu ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW title %@\n", [theWindow title]];
|
||||
[output appendFormat:@"WINDOW className %@\n", [theWindow className]];
|
||||
[output appendFormat:@"WINDOW isVisible: %s\n",[theWindow isVisible] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isAutodisplay: %s\n",[theWindow isAutodisplay] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isMiniaturized: %s\n",[theWindow isMiniaturized] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW viewsNeedDisplay: %s\n",[theWindow viewsNeedDisplay] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isOpaque: %s\n",[theWindow isOpaque] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isReleasedWhenClosed: %s\n ",[theWindow isReleasedWhenClosed] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isOneShot: %s\n",[theWindow isOneShot] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isMainWindow: %s\n",[theWindow isMainWindow] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isKeyWindow: %s\n",[theWindow isKeyWindow] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW styleMask: %d\n",[theWindow styleMask]];
|
||||
[output appendFormat:@"WINDOW isVisible: %s\n", [theWindow isVisible] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isAutodisplay: %s\n", [theWindow isAutodisplay] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isMiniaturized: %s\n", [theWindow isMiniaturized] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW viewsNeedDisplay: %s\n", [theWindow viewsNeedDisplay] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isOpaque: %s\n", [theWindow isOpaque] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isReleasedWhenClosed: %s\n ", [theWindow isReleasedWhenClosed] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isOneShot: %s\n", [theWindow isOneShot] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isMainWindow: %s\n", [theWindow isMainWindow] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW isKeyWindow: %s\n", [theWindow isKeyWindow] ? "YES" : "NO"];
|
||||
[output appendFormat:@"WINDOW styleMask: %d\n", [theWindow styleMask]];
|
||||
[output appendFormat:@"WINDOW frame:%@", [self NSRectDetails:[theWindow frame]]];
|
||||
//[output appendString:[self subViewDetails:theWindow]];
|
||||
//[output appendString:[self subViewDetails: theWindow]];
|
||||
|
||||
[output appendFormat:@"Native Class Name %@\n",
|
||||
[output appendFormat:@"Native Class Name %@\n",
|
||||
[self getNativeClassName:(HWND)[theWindow windowNumber]]];
|
||||
[output appendFormat:@"Win32 GWL_EXStyle %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber],GWL_EXSTYLE)];
|
||||
[output appendFormat:@"Win32 GWL_EXStyle %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber], GWL_EXSTYLE)];
|
||||
|
||||
[output appendFormat:@"Win32 GWL_STYLE %X\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber],GWL_STYLE)];
|
||||
[output appendFormat:@"Win32 GWL_STYLE %X\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber], GWL_STYLE)];
|
||||
|
||||
[output appendFormat:@"Win32 GWL_WNDPROC %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber],GWL_WNDPROC)];
|
||||
[output appendFormat:@"Win32 GWL_WNDPROC %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber], GWL_WNDPROC)];
|
||||
|
||||
[output appendFormat:@"Win32 GWL_HINSTANCE %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber],GWL_HINSTANCE)];
|
||||
[output appendFormat:@"Win32 GWL_HINSTANCE %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber], GWL_HINSTANCE)];
|
||||
|
||||
[output appendFormat:@"Win32 GWL_HWNDPARENT %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber],GWL_HWNDPARENT)];
|
||||
[output appendFormat:@"Win32 GWL_HWNDPARENT %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber], GWL_HWNDPARENT)];
|
||||
|
||||
[output appendFormat:@"Win32 GWL_ID %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber],GWL_ID)];
|
||||
[output appendString:spacer];
|
||||
[output appendFormat:@"Win32 GWL_ID %ld\n",
|
||||
GetWindowLong((HWND)[theWindow windowNumber], GWL_ID)];
|
||||
[output appendString: spacer];
|
||||
|
||||
[output appendFormat:@"Win32 windowtext %@\n",
|
||||
[output appendFormat:@"Win32 windowtext %@\n",
|
||||
[self getWindowtext:(HWND)[theWindow windowNumber]]];
|
||||
return output;
|
||||
}
|
||||
|
||||
- (NSMutableString *) MINMAXDetails:(MINMAXINFO *) mm
|
||||
{
|
||||
NSMutableString * output =[NSMutableString stringWithString:spacer];
|
||||
NSMutableString * output =[NSMutableString stringWithString: spacer];
|
||||
[output appendString:@"MINMAXINFO"];
|
||||
|
||||
[output appendFormat:@"ptMaxSize width[%ld] X height[%ld]\n",
|
||||
mm->ptMaxSize.x,mm->ptMaxSize.y];
|
||||
[output appendFormat:@"ptMaxSize width[%ld] X height[%ld]\n",
|
||||
mm->ptMaxSize.x, mm->ptMaxSize.y];
|
||||
|
||||
[output appendFormat:@"ptMaxPosition width[%ld] X height[%ld]\n",
|
||||
mm->ptMaxPosition.x,mm->ptMaxPosition.y];
|
||||
[output appendFormat:@"ptMaxPosition width[%ld] X height[%ld]\n",
|
||||
mm->ptMaxPosition.x, mm->ptMaxPosition.y];
|
||||
|
||||
[output appendFormat:@"ptMinTrackSize width[%ld] X height[%ld]\n",
|
||||
mm->ptMinTrackSize.x,mm->ptMinTrackSize.y];
|
||||
[output appendFormat:@"ptMinTrackSize width[%ld] X height[%ld]\n",
|
||||
mm->ptMinTrackSize.x, mm->ptMinTrackSize.y];
|
||||
|
||||
[output appendFormat:@"ptMaxTrackSize width[%ld] X height[%ld]\n",
|
||||
mm->ptMaxTrackSize.x,mm->ptMaxTrackSize.y];
|
||||
[output appendFormat:@"ptMaxTrackSize width[%ld] X height[%ld]\n",
|
||||
mm->ptMaxTrackSize.x, mm->ptMaxTrackSize.y];
|
||||
|
||||
return output;
|
||||
}
|
||||
|
@ -322,17 +324,17 @@ typedef struct tagCREATESTRUCT {
|
|||
NSRect cvRect = [cView frame];
|
||||
NSRect svRect = [sView frame];
|
||||
NSRect tRect;
|
||||
NSMutableString * output =[NSMutableString stringWithString:spacer];
|
||||
NSMutableString * output =[NSMutableString stringWithString: spacer];
|
||||
[output appendFormat:@"subView Details for %@\n", [theWindow title]];
|
||||
[output appendFormat:@"superRect %@", [self NSRectDetails:svRect]];
|
||||
[output appendFormat:@"contentRect %@", [self NSRectDetails:cvRect]];
|
||||
[output appendFormat:@"superRect %@", [self NSRectDetails: svRect]];
|
||||
[output appendFormat:@"contentRect %@", [self NSRectDetails: cvRect]];
|
||||
|
||||
for (i=0;i<c;i++)
|
||||
{
|
||||
temp=[theViews objectAtIndex:i];
|
||||
temp=[theViews objectAtIndex: i];
|
||||
tRect =[temp frame];
|
||||
[output appendFormat:@"subView %u rect %@",
|
||||
i, [self NSRectDetails:tRect]];
|
||||
[output appendFormat:@"subView %u rect %@",
|
||||
i, [self NSRectDetails: tRect]];
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
@ -343,11 +345,11 @@ typedef struct tagCREATESTRUCT {
|
|||
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
||||
printf("+++ NEW EVENT +++\n");
|
||||
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
||||
printf("WM_APPNOTIFICATION -1\n %s\nPosted by current application\n",
|
||||
printf("WM_APPNOTIFICATION -1\n %s\nPosted by current application\n",
|
||||
[[aNotification name] cString]);
|
||||
NSWindow *theWindow=[aNotification object];
|
||||
|
||||
printf("%s",[[self gswindowstate:theWindow] cString]);
|
||||
printf("%s", [[self gswindowstate: theWindow] cString]);
|
||||
#endif
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -14,14 +14,15 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -32,7 +33,7 @@
|
|||
- (void) decodeWM_CLOSEParams:(WPARAM)wParam :(LPARAM)lParam :(HWND)hwnd;
|
||||
{
|
||||
NSEvent * ev;
|
||||
NSPoint eventLocation = NSMakePoint(0,0);
|
||||
NSPoint eventLocation = NSMakePoint(0, 0);
|
||||
ev = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
location: eventLocation
|
||||
modifierFlags: 0
|
||||
|
@ -52,8 +53,8 @@
|
|||
#ifdef __CLOSE__
|
||||
NSDebugLLog(@"NSEvent", @"Got Message %s for %d", "CLOSE", hwnd);
|
||||
printf("CLOSING\n");
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("sending event %s \n",[[ev eventNameWithSubtype:YES] cString]);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("sending event %s \n", [[ev eventNameWithSubtype:YES] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
}
|
||||
|
@ -83,7 +84,7 @@ printf("WM_NCDESTROY\n");
|
|||
flags._eventHandled=YES;
|
||||
|
||||
#ifdef __DESTROY__
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
}
|
||||
|
@ -142,8 +143,8 @@ printf("WM_NCDESTROY\n");
|
|||
break;
|
||||
}
|
||||
#ifdef __SYSCOMMAND__
|
||||
printf("SYSTEM MENU REQUESTED 0x%X\n",wParam);
|
||||
//printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("SYSTEM MENU REQUESTED 0x%X\n", wParam);
|
||||
//printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -157,12 +158,12 @@ printf("WM_NCDESTROY\n");
|
|||
// to be completed for styles
|
||||
LONG result;
|
||||
|
||||
ShowWindow(hwnd,SW_HIDE);
|
||||
ShowWindow(hwnd, SW_HIDE);
|
||||
SetLastError(0);
|
||||
result=SetWindowLong(hwnd,GWL_EXSTYLE,WS_EX_APPWINDOW);
|
||||
result=SetWindowLong(hwnd,GWL_STYLE,(LONG)aStyle);
|
||||
result=SetWindowLong(hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW);
|
||||
result=SetWindowLong(hwnd, GWL_STYLE, (LONG)aStyle);
|
||||
// should check error here...
|
||||
ShowWindow(hwnd,SW_SHOWNORMAL);
|
||||
ShowWindow(hwnd, SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -11,14 +11,15 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include "w32_Events.h"
|
||||
|
@ -64,13 +65,13 @@
|
|||
}
|
||||
|
||||
#ifdef __WM_MOVE__
|
||||
printf("sending GS_EVENT %d GS_SUBTYPE %d\n",[ev type],[ev subtype]);
|
||||
printf("HOLD_MENU_FOR_MOVE is %s\n",flags.HOLD_MENU_FOR_MOVE ? "TRUE" : "FALSE");
|
||||
printf("HOLD_MENU_FOR_SIZE is %s\n",flags.HOLD_MENU_FOR_SIZE ? "TRUE" : "FALSE");
|
||||
printf("sending GS_EVENT %d GS_SUBTYPE %d\n", [ev type], [ev subtype]);
|
||||
printf("HOLD_MENU_FOR_MOVE is %s\n", flags.HOLD_MENU_FOR_MOVE ? "TRUE" : "FALSE");
|
||||
printf("HOLD_MENU_FOR_SIZE is %s\n", flags.HOLD_MENU_FOR_SIZE ? "TRUE" : "FALSE");
|
||||
|
||||
printf("%s\n",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("EVENTLOCATION %s",[[self NSRectDetails:rect] cString]);
|
||||
printf("[hwnd rect] is %s",[[self NSRectDetails:[EVENT_WINDOW(hwnd) frame]] cString]);
|
||||
printf("%s\n", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("EVENTLOCATION %s", [[self NSRectDetails:rect] cString]);
|
||||
printf("[hwnd rect] is %s", [[self NSRectDetails:[EVENT_WINDOW(hwnd) frame]] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
|
@ -123,7 +124,7 @@
|
|||
case SIZE_MINIMIZED:
|
||||
{
|
||||
|
||||
if (flags.HOLD_MINI_FOR_SIZE==TRUE) //// this is fix for [5,25 bug]
|
||||
if (flags.HOLD_MINI_FOR_SIZE==TRUE) //// this is fix for [5, 25 bug]
|
||||
break;
|
||||
|
||||
// make event
|
||||
|
@ -191,7 +192,7 @@
|
|||
{
|
||||
[EVENT_WINDOW(hwnd) sendEvent:ev];
|
||||
[self resizeBackingStoreFor:hwnd];
|
||||
// fixes part one of bug [5,25] see notes
|
||||
// fixes part one of bug [5, 25] see notes
|
||||
if (flags.useWMTaskBar==YES)
|
||||
[EVENT_WINDOW(hwnd) deminiaturize:self];
|
||||
}
|
||||
|
@ -204,13 +205,13 @@
|
|||
}
|
||||
|
||||
#ifdef __WM_SIZE__
|
||||
printf("sending GS_EVENT %d GS_SUBTYPE %d\n",[ev type],[ev subtype]);
|
||||
printf("[wParam] SIZE_FLAG is %d\n",(int)wParam);
|
||||
printf("HOLD_MENU_FOR_MOVE is %s\n",flags.HOLD_MENU_FOR_MOVE ? "TRUE" : "FALSE");
|
||||
printf("HOLD_MENU_FOR_SIZE is %s\n",flags.HOLD_MENU_FOR_SIZE ? "TRUE" : "FALSE");
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("size to:%s",[[self NSRectDetails:rect] cString]);
|
||||
printf("[hwnd rect] is %s",[[self NSRectDetails:[EVENT_WINDOW(hwnd) frame]] cString]);
|
||||
printf("sending GS_EVENT %d GS_SUBTYPE %d\n", [ev type], [ev subtype]);
|
||||
printf("[wParam] SIZE_FLAG is %d\n", (int)wParam);
|
||||
printf("HOLD_MENU_FOR_MOVE is %s\n", flags.HOLD_MENU_FOR_MOVE ? "TRUE" : "FALSE");
|
||||
printf("HOLD_MENU_FOR_SIZE is %s\n", flags.HOLD_MENU_FOR_SIZE ? "TRUE" : "FALSE");
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("size to:%s", [[self NSRectDetails:rect] cString]);
|
||||
printf("[hwnd rect] is %s", [[self NSRectDetails:[EVENT_WINDOW(hwnd) frame]] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
|
@ -272,11 +273,11 @@
|
|||
|
||||
[EVENT_WINDOW(hwnd) sendEvent:ev];
|
||||
|
||||
//printf(" Rect 1 =\n%s",[[self MSRectDetails:drect] cString]);
|
||||
//printf(" Rect 1 =\n%s", [[self MSRectDetails:drect] cString]);
|
||||
|
||||
}
|
||||
|
||||
//printf("wParam is %s\n",wParam ? "TRUE" : "FALSE");*/
|
||||
//printf("wParam is %s\n", wParam ? "TRUE" : "FALSE");*/
|
||||
}
|
||||
|
||||
- (void) decodeWM_WINDOWPOSCHANGEDParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd
|
||||
|
@ -310,8 +311,8 @@
|
|||
}
|
||||
|
||||
#ifdef __GETMINMAXINFO__
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s",[[self MINMAXDetails:mm] cString]);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s", [[self MINMAXDetails:mm] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
return 0;
|
||||
|
@ -332,7 +333,7 @@
|
|||
|
||||
#ifdef __EXITSIZEMOVE__
|
||||
NSDebugLLog(@"NSEvent", @"Got Message %s for %d", "EXITSIZEMOVE", hwnd);
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -14,14 +14,15 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include "w32_Events.h"
|
||||
|
@ -32,12 +33,12 @@
|
|||
//- (LRESULT) decodeWM_SETTEXTParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd
|
||||
//{
|
||||
//printf("WM_SETTEXT\n");
|
||||
//printf("Window text is: %s\n",(LPSTR)lParam);
|
||||
//printf("Window text is: %s\n", (LPSTR)lParam);
|
||||
|
||||
//BOOL result=SetWindowText(hwnd,(LPSTR)lParam);
|
||||
//BOOL result=SetWindowText(hwnd, (LPSTR)lParam);
|
||||
|
||||
// if (result==0)
|
||||
//printf("error on setWindow text %ld\n",GetLastError());
|
||||
//printf("error on setWindow text %ld\n", GetLastError());
|
||||
|
||||
//return 0;
|
||||
//}
|
||||
|
@ -57,7 +58,7 @@
|
|||
win_num = (int)hwnd;
|
||||
|
||||
currentFocus = hwnd;
|
||||
eventLocation = NSMakePoint(0,0);
|
||||
eventLocation = NSMakePoint(0, 0);
|
||||
if (currentFocus == desiredFocus)
|
||||
{
|
||||
/* This was from a request from the front end. Mark as done. */
|
||||
|
@ -66,7 +67,7 @@
|
|||
else
|
||||
{
|
||||
/* We need to do this directly and not send an event to the frontend -
|
||||
that's too slow and allows the window state to get out of sync,
|
||||
that's too slow and allows the window state to get out of sync,
|
||||
causing bad recursion problems */
|
||||
NSWindow *window = GSWindowWithNumber((int)hwnd);
|
||||
if ([window canBecomeKeyWindow] == YES)
|
||||
|
@ -82,7 +83,7 @@
|
|||
NSDebugLLog(@"Focus", @"Got focus:%d (current = %d, key = %d)",
|
||||
win_num, currentFocus, key_num);
|
||||
NSDebugLLog(@"Focus", @" result of focus request");
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
return 0;
|
||||
|
@ -91,7 +92,7 @@
|
|||
- (void) decodeWM_KILLFOCUSParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd
|
||||
{
|
||||
// reused from original author (added debug output)
|
||||
NSPoint eventLocation = NSMakePoint(0,0);
|
||||
NSPoint eventLocation = NSMakePoint(0, 0);
|
||||
NSEvent * ev=nil;
|
||||
|
||||
ev = [NSEvent otherEventWithType:NSAppKitDefined
|
||||
|
@ -110,7 +111,7 @@
|
|||
#ifdef __KILLFOCUS__
|
||||
NSDebugLLog(@"NSEvent", @"Got Message %s for %d", "KILLFOCUS", hwnd);
|
||||
NSDebugLLog(@"Focus", @"Got KILLFOCUS (focus out) for %d", hwnd);
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -14,14 +14,15 @@
|
|||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -141,8 +142,8 @@ invalidateWindow(WIN32Server *svr, HWND hwnd, RECT rect)
|
|||
//NSLog(@"Window wstyle %d for style %d", wstyle, style);
|
||||
#ifdef __W32_debug__
|
||||
printf("\n\n##############################################################\n");
|
||||
printf("GS Window Style %u\n",style);
|
||||
printf("Win32 Style picked %ld [hex] %X\n",wstyle,(unsigned int)wstyle);
|
||||
printf("GS Window Style %u\n", style);
|
||||
printf("Win32 Style picked %ld [hex] %X\n", wstyle, (unsigned int)wstyle);
|
||||
printf("\n\n##############################################################\n");
|
||||
#endif
|
||||
return wstyle;
|
||||
|
@ -167,13 +168,13 @@ invalidateWindow(WIN32Server *svr, HWND hwnd, RECT rect)
|
|||
{
|
||||
case 0:
|
||||
{
|
||||
ShowWindow(hwnd,SW_SHOW);
|
||||
ShowWindow(hwnd, SW_SHOW);
|
||||
flags._eventHandled=YES;
|
||||
}
|
||||
break;
|
||||
case SW_PARENTCLOSING:
|
||||
{
|
||||
ShowWindow(hwnd,SW_SHOW);
|
||||
ShowWindow(hwnd, SW_SHOW);
|
||||
flags._eventHandled=YES;
|
||||
}
|
||||
break;
|
||||
|
@ -195,10 +196,10 @@ invalidateWindow(WIN32Server *svr, HWND hwnd, RECT rect)
|
|||
}
|
||||
|
||||
#ifdef __SHOWWINDOW__
|
||||
printf("[wParam] show window %s\n",wParam ? "TRUE" : "FALSE");
|
||||
printf("[lParam] requested SW_FLAG %d\n",wParam);
|
||||
//printf("is Main Menu %d\n",_is_menu);
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("[wParam] show window %s\n", wParam ? "TRUE" : "FALSE");
|
||||
printf("[lParam] requested SW_FLAG %d\n", wParam);
|
||||
//printf("is Main Menu %d\n", _is_menu);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
}
|
||||
|
@ -214,7 +215,7 @@ invalidateWindow(WIN32Server *svr, HWND hwnd, RECT rect)
|
|||
{
|
||||
// GS handles this for now...
|
||||
#ifdef __ERASEBKGND__
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
return (LRESULT)1;
|
||||
|
@ -233,12 +234,12 @@ invalidateWindow(WIN32Server *svr, HWND hwnd, RECT rect)
|
|||
BOOL bErase // erase state
|
||||
);*/
|
||||
|
||||
//theHdc=BeginPaint(hwnd,lpPaint);
|
||||
//theHdc=BeginPaint(hwnd, lpPaint);
|
||||
//if (flags.HOLD_PAINT_FOR_SIZING==FALSE)
|
||||
// {
|
||||
if (GetUpdateRect(hwnd, &rect, NO))
|
||||
{
|
||||
//InvalidateRect(hwnd,rect,YES);
|
||||
//InvalidateRect(hwnd, rect, YES);
|
||||
|
||||
invalidateWindow(self, hwnd, rect);
|
||||
// validate the whole window, for in some cases an infinite series
|
||||
|
@ -251,8 +252,8 @@ invalidateWindow(WIN32Server *svr, HWND hwnd, RECT rect)
|
|||
|
||||
//printf("WM_PAINT\n");
|
||||
#ifdef __PAINT__
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s",[[self MSRectDetails:rect] cString]);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("%s", [[self MSRectDetails:rect] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
}
|
||||
|
@ -321,8 +322,8 @@ invalidateWindow(WIN32Server *svr, HWND hwnd, RECT rect)
|
|||
#ifdef __BACKING__
|
||||
NSDebugLLog(@"NSEvent", @"Change backing store to %d %d", r.right - r.left, r.bottom - r.top);
|
||||
printf("RESIZING BACKING Store\n");
|
||||
printf("%s",[[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("New Rect: %s",[[self MSRectDetails:r] cString]);
|
||||
printf("%s", [[self WindowDetail:EVENT_WINDOW(hwnd)] cString]);
|
||||
printf("New Rect: %s", [[self MSRectDetails:r] cString]);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue