libs-back/Source/win32/w32_activate.m
Adam Fedor 633767e9fc Backport changes from trunk
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/stable@27078 72102866-910b-0410-8b05-ffd578937521
2008-11-17 04:35:10 +00:00

95 lines
2.4 KiB
Objective-C

/* WIN32Server - Implements window handling for MSWindows
Copyright (C) 2005 Free Software Foundation, Inc.
Written by: Tom MacSween <macsweent@sympatico.ca>
Date August 2005
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include <AppKit/NSEvent.h>
#include <AppKit/NSWindow.h>
#include "win32/WIN32Server.h"
#include "win32/WIN32Geometry.h"
@implementation WIN32Server (w32_activate)
- (LRESULT) decodeWM_ACTIVEParams:(WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd
{
// decode our params
int last_WM_ACTIVATE = LOWORD(wParam);
//int minimized = HIWORD(wParam);
switch (last_WM_ACTIVATE)
{
case WA_ACTIVE: //deactivate
{
// future implimentation if needed
}
break;
case WA_CLICKACTIVE: //order back the window
{
// future implimentation if needed
}
break;
case WA_INACTIVE: // set currentactive and display
{
currentActive = hwnd;
[EVENT_WINDOW(lParam) display];
}
break;
default:
break;
}
return 0;
}
- (LRESULT) decodeWM_ACTIVEAPPParams: (HWND)hwnd : (WPARAM)wParam
: (LPARAM)lParam
{
switch ((int)wParam)
{
case TRUE:
{
[NSApp activateIgnoringOtherApps: YES];
flags._eventHandled = YES;
}
break;
case FALSE:
{
}
break;
default:
break;
}
return 0;
}
- (void) decodeWM_NCACTIVATEParams: (WPARAM)wParam : (LPARAM)lParam
: (HWND)hwnd
{
}
@end