UNIMPLEMENTED put in unimplemented functions
[reactos.git] / reactos / lib / user32 / windows / prop.c
1 /*
2 * ReactOS kernel
3 * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
4 *
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.
9 *
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.
14 *
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.
18 */
19 /* $Id: prop.c,v 1.7 2003/05/12 19:30:00 jfilby Exp $
20 *
21 * PROJECT: ReactOS user32.dll
22 * FILE: lib/user32/windows/input.c
23 * PURPOSE: Input
24 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
25 * UPDATE HISTORY:
26 * 09-05-2001 CSH Created
27 */
28
29 /* INCLUDES ******************************************************************/
30
31 #include <windows.h>
32 #include <user32.h>
33 #include <debug.h>
34
35
36 /* FUNCTIONS *****************************************************************/
37
38 int STDCALL
39 EnumPropsA(HWND hWnd, PROPENUMPROC lpEnumFunc)
40 {
41 UNIMPLEMENTED;
42 return 0;
43 }
44
45 int STDCALL
46 EnumPropsExA(HWND hWnd, PROPENUMPROCEX lpEnumFunc, LPARAM lParam)
47 {
48 UNIMPLEMENTED;
49 return 0;
50 }
51
52 int STDCALL
53 EnumPropsExW(HWND hWnd, PROPENUMPROCEX lpEnumFunc, LPARAM lParam)
54 {
55 UNIMPLEMENTED;
56 return 0;
57 }
58
59 int STDCALL
60 EnumPropsW(HWND hWnd, PROPENUMPROC lpEnumFunc)
61 {
62 UNIMPLEMENTED;
63 return 0;
64 }
65
66 HANDLE STDCALL
67 GetPropA(HWND hWnd, LPCSTR lpString)
68 {
69 PWSTR lpWString;
70 UNICODE_STRING UString;
71 HANDLE Ret;
72 if (HIWORD(lpString))
73 {
74 RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
75 lpWString = UString.Buffer;
76 if (lpWString == NULL)
77 {
78 return(FALSE);
79 }
80 Ret = GetPropW(hWnd, lpWString);
81 RtlFreeUnicodeString(&UString);
82 }
83 else
84 {
85 Ret = GetPropW(hWnd, (LPWSTR)lpString);
86 }
87 return(Ret);
88 }
89
90 HANDLE STDCALL
91 GetPropW(HWND hWnd, LPCWSTR lpString)
92 {
93 ATOM Atom;
94 if (HIWORD(lpString))
95 {
96 Atom = GlobalFindAtomW(lpString);
97 }
98 else
99 {
100 Atom = LOWORD((DWORD)lpString);
101 }
102 return(NtUserGetProp(hWnd, Atom));
103 }
104
105 HANDLE STDCALL
106 RemovePropA(HWND hWnd, LPCSTR lpString)
107 {
108 PWSTR lpWString;
109 UNICODE_STRING UString;
110 HANDLE Ret;
111
112 if (HIWORD(lpString))
113 {
114 RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
115 lpWString = UString.Buffer;
116 if (lpWString == NULL)
117 {
118 return(FALSE);
119 }
120 Ret = RemovePropW(hWnd, lpWString);
121 RtlFreeUnicodeString(&UString);
122 }
123 else
124 {
125 Ret = RemovePropW(hWnd, (LPCWSTR)lpString);
126 }
127 return(Ret);
128 }
129
130 HANDLE STDCALL
131 RemovePropW(HWND hWnd,
132 LPCWSTR lpString)
133 {
134 ATOM Atom;
135 if (HIWORD(lpString))
136 {
137 Atom = GlobalFindAtomW(lpString);
138 }
139 else
140 {
141 Atom = LOWORD((DWORD)lpString);
142 }
143 return(NtUserRemoveProp(hWnd, Atom));
144 }
145
146 WINBOOL STDCALL
147 SetPropA(HWND hWnd, LPCSTR lpString, HANDLE hData)
148 {
149 PWSTR lpWString;
150 UNICODE_STRING UString;
151 BOOL Ret;
152
153 if (HIWORD(lpString))
154 {
155 RtlCreateUnicodeStringFromAsciiz(&UString, (LPSTR)lpString);
156 lpWString = UString.Buffer;
157 if (lpWString == NULL)
158 {
159 return(FALSE);
160 }
161 Ret = SetPropW(hWnd, lpWString, hData);
162 RtlFreeUnicodeString(&UString);
163 }
164 else
165 {
166 Ret = SetPropW(hWnd, (LPWSTR)lpString, hData);
167 }
168 return(Ret);
169 }
170
171 WINBOOL STDCALL
172 SetPropW(HWND hWnd, LPCWSTR lpString, HANDLE hData)
173 {
174 ATOM Atom;
175 if (HIWORD(lpString))
176 {
177 Atom = GlobalFindAtomW(lpString);
178 }
179 else
180 {
181 Atom = LOWORD((DWORD)lpString);
182 }
183
184 return(NtUserSetProp(hWnd, Atom, hData));
185 }