2002-06-13 20:36:40 +00:00
|
|
|
/*
|
|
|
|
* ReactOS kernel
|
|
|
|
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
2005-01-06 13:58:04 +00:00
|
|
|
/* $Id$
|
2002-06-13 20:36:40 +00:00
|
|
|
*
|
|
|
|
* PROJECT: ReactOS user32.dll
|
|
|
|
* FILE: lib/user32/windows/input.c
|
|
|
|
* PURPOSE: Input
|
|
|
|
* PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
|
|
|
* UPDATE HISTORY:
|
|
|
|
* 09-05-2001 CSH Created
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
2005-06-19 18:06:53 +00:00
|
|
|
#include <user32.h>
|
2002-06-13 20:36:40 +00:00
|
|
|
|
2006-06-26 13:16:43 +00:00
|
|
|
#include <wine/debug.h>
|
|
|
|
|
2002-06-13 20:36:40 +00:00
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
|
2008-09-20 13:45:10 +00:00
|
|
|
BOOL
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2008-09-20 13:45:10 +00:00
|
|
|
GdiReleaseDC(HDC hdc);
|
2006-12-19 18:29:57 +00:00
|
|
|
|
2003-07-10 21:04:32 +00:00
|
|
|
/*
|
2003-09-26 20:58:06 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-06-13 20:36:40 +00:00
|
|
|
int
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2008-09-20 13:45:10 +00:00
|
|
|
ReleaseDC(HWND hWnd,
|
|
|
|
HDC hDC)
|
2002-06-13 20:36:40 +00:00
|
|
|
{
|
2008-09-20 13:45:10 +00:00
|
|
|
// From msdn: if the DC was not released return zero.
|
|
|
|
// if the DC was released return one.
|
2006-12-19 18:29:57 +00:00
|
|
|
|
2008-09-20 13:45:10 +00:00
|
|
|
if (!hDC) return FALSE; // Null hDC return zero.
|
2006-12-30 11:04:20 +00:00
|
|
|
|
2008-09-20 13:45:10 +00:00
|
|
|
GdiReleaseDC ( hDC ); // Release locals.
|
|
|
|
// Win 3.1 throw back, hWnd is ignored and not used.
|
2010-01-05 19:26:32 +00:00
|
|
|
return NtUserCallOneParam((DWORD_PTR) hDC, ONEPARAM_ROUTINE_RELEASEDC);
|
2002-06-13 20:36:40 +00:00
|
|
|
}
|
2003-07-10 21:04:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2003-08-17 09:17:04 +00:00
|
|
|
* @implemented
|
2003-07-10 21:04:32 +00:00
|
|
|
*/
|
2002-06-13 20:36:40 +00:00
|
|
|
HWND
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2008-09-20 13:45:10 +00:00
|
|
|
WindowFromDC(HDC hDC)
|
2002-06-13 20:36:40 +00:00
|
|
|
{
|
2008-09-20 13:45:10 +00:00
|
|
|
return NtUserWindowFromDC(hDC);
|
2002-06-13 20:36:40 +00:00
|
|
|
}
|