3 * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * PROJECT: ReactOS user32.dll
22 * FILE: lib/user32/windows/input.c
24 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
26 * 09-05-2001 CSH Created
29 /* INCLUDES ******************************************************************/
36 /* FUNCTIONS *****************************************************************/
42 EnumPropsA(HWND hWnd, PROPENUMPROCA lpEnumFunc)
53 EnumPropsExA(HWND hWnd, PROPENUMPROCEXA lpEnumFunc, LPARAM lParam)
64 EnumPropsExW(HWND hWnd, PROPENUMPROCEXW lpEnumFunc, LPARAM lParam)
75 EnumPropsW(HWND hWnd, PROPENUMPROCW lpEnumFunc)
86 GetPropA(HWND hWnd, LPCSTR lpString)
89 UNICODE_STRING UString;
93 RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
94 lpWString = UString.Buffer;
95 if (lpWString == NULL)
99 Ret = GetPropW(hWnd, lpWString);
100 RtlFreeUnicodeString(&UString);
104 Ret = GetPropW(hWnd, (LPWSTR)lpString);
114 GetPropW(HWND hWnd, LPCWSTR lpString)
117 if (HIWORD(lpString))
119 Atom = GlobalFindAtomW(lpString);
123 Atom = LOWORD((DWORD)lpString);
125 return(NtUserGetProp(hWnd, Atom));
133 RemovePropA(HWND hWnd, LPCSTR lpString)
136 UNICODE_STRING UString;
139 if (HIWORD(lpString))
141 RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
142 lpWString = UString.Buffer;
143 if (lpWString == NULL)
147 Ret = RemovePropW(hWnd, lpWString);
148 RtlFreeUnicodeString(&UString);
152 Ret = RemovePropW(hWnd, (LPCWSTR)lpString);
162 RemovePropW(HWND hWnd,
166 if (HIWORD(lpString))
168 Atom = GlobalFindAtomW(lpString);
172 Atom = LOWORD((DWORD)lpString);
174 return(NtUserRemoveProp(hWnd, Atom));
182 SetPropA(HWND hWnd, LPCSTR lpString, HANDLE hData)
185 UNICODE_STRING UString;
188 if (HIWORD(lpString))
190 RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
191 lpWString = UString.Buffer;
192 if (lpWString == NULL)
196 Ret = SetPropW(hWnd, lpWString, hData);
197 RtlFreeUnicodeString(&UString);
201 Ret = SetPropW(hWnd, (LPWSTR)lpString, hData);
211 SetPropW(HWND hWnd, LPCWSTR lpString, HANDLE hData)
214 if (HIWORD(lpString))
216 Atom = GlobalFindAtomW(lpString);
220 Atom = LOWORD((DWORD)lpString);
223 return(NtUserSetProp(hWnd, Atom, hData));