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 *****************************************************************/
39 EnumPropsA(HWND hWnd, PROPENUMPROC lpEnumFunc)
45 EnumPropsExA(HWND hWnd, PROPENUMPROCEX lpEnumFunc, LPARAM lParam)
51 EnumPropsExW(HWND hWnd, PROPENUMPROCEX lpEnumFunc, LPARAM lParam)
57 EnumPropsW(HWND hWnd, PROPENUMPROC lpEnumFunc)
63 GetPropA(HWND hWnd, LPCSTR lpString)
66 UNICODE_STRING UString;
70 RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
71 lpWString = UString.Buffer;
72 if (lpWString == NULL)
76 Ret = GetPropW(hWnd, lpWString);
77 RtlFreeUnicodeString(&UString);
81 Ret = GetPropW(hWnd, (LPWSTR)lpString);
87 GetPropW(HWND hWnd, LPCWSTR lpString)
92 Atom = GlobalFindAtomW(lpString);
96 Atom = LOWORD((DWORD)lpString);
98 return(NtUserGetProp(hWnd, Atom));
102 RemovePropA(HWND hWnd, LPCSTR lpString)
105 UNICODE_STRING UString;
108 if (HIWORD(lpString))
110 RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
111 lpWString = UString.Buffer;
112 if (lpWString == NULL)
116 Ret = RemovePropW(hWnd, lpWString);
117 RtlFreeUnicodeString(&UString);
121 Ret = RemovePropW(hWnd, (LPCWSTR)lpString);
127 RemovePropW(HWND hWnd,
131 if (HIWORD(lpString))
133 Atom = GlobalFindAtomW(lpString);
137 Atom = LOWORD((DWORD)lpString);
139 return(NtUserRemoveProp(hWnd, Atom));
143 SetPropA(HWND hWnd, LPCSTR lpString, HANDLE hData)
146 UNICODE_STRING UString;
149 if (HIWORD(lpString))
151 RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
152 lpWString = UString.Buffer;
153 if (lpWString == NULL)
157 Ret = SetPropW(hWnd, lpWString, hData);
158 RtlFreeUnicodeString(&UString);
162 Ret = SetPropW(hWnd, (LPWSTR)lpString, hData);
168 SetPropW(HWND hWnd, LPCWSTR lpString, HANDLE hData)
171 if (HIWORD(lpString))
173 Atom = GlobalFindAtomW(lpString);
177 Atom = LOWORD((DWORD)lpString);
180 return(NtUserSetProp(hWnd, Atom, hData));