ANSI/UNICODE struct separation patch by Royce3, ANSI/UNICODE WNDCLASS separation and new gdi32 functions by Jonathan Wilson

svn path=/trunk/; revision=5422
This commit is contained in:
Thomas Bluemel 2003-08-05 15:41:03 +00:00
parent d932b77179
commit 64c31c759c
46 changed files with 2649 additions and 1552 deletions

View file

@ -1,4 +1,3 @@
@echo off
set BOOTCD_DIR=..\bootcd set BOOTCD_DIR=..\bootcd
set FREELDR_DIR=..\freeldr set FREELDR_DIR=..\freeldr
set ROSAPPS_DIR=..\rosapps set ROSAPPS_DIR=..\rosapps

View file

@ -360,7 +360,7 @@ NtUserGetCapture 0
NtUserGetCaretBlinkTime 0 NtUserGetCaretBlinkTime 0
NtUserGetCaretPos 1 NtUserGetCaretPos 1
NtUserGetClassInfo 5 NtUserGetClassInfo 5
NtUserGetClassLong 2 NtUserGetClassLong 3
NtUserGetClassName 3 NtUserGetClassName 3
NtUserGetClientOrigin 2 NtUserGetClientOrigin 2
NtUserGetClientRect 2 NtUserGetClientRect 2
@ -412,7 +412,7 @@ NtUserGetUpdateRect 3
NtUserGetUpdateRgn 3 NtUserGetUpdateRgn 3
NtUserGetWindowDC 1 NtUserGetWindowDC 1
NtUserGetWindowPlacement 2 NtUserGetWindowPlacement 2
NtUserGetWindowLong 2 NtUserGetWindowLong 3
NtUserGetWindowRect 2 NtUserGetWindowRect 2
NtUserGetWOWClass 2 NtUserGetWOWClass 2
NtUserHideCaret 1 NtUserHideCaret 1

View file

@ -1525,7 +1525,7 @@ InsertMenuItemA(
HMENU, HMENU,
UINT, UINT,
WINBOOL, WINBOOL,
LPCMENUITEMINFO LPCMENUITEMINFOA
); );
WINBOOL WINBOOL
@ -1534,7 +1534,7 @@ GetMenuItemInfoA(
HMENU, HMENU,
UINT, UINT,
WINBOOL, WINBOOL,
LPMENUITEMINFO LPMENUITEMINFOA
); );
WINBOOL WINBOOL
@ -1543,7 +1543,7 @@ SetMenuItemInfoA(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPMENUITEMINFO lpmii); LPMENUITEMINFOA lpmii);
int int
STDCALL STDCALL
@ -1886,15 +1886,15 @@ DeviceCapabilitiesA(LPCSTR, LPCSTR, WORD,
int int
STDCALL STDCALL
EnumFontFamiliesExA(HDC, LPLOGFONTA, FONTENUMEXPROC, LPARAM,DWORD); EnumFontFamiliesExA(HDC, LPLOGFONTA, FONTENUMEXPROCA, LPARAM,DWORD);
int int
STDCALL STDCALL
EnumFontFamiliesA(HDC, LPCSTR, FONTENUMPROC, LPARAM); EnumFontFamiliesA(HDC, LPCSTR, FONTENUMPROCA, LPARAM);
int int
STDCALL STDCALL
EnumFontsA(HDC, LPCSTR, FONTENUMPROC, LPARAM); EnumFontsA(HDC, LPCSTR, FONTENUMPROCA, LPARAM);
WINBOOL WINBOOL
STDCALL STDCALL
@ -1959,7 +1959,7 @@ GetTextExtentExPointA(
DWORD DWORD
STDCALL STDCALL
GetCharacterPlacementA(HDC, LPCSTR, int, int, LPGCP_RESULTS, DWORD); GetCharacterPlacementA(HDC, LPCSTR, int, int, LPGCP_RESULTSA, DWORD);
HDC HDC
STDCALL STDCALL
@ -1991,7 +1991,7 @@ GetTextMetricsA(HDC, LPTEXTMETRICA);
int int
STDCALL STDCALL
StartDocA(HDC, CONST DOCINFO *); StartDocA(HDC, CONST DOCINFOA *);
int int
STDCALL STDCALL
@ -2007,7 +2007,7 @@ ExtTextOutA(HDC, int, int, UINT, CONST RECT *,LPCSTR, UINT, CONST INT *);
WINBOOL WINBOOL
STDCALL STDCALL
PolyTextOutA(HDC, CONST POLYTEXT *, int); PolyTextOutA(HDC, CONST POLYTEXTA *, int);
int int
STDCALL STDCALL
@ -2019,11 +2019,11 @@ GetKerningPairsA(HDC, DWORD, LPKERNINGPAIR);
HCOLORSPACE HCOLORSPACE
STDCALL STDCALL
CreateColorSpaceA(LPLOGCOLORSPACE); CreateColorSpaceA(LPLOGCOLORSPACEA);
WINBOOL WINBOOL
STDCALL STDCALL
GetLogColorSpaceA(HCOLORSPACE,LPLOGCOLORSPACE,DWORD); GetLogColorSpaceA(HCOLORSPACE,LPLOGCOLORSPACEA,DWORD);
WINBOOL WINBOOL
STDCALL STDCALL
@ -2043,7 +2043,7 @@ EnumICMProfilesA(HDC,ICMENUMPROC,LPARAM);
int int
STDCALL STDCALL
PropertySheetA(LPCPROPSHEETHEADER lppsph); PropertySheetA(LPCPROPSHEETHEADERA lppsph);
HIMAGELIST HIMAGELIST
STDCALL STDCALL
@ -2059,11 +2059,11 @@ DrawStatusTextA(HDC hDC, LPRECT lprc, LPCSTR pszText, UINT uFlags);
WINBOOL WINBOOL
STDCALL STDCALL
GetOpenFileNameA(LPOPENFILENAME); GetOpenFileNameA(LPOPENFILENAMEA);
WINBOOL WINBOOL
STDCALL STDCALL
GetSaveFileNameA(LPOPENFILENAME); GetSaveFileNameA(LPOPENFILENAMEA);
short short
STDCALL STDCALL
@ -2071,27 +2071,27 @@ GetFileTitleA(LPCSTR, LPSTR, WORD);
WINBOOL WINBOOL
STDCALL STDCALL
ChooseColorA(LPCHOOSECOLOR); ChooseColorA(LPCHOOSECOLORA);
HWND HWND
STDCALL STDCALL
FindTextA(LPFINDREPLACE); FindTextA(LPFINDREPLACEA);
HWND HWND
STDCALL STDCALL
ReplaceTextA(LPFINDREPLACE); ReplaceTextA(LPFINDREPLACEA);
WINBOOL WINBOOL
STDCALL STDCALL
ChooseFontA(LPCHOOSEFONT); ChooseFontA(LPCHOOSEFONTA);
WINBOOL WINBOOL
STDCALL STDCALL
PrintDlgA(LPPRINTDLG); PrintDlgA(LPPRINTDLGA);
WINBOOL WINBOOL
STDCALL STDCALL
PageSetupDlgA( LPPAGESETUPDLG ); PageSetupDlgA( LPPAGESETUPDLGA );
WINBOOL WINBOOL
STDCALL STDCALL
@ -2130,14 +2130,14 @@ HANDLE
STDCALL STDCALL
FindFirstFileA( FindFirstFileA(
LPCSTR lpFileName, LPCSTR lpFileName,
LPWIN32_FIND_DATA lpFindFileData LPWIN32_FIND_DATAA lpFindFileData
); );
WINBOOL WINBOOL
STDCALL STDCALL
FindNextFileA( FindNextFileA(
HANDLE hFindFile, HANDLE hFindFile,
LPWIN32_FIND_DATA lpFindFileData LPWIN32_FIND_DATAA lpFindFileData
); );
WINBOOL WINBOOL
@ -2361,7 +2361,7 @@ LONG
STDCALL STDCALL
RegQueryMultipleValuesA ( RegQueryMultipleValuesA (
HKEY hKey, HKEY hKey,
PVALENT val_list, PVALENTA val_list,
DWORD num_vals, DWORD num_vals,
LPSTR lpValueBuf, LPSTR lpValueBuf,
LPDWORD ldwTotsize LPDWORD ldwTotsize
@ -2508,7 +2508,7 @@ GetNumberFormatA(
LCID Locale, LCID Locale,
DWORD dwFlags, DWORD dwFlags,
LPCSTR lpValue, LPCSTR lpValue,
CONST NUMBERFMT *lpFormat, CONST NUMBERFMTA *lpFormat,
LPSTR lpNumberStr, LPSTR lpNumberStr,
int cchNumber); int cchNumber);
@ -2518,7 +2518,7 @@ GetCurrencyFormatA(
LCID Locale, LCID Locale,
DWORD dwFlags, DWORD dwFlags,
LPCSTR lpValue, LPCSTR lpValue,
CONST CURRENCYFMT *lpFormat, CONST CURRENCYFMTA *lpFormat,
LPSTR lpCurrencyStr, LPSTR lpCurrencyStr,
int cchCurrency); int cchCurrency);
@ -2713,7 +2713,7 @@ WNetAddConnectionA(
DWORD STDCALL DWORD STDCALL
WNetAddConnection2A( WNetAddConnection2A(
LPNETRESOURCE lpNetResource, LPNETRESOURCEA lpNetResource,
LPCSTR lpPassword, LPCSTR lpPassword,
LPCSTR lpUserName, LPCSTR lpUserName,
DWORD dwFlags DWORD dwFlags
@ -2722,7 +2722,7 @@ WNetAddConnection2A(
DWORD STDCALL DWORD STDCALL
WNetAddConnection3A( WNetAddConnection3A(
HWND hwndOwner, HWND hwndOwner,
LPNETRESOURCE lpNetResource, LPNETRESOURCEA lpNetResource,
LPCSTR lpPassword, LPCSTR lpPassword,
LPCSTR lpUserName, LPCSTR lpUserName,
DWORD dwFlags DWORD dwFlags
@ -2751,7 +2751,7 @@ WNetGetConnectionA(
DWORD STDCALL DWORD STDCALL
WNetUseConnectionA( WNetUseConnectionA(
HWND hwndOwner, HWND hwndOwner,
LPNETRESOURCE lpNetResource, LPNETRESOURCEA lpNetResource,
LPCSTR lpUserID, LPCSTR lpUserID,
LPCSTR lpPassword, LPCSTR lpPassword,
DWORD dwFlags, DWORD dwFlags,
@ -2769,12 +2769,12 @@ WNetSetConnectionA(
DWORD STDCALL DWORD STDCALL
WNetConnectionDialog1A( WNetConnectionDialog1A(
LPCONNECTDLGSTRUCT lpConnDlgStruct LPCONNECTDLGSTRUCTA lpConnDlgStruct
); );
DWORD STDCALL DWORD STDCALL
WNetDisconnectDialog1A( WNetDisconnectDialog1A(
LPDISCDLGSTRUCT lpConnDlgStruct LPDISCDLGSTRUCTA lpConnDlgStruct
); );
DWORD STDCALL DWORD STDCALL
@ -2782,7 +2782,7 @@ WNetOpenEnumA(
DWORD dwScope, DWORD dwScope,
DWORD dwType, DWORD dwType,
DWORD dwUsage, DWORD dwUsage,
LPNETRESOURCE lpNetResource, LPNETRESOURCEA lpNetResource,
LPHANDLE lphEnum LPHANDLE lphEnum
); );
@ -2833,7 +2833,7 @@ WNetGetLastErrorA(
DWORD STDCALL DWORD STDCALL
MultinetGetConnectionPerformanceA( MultinetGetConnectionPerformanceA(
LPNETRESOURCE lpNetResource, LPNETRESOURCEA lpNetResource,
LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
); );

View file

@ -6474,7 +6474,7 @@ ColorMatchToTarget(HDC,HDC,DWORD);
HPROPSHEETPAGE HPROPSHEETPAGE
STDCALL STDCALL
CreatePropertySheetPageA(LPCPROPSHEETPAGE lppsp); CreatePropertySheetPageA(LPCPROPSHEETPAGEA lppsp);
WINBOOL WINBOOL
STDCALL STDCALL
@ -7547,7 +7547,10 @@ void WINAPI
SHChangeNotify (LONG, UINT, LPCVOID, LPCVOID); SHChangeNotify (LONG, UINT, LPCVOID, LPCVOID);
int WINAPI int WINAPI
SHFileOperation (LPSHFILEOPSTRUCT); SHFileOperationA (LPSHFILEOPSTRUCTA);
int WINAPI
SHFileOperationW (LPSHFILEOPSTRUCTW);
void WINAPI void WINAPI
SHFreeNameMappings (HANDLE); SHFreeNameMappings (HANDLE);

File diff suppressed because it is too large Load diff

View file

@ -1522,7 +1522,7 @@ InsertMenuItemW(
HMENU, HMENU,
UINT, UINT,
WINBOOL, WINBOOL,
LPCMENUITEMINFO LPCMENUITEMINFOW
); );
WINBOOL WINBOOL
@ -1531,7 +1531,7 @@ GetMenuItemInfoW(
HMENU, HMENU,
UINT, UINT,
WINBOOL, WINBOOL,
LPMENUITEMINFO LPMENUITEMINFOW
); );
WINBOOL WINBOOL
@ -1540,7 +1540,7 @@ SetMenuItemInfoW(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPMENUITEMINFO lpmii); LPMENUITEMINFOW lpmii);
int int
STDCALL STDCALL
@ -1897,15 +1897,15 @@ DeviceCapabilitiesW(LPCWSTR, LPCWSTR, WORD,
int int
STDCALL STDCALL
EnumFontFamiliesExW(HDC, LPLOGFONTW, FONTENUMEXPROC, LPARAM, DWORD); EnumFontFamiliesExW(HDC, LPLOGFONTW, FONTENUMEXPROCW, LPARAM, DWORD);
int int
STDCALL STDCALL
EnumFontFamiliesW(HDC, LPCWSTR, FONTENUMPROC, LPARAM); EnumFontFamiliesW(HDC, LPCWSTR, FONTENUMPROCW, LPARAM);
int int
STDCALL STDCALL
EnumFontsW(HDC, LPCWSTR, FONTENUMPROC, LPARAM); EnumFontsW(HDC, LPCWSTR, FONTENUMPROCW, LPARAM);
WINBOOL WINBOOL
STDCALL STDCALL
@ -1970,7 +1970,7 @@ GetTextExtentExPointW(
DWORD DWORD
STDCALL STDCALL
GetCharacterPlacementW(HDC, LPCWSTR, int, int, LPGCP_RESULTS, DWORD); GetCharacterPlacementW(HDC, LPCWSTR, int, int, LPGCP_RESULTSW, DWORD);
HDC HDC
STDCALL STDCALL
@ -2002,7 +2002,7 @@ GetTextMetricsW(HDC, LPTEXTMETRICW);
int int
STDCALL STDCALL
StartDocW(HDC, CONST DOCINFO *); StartDocW(HDC, CONST DOCINFOW *);
int int
STDCALL STDCALL
@ -2018,7 +2018,7 @@ ExtTextOutW(HDC, int, int, UINT, CONST RECT *,LPCWSTR, UINT, CONST INT *);
WINBOOL WINBOOL
STDCALL STDCALL
PolyTextOutW(HDC, CONST POLYTEXT *, int); PolyTextOutW(HDC, CONST POLYTEXTW *, int);
int int
STDCALL STDCALL
@ -2030,11 +2030,11 @@ GetKerningPairsW(HDC, DWORD, LPKERNINGPAIR);
WINBOOL WINBOOL
STDCALL STDCALL
GetLogColorSpaceW(HCOLORSPACE,LPLOGCOLORSPACE,DWORD); GetLogColorSpaceW(HCOLORSPACE,LPLOGCOLORSPACEW,DWORD);
HCOLORSPACE HCOLORSPACE
STDCALL STDCALL
CreateColorSpaceW(LPLOGCOLORSPACE); CreateColorSpaceW(LPLOGCOLORSPACEW);
WINBOOL WINBOOL
STDCALL STDCALL
@ -2054,11 +2054,11 @@ EnumICMProfilesW(HDC,ICMENUMPROC,LPARAM);
HPROPSHEETPAGE HPROPSHEETPAGE
STDCALL STDCALL
CreatePropertySheetPageW(LPCPROPSHEETPAGE lppsp); CreatePropertySheetPageW(LPCPROPSHEETPAGEW lppsp);
int int
STDCALL STDCALL
PropertySheetW(LPCPROPSHEETHEADER lppsph); PropertySheetW(LPCPROPSHEETHEADERW lppsph);
HIMAGELIST HIMAGELIST
STDCALL STDCALL
@ -2080,11 +2080,11 @@ DrawStatusTextW(HDC hDC, LPRECT lprc, LPCWSTR pszText, UINT uFlags);
WINBOOL WINBOOL
STDCALL STDCALL
GetOpenFileNameW(LPOPENFILENAME); GetOpenFileNameW(LPOPENFILENAMEW);
WINBOOL WINBOOL
STDCALL STDCALL
GetSaveFileNameW(LPOPENFILENAME); GetSaveFileNameW(LPOPENFILENAMEW);
short short
STDCALL STDCALL
@ -2092,27 +2092,27 @@ GetFileTitleW(LPCWSTR, LPWSTR, WORD);
WINBOOL WINBOOL
STDCALL STDCALL
ChooseColorW(LPCHOOSECOLOR); ChooseColorW(LPCHOOSECOLORW);
HWND HWND
STDCALL STDCALL
ReplaceTextW(LPFINDREPLACE); ReplaceTextW(LPFINDREPLACEW);
WINBOOL WINBOOL
STDCALL STDCALL
ChooseFontW(LPCHOOSEFONT); ChooseFontW(LPCHOOSEFONTW);
HWND HWND
STDCALL STDCALL
FindTextW(LPFINDREPLACE); FindTextW(LPFINDREPLACEW);
WINBOOL WINBOOL
STDCALL STDCALL
PrintDlgW(LPPRINTDLG); PrintDlgW(LPPRINTDLGW);
WINBOOL WINBOOL
STDCALL STDCALL
PageSetupDlgW(LPPAGESETUPDLG); PageSetupDlgW(LPPAGESETUPDLGW);
WINBOOL WINBOOL
STDCALL STDCALL
@ -2536,7 +2536,7 @@ GetNumberFormatW(
LCID Locale, LCID Locale,
DWORD dwFlags, DWORD dwFlags,
LPCWSTR lpValue, LPCWSTR lpValue,
CONST NUMBERFMT *lpFormat, CONST NUMBERFMTW *lpFormat,
LPWSTR lpNumberStr, LPWSTR lpNumberStr,
int cchNumber); int cchNumber);
@ -2546,7 +2546,7 @@ GetCurrencyFormatW(
LCID Locale, LCID Locale,
DWORD dwFlags, DWORD dwFlags,
LPCWSTR lpValue, LPCWSTR lpValue,
CONST CURRENCYFMT *lpFormat, CONST CURRENCYFMTW *lpFormat,
LPWSTR lpCurrencyStr, LPWSTR lpCurrencyStr,
int cchCurrency); int cchCurrency);
@ -2739,18 +2739,18 @@ WNetAddConnectionW(
DWORD STDCALL DWORD STDCALL
WNetAddConnection2W( WNetAddConnection2W(
LPNETRESOURCE lpNetResource, LPNETRESOURCEW lpNetResource,
LPCWSTR lpPassword, LPCWSTR lpPassword,
LPCWSTR lpUserName, LPCWSTR lpUserName,
DWORD dwFlags DWORD dwFlags
); );
DWORD STDCALL DWORD STDCALL
WNetAddConnection3W( WNetAddConnection3W(
HWND hwndOwner, HWND hwndOwner,
LPNETRESOURCE lpNetResource, LPNETRESOURCEW lpNetResource,
LPCWSTR lpPassword, LPCWSTR lpPassword,
LPCWSTR lpUserName, LPCWSTR lpUserName,
DWORD dwFlags DWORD dwFlags
); );
@ -2777,7 +2777,7 @@ WNetGetConnectionW(
DWORD STDCALL DWORD STDCALL
WNetUseConnectionW( WNetUseConnectionW(
HWND hwndOwner, HWND hwndOwner,
LPNETRESOURCE lpNetResource, LPNETRESOURCEW lpNetResource,
LPCWSTR lpUserID, LPCWSTR lpUserID,
LPCWSTR lpPassword, LPCWSTR lpPassword,
DWORD dwFlags, DWORD dwFlags,
@ -2795,12 +2795,12 @@ WNetSetConnectionW(
DWORD STDCALL DWORD STDCALL
WNetConnectionDialog1W( WNetConnectionDialog1W(
LPCONNECTDLGSTRUCT lpConnDlgStruct LPCONNECTDLGSTRUCTW lpConnDlgStruct
); );
DWORD STDCALL DWORD STDCALL
WNetDisconnectDialog1W( WNetDisconnectDialog1W(
LPDISCDLGSTRUCT lpConnDlgStruct LPDISCDLGSTRUCTW lpConnDlgStruct
); );
DWORD STDCALL DWORD STDCALL
@ -2808,7 +2808,7 @@ WNetOpenEnumW(
DWORD dwScope, DWORD dwScope,
DWORD dwType, DWORD dwType,
DWORD dwUsage, DWORD dwUsage,
LPNETRESOURCE lpNetResource, LPNETRESOURCEW lpNetResource,
LPHANDLE lphEnum LPHANDLE lphEnum
); );
@ -2859,7 +2859,7 @@ WNetGetLastErrorW(
DWORD STDCALL DWORD STDCALL
MultinetGetConnectionPerformanceW( MultinetGetConnectionPerformanceW(
LPNETRESOURCE lpNetResource, LPNETRESOURCEW lpNetResource,
LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
); );

View file

@ -17,7 +17,7 @@ W32kColorMatchToTarget(HDC hDC,
HCOLORSPACE HCOLORSPACE
STDCALL STDCALL
W32kCreateColorSpace(LPLOGCOLORSPACE LogColorSpace); W32kCreateColorSpace(LPLOGCOLORSPACEW LogColorSpace);
BOOL BOOL
STDCALL STDCALL
@ -25,7 +25,7 @@ W32kDeleteColorSpace(HCOLORSPACE hColorSpace);
INT INT
STDCALL STDCALL
W32kEnumICMProfiles(HDC hDC, W32kEnumICMProfiles(HDC hDC,
ICMENUMPROC EnumICMProfilesFunc, ICMENUMPROC EnumICMProfilesFunc,
LPARAM lParam); LPARAM lParam);
@ -35,19 +35,19 @@ W32kGetColorSpace(HDC hDC);
BOOL BOOL
STDCALL STDCALL
W32kGetDeviceGammaRamp(HDC hDC, W32kGetDeviceGammaRamp(HDC hDC,
LPVOID Ramp); LPVOID Ramp);
BOOL BOOL
STDCALL STDCALL
W32kGetICMProfile(HDC hDC, W32kGetICMProfile(HDC hDC,
LPDWORD NameSize, LPDWORD NameSize,
LPWSTR Filename); LPWSTR Filename);
BOOL BOOL
STDCALL STDCALL
W32kGetLogColorSpace(HCOLORSPACE hColorSpace, W32kGetLogColorSpace(HCOLORSPACE hColorSpace,
LPLOGCOLORSPACE Buffer, LPLOGCOLORSPACEW Buffer,
DWORD Size); DWORD Size);
HCOLORSPACE HCOLORSPACE

View file

@ -3,20 +3,28 @@
ULONG STDCALL ULONG STDCALL
NtUserGetSystemMetrics(ULONG Index); NtUserGetSystemMetrics(ULONG Index);
DWORD STDCALL DWORD STDCALL
NtUserGetClassLong(HWND hWnd, DWORD Offset); NtUserGetClassLong(HWND hWnd, DWORD Offset, BOOL Ansi);
LONG STDCALL LONG STDCALL
NtUserGetWindowLong(HWND hWnd, DWORD Index); NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi);
INT STDCALL INT STDCALL
NtUserReleaseDC(HWND hWnd, HDC hDc); NtUserReleaseDC(HWND hWnd, HDC hDc);
BOOL STDCALL BOOL STDCALL
NtUserGetWindowRect(HWND hWnd, LPRECT Rect); NtUserGetWindowRect(HWND hWnd, LPRECT Rect);
BOOL STDCALL BOOL STDCALL
NtUserGetClientRect(HWND hWnd, LPRECT Rect); NtUserGetClientRect(HWND hWnd, LPRECT Rect);
HANDLE STDCALL HANDLE STDCALL
NtUserGetProp(HWND hWnd, ATOM Atom); NtUserGetProp(HWND hWnd, ATOM Atom);
BOOL STDCALL BOOL STDCALL
NtUserGetClientOrigin(HWND hWnd, LPPOINT Point); NtUserGetClientOrigin(HWND hWnd, LPPOINT Point);
HWND STDCALL HWND STDCALL
NtUserGetDesktopWindow(); NtUserGetDesktopWindow();
@ -80,7 +88,7 @@ DWORD
STDCALL STDCALL
NtUserBuildMenuItemList( NtUserBuildMenuItemList(
HMENU hMenu, HMENU hMenu,
LPCMENUITEMINFO* lpmiil, LPCMENUITEMINFOW* lpmiil,
ULONG nBufSize, ULONG nBufSize,
DWORD Reserved); DWORD Reserved);
@ -448,7 +456,8 @@ NtUserInsertMenuItem(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPMENUITEMINFOW lpmii); LPCMENUITEMINFOW lpmii);
DWORD DWORD
STDCALL STDCALL
@ -571,10 +580,9 @@ NtUserGetClassInfo(IN LPWSTR ClassName,
DWORD DWORD
STDCALL STDCALL
NtUserGetClassName( NtUserGetClassName(HWND hWnd,
DWORD Unknown0, LPWSTR lpClassName,
DWORD Unknown1, int nMaxCount);
DWORD Unknown2);
DWORD DWORD
STDCALL STDCALL
@ -1148,13 +1156,12 @@ NtUserRedrawWindow
RTL_ATOM RTL_ATOM
STDCALL STDCALL
NtUserRegisterClassExWOW( NtUserRegisterClassExWOW(CONST WNDCLASSEXW* lpwcxw,
LPWNDCLASSEXW lpwcx, CONST WNDCLASSEXA* lpwcxa,
BOOL bUnicodeClass, BOOL bUnicodeClass,
DWORD Unknown2, DWORD Unknown3,
DWORD Unknown3, DWORD Unknown4,
DWORD Unknown4, DWORD Unknown5);
DWORD Unknown5);
DWORD DWORD
STDCALL STDCALL
@ -1259,9 +1266,13 @@ NtUserSetCapture(HWND Wnd);
HWND STDCALL HWND STDCALL
NtUserGetCapture(VOID); NtUserGetCapture(VOID);
DWORD DWORD STDCALL
STDCALL NtUserSetClassLong(
NtUserSetClassLong(HWND hWnd, int Index, LONG NewValue, DWORD unk); HWND hWnd,
DWORD Offset,
LONG dwNewLong,
BOOL Ansi );
DWORD DWORD
STDCALL STDCALL

View file

@ -39,7 +39,7 @@ W32kSetAbortProc(HDC hDC,
INT INT
STDCALL STDCALL
W32kStartDoc(HDC hDC, W32kStartDoc(HDC hDC,
CONST PDOCINFO di); CONST PDOCINFOW di);
INT INT
STDCALL STDCALL

View file

@ -56,14 +56,14 @@ int
STDCALL STDCALL
W32kEnumFontFamilies(HDC hDC, W32kEnumFontFamilies(HDC hDC,
LPCWSTR Family, LPCWSTR Family,
FONTENUMPROC EnumFontFamProc, FONTENUMPROCW EnumFontFamProc,
LPARAM lParam); LPARAM lParam);
int int
STDCALL STDCALL
W32kEnumFontFamiliesEx(HDC hDC, W32kEnumFontFamiliesEx(HDC hDC,
LPLOGFONTW Logfont, LPLOGFONTW Logfont,
FONTENUMEXPROC EnumFontFamExProc, FONTENUMEXPROCW EnumFontFamExProc,
LPARAM lParam, LPARAM lParam,
DWORD Flags); DWORD Flags);
@ -71,7 +71,7 @@ int
STDCALL STDCALL
W32kEnumFonts(HDC hDC, W32kEnumFonts(HDC hDC,
LPCWSTR FaceName, LPCWSTR FaceName,
FONTENUMPROC FontFunc, FONTENUMPROCW FontFunc,
LPARAM lParam); LPARAM lParam);
BOOL BOOL
@ -110,7 +110,7 @@ W32kGetCharacterPlacement(HDC hDC,
LPCWSTR String, LPCWSTR String,
int Count, int Count,
int MaxExtent, int MaxExtent,
LPGCP_RESULTS Results, LPGCP_RESULTSW Results,
DWORD Flags); DWORD Flags);
BOOL BOOL
@ -213,7 +213,7 @@ W32kGetTextMetrics(HDC hDC,
BOOL BOOL
STDCALL STDCALL
W32kPolyTextOut(HDC hDC, W32kPolyTextOut(HDC hDC,
CONST LPPOLYTEXT txt, CONST LPPOLYTEXTW txt,
int Count); int Count);
BOOL BOOL

View file

@ -1,4 +1,4 @@
/* $Id: _system.c,v 1.7 2003/07/11 17:25:16 royce Exp $ /* $Id: _system.c,v 1.8 2003/08/05 15:41:02 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -23,7 +23,7 @@ int system(const char *command)
PROCESS_INFORMATION ProcessInformation; PROCESS_INFORMATION ProcessInformation;
STARTUPINFO StartupInfo; STARTUPINFOA StartupInfo;
int nStatus; int nStatus;
@ -57,7 +57,7 @@ int system(const char *command)
//command file has invalid format ENOEXEC //command file has invalid format ENOEXEC
StartupInfo.cb = sizeof(STARTUPINFO); StartupInfo.cb = sizeof(StartupInfo);
StartupInfo.lpReserved= NULL; StartupInfo.lpReserved= NULL;
StartupInfo.dwFlags = 0; StartupInfo.dwFlags = 0;
StartupInfo.wShowWindow = SW_SHOWDEFAULT; StartupInfo.wShowWindow = SW_SHOWDEFAULT;

View file

@ -36,9 +36,9 @@ direct_exec_tail(const char* program, const char* args,
char* const envp[], char* const envp[],
PROCESS_INFORMATION* ProcessInformation) PROCESS_INFORMATION* ProcessInformation)
{ {
static STARTUPINFO StartupInfo; static STARTUPINFOA StartupInfo;
StartupInfo.cb = sizeof(STARTUPINFO); StartupInfo.cb = sizeof(StartupInfo);
StartupInfo.lpReserved= NULL; StartupInfo.lpReserved= NULL;
StartupInfo.dwFlags = 0; StartupInfo.dwFlags = 0;
StartupInfo.wShowWindow = SW_SHOWDEFAULT; StartupInfo.wShowWindow = SW_SHOWDEFAULT;

View file

@ -15,7 +15,7 @@ FILE *_popen (const char *cm, const char *md) /* program name, pipe mode */
{ {
FILE *pf; FILE *pf;
HANDLE hReadPipe, hWritePipe; HANDLE hReadPipe, hWritePipe;
STARTUPINFO StartupInfo; STARTUPINFOA StartupInfo;
PROCESS_INFORMATION ProcessInformation; PROCESS_INFORMATION ProcessInformation;
// fixme CreatePipe // fixme CreatePipe
@ -23,7 +23,7 @@ FILE *_popen (const char *cm, const char *md) /* program name, pipe mode */
// if ( !CreatePipe(&hReadPipe,&hWritePipe,NULL,1024)) // if ( !CreatePipe(&hReadPipe,&hWritePipe,NULL,1024))
// return NULL; // return NULL;
StartupInfo.cb = sizeof(STARTUPINFO); StartupInfo.cb = sizeof(StartupInfo);
if ( md == "r" ) { if ( md == "r" ) {
StartupInfo.hStdOutput = hWritePipe; StartupInfo.hStdOutput = hWritePipe;
} }

View file

@ -12,7 +12,7 @@
int _stat(const char* path, struct stat* buffer) int _stat(const char* path, struct stat* buffer)
{ {
HANDLE fh; HANDLE fh;
WIN32_FIND_DATA wfd; WIN32_FIND_DATAA wfd;
fh = FindFirstFile(path, &wfd); fh = FindFirstFile(path, &wfd);
if (fh == INVALID_HANDLE_VALUE) { if (fh == INVALID_HANDLE_VALUE) {

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.29 2003/07/21 04:04:20 jimtabor Exp $ /* $Id: stubs.c,v 1.30 2003/08/05 15:41:02 weiden Exp $
* *
* reactos/lib/gdi32/misc/stubs.c * reactos/lib/gdi32/misc/stubs.c
* *
@ -31,27 +31,6 @@ AnimatePalette(
} }
/*
* @unimplemented
*/
BOOL
STDCALL
Arc(
HDC a0,
int a1,
int a2,
int a3,
int a4,
int a5,
int a6,
int a7,
int a8
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
@ -117,21 +96,6 @@ CloseMetaFile(
return 0; return 0;
} }
/*
* @unimplemented
*/
HBRUSH
STDCALL
CreateBrushIndirect(
CONST LOGBRUSH *a0
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -147,21 +111,6 @@ CreateDIBPatternBrush(
} }
/*
* @unimplemented
*/
HBRUSH
STDCALL
CreateDIBPatternBrushPt(
CONST VOID *a0,
UINT a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -193,35 +142,6 @@ CreateEllipticRgnIndirect(
} }
/*
* @unimplemented
*/
HBRUSH
STDCALL
CreateHatchBrush(
int a0,
COLORREF a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
HPALETTE
STDCALL
CreatePalette(
CONST LOGPALETTE *a0
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -525,54 +445,6 @@ GetMetaFileBitsEx(
return 0; return 0;
} }
/*
* @unimplemented
*/
COLORREF
STDCALL
GetNearestColor(
HDC a0,
COLORREF a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
UINT
STDCALL
GetNearestPaletteIndex(
HPALETTE a0,
COLORREF a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
UINT
STDCALL
GetPaletteEntries(
HPALETTE a0,
UINT a1,
UINT a2,
LPPALETTEENTRY a3
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -617,25 +489,6 @@ GetRasterizerCaps(
return FALSE; return FALSE;
} }
/*
* @unimplemented
*/
UINT
STDCALL
GetSystemPaletteEntries(
HDC a0,
UINT a1,
UINT a2,
LPPALETTEENTRY a3
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -829,23 +682,6 @@ PolyPolygon(
return FALSE; return FALSE;
} }
/*
* @unimplemented
*/
BOOL
STDCALL
PtInRegion(
HRGN a0,
int a1,
int a2
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -862,21 +698,6 @@ PtVisible(
} }
/*
* @unimplemented
*/
BOOL
STDCALL
RectInRegion(
HRGN a0,
CONST RECT *a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -892,21 +713,6 @@ RectVisible(
} }
/*
* @unimplemented
*/
BOOL
STDCALL
RestoreDC(
HDC a0,
int a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -941,21 +747,6 @@ ResizePalette(
return FALSE; return FALSE;
} }
/*
* @unimplemented
*/
int
STDCALL
SaveDC(
HDC a0
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -1032,23 +823,6 @@ SetMetaFileBitsEx(
} }
/*
* @unimplemented
*/
UINT
STDCALL
SetPaletteEntries(
HPALETTE a0,
UINT a1,
UINT a2,
CONST PALETTEENTRY *a3
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -1422,68 +1196,6 @@ PolyPolyline(
} }
/*
* @unimplemented
*/
BOOL
STDCALL
GetWorldTransform(
HDC hdc,
LPXFORM a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
BOOL
STDCALL
SetWorldTransform(
HDC a0,
CONST XFORM *a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
BOOL
STDCALL
ModifyWorldTransform(
HDC a0,
CONST XFORM *a1,
DWORD a2
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
BOOL
STDCALL
CombineTransform(
LPXFORM a0,
CONST XFORM *a1,
CONST XFORM *a2
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -1500,26 +1212,8 @@ GetDIBColorTable(
return 0; return 0;
} }
/* /*
* @unimplemented * @unimplemented
*/
UINT
STDCALL
SetDIBColorTable(
HDC hdc,
UINT a1,
UINT a2,
CONST RGBQUAD *a3
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/ */
BOOL BOOL
STDCALL STDCALL
@ -1548,20 +1242,6 @@ GetColorAdjustment(
} }
/*
* @unimplemented
*/
HPALETTE
STDCALL
CreateHalftonePalette(
HDC hdc
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -1647,28 +1327,6 @@ AbortPath(
} }
/*
* @unimplemented
*/
BOOL
STDCALL
ArcTo(
HDC hdc,
int a1,
int a2,
int a3,
int a4,
int a5,
int a6,
int a7,
int a8
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -1908,106 +1566,6 @@ CreatePolygonRgn(
return 0; return 0;
} }
/*
* @unimplemented
*/
BOOL
STDCALL
PolyBezier(
HDC a0,
CONST POINT *a1,
DWORD a2
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
BOOL
STDCALL
PolyBezierTo(
HDC a0,
CONST POINT *a1,
DWORD a2
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
BOOL
STDCALL
PolylineTo(
HDC a0,
CONST POINT *a1,
DWORD a2
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
BOOL
STDCALL
SetViewportExtEx(
HDC a0,
int a1,
int a2,
LPSIZE a3
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
BOOL
STDCALL
SetWindowExtEx(
HDC a0,
int a1,
int a2,
LPSIZE a3
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
BOOL
STDCALL
OffsetWindowOrgEx(
HDC a0,
int a1,
int a2,
LPPOINT a3
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -2046,23 +1604,6 @@ ScaleWindowExtEx(
} }
/*
* @unimplemented
*/
BOOL
STDCALL
SetBitmapDimensionEx(
HBITMAP a0,
int a1,
int a2,
LPSIZE a3
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -2080,21 +1621,6 @@ SetBrushOrgEx(
} }
/*
* @unimplemented
*/
BOOL
STDCALL
GetDCOrgEx(
HDC a0,
LPPOINT a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */

View file

@ -1,4 +1,4 @@
/* $Id: stubsa.c,v 1.21 2003/08/04 00:28:44 royce Exp $ /* $Id: stubsa.c,v 1.22 2003/08/05 15:41:02 weiden Exp $
* *
* reactos/lib/gdi32/misc/stubs.c * reactos/lib/gdi32/misc/stubs.c
* *
@ -227,39 +227,46 @@ DeviceCapabilitiesExA(
/* /*
* @implemented * @unimplemented
*/ */
int int
STDCALL STDCALL
EnumFontFamiliesExA( EnumFontFamiliesExA (
HDC hdc, HDC hdc,
LPLOGFONTA lpLogFont, LPLOGFONTA lpLogFont,
FONTENUMEXPROC lpEnumFontFamProc, FONTENUMEXPROCA lpEnumFontFamProc,
LPARAM lParam, LPARAM lParam,
DWORD dwFlags DWORD dwFlags
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
#if 0
LOGFONTW LogFontW; LOGFONTW LogFontW;
RosRtlLogFontA2W ( &LogFontW, lpLogFont ); RosRtlLogFontA2W ( &LogFontW, lpLogFont );
/* no need to convert LogFontW back to lpLogFont b/c it's an [in] parameter only */ /* no need to convert LogFontW back to lpLogFont b/c it's an [in] parameter only */
return W32kEnumFontFamiliesEx ( hdc, &LogFontW, lpEnumFontFamProc, lParam, dwFlags ); return W32kEnumFontFamiliesEx ( hdc, &LogFontW, lpEnumFontFamProc, lParam, dwFlags );
#endif
} }
/* /*
* @implemented * @unimplemented
*/ */
int int
STDCALL STDCALL
EnumFontFamiliesA( EnumFontFamiliesA(
HDC hdc, HDC hdc,
LPCSTR lpszFamily, LPCSTR lpszFamily,
FONTENUMPROC lpEnumFontFamProc, FONTENUMPROCA lpEnumFontFamProc,
LPARAM lParam LPARAM lParam
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
#if 0
NTSTATUS Status; NTSTATUS Status;
LPWSTR lpszFamilyW; LPWSTR lpszFamilyW;
int rc = 0; int rc = 0;
@ -275,6 +282,7 @@ EnumFontFamiliesA(
} }
return rc; return rc;
#endif
} }
@ -286,10 +294,13 @@ STDCALL
EnumFontsA ( EnumFontsA (
HDC hDC, HDC hDC,
LPCSTR lpFaceName, LPCSTR lpFaceName,
FONTENUMPROC FontFunc, FONTENUMPROCA FontFunc,
LPARAM lParam LPARAM lParam
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
#if 0
NTSTATUS Status; NTSTATUS Status;
LPWSTR lpFaceNameW; LPWSTR lpFaceNameW;
int rc = 0; int rc = 0;
@ -304,6 +315,7 @@ EnumFontsA (
HEAP_free ( lpFaceNameW ); HEAP_free ( lpFaceNameW );
} }
return rc; return rc;
#endif
} }
@ -498,7 +510,7 @@ GetCharacterPlacementA(
LPCSTR a1, LPCSTR a1,
int a2, int a2,
int a3, int a3,
LPGCP_RESULTS a4, LPGCP_RESULTSA a4,
DWORD a5 DWORD a5
) )
{ {
@ -699,7 +711,7 @@ int
STDCALL STDCALL
StartDocA( StartDocA(
HDC hdc, HDC hdc,
CONST DOCINFO *a1 CONST DOCINFOA *a1
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -729,7 +741,7 @@ BOOL
STDCALL STDCALL
PolyTextOutA( PolyTextOutA(
HDC hdc, HDC hdc,
CONST POLYTEXT *a1, CONST POLYTEXTA *a1,
int a2 int a2
) )
{ {
@ -777,7 +789,7 @@ BOOL
STDCALL STDCALL
GetLogColorSpaceA( GetLogColorSpaceA(
HCOLORSPACE a0, HCOLORSPACE a0,
LPLOGCOLORSPACE a1, LPLOGCOLORSPACEA a1,
DWORD a2 DWORD a2
) )
{ {
@ -792,7 +804,7 @@ GetLogColorSpaceA(
HCOLORSPACE HCOLORSPACE
STDCALL STDCALL
CreateColorSpaceA( CreateColorSpaceA(
LPLOGCOLORSPACE a0 LPLOGCOLORSPACEA a0
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View file

@ -1,4 +1,4 @@
/* $Id: stubsw.c,v 1.17 2003/07/24 22:17:15 royce Exp $ /* $Id: stubsw.c,v 1.18 2003/08/05 15:41:02 weiden Exp $
* *
* reactos/lib/gdi32/misc/stubs.c * reactos/lib/gdi32/misc/stubs.c
* *
@ -129,51 +129,66 @@ DeviceCapabilitiesExW(
/* /*
* @implemented * @unimplemented
*/ */
int int
STDCALL STDCALL
EnumFontFamiliesExW( EnumFontFamiliesExW(
HDC hdc, HDC hdc,
LPLOGFONTW lpLogFont, LPLOGFONTW lpLogFont,
FONTENUMEXPROC lpEnumFontFamProc, FONTENUMEXPROCW lpEnumFontFamProc,
LPARAM lParam, LPARAM lParam,
DWORD dwFlags DWORD dwFlags
) )
{ {
#if 0
return W32kEnumFontFamiliesEx ( hdc, lpLogFont, lpEnumFontFamProc, lParam, dwFlags ); return W32kEnumFontFamiliesEx ( hdc, lpLogFont, lpEnumFontFamProc, lParam, dwFlags );
#else
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
#endif
} }
/* /*
* @implemented * @unimplemented
*/ */
int int
STDCALL STDCALL
EnumFontFamiliesW( EnumFontFamiliesW(
HDC hdc, HDC hdc,
LPCWSTR lpszFamily, LPCWSTR lpszFamily,
FONTENUMPROC lpEnumFontFamProc, FONTENUMPROCW lpEnumFontFamProc,
LPARAM lParam LPARAM lParam
) )
{ {
#if 0
return W32kEnumFontFamilies ( hdc, lpszFamily, lpEnumFontFamProc, lParam ); return W32kEnumFontFamilies ( hdc, lpszFamily, lpEnumFontFamProc, lParam );
#else
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
#endif
} }
/* /*
* @implemented * @unimplemented
*/ */
int int
STDCALL STDCALL
EnumFontsW( EnumFontsW(
HDC hDC, HDC hDC,
LPCWSTR lpFaceName, LPCWSTR lpFaceName,
FONTENUMPROC FontFunc, FONTENUMPROCW FontFunc,
LPARAM lParam LPARAM lParam
) )
{ {
#if 0
return W32kEnumFonts ( hDC, lpFaceName, FontFunc, lParam ); return W32kEnumFonts ( hDC, lpFaceName, FontFunc, lParam );
#else
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
#endif
} }
@ -335,7 +350,7 @@ GetCharacterPlacementW(
LPCWSTR a1, LPCWSTR a1,
int a2, int a2,
int a3, int a3,
LPGCP_RESULTS a4, LPGCP_RESULTSW a4,
DWORD a5 DWORD a5
) )
{ {
@ -435,11 +450,11 @@ GetEnhMetaFileDescriptionW(
int int
STDCALL STDCALL
StartDocW( StartDocW(
HDC hdc, HDC hdc,
CONST DOCINFO *a1 CONST DOCINFOW *a1
) )
{ {
return W32kStartDoc ( hdc, (CONST PDOCINFO)a1 ); return W32kStartDoc ( hdc, (CONST PDOCINFOW)a1 );
} }
@ -465,7 +480,7 @@ BOOL
STDCALL STDCALL
PolyTextOutW( PolyTextOutW(
HDC hdc, HDC hdc,
CONST POLYTEXT *a1, CONST POLYTEXTW *a1,
int a2 int a2
) )
{ {
@ -513,7 +528,7 @@ BOOL
STDCALL STDCALL
GetLogColorSpaceW( GetLogColorSpaceW(
HCOLORSPACE a0, HCOLORSPACE a0,
LPLOGCOLORSPACE a1, LPLOGCOLORSPACEW a1,
DWORD a2 DWORD a2
) )
{ {
@ -527,7 +542,7 @@ GetLogColorSpaceW(
HCOLORSPACE HCOLORSPACE
STDCALL STDCALL
CreateColorSpaceW( CreateColorSpaceW(
LPLOGCOLORSPACE a0 LPLOGCOLORSPACEW a0
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View file

@ -19,3 +19,41 @@ CreateSolidBrush(
{ {
return W32kCreateSolidBrush(a0); return W32kCreateSolidBrush(a0);
} }
/*
* @implemented
*/
HBRUSH
STDCALL
CreateBrushIndirect(
CONST LOGBRUSH *a0
)
{
return W32kCreateBrushIndirect(a0);
}
/*
* @implemented
*/
HBRUSH
STDCALL
CreateDIBPatternBrushPt(
CONST VOID *a0,
UINT a1
)
{
return W32kCreateDIBPatternBrushPt(a0,a1);
}
/*
* @implemented
*/
HBRUSH
STDCALL
CreateHatchBrush(
int a0,
COLORREF a1
)
{
return W32kCreateHatchBrush(a0,a1);
}

View file

@ -624,3 +624,266 @@ GetDeviceCaps(
{ {
return W32kGetDeviceCaps(DC, Index); return W32kGetDeviceCaps(DC, Index);
} }
/*
* @implemented
*/
HPALETTE
STDCALL
CreatePalette(
CONST LOGPALETTE *a0
)
{
return W32kCreatePalette((CONST PLOGPALETTE)a0);
}
/*
* @implemented
*/
COLORREF
STDCALL
GetNearestColor(
HDC a0,
COLORREF a1
)
{
return W32kGetNearestColor(a0,a1);
}
/*
* @implemented
*/
UINT
STDCALL
GetNearestPaletteIndex(
HPALETTE a0,
COLORREF a1
)
{
return W32kGetNearestPaletteIndex(a0,a1);
}
/*
* @implemented
*/
UINT
STDCALL
GetPaletteEntries(
HPALETTE a0,
UINT a1,
UINT a2,
LPPALETTEENTRY a3
)
{
return W32kGetPaletteEntries(a0,a1,a2,a3);
}
/*
* @implemented
*/
UINT
STDCALL
GetSystemPaletteEntries(
HDC a0,
UINT a1,
UINT a2,
LPPALETTEENTRY a3
)
{
return W32kGetSystemPaletteEntries(a0,a1,a2,a3);
}
/*
* @implemented
*/
BOOL
STDCALL
RestoreDC(
HDC a0,
int a1
)
{
return W32kRestoreDC(a0,a1);
}
/*
* @implemented
*/
int
STDCALL
SaveDC(
HDC a0
)
{
return W32kSaveDC(a0);
}
/*
* @implemented
*/
UINT
STDCALL
SetPaletteEntries(
HPALETTE a0,
UINT a1,
UINT a2,
CONST PALETTEENTRY *a3
)
{
return W32kSetPaletteEntries(a0,a1,a2,(CONST PPALETTEENTRY)a3);
}
/*
* @implemented
*/
BOOL
STDCALL
GetWorldTransform(
HDC hdc,
LPXFORM a1
)
{
return W32kGetWorldTransform(hdc,a1);
}
/*
* @implemented
*/
BOOL
STDCALL
SetWorldTransform(
HDC a0,
CONST XFORM *a1
)
{
return W32kSetWorldTransform(a0,(CONST PXFORM)a1);
}
/*
* @implemented
*/
BOOL
STDCALL
ModifyWorldTransform(
HDC a0,
CONST XFORM *a1,
DWORD a2
)
{
return W32kModifyWorldTransform(a0,(CONST PXFORM)a1,a2);
}
/*
* @implemented
*/
BOOL
STDCALL
CombineTransform(
LPXFORM a0,
CONST XFORM *a1,
CONST XFORM *a2
)
{
return W32kCombineTransform(a0,(CONST PXFORM)a1,(CONST PXFORM)a2);
}
/*
* @implemented
*/
UINT
STDCALL
SetDIBColorTable(
HDC hdc,
UINT a1,
UINT a2,
CONST RGBQUAD *a3
)
{
return W32kSetDIBColorTable(hdc,a1,a2,(CONST PRGBQUAD)a3);
}
/*
* @implemented
*/
HPALETTE
STDCALL
CreateHalftonePalette(
HDC hdc
)
{
return W32kCreateHalftonePalette(hdc);
}
/*
* @implemented
*/
BOOL
STDCALL
SetViewportExtEx(
HDC a0,
int a1,
int a2,
LPSIZE a3
)
{
return W32kSetViewportExtEx(a0,a1,a2,a3);
}
/*
* @implemented
*/
BOOL
STDCALL
SetWindowExtEx(
HDC a0,
int a1,
int a2,
LPSIZE a3
)
{
return W32kSetWindowExtEx(a0,a1,a2,a3);
}
/*
* @implemented
*/
BOOL
STDCALL
OffsetWindowOrgEx(
HDC a0,
int a1,
int a2,
LPPOINT a3
)
{
return W32kOffsetWindowOrgEx(a0,a1,a2,a3);
}
/*
* @implemented
*/
BOOL
STDCALL
SetBitmapDimensionEx(
HBITMAP a0,
int a1,
int a2,
LPSIZE a3
)
{
return W32kSetBitmapDimensionEx(a0,a1,a2,a3);
}
/*
* @implemented
*/
BOOL
STDCALL
GetDCOrgEx(
HDC a0,
LPPOINT a1
)
{
return W32kGetDCOrgEx(a0,a1);
}

View file

@ -8,6 +8,26 @@
#include <win32k/kapi.h> #include <win32k/kapi.h>
/*
* @implemented
*/
BOOL
STDCALL
Arc(
HDC a0,
int a1,
int a2,
int a3,
int a4,
int a5,
int a6,
int a7,
int a8
)
{
return W32kArc(a0,a1,a2,a3,a4,a5,a6,a7,a8);
}
/* /*
* @implemented * @implemented
*/ */
@ -66,3 +86,67 @@ Polyline( HDC hdc, CONST POINT *lppt, int cPoints )
{ {
return W32kPolyline(hdc, (CONST LPPOINT) lppt, cPoints); return W32kPolyline(hdc, (CONST LPPOINT) lppt, cPoints);
} }
/*
* @implemented
*/
BOOL
STDCALL
ArcTo(
HDC hdc,
int a1,
int a2,
int a3,
int a4,
int a5,
int a6,
int a7,
int a8
)
{
return W32kArcTo(hdc,a1,a2,a3,a4,a5,a6,a7,a8);
}
/*
* @implemented
*/
BOOL
STDCALL
PolyBezier(
HDC a0,
CONST POINT *a1,
DWORD a2
)
{
return PolyBezier(a0,(CONST PPOINT)a1,a2);
}
/*
* @implemented
*/
BOOL
STDCALL
PolyBezierTo(
HDC a0,
CONST POINT *a1,
DWORD a2
)
{
return PolyBezierTo(a0,(CONST PPOINT)a1,a2);
}
/*
* @unimplemented
*/
BOOL
STDCALL
PolylineTo(
HDC a0,
CONST POINT *a1,
DWORD a2
)
{
return PolyBezierTo(a0,(CONST PPOINT)a1,a2);
}

View file

@ -240,3 +240,30 @@ FillRgn(
{ {
return W32kFillRgn(a0, a1, a2); return W32kFillRgn(a0, a1, a2);
} }
/*
* @implemented
*/
BOOL
STDCALL
PtInRegion(
HRGN a0,
int a1,
int a2
)
{
return W32kPtInRegion(a0,a1,a2);
}
/*
* @implemented
*/
BOOL
STDCALL
RectInRegion(
HRGN a0,
CONST RECT *a1
)
{
return W32kRectInRegion(a0,(CONST PRECT)a1);
}

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.52 2003/07/10 18:50:51 chorns Exp $ /* $Id: stubs.c,v 1.53 2003/08/05 15:41:02 weiden Exp $
* *
* KERNEL32.DLL stubs (unimplemented functions) * KERNEL32.DLL stubs (unimplemented functions)
* Remove from this file, if you implement them. * Remove from this file, if you implement them.
@ -425,7 +425,7 @@ GetCurrencyFormatW (
LCID Locale, LCID Locale,
DWORD dwFlags, DWORD dwFlags,
LPCWSTR lpValue, LPCWSTR lpValue,
CONST CURRENCYFMT * lpFormat, CONST CURRENCYFMTW * lpFormat,
LPWSTR lpCurrencyStr, LPWSTR lpCurrencyStr,
int cchCurrency int cchCurrency
) )
@ -444,7 +444,7 @@ GetCurrencyFormatA (
LCID Locale, LCID Locale,
DWORD dwFlags, DWORD dwFlags,
LPCSTR lpValue, LPCSTR lpValue,
CONST CURRENCYFMT * lpFormat, CONST CURRENCYFMTA * lpFormat,
LPSTR lpCurrencyStr, LPSTR lpCurrencyStr,
int cchCurrency int cchCurrency
) )
@ -550,7 +550,7 @@ GetNumberFormatW (
LCID Locale, LCID Locale,
DWORD dwFlags, DWORD dwFlags,
LPCWSTR lpValue, LPCWSTR lpValue,
CONST NUMBERFMT * lpFormat, CONST NUMBERFMTW * lpFormat,
LPWSTR lpNumberStr, LPWSTR lpNumberStr,
int cchNumber int cchNumber
) )
@ -569,7 +569,7 @@ GetNumberFormatA (
LCID Locale, LCID Locale,
DWORD dwFlags, DWORD dwFlags,
LPCSTR lpValue, LPCSTR lpValue,
CONST NUMBERFMT * lpFormat, CONST NUMBERFMTA * lpFormat,
LPSTR lpNumberStr, LPSTR lpNumberStr,
int cchNumber int cchNumber
) )

View file

@ -1,4 +1,4 @@
/* $Id: proc.c,v 1.54 2003/07/10 18:50:51 chorns Exp $ /* $Id: proc.c,v 1.55 2003/08/05 15:41:02 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -22,7 +22,7 @@
WaitForInputIdleType lpfnGlobalRegisterWaitForInputIdle; WaitForInputIdleType lpfnGlobalRegisterWaitForInputIdle;
LPSTARTUPINFO lpLocalStartupInfo = NULL; LPSTARTUPINFOA lpLocalStartupInfo = NULL;
VOID STDCALL VOID STDCALL
RegisterWaitForInputIdle(WaitForInputIdleType lpfnRegisterWaitForInputIdle); RegisterWaitForInputIdle(WaitForInputIdleType lpfnRegisterWaitForInputIdle);

View file

@ -1,4 +1,4 @@
/* $Id: open.c,v 1.15 2003/07/11 21:57:54 royce Exp $ /* $Id: open.c,v 1.16 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -358,7 +358,7 @@ BOOL __fileno_init(void)
ULONG count = 0, i; ULONG count = 0, i;
HANDLE* pFile; HANDLE* pFile;
char* pmode; char* pmode;
STARTUPINFO StInfo; STARTUPINFOA StInfo;
GetStartupInfoA(&StInfo); GetStartupInfoA(&StInfo);
if (StInfo.lpReserved2 && StInfo.cbReserved2 >= sizeof(ULONG)) { if (StInfo.lpReserved2 && StInfo.cbReserved2 >= sizeof(ULONG)) {

View file

@ -48,7 +48,7 @@ int add(char* name)
int expand(char* name, int flag) int expand(char* name, int flag)
{ {
char* s; char* s;
WIN32_FIND_DATA fd; WIN32_FIND_DATAA fd;
HANDLE hFile; HANDLE hFile;
BOOLEAN first = TRUE; BOOLEAN first = TRUE;
char buffer[256]; char buffer[256];

View file

@ -1,4 +1,4 @@
/* $Id: _system.c,v 1.7 2003/07/11 21:58:09 royce Exp $ /* $Id: _system.c,v 1.8 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -24,7 +24,7 @@ int system(const char *command)
char *szComSpec = NULL; char *szComSpec = NULL;
PROCESS_INFORMATION ProcessInformation; PROCESS_INFORMATION ProcessInformation;
STARTUPINFO StartupInfo; STARTUPINFOA StartupInfo;
char *s; char *s;
BOOL result; BOOL result;
@ -80,8 +80,8 @@ int system(const char *command)
//command file has invalid format ENOEXEC //command file has invalid format ENOEXEC
memset (&StartupInfo, 0, sizeof(STARTUPINFO)); memset (&StartupInfo, 0, sizeof(StartupInfo));
StartupInfo.cb = sizeof(STARTUPINFO); StartupInfo.cb = sizeof(StartupInfo);
StartupInfo.lpReserved= NULL; StartupInfo.lpReserved= NULL;
StartupInfo.dwFlags = 0; StartupInfo.dwFlags = 0;
StartupInfo.wShowWindow = SW_SHOWDEFAULT; StartupInfo.wShowWindow = SW_SHOWDEFAULT;

View file

@ -1,4 +1,4 @@
/* $Id: process.c,v 1.6 2003/07/16 02:45:24 royce Exp $ */ /* $Id: process.c,v 1.7 2003/08/05 15:41:03 weiden Exp $ */
#include <msvcrt/process.h> #include <msvcrt/process.h>
#include <msvcrt/stdlib.h> #include <msvcrt/stdlib.h>
#include <msvcrt/string.h> #include <msvcrt/string.h>
@ -163,7 +163,7 @@ valisttos(const char* arg0, va_list alist, char delim)
static int static int
do_spawn(int mode, const char* cmdname, const char* args, const char* envp) do_spawn(int mode, const char* cmdname, const char* args, const char* envp)
{ {
STARTUPINFO StartupInfo; STARTUPINFOA StartupInfo;
PROCESS_INFORMATION ProcessInformation; PROCESS_INFORMATION ProcessInformation;
char* fmode; char* fmode;
HANDLE* hFile; HANDLE* hFile;
@ -191,8 +191,8 @@ do_spawn(int mode, const char* cmdname, const char* args, const char* envp)
return -1; return -1;
} }
memset (&StartupInfo, 0, sizeof(STARTUPINFO)); memset (&StartupInfo, 0, sizeof(StartupInfo));
StartupInfo.cb = sizeof(STARTUPINFO); StartupInfo.cb = sizeof(StartupInfo);
for (last = i = 0; i < maxfno; i++) for (last = i = 0; i < maxfno; i++)
{ {

View file

@ -1,4 +1,4 @@
/* $Id: desktop.c,v 1.16 2003/07/25 23:02:21 royce Exp $ /* $Id: desktop.c,v 1.17 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -46,10 +46,10 @@ SystemParametersInfoW(UINT uiAction,
PVOID pvParam, PVOID pvParam,
UINT fWinIni) UINT fWinIni)
{ {
NONCLIENTMETRICS *nclm; NONCLIENTMETRICSW *nclm;
/* FIXME: This should be obtained from the registry */ /* FIXME: This should be obtained from the registry */
static LOGFONT CaptionFont = static LOGFONTW CaptionFont =
{ 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET, { 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
0, 0, DEFAULT_QUALITY, FF_MODERN, L"Bitstream Vera Sans Bold" }; 0, 0, DEFAULT_QUALITY, FF_MODERN, L"Bitstream Vera Sans Bold" };
@ -66,8 +66,8 @@ SystemParametersInfoW(UINT uiAction,
case SPI_GETNONCLIENTMETRICS: case SPI_GETNONCLIENTMETRICS:
{ {
nclm = pvParam; nclm = pvParam;
memcpy(&nclm->lfCaptionFont, &CaptionFont, sizeof(LOGFONT)); memcpy(&nclm->lfCaptionFont, &CaptionFont, sizeof(CaptionFont));
memcpy(&nclm->lfSmCaptionFont, &CaptionFont, sizeof(LOGFONT)); memcpy(&nclm->lfSmCaptionFont, &CaptionFont, sizeof(CaptionFont));
return(TRUE); return(TRUE);
} }
} }

View file

@ -1,4 +1,4 @@
/* $Id: class.c,v 1.21 2003/07/27 21:35:50 dwelch Exp $ /* $Id: class.c,v 1.22 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -10,9 +10,10 @@
*/ */
#include <windows.h> #include <windows.h>
#include <user32.h> #include <user32.h>
#include <string.h>
#include <stdlib.h>
#include <debug.h> #include <debug.h>
/* /*
* @unimplemented * @unimplemented
*/ */
@ -79,32 +80,21 @@ GetClassInfoW(
DWORD STDCALL DWORD STDCALL
GetClassLongA(HWND hWnd, int nIndex) GetClassLongA(HWND hWnd, int nIndex)
{ {
switch (nIndex) return(NtUserGetClassLong(hWnd, nIndex, TRUE));
{
case GCL_WNDPROC:
UNIMPLEMENTED;
return(0);
case GCL_MENUNAME:
UNIMPLEMENTED;
return(0);
default:
return(GetClassLongW(hWnd, nIndex));
}
} }
/* /*
* @implemented * @implemented
*/ */
DWORD STDCALL DWORD STDCALL
GetClassLongW(HWND hWnd, int nIndex) GetClassLongW(HWND hWnd, int nIndex)
{ {
return(NtUserGetClassLong(hWnd, nIndex)); return(NtUserGetClassLong(hWnd, nIndex, FALSE));
} }
/* /*
* @unimplemented * @implemented
*/ */
int int
STDCALL STDCALL
@ -113,13 +103,27 @@ GetClassNameA(
LPSTR lpClassName, LPSTR lpClassName,
int nMaxCount) int nMaxCount)
{ {
UNIMPLEMENTED; int result;
return 0; LPWSTR ClassName;
NTSTATUS Status;
ClassName = RtlAllocateHeap(RtlGetProcessHeap(),HEAP_ZERO_MEMORY,nMaxCount);
result = NtUserGetClassName(hWnd, ClassName, nMaxCount);
Status = RtlUnicodeToMultiByteN (lpClassName,
result,
NULL,
ClassName,
result);
if (!NT_SUCCESS(Status))
{
return 0;
}
RtlFreeHeap(RtlGetProcessHeap(),0,ClassName);
return result;
} }
/* /*
* @unimplemented * @implemented
*/ */
int int
STDCALL STDCALL
@ -128,8 +132,13 @@ GetClassNameW(
LPWSTR lpClassName, LPWSTR lpClassName,
int nMaxCount) int nMaxCount)
{ {
UNIMPLEMENTED; int result;
return 0; LPWSTR ClassName;
ClassName = RtlAllocateHeap(RtlGetProcessHeap(),HEAP_ZERO_MEMORY,nMaxCount);
result = NtUserGetClassName(hWnd, ClassName, nMaxCount);
RtlCopyMemory(ClassName,lpClassName,result);
RtlFreeHeap(RtlGetProcessHeap(),0,ClassName);
return result;
} }
@ -156,7 +165,7 @@ GetClassWord(
LONG STDCALL LONG STDCALL
GetWindowLongA(HWND hWnd, int nIndex) GetWindowLongA(HWND hWnd, int nIndex)
{ {
return NtUserGetWindowLong(hWnd, nIndex); return NtUserGetWindowLong(hWnd, nIndex, TRUE);
} }
@ -166,7 +175,7 @@ GetWindowLongA(HWND hWnd, int nIndex)
LONG STDCALL LONG STDCALL
GetWindowLongW(HWND hWnd, int nIndex) GetWindowLongW(HWND hWnd, int nIndex)
{ {
return NtUserGetWindowLong(hWnd, nIndex); return NtUserGetWindowLong(hWnd, nIndex, FALSE);
} }
@ -223,7 +232,7 @@ RegisterClassA(CONST WNDCLASSA *lpWndClass)
{ {
WNDCLASSEXA Class; WNDCLASSEXA Class;
RtlMoveMemory(&Class.style, lpWndClass, sizeof(WNDCLASS)); RtlMoveMemory ( &Class.style, lpWndClass, sizeof(WNDCLASSA));
Class.cbSize = sizeof(WNDCLASSEXA); Class.cbSize = sizeof(WNDCLASSEXA);
Class.hIconSm = INVALID_HANDLE_VALUE; Class.hIconSm = INVALID_HANDLE_VALUE;
return RegisterClassExA(&Class); return RegisterClassExA(&Class);
@ -236,49 +245,14 @@ RegisterClassA(CONST WNDCLASSA *lpWndClass)
ATOM STDCALL ATOM STDCALL
RegisterClassExA(CONST WNDCLASSEXA *lpwcx) RegisterClassExA(CONST WNDCLASSEXA *lpwcx)
{ {
UNICODE_STRING MenuName;
UNICODE_STRING ClassName;
WNDCLASSEXW Class;
RTL_ATOM Atom; RTL_ATOM Atom;
RtlMoveMemory(&Class, lpwcx, sizeof(WNDCLASSEXA)); Atom = NtUserRegisterClassExWOW(0,(WNDCLASSEXA*)lpwcx,
if (HIWORD((ULONG)lpwcx->lpszMenuName) != 0)
{
if (!RtlCreateUnicodeStringFromAsciiz(&MenuName, (PCSZ)lpwcx->lpszMenuName))
{
RtlFreeUnicodeString(&MenuName);
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return (ATOM)0;
}
Class.lpszMenuName = MenuName.Buffer;
}
if (HIWORD((ULONG)lpwcx->lpszClassName) != 0)
{
if (!RtlCreateUnicodeStringFromAsciiz(&ClassName, (PCSZ)lpwcx->lpszClassName))
{
RtlFreeUnicodeString(&ClassName);
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return (ATOM)0;
}
Class.lpszClassName = ClassName.Buffer;
}
Atom = NtUserRegisterClassExWOW(&Class,
FALSE, FALSE,
0, 0,
0, 0,
0,
0); 0);
if (HIWORD((ULONG)lpwcx->lpszMenuName) != 0)
{
RtlFreeUnicodeString(&ClassName);
}
if (HIWORD((ULONG)lpwcx->lpszClassName )!= 0)
{
RtlFreeUnicodeString(&MenuName);
}
return (ATOM)Atom; return (ATOM)Atom;
} }
@ -292,8 +266,8 @@ RegisterClassExW(CONST WNDCLASSEXW *lpwcx)
RTL_ATOM Atom; RTL_ATOM Atom;
Atom = NtUserRegisterClassExWOW((WNDCLASSEXW*)lpwcx, Atom = NtUserRegisterClassExWOW((WNDCLASSEXW*)lpwcx,
TRUE,
0, 0,
TRUE,
0, 0,
0, 0,
0); 0);
@ -318,7 +292,7 @@ RegisterClassW(CONST WNDCLASSW *lpWndClass)
/* /*
* @unimplemented * @mplemented
*/ */
DWORD DWORD
STDCALL STDCALL
@ -327,13 +301,12 @@ SetClassLongA(
int nIndex, int nIndex,
LONG dwNewLong) LONG dwNewLong)
{ {
UNIMPLEMENTED; return(NtUserSetClassLong(hWnd, nIndex, dwNewLong, TRUE));
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
DWORD DWORD
STDCALL STDCALL
@ -342,8 +315,7 @@ SetClassLongW(
int nIndex, int nIndex,
LONG dwNewLong) LONG dwNewLong)
{ {
UNIMPLEMENTED; return(NtUserSetClassLong(hWnd, nIndex, dwNewLong, FALSE));
return 0;
} }

View file

@ -1,4 +1,4 @@
/* $Id: defwnd.c,v 1.58 2003/08/03 01:48:53 rcampbell Exp $ /* $Id: defwnd.c,v 1.59 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -393,7 +393,7 @@ static void UserDrawCaptionNC( HDC hDC, RECT *rect, HWND hWnd,
DWORD style, BOOL active ) DWORD style, BOOL active )
{ {
RECT r = *rect; RECT r = *rect;
char buffer[256]; WCHAR buffer[256];
/* FIXME: Implement and Use DrawCaption() */ /* FIXME: Implement and Use DrawCaption() */
SelectObject( hDC, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION) ); SelectObject( hDC, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION) );
@ -410,12 +410,12 @@ static void UserDrawCaptionNC( HDC hDC, RECT *rect, HWND hWnd,
UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONMIN); UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONMIN);
UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONMAX); UserDrawCaptionButton( hWnd, hDC, FALSE, DFCS_CAPTIONMAX);
} }
if (GetWindowTextA( hWnd, buffer, sizeof(buffer) )) if (GetWindowTextW( hWnd, buffer, sizeof(buffer)/sizeof(buffer[0]) ))
{ {
NONCLIENTMETRICS nclm; NONCLIENTMETRICSW nclm;
HFONT hFont, hOldFont; HFONT hFont, hOldFont;
nclm.cbSize = sizeof(NONCLIENTMETRICS); nclm.cbSize = sizeof(nclm);
SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, 0, &nclm, 0);
SetTextColor(hDC, SysColours[ active ? COLOR_CAPTIONTEXT : COLOR_INACTIVECAPTIONTEXT]); SetTextColor(hDC, SysColours[ active ? COLOR_CAPTIONTEXT : COLOR_INACTIVECAPTIONTEXT]);
SetBkMode( hDC, TRANSPARENT ); SetBkMode( hDC, TRANSPARENT );
@ -424,7 +424,7 @@ static void UserDrawCaptionNC( HDC hDC, RECT *rect, HWND hWnd,
else else
hFont = CreateFontIndirectW(&nclm.lfCaptionFont); hFont = CreateFontIndirectW(&nclm.lfCaptionFont);
hOldFont = SelectObject(hDC, hFont); hOldFont = SelectObject(hDC, hFont);
TextOutA(hDC, r.left + (GetSystemMetrics(SM_CXDLGFRAME) * 2), rect->top + (nclm.lfCaptionFont.lfHeight / 2), buffer, strlen(buffer)); TextOutW(hDC, r.left + (GetSystemMetrics(SM_CXDLGFRAME) * 2), rect->top + (nclm.lfCaptionFont.lfHeight / 2), buffer, wcslen(buffer));
DeleteObject (SelectObject (hDC, hOldFont)); DeleteObject (SelectObject (hDC, hOldFont));
} }
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: menu.c,v 1.15 2003/08/04 23:52:25 weiden Exp $ /* $Id: menu.c,v 1.16 2003/08/05 15:41:03 weiden Exp $
* *
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/menu.c * FILE: lib/user32/windows/menu.c
@ -171,53 +171,59 @@ STATIC HEAP_strdupA2W ( HANDLE hHeap, LPWSTR* ppszW, LPCSTR lpszA, UINT* NewLen
* *
* Parse an extended menu resource and add items to the menu. * Parse an extended menu resource and add items to the menu.
* Return a pointer to the end of the resource. * Return a pointer to the end of the resource.
*
* FIXME - should we be passing an LPCSTR to a predominantly UNICODE function?
*/ */
static LPCSTR MENUEX_ParseResource( LPCSTR res, HMENU hMenu) static LPCSTR MENUEX_ParseResource( LPCSTR res, HMENU hMenu)
{ {
WORD resinfo; WORD resinfo;
do { do
MENUITEMINFO mii; {
MENUITEMINFOW mii;
mii.cbSize = sizeof(mii); mii.cbSize = sizeof(mii);
mii.fMask = MIIM_STATE | MIIM_ID | MIIM_TYPE; mii.fMask = MIIM_STATE | MIIM_ID | MIIM_TYPE;
mii.fType = GET_DWORD(res); mii.fType = GET_DWORD(res);
res += sizeof(DWORD); res += sizeof(DWORD);
mii.fState = GET_DWORD(res); mii.fState = GET_DWORD(res);
res += sizeof(DWORD); res += sizeof(DWORD);
mii.wID = GET_DWORD(res); mii.wID = GET_DWORD(res);
res += sizeof(DWORD); res += sizeof(DWORD);
resinfo = GET_WORD(res); resinfo = GET_WORD(res);
res += sizeof(WORD); res += sizeof(WORD);
/* Align the text on a word boundary. */ /* Align the text on a word boundary. */
res += (~((int)res - 1)) & 1; res += (~((int)res - 1)) & 1;
mii.dwTypeData = (LPWSTR) res; mii.dwTypeData = (LPWSTR) res;
res += (1 + strlenW(mii.dwTypeData)) * sizeof(WCHAR); res += (1 + strlenW(mii.dwTypeData)) * sizeof(WCHAR);
/* Align the following fields on a dword boundary. */ /* Align the following fields on a dword boundary. */
res += (~((int)res - 1)) & 3; res += (~((int)res - 1)) & 3;
if (resinfo & 1) { /* Pop-up? */ if (resinfo & 1) /* Pop-up? */
/* DWORD helpid = GET_DWORD(res); FIXME: use this. */
res += sizeof(DWORD);
mii.hSubMenu = CreatePopupMenu();
if (!mii.hSubMenu)
return NULL;
if (!(res = MENUEX_ParseResource(res, mii.hSubMenu))) {
DestroyMenu(mii.hSubMenu);
return NULL;
}
mii.fMask |= MIIM_SUBMENU;
mii.fType |= MF_POPUP;
}
else if(!*mii.dwTypeData && !(mii.fType & MF_SEPARATOR))
{ {
DbgPrint("WARN: Converting NULL menu item %04x, type %04x to SEPARATOR\n", /* DWORD helpid = GET_DWORD(res); FIXME: use this. */
mii.wID, mii.fType); res += sizeof(DWORD);
mii.fType |= MF_SEPARATOR; mii.hSubMenu = CreatePopupMenu();
if (!mii.hSubMenu)
return NULL;
if (!(res = MENUEX_ParseResource(res, mii.hSubMenu)))
{
DestroyMenu(mii.hSubMenu);
return NULL;
}
mii.fMask |= MIIM_SUBMENU;
mii.fType |= MF_POPUP;
} }
InsertMenuItemW(hMenu, -1, MF_BYPOSITION, &mii); else if(!*mii.dwTypeData && !(mii.fType & MF_SEPARATOR))
} while (!(resinfo & MF_END)); {
return res; DbgPrint("WARN: Converting NULL menu item %04x, type %04x to SEPARATOR\n",
mii.wID, mii.fType);
mii.fType |= MF_SEPARATOR;
}
InsertMenuItemW(hMenu, -1, MF_BYPOSITION, &mii);
}
while (!(resinfo & MF_END));
return res;
} }
/********************************************************************** /**********************************************************************
@ -751,7 +757,7 @@ GetMenuItemInfoA(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPMENUITEMINFO lpmii) LPMENUITEMINFOA lpmii)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
return FALSE; return FALSE;
@ -767,7 +773,7 @@ GetMenuItemInfoW(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPMENUITEMINFO lpmii) LPMENUITEMINFOW lpmii)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
return FALSE; return FALSE;
@ -892,7 +898,7 @@ InsertMenuItemA(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPCMENUITEMINFO lpmii) LPCMENUITEMINFOA lpmii)
{ {
MENUITEMINFOW mi; MENUITEMINFOW mi;
WINBOOL res = FALSE; WINBOOL res = FALSE;
@ -935,7 +941,7 @@ InsertMenuItemW(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPCMENUITEMINFO lpmii) LPCMENUITEMINFOW lpmii)
{ {
MENUITEMINFOW mi; MENUITEMINFOW mi;
WINBOOL res = FALSE; WINBOOL res = FALSE;
@ -1250,7 +1256,7 @@ SetMenuItemInfoA(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPMENUITEMINFO lpmii) LPMENUITEMINFOA lpmii)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
return FALSE; return FALSE;
@ -1266,7 +1272,7 @@ SetMenuItemInfoW(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPMENUITEMINFO lpmii) LPMENUITEMINFOW lpmii)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
return FALSE; return FALSE;

View file

@ -1,4 +1,4 @@
/* $Id: window.c,v 1.50 2003/08/04 16:56:40 gdalsnes Exp $ /* $Id: window.c,v 1.51 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
@ -45,6 +45,7 @@ User32SendNCCALCSIZEMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
DPRINT("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
/* FIXME: handle ANSI windows vs Unicode windows */
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC);
DPRINT("Proc %X\n", Proc); DPRINT("Proc %X\n", Proc);
/* Call the window procedure; notice kernel messages are always unicode. */ /* Call the window procedure; notice kernel messages are always unicode. */
@ -80,6 +81,7 @@ User32SendGETMINMAXINFOMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
DPRINT("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
/* FIXME: handle ANSI windows vs Unicode windows */
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC);
DPRINT("Proc %X\n", Proc); DPRINT("Proc %X\n", Proc);
/* Call the window procedure; notice kernel messages are always unicode. */ /* Call the window procedure; notice kernel messages are always unicode. */
@ -105,6 +107,7 @@ User32SendCREATEMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
DPRINT("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
/* FIXME: handle ANSI windows vs Unicode windows */
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC);
DPRINT("Proc %X\n", Proc); DPRINT("Proc %X\n", Proc);
/* Call the window procedure; notice kernel messages are always unicode. */ /* Call the window procedure; notice kernel messages are always unicode. */
@ -129,6 +132,7 @@ User32SendNCCREATEMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
DPRINT("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
/* FIXME: handle ANSI windows vs Unicode windows */
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC);
DPRINT("Proc %X\n", Proc); DPRINT("Proc %X\n", Proc);
/* Call the window procedure; notice kernel messages are always unicode. */ /* Call the window procedure; notice kernel messages are always unicode. */
@ -153,6 +157,7 @@ User32SendWINDOWPOSCHANGINGMessageForKernel(PVOID Arguments, ULONG ArgumentLengt
DPRINT("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
/* FIXME: handle ANSI windows vs Unicode windows */
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC);
DPRINT("Proc %X\n", Proc); DPRINT("Proc %X\n", Proc);
/* Call the window procedure; notice kernel messages are always unicode. */ /* Call the window procedure; notice kernel messages are always unicode. */
@ -177,6 +182,7 @@ User32SendWINDOWPOSCHANGEDMessageForKernel(PVOID Arguments, ULONG ArgumentLength
DPRINT("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
/* FIXME: handle ANSI windows vs Unicode windows */
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC);
DPRINT("Proc %X\n", Proc); DPRINT("Proc %X\n", Proc);
/* Call the window procedure; notice kernel messages are always unicode. */ /* Call the window procedure; notice kernel messages are always unicode. */
@ -201,6 +207,7 @@ User32SendSTYLECHANGINGMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
DPRINT("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
/* FIXME: handle ANSI windows vs Unicode windows */
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC);
DPRINT("Proc %X\n", Proc); DPRINT("Proc %X\n", Proc);
/* Call the window procedure; notice kernel messages are always unicode. */ /* Call the window procedure; notice kernel messages are always unicode. */
@ -225,6 +232,7 @@ User32SendSTYLECHANGEDMessageForKernel(PVOID Arguments, ULONG ArgumentLength)
DPRINT("Wrong length.\n"); DPRINT("Wrong length.\n");
return(STATUS_INFO_LENGTH_MISMATCH); return(STATUS_INFO_LENGTH_MISMATCH);
} }
/* FIXME: handle ANSI windows vs Unicode windows */
Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC); Proc = (WNDPROC)GetWindowLongW(CallbackArgs->Wnd, GWL_WNDPROC);
DPRINT("Proc %X\n", Proc); DPRINT("Proc %X\n", Proc);
/* Call the window procedure; notice kernel messages are always unicode. */ /* Call the window procedure; notice kernel messages are always unicode. */
@ -265,6 +273,7 @@ User32CallWindowProcFromKernel(PVOID Arguments, ULONG ArgumentLength)
} }
if (CallbackArgs->Proc == NULL) if (CallbackArgs->Proc == NULL)
{ {
/* FIXME: handle ANSI windows vs Unicode windows */
CallbackArgs->Proc = (WNDPROC)GetWindowLong(CallbackArgs->Wnd, CallbackArgs->Proc = (WNDPROC)GetWindowLong(CallbackArgs->Wnd,
GWL_WNDPROC); GWL_WNDPROC);
} }
@ -1257,7 +1266,7 @@ IsChild(HWND hWndParent,
WINBOOL STDCALL WINBOOL STDCALL
IsIconic(HWND hWnd) IsIconic(HWND hWnd)
{ {
return (NtUserGetWindowLong( hWnd, GWL_STYLE ) & WS_MINIMIZE) != 0; return (NtUserGetWindowLong( hWnd, GWL_STYLE, FALSE) & WS_MINIMIZE) != 0;
} }
@ -1267,8 +1276,7 @@ IsIconic(HWND hWnd)
WINBOOL STDCALL WINBOOL STDCALL
IsWindow(HWND hWnd) IsWindow(HWND hWnd)
{ {
DWORD WndProc = NtUserGetWindowLong(hWnd, GWL_WNDPROC); DWORD WndProc = NtUserGetWindowLong(hWnd, GWL_WNDPROC, FALSE);
return (0 != WndProc || ERROR_INVALID_HANDLE != GetLastError()); return (0 != WndProc || ERROR_INVALID_HANDLE != GetLastError());
} }

View file

@ -10,7 +10,8 @@
typedef struct _WNDCLASS_OBJECT typedef struct _WNDCLASS_OBJECT
{ {
WNDCLASSEX Class; WNDCLASSEXA ClassA;
WNDCLASSEXW ClassW;
BOOL Unicode; BOOL Unicode;
LIST_ENTRY ListEntry; LIST_ENTRY ListEntry;
} WNDCLASS_OBJECT, *PWNDCLASS_OBJECT; } WNDCLASS_OBJECT, *PWNDCLASS_OBJECT;
@ -33,12 +34,13 @@ NTSTATUS FASTCALL
ClassReferenceClassByNameOrAtom(PWNDCLASS_OBJECT *Class, ClassReferenceClassByNameOrAtom(PWNDCLASS_OBJECT *Class,
LPWSTR ClassNameOrAtom); LPWSTR ClassNameOrAtom);
PWNDCLASS_OBJECT FASTCALL PWNDCLASS_OBJECT FASTCALL
W32kCreateClass(LPWNDCLASSEXW lpwcx, W32kCreateClass(CONST WNDCLASSEXW *lpwcxw,
CONST WNDCLASSEXA *lpwcxa,
BOOL bUnicodeClass, BOOL bUnicodeClass,
RTL_ATOM ClassName); RTL_ATOM Atom);
struct _WINDOW_OBJECT; struct _WINDOW_OBJECT;
ULONG FASTCALL ULONG FASTCALL
W32kGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset); W32kGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi);
#endif /* __WIN32K_CLASS_H */ #endif /* __WIN32K_CLASS_H */

View file

@ -48,7 +48,7 @@ DWORD
STDCALL STDCALL
NtUserBuildMenuItemList( NtUserBuildMenuItemList(
HMENU hMenu, HMENU hMenu,
LPCMENUITEMINFO* lpmiil, LPCMENUITEMINFOW* lpmiil,
ULONG nBufSize, ULONG nBufSize,
DWORD Reserved); DWORD Reserved);
@ -97,7 +97,8 @@ NtUserInsertMenuItem(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPMENUITEMINFOW lpmii); LPCMENUITEMINFOW lpmii);
BOOL BOOL
STDCALL STDCALL
@ -210,4 +211,4 @@ NtUserTrackPopupMenuEx(
#endif /* __WIN32K_MENU_H */ #endif /* __WIN32K_MENU_H */
/* EOF */ /* EOF */

View file

@ -91,7 +91,9 @@ typedef struct _WINDOW_OBJECT
PSCROLLBARINFO pVScroll; PSCROLLBARINFO pVScroll;
PSCROLLBARINFO wExtra; PSCROLLBARINFO wExtra;
LONG UserData; LONG UserData;
WNDPROC WndProc; BOOL Unicode;
WNDPROC WndProcA;
WNDPROC WndProcW;
PETHREAD OwnerThread; PETHREAD OwnerThread;
HWND hWndOwner; /* handle to the owner window (why not use pointer to window? wine doesn't...)*/ HWND hWndOwner; /* handle to the owner window (why not use pointer to window? wine doesn't...)*/
HWND hWndLastPopup; /* handle to last active popup window (why not use pointer to window? wine doesn't...)*/ HWND hWndLastPopup; /* handle to last active popup window (why not use pointer to window? wine doesn't...)*/

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: class.c,v 1.21 2003/08/04 16:54:54 gdalsnes Exp $ /* $Id: class.c,v 1.22 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -68,17 +68,17 @@ ClassReferenceClassByAtom(PWNDCLASS_OBJECT* Class,
CurrentEntry = Process->ClassListHead.Flink; CurrentEntry = Process->ClassListHead.Flink;
while (CurrentEntry != &Process->ClassListHead) while (CurrentEntry != &Process->ClassListHead)
{ {
Current = CONTAINING_RECORD(CurrentEntry, WNDCLASS_OBJECT, ListEntry); Current = CONTAINING_RECORD(CurrentEntry, WNDCLASS_OBJECT, ListEntry);
if (Current->Class.lpszClassName == (LPWSTR)(ULONG)Atom) if (Current->ClassW.lpszClassName == (LPWSTR)(ULONG)Atom)
{ {
*Class = Current; *Class = Current;
ObmReferenceObject(Current); ObmReferenceObject(Current);
ExReleaseFastMutexUnsafe (&Process->ClassListLock); ExReleaseFastMutexUnsafe (&Process->ClassListLock);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
CurrentEntry = CurrentEntry->Flink; CurrentEntry = CurrentEntry->Flink;
} }
ExReleaseFastMutexUnsafe (&Process->ClassListLock); ExReleaseFastMutexUnsafe (&Process->ClassListLock);
@ -162,14 +162,37 @@ NtUserGetClassInfo(IN LPWSTR ClassName,
return(0); return(0);
} }
DWORD STDCALL ULONG FASTCALL
NtUserGetClassName(DWORD Unknown0, W32kGetClassName(struct _WINDOW_OBJECT *WindowObject,
DWORD Unknown1, LPWSTR lpClassName,
DWORD Unknown2) int nMaxCount)
{ {
UNIMPLEMENTED; int length;
length = wcslen(WindowObject->Class->ClassW.lpszClassName);
return(0); if (length > nMaxCount)
{
length = nMaxCount;
}
wcsncpy(lpClassName,WindowObject->Class->ClassW.lpszClassName,length+1);
return length;
}
DWORD STDCALL
NtUserGetClassName(HWND hWnd,
LPWSTR lpClassName,
int nMaxCount)
{
PWINDOW_OBJECT WindowObject;
LONG Ret;
WindowObject = W32kGetWindowObject(hWnd);
if (WindowObject == NULL)
{
return(0);
}
Ret = W32kGetClassName(WindowObject, lpClassName, nMaxCount);
W32kReleaseWindowObject(WindowObject);
return(Ret);
} }
DWORD STDCALL DWORD STDCALL
@ -182,38 +205,88 @@ NtUserGetWOWClass(DWORD Unknown0,
} }
PWNDCLASS_OBJECT FASTCALL PWNDCLASS_OBJECT FASTCALL
W32kCreateClass(LPWNDCLASSEXW lpwcx, W32kCreateClass(CONST WNDCLASSEXW *lpwcxw,
BOOL bUnicodeClass, CONST WNDCLASSEXA *lpwcxa,
RTL_ATOM Atom) BOOL bUnicodeClass,
RTL_ATOM Atom)
{ {
PWNDCLASS_OBJECT ClassObject; PWNDCLASS_OBJECT ClassObject;
WORD objectSize; WORD objectSize;
LPTSTR namePtr; LPWSTR namePtrW;
LPSTR namePtrA;
ULONG menulenA=1, menulenW=sizeof(WCHAR);
objectSize = sizeof(WNDCLASS_OBJECT) + /* FIXME - how to handle INT resources? */
(lpwcx->lpszMenuName != 0 ? ((wcslen (lpwcx->lpszMenuName) + 1) * 2) : 0); /* FIXME - lpszClassName = Atom? is that right */
if ( bUnicodeClass )
{
if ( lpwcxw->lpszMenuName )
{
menulenW = (wcslen(lpwcxw->lpszMenuName) + 1) * sizeof(WCHAR);
RtlUnicodeToMultiByteSize ( &menulenA, lpwcxw->lpszMenuName, menulenW );
}
}
else
{
if ( lpwcxa->lpszMenuName )
{
menulenA = strlen(lpwcxa->lpszMenuName) + 1;
RtlMultiByteToUnicodeSize ( &menulenW, lpwcxa->lpszMenuName, menulenA );
}
}
objectSize = sizeof(WNDCLASS_OBJECT);
ClassObject = ObmCreateObject(NULL, NULL, otClass, objectSize); ClassObject = ObmCreateObject(NULL, NULL, otClass, objectSize);
if (ClassObject == 0) if (ClassObject == 0)
{ {
return(NULL); return(NULL);
} }
ClassObject->Class = *lpwcx; if ( bUnicodeClass )
ClassObject->Unicode = bUnicodeClass;
if (lpwcx->lpszMenuName != 0)
{ {
namePtr = (LPTSTR)(((PCHAR)ClassObject) + sizeof (WNDCLASS_OBJECT)); memmove ( &ClassObject->ClassW, lpwcxw, sizeof(ClassObject->ClassW) );
ClassObject->Class.lpszMenuName = namePtr; memmove ( &ClassObject->ClassA, &ClassObject->ClassW, sizeof(ClassObject->ClassA) );
wcscpy (namePtr, lpwcx->lpszMenuName); ClassObject->ClassA.lpfnWndProc = 0xCCCCCCCC; /*FIXME: figure out what the correct strange value is and what to do with it */
namePtrW = ExAllocatePool(PagedPool, menulenW);
if ( lpwcxw->lpszMenuName )
memmove ( namePtrW, lpwcxw->lpszMenuName, menulenW );
else
*namePtrW = L'\0';
ClassObject->ClassW.lpszMenuName = namePtrW;
namePtrA = ExAllocatePool(PagedPool, menulenA);
if ( *namePtrW )
RtlUnicodeToMultiByteN ( namePtrA, menulenA, NULL, namePtrW, menulenW );
else
*namePtrA = '\0';
ClassObject->ClassA.lpszMenuName = namePtrA;
} }
ClassObject->Class.lpszClassName = (LPWSTR)(ULONG)Atom; else
{
memmove ( &ClassObject->ClassA, lpwcxa, sizeof(ClassObject->ClassA) );
memmove ( &ClassObject->ClassW, &ClassObject->ClassA, sizeof(ClassObject->ClassW) );
ClassObject->ClassW.lpfnWndProc = 0xCCCCCCCC; /* FIXME: figure out what the correct strange value is and what to do with it */
namePtrA = ExAllocatePool(PagedPool, menulenA);
if ( lpwcxa->lpszMenuName )
memmove ( namePtrA, lpwcxa->lpszMenuName, menulenA );
else
*namePtrA = '\0';
ClassObject->ClassA.lpszMenuName = namePtrA;
namePtrW = ExAllocatePool(PagedPool, menulenW);
if ( *namePtrA )
RtlMultiByteToUnicodeN ( namePtrW, menulenW, NULL, namePtrA, menulenA );
else
*namePtrW = L'\0';
ClassObject->ClassW.lpszMenuName = namePtrW;
}
ClassObject->Unicode = bUnicodeClass;
ClassObject->ClassW.lpszClassName = (LPWSTR)(ULONG)Atom;
ClassObject->ClassA.lpszClassName = (LPSTR)(ULONG)Atom;
return(ClassObject); return(ClassObject);
} }
RTL_ATOM STDCALL RTL_ATOM STDCALL
NtUserRegisterClassExWOW(LPWNDCLASSEXW lpwcx, NtUserRegisterClassExWOW(CONST WNDCLASSEXW *lpwcxw,
CONST WNDCLASSEXA *lpwcxa,
BOOL bUnicodeClass, BOOL bUnicodeClass,
DWORD Unknown2,
DWORD Unknown3, DWORD Unknown3,
DWORD Unknown4, DWORD Unknown4,
DWORD Unknown5) DWORD Unknown5)
@ -221,7 +294,8 @@ NtUserRegisterClassExWOW(LPWNDCLASSEXW lpwcx,
* FUNCTION: * FUNCTION:
* Registers a new class with the window manager * Registers a new class with the window manager
* ARGUMENTS: * ARGUMENTS:
* lpcx = Win32 extended window class structure * lpcxw = Win32 extended window class structure (unicode)
* lpcxa = Win32 extended window class structure (ascii)
* bUnicodeClass = Wether to send ANSI or unicode strings * bUnicodeClass = Wether to send ANSI or unicode strings
* to window procedures * to window procedures
* RETURNS: * RETURNS:
@ -232,6 +306,8 @@ NtUserRegisterClassExWOW(LPWNDCLASSEXW lpwcx,
PWNDCLASS_OBJECT ClassObject; PWNDCLASS_OBJECT ClassObject;
NTSTATUS Status; NTSTATUS Status;
RTL_ATOM Atom; RTL_ATOM Atom;
LPWSTR classname;
int len;
DPRINT("About to open window station handle (0x%X)\n", DPRINT("About to open window station handle (0x%X)\n",
PROCESS_WINDOW_STATION()); PROCESS_WINDOW_STATION());
@ -246,36 +322,83 @@ NtUserRegisterClassExWOW(LPWNDCLASSEXW lpwcx,
PROCESS_WINDOW_STATION()); PROCESS_WINDOW_STATION());
return((RTL_ATOM)0); return((RTL_ATOM)0);
} }
if (!IS_ATOM(lpwcx->lpszClassName)) if (bUnicodeClass)
{
if (!IS_ATOM(lpwcxw->lpszClassName))
{
Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable,
(LPWSTR)lpwcxw->lpszClassName,
&Atom);
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(WinStaObject);
DPRINT("Failed adding class name (%wS) to atom table\n",
lpwcxw->lpszClassName);
SetLastNtError(Status);
return((RTL_ATOM)0);
}
}
else
{
Atom = (RTL_ATOM)(ULONG)lpwcxw->lpszClassName;
}
ClassObject = W32kCreateClass(lpwcxw, NULL, bUnicodeClass, Atom);
if (ClassObject == NULL)
{ {
Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable, if (!IS_ATOM(lpwcxw->lpszClassName))
(LPWSTR)lpwcx->lpszClassName, {
&Atom); RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Atom);
if (!NT_SUCCESS(Status)) }
{ ObDereferenceObject(WinStaObject);
ObDereferenceObject(WinStaObject); DPRINT("Failed creating window class object\n");
DPRINT("Failed adding class name (%wS) to atom table\n", SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
lpwcx->lpszClassName); return((RTL_ATOM)0);
SetLastNtError(Status);
return((RTL_ATOM)0);
} }
} }
else else
{
if (!IS_ATOM(lpwcxa->lpszClassName))
{
len = strlen(lpwcxa->lpszClassName);
classname = ExAllocatePool(PagedPool, ((len + 1) * sizeof(WCHAR)));
Status = RtlMultiByteToUnicodeN (classname,
((len + 1) * sizeof(WCHAR)),
NULL,
lpwcxa->lpszClassName,
len);
if (!NT_SUCCESS(Status))
{
return 0;
}
Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable,
(LPWSTR)classname,
&Atom);
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(WinStaObject);
DPRINT("Failed adding class name (%wS) to atom table\n",
lpwcxa->lpszClassName);
SetLastNtError(Status);
return((RTL_ATOM)0);
}
}
else
{
Atom = (RTL_ATOM)(ULONG)lpwcxa->lpszClassName;
}
ClassObject = W32kCreateClass(NULL, lpwcxa, bUnicodeClass, Atom);
if (ClassObject == NULL)
{ {
Atom = (RTL_ATOM)(ULONG)lpwcx->lpszClassName; if (!IS_ATOM(lpwcxa->lpszClassName))
} {
ClassObject = W32kCreateClass(lpwcx, bUnicodeClass, Atom); RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Atom);
if (ClassObject == NULL) }
{ ObDereferenceObject(WinStaObject);
if (!IS_ATOM(lpwcx->lpszClassName)) DPRINT("Failed creating window class object\n");
{ SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Atom); return((RTL_ATOM)0);
} }
ObDereferenceObject(WinStaObject); }
DPRINT("Failed creating window class object\n");
SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
return((RTL_ATOM)0);
}
ExAcquireFastMutex(&PsGetWin32Process()->ClassListLock); ExAcquireFastMutex(&PsGetWin32Process()->ClassListLock);
InsertTailList(&PsGetWin32Process()->ClassListHead, &ClassObject->ListEntry); InsertTailList(&PsGetWin32Process()->ClassListHead, &ClassObject->ListEntry);
ExReleaseFastMutex(&PsGetWin32Process()->ClassListLock); ExReleaseFastMutex(&PsGetWin32Process()->ClassListLock);
@ -286,25 +409,54 @@ NtUserRegisterClassExWOW(LPWNDCLASSEXW lpwcx,
} }
ULONG FASTCALL ULONG FASTCALL
W32kGetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset) W32kGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi)
{ {
LONG Ret; LONG Ret;
switch (Offset) switch (Offset)
{ {
case GCL_STYLE:
Ret = WindowObject->Class->Class.style;
break;
case GCL_CBWNDEXTRA: case GCL_CBWNDEXTRA:
Ret = WindowObject->Class->Class.cbWndExtra; Ret = WindowObject->Class->ClassW.cbWndExtra;
break; break;
case GCL_CBCLSEXTRA: case GCL_CBCLSEXTRA:
Ret = WindowObject->Class->Class.cbClsExtra; Ret = WindowObject->Class->ClassW.cbClsExtra;
break;
case GCL_HMODULE:
Ret = (ULONG)WindowObject->Class->Class.hInstance;
break; break;
case GCL_HBRBACKGROUND: case GCL_HBRBACKGROUND:
Ret = (ULONG)WindowObject->Class->Class.hbrBackground; Ret = (ULONG)WindowObject->Class->ClassW.hbrBackground;
break;
case GCL_HCURSOR:
Ret = (ULONG)WindowObject->Class->ClassW.hCursor;
break;
case GCL_HICON:
Ret = (ULONG)WindowObject->Class->ClassW.hIcon;
break;
case GCL_HICONSM:
Ret = (ULONG)WindowObject->Class->ClassW.hIconSm;
break;
case GCL_HMODULE:
Ret = (ULONG)WindowObject->Class->ClassW.hInstance;
break;
case GCL_MENUNAME:
if (Ansi)
{
Ret = (ULONG)WindowObject->Class->ClassA.lpszMenuName;
}
else
{
Ret = (ULONG)WindowObject->Class->ClassW.lpszMenuName;
}
break;
case GCL_STYLE:
Ret = WindowObject->Class->ClassW.style;
break;
case GCL_WNDPROC:
if (WindowObject->Unicode)
{
Ret = (ULONG)WindowObject->Class->ClassW.lpfnWndProc;
}
else
{
Ret = (ULONG)WindowObject->Class->ClassA.lpfnWndProc;
}
break; break;
default: default:
Ret = 0; Ret = 0;
@ -314,7 +466,7 @@ W32kGetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset)
} }
DWORD STDCALL DWORD STDCALL
NtUserGetClassLong(HWND hWnd, DWORD Offset) NtUserGetClassLong(HWND hWnd, DWORD Offset, BOOL Ansi)
{ {
PWINDOW_OBJECT WindowObject; PWINDOW_OBJECT WindowObject;
LONG Ret; LONG Ret;
@ -324,17 +476,75 @@ NtUserGetClassLong(HWND hWnd, DWORD Offset)
{ {
return(0); return(0);
} }
Ret = W32kGetClassLong(WindowObject, Offset); Ret = W32kGetClassLong(WindowObject, Offset, Ansi);
W32kReleaseWindowObject(WindowObject); W32kReleaseWindowObject(WindowObject);
return(Ret); return(Ret);
} }
DWORD STDCALL void FASTCALL
NtUserSetClassLong(HWND hWnd, int Index, LONG NewValue, DWORD unk) W32kSetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset, LONG dwNewLong, BOOL Ansi)
{ {
UNIMPLEMENTED; switch (Offset)
{
case GCL_CBWNDEXTRA:
WindowObject->Class->ClassW.cbWndExtra = dwNewLong;
WindowObject->Class->ClassA.cbWndExtra = dwNewLong;
break;
case GCL_CBCLSEXTRA:
WindowObject->Class->ClassW.cbClsExtra = dwNewLong;
WindowObject->Class->ClassA.cbClsExtra = dwNewLong;
break;
case GCL_HBRBACKGROUND:
WindowObject->Class->ClassW.hbrBackground = (HBRUSH)dwNewLong;
WindowObject->Class->ClassA.hbrBackground = (HBRUSH)dwNewLong;
break;
case GCL_HCURSOR:
WindowObject->Class->ClassW.hCursor = (HCURSOR)dwNewLong;
WindowObject->Class->ClassA.hCursor = (HCURSOR)dwNewLong;
break;
case GCL_HICON:
WindowObject->Class->ClassW.hIcon = (HICON)dwNewLong;
WindowObject->Class->ClassA.hIcon = (HICON)dwNewLong;
break;
case GCL_HICONSM:
WindowObject->Class->ClassW.hIconSm = (HICON)dwNewLong;
WindowObject->Class->ClassA.hIconSm = (HICON)dwNewLong;
break;
case GCL_HMODULE:
WindowObject->Class->ClassW.hInstance = (HINSTANCE)dwNewLong;
WindowObject->Class->ClassA.hInstance = (HINSTANCE)dwNewLong;
break;
/*case GCL_MENUNAME:
WindowObject->Class->Class.lpszMenuName = (LPCWSTR)dwNewLong;
break;*/
case GCL_STYLE:
WindowObject->Class->ClassW.style = dwNewLong;
WindowObject->Class->ClassA.style = dwNewLong;
break;
/*case GCL_WNDPROC:
WindowObject->Class->Class.lpfnWndProc = (WNDPROC)dwNewLong;
break;*/
}
}
return(0); DWORD STDCALL
NtUserSetClassLong(HWND hWnd,
DWORD Offset,
LONG dwNewLong,
BOOL Ansi)
{
PWINDOW_OBJECT WindowObject;
LONG Ret;
WindowObject = W32kGetWindowObject(hWnd);
if (WindowObject == NULL)
{
return(0);
}
Ret = W32kGetClassLong(WindowObject, Offset, Ansi);
W32kSetClassLong(WindowObject, Offset, dwNewLong, Ansi);
W32kReleaseWindowObject(WindowObject);
return(Ret);
} }
DWORD STDCALL DWORD STDCALL

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: menu.c,v 1.7 2003/08/04 23:52:25 weiden Exp $ /* $Id: menu.c,v 1.8 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -621,7 +621,7 @@ DWORD
STDCALL STDCALL
NtUserBuildMenuItemList( NtUserBuildMenuItemList(
HMENU hMenu, HMENU hMenu,
LPCMENUITEMINFO* lpmiil, LPCMENUITEMINFOW* lpmiil,
ULONG nBufSize, ULONG nBufSize,
DWORD Reserved) DWORD Reserved)
{ {
@ -773,7 +773,7 @@ NtUserInsertMenuItem(
HMENU hMenu, HMENU hMenu,
UINT uItem, UINT uItem,
WINBOOL fByPosition, WINBOOL fByPosition,
LPMENUITEMINFOW lpmii) LPCMENUITEMINFOW lpmii)
{ {
DWORD res = 0; DWORD res = 0;
PMENU_OBJECT MenuObject; PMENU_OBJECT MenuObject;

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: message.c,v 1.26 2003/08/02 16:53:08 gdalsnes Exp $ /* $Id: message.c,v 1.27 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -106,11 +106,22 @@ NtUserDispatchMessage(CONST MSG* UnsafeMsg)
/* FIXME: Call hook procedures. */ /* FIXME: Call hook procedures. */
/* Call the window procedure. */ /* Call the window procedure. */
Result = W32kCallWindowProc(WindowObject->WndProc, if (WindowObject->Unicode == TRUE)
Msg.hwnd, {
Msg.message, Result = W32kCallWindowProc(WindowObject->WndProcW,
Msg.wParam, Msg.hwnd,
Msg.lParam); Msg.message,
Msg.wParam,
Msg.lParam);
}
else
{
Result = W32kCallWindowProc(WindowObject->WndProcA,
Msg.hwnd,
Msg.message,
Msg.wParam,
Msg.lParam);
}
return Result; return Result;
} }
@ -211,7 +222,7 @@ W32kPeekMessage(LPMSG Msg,
if (WindowObject != NULL) if (WindowObject != NULL)
{ {
if (WindowObject->Style & WS_MINIMIZE && if (WindowObject->Style & WS_MINIMIZE &&
(HICON)NtUserGetClassLong(Msg->hwnd, GCL_HICON) != NULL) (HICON)NtUserGetClassLong(Msg->hwnd, GCL_HICON, FALSE) != NULL)
{ {
Msg->message = WM_PAINTICON; Msg->message = WM_PAINTICON;
Msg->wParam = 1; Msg->wParam = 1;
@ -512,7 +523,14 @@ W32kSendMessage(HWND hWnd,
} }
else else
{ {
Result = W32kCallWindowProc(Window->WndProc, hWnd, Msg, wParam, lParam); if (Window->Unicode == TRUE)
{
Result = W32kCallWindowProc(Window->WndProcW, hWnd, Msg, wParam, lParam);
}
else
{
Result = W32kCallWindowProc(Window->WndProcA, hWnd, Msg, wParam, lParam);
}
return Result; return Result;
} }
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: msgqueue.c,v 1.13 2003/08/02 16:53:08 gdalsnes Exp $ /* $Id: msgqueue.c,v 1.14 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -195,7 +195,7 @@ MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh,
} }
if (Click) if (Click)
{ {
if (W32kGetClassLong(Window, GCL_STYLE) & CS_DBLCLKS || if (W32kGetClassLong(Window, GCL_STYLE, FALSE) & CS_DBLCLKS ||
(*HitTest) != HTCLIENT) (*HitTest) != HTCLIENT)
{ {
if (Msg == ClkMessage && if (Msg == ClkMessage &&

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: painting.c,v 1.22 2003/08/04 16:54:54 gdalsnes Exp $ /* $Id: painting.c,v 1.23 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -63,7 +63,7 @@ PaintDoPaint(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags, ULONG ExFlags)
HDC hDC; HDC hDC;
HWND hWnd = Window->Self; HWND hWnd = Window->Self;
BOOL bIcon = (0 != (Window->Style & WS_MINIMIZE)) && BOOL bIcon = (0 != (Window->Style & WS_MINIMIZE)) &&
(0 != W32kGetClassLong(Window, GCL_HICON)); (0 != W32kGetClassLong(Window, GCL_HICON, FALSE));
if (0 != (ExFlags & RDW_EX_DELAY_NCPAINT) || if (0 != (ExFlags & RDW_EX_DELAY_NCPAINT) ||
PaintHaveToDelayNCPaint(Window, 0)) PaintHaveToDelayNCPaint(Window, 0))
@ -902,14 +902,14 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* lPs)
/* FIXME: Hide caret. */ /* FIXME: Hide caret. */
IsIcon = (Window->Style & WS_MINIMIZE) && W32kGetClassLong(Window, GCL_HICON); IsIcon = (Window->Style & WS_MINIMIZE) && W32kGetClassLong(Window, GCL_HICON, FALSE);
DcxFlags = DCX_INTERSECTRGN | DCX_WINDOWPAINT | DCX_USESTYLE; DcxFlags = DCX_INTERSECTRGN | DCX_WINDOWPAINT | DCX_USESTYLE;
if (IsIcon) if (IsIcon)
{ {
DcxFlags |= DCX_WINDOW; DcxFlags |= DCX_WINDOW;
} }
if (W32kGetClassLong(Window, GCL_STYLE) & CS_PARENTDC) if (W32kGetClassLong(Window, GCL_STYLE, FALSE) & CS_PARENTDC)
{ {
/* Don't clip the output to the update region for CS_PARENTDC window */ /* Don't clip the output to the update region for CS_PARENTDC window */
if ((HRGN) 1 < UpdateRegion) if ((HRGN) 1 < UpdateRegion)

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: windc.c,v 1.16 2003/07/17 21:25:11 gvg Exp $ /* $Id: windc.c,v 1.17 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -250,7 +250,7 @@ NtUserGetDCEx(HWND hWnd, HANDLE ClipRegion, ULONG Flags)
if (!(Flags & DCX_WINDOW)) if (!(Flags & DCX_WINDOW))
{ {
if (Window->Class->Class.style & CS_PARENTDC) if (Window->Class->ClassW.style & CS_PARENTDC)
{ {
Flags |= DCX_PARENTCLIP; Flags |= DCX_PARENTCLIP;
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: window.c,v 1.76 2003/08/04 21:21:13 royce Exp $ /* $Id: window.c,v 1.77 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -64,6 +64,9 @@ static LIST_ENTRY RegisteredMessageListHead;
#define REGISTERED_MESSAGE_MIN 0xc000 #define REGISTERED_MESSAGE_MIN 0xc000
#define REGISTERED_MESSAGE_MAX 0xffff #define REGISTERED_MESSAGE_MAX 0xffff
PWINDOW_OBJECT FASTCALL
W32kGetParent(PWINDOW_OBJECT Wnd);
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
PWINDOW_OBJECT FASTCALL PWINDOW_OBJECT FASTCALL
@ -119,7 +122,7 @@ W32kGetParent(PWINDOW_OBJECT Wnd)
{ {
if (Wnd->Style & WS_POPUP) if (Wnd->Style & WS_POPUP)
{ {
return W32kGetWindowObject(Wnd->hWndOwner); /* wine use HWND for owner window (unknown reason) */ return W32kGetWindowObject(Wnd->ParentHandle); /* wine use HWND for owner window (unknown reason) */
} }
else if (Wnd->Style & WS_CHILD) else if (Wnd->Style & WS_CHILD)
{ {
@ -488,7 +491,9 @@ W32kCreateDesktopWindow(PWINSTATION_OBJECT WindowStation,
WindowObject->WindowRect.bottom = Height; WindowObject->WindowRect.bottom = Height;
WindowObject->ClientRect = WindowObject->WindowRect; WindowObject->ClientRect = WindowObject->WindowRect;
WindowObject->UserData = 0; WindowObject->UserData = 0;
WindowObject->WndProc = DesktopClass->Class.lpfnWndProc; /*FIXME: figure out what the correct strange value is and what to do with it (and how to set the wndproc values correctly) */
WindowObject->WndProcA = DesktopClass->ClassA.lpfnWndProc;
WindowObject->WndProcW = DesktopClass->ClassW.lpfnWndProc;
WindowObject->OwnerThread = PsGetCurrentThread(); WindowObject->OwnerThread = PsGetCurrentThread();
InitializeListHead(&WindowObject->ChildrenListHead); InitializeListHead(&WindowObject->ChildrenListHead);
@ -599,7 +604,7 @@ NtUserCreateWindowEx(DWORD dwExStyle,
/* Create the window object. */ /* Create the window object. */
WindowObject = (PWINDOW_OBJECT) WindowObject = (PWINDOW_OBJECT)
ObmCreateObject(PsGetWin32Process()->WindowStation->HandleTable, &Handle, ObmCreateObject(PsGetWin32Process()->WindowStation->HandleTable, &Handle,
otWindow, sizeof(WINDOW_OBJECT) + ClassObject->Class.cbWndExtra otWindow, sizeof(WINDOW_OBJECT) + ClassObject->ClassW.cbWndExtra
); );
DPRINT("Created object with handle %X\n", Handle); DPRINT("Created object with handle %X\n", Handle);
@ -632,14 +637,16 @@ NtUserCreateWindowEx(DWORD dwExStyle,
WindowObject->MessageQueue = PsGetWin32Thread()->MessageQueue; WindowObject->MessageQueue = PsGetWin32Thread()->MessageQueue;
WindowObject->Parent = ParentWindow; WindowObject->Parent = ParentWindow;
WindowObject->UserData = 0; WindowObject->UserData = 0;
WindowObject->WndProc = ClassObject->Class.lpfnWndProc; WindowObject->Unicode = ClassObject->Unicode;
WindowObject->WndProcA = ClassObject->ClassA.lpfnWndProc;
WindowObject->WndProcW = ClassObject->ClassW.lpfnWndProc;
WindowObject->OwnerThread = PsGetCurrentThread(); WindowObject->OwnerThread = PsGetCurrentThread();
/* extra window data */ /* extra window data */
if (ClassObject->Class.cbWndExtra != 0) if (ClassObject->ClassW.cbWndExtra != 0)
{ {
WindowObject->ExtraData = (PULONG)(WindowObject + 1); WindowObject->ExtraData = (PULONG)(WindowObject + 1);
WindowObject->ExtraDataSize = ClassObject->Class.cbWndExtra; WindowObject->ExtraDataSize = ClassObject->ClassW.cbWndExtra;
RtlZeroMemory(WindowObject->ExtraData, WindowObject->ExtraDataSize); RtlZeroMemory(WindowObject->ExtraData, WindowObject->ExtraDataSize);
} }
else else
@ -1684,7 +1691,7 @@ NtUserSetWindowFNID(DWORD Unknown0,
} }
LONG STDCALL LONG STDCALL
NtUserGetWindowLong(HWND hWnd, DWORD Index) NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi)
{ {
PWINDOW_OBJECT WindowObject; PWINDOW_OBJECT WindowObject;
NTSTATUS Status; NTSTATUS Status;
@ -1722,9 +1729,17 @@ NtUserGetWindowLong(HWND hWnd, DWORD Index)
case GWL_STYLE: case GWL_STYLE:
Result = WindowObject->Style; Result = WindowObject->Style;
break; break;
/* FIXME: need to return the "invalid" value if the caller asks for it
(but we cant do that because that breaks stuff in user32 which wont be fixable until we have an implementation of IsWindowUnicode available */
case GWL_WNDPROC: case GWL_WNDPROC:
Result = (LONG) WindowObject->WndProc; if (WindowObject->Unicode)
{
Result = (LONG) WindowObject->WndProcW;
}
else
{
Result = (LONG) WindowObject->WndProcA;
}
break; break;
case GWL_HINSTANCE: case GWL_HINSTANCE:
@ -1810,8 +1825,9 @@ NtUserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
case GWL_WNDPROC: case GWL_WNDPROC:
/* FIXME: should check if window belongs to current process */ /* FIXME: should check if window belongs to current process */
OldValue = (LONG) WindowObject->WndProc; /*OldValue = (LONG) WindowObject->WndProc;
WindowObject->WndProc = (WNDPROC) NewValue; WindowObject->WndProc = (WNDPROC) NewValue;*/
OldValue = 0;
break; break;
case GWL_HINSTANCE: case GWL_HINSTANCE:

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: winsta.c,v 1.22 2003/08/04 16:54:54 gdalsnes Exp $ /* $Id: winsta.c,v 1.23 2003/08/05 15:41:03 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -203,7 +203,7 @@ InitWindowStationImpl(VOID)
wcx.hbrBackground = NULL; wcx.hbrBackground = NULL;
wcx.lpszMenuName = NULL; wcx.lpszMenuName = NULL;
wcx.lpszClassName = L"DesktopWindowClass"; wcx.lpszClassName = L"DesktopWindowClass";
DesktopWindowClass = W32kCreateClass(&wcx, TRUE, (RTL_ATOM)32880); DesktopWindowClass = W32kCreateClass(&wcx, 0, TRUE, (RTL_ATOM)32880);
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: icm.c,v 1.6 2003/05/18 17:16:18 ea Exp $ */ /* $Id: icm.c,v 1.7 2003/08/05 15:41:03 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN #undef WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
@ -47,7 +47,7 @@ W32kColorMatchToTarget(HDC hDC,
HCOLORSPACE HCOLORSPACE
STDCALL STDCALL
W32kCreateColorSpace(LPLOGCOLORSPACE LogColorSpace) W32kCreateColorSpace(LPLOGCOLORSPACEW LogColorSpace)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }
@ -86,8 +86,8 @@ W32kGetDeviceGammaRamp(HDC hDC,
BOOL BOOL
STDCALL STDCALL
W32kGetICMProfile(HDC hDC, W32kGetICMProfile(HDC hDC,
LPDWORD NameSize, LPDWORD NameSize,
LPWSTR Filename) LPWSTR Filename)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -96,7 +96,7 @@ W32kGetICMProfile(HDC hDC,
BOOL BOOL
STDCALL STDCALL
W32kGetLogColorSpace(HCOLORSPACE hColorSpace, W32kGetLogColorSpace(HCOLORSPACE hColorSpace,
LPLOGCOLORSPACE Buffer, LPLOGCOLORSPACEW Buffer,
DWORD Size) DWORD Size)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: print.c,v 1.9 2003/05/18 17:16:18 ea Exp $ */ /* $Id: print.c,v 1.10 2003/08/05 15:41:03 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN #undef WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <ddk/ntddk.h> #include <ddk/ntddk.h>
@ -80,7 +80,7 @@ W32kSetAbortProc(HDC hDC,
INT INT
STDCALL STDCALL
W32kStartDoc(HDC hDC, W32kStartDoc(HDC hDC,
CONST PDOCINFO di) CONST PDOCINFOW di)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: text.c,v 1.37 2003/07/24 21:23:37 gvg Exp $ */ /* $Id: text.c,v 1.38 2003/08/05 15:41:03 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN #undef WIN32_LEAN_AND_MEAN
@ -364,7 +364,7 @@ int
STDCALL STDCALL
W32kEnumFontFamiliesEx(HDC hDC, W32kEnumFontFamiliesEx(HDC hDC,
LPLOGFONTW Logfont, LPLOGFONTW Logfont,
FONTENUMEXPROC EnumFontFamExProc, FONTENUMEXPROCW EnumFontFamExProc,
LPARAM lParam, LPARAM lParam,
DWORD Flags) DWORD Flags)
{ {
@ -429,7 +429,7 @@ W32kGetCharacterPlacement(HDC hDC,
LPCWSTR String, LPCWSTR String,
int Count, int Count,
int MaxExtent, int MaxExtent,
LPGCP_RESULTS Results, LPGCP_RESULTSW Results,
DWORD Flags) DWORD Flags)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -914,7 +914,7 @@ W32kGetTextMetrics(HDC hDC,
BOOL BOOL
STDCALL STDCALL
W32kPolyTextOut(HDC hDC, W32kPolyTextOut(HDC hDC,
CONST LPPOLYTEXT txt, CONST LPPOLYTEXTW txt,
int Count) int Count)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;