- Fix debug header nonsense

- Fix some w32api definitions
 - MSVC/PSDK Compatibility fixes.
 - Clean up user32 headers for greater PCH usage.

svn path=/trunk/; revision=16811
This commit is contained in:
Alex Ionescu 2005-07-27 19:21:46 +00:00
parent 24f28bb15b
commit ea3d8b6b8d
43 changed files with 197 additions and 268 deletions

View file

@ -268,7 +268,7 @@ int main()
WriteFile(stdout, buf1, lstrlen(buf1), &r, NULL); WriteFile(stdout, buf1, lstrlen(buf1), &r, NULL);
EnumThreadWindows((DWORD)CurrentProcess->Threads[ti].ClientId.UniqueThread, EnumThreadWindows((DWORD)CurrentProcess->Threads[ti].ClientId.UniqueThread,
(ENUMWINDOWSPROC) EnumThreadProc, (WNDENUMPROC) EnumThreadProc,
(LPARAM)(LPTSTR) szWindowName ); (LPARAM)(LPTSTR) szWindowName );
} }
CurrentProcess = (PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess + CurrentProcess = (PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess +

View file

@ -13,7 +13,7 @@
#include "mpu401.h" #include "mpu401.h"
// #define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
#include "sbdebug.h" // our own debug helper #include "sbdebug.h" // our own debug helper

View file

@ -63,7 +63,7 @@
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG
#define DPRINT(...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(__VA_ARGS__); } while(0); #define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0); #define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
#else #else
#ifdef __GNUC__ #ifdef __GNUC__

View file

@ -6,6 +6,11 @@
#include <windows.h> #include <windows.h>
#include <wchar.h> #include <wchar.h>
/* Add ROS Master debug functions if not added yet */
#ifndef __INTERNAL_DEBUG
#include <reactos/debug.h>
#endif
#ifndef __GNUC__ #ifndef __GNUC__
#define __FUNCTION__ "" #define __FUNCTION__ ""
#define inline __inline #define inline __inline
@ -13,21 +18,6 @@
unsigned long DbgPrint(char *Format,...); unsigned long DbgPrint(char *Format,...);
#ifdef DBG
#define DPRINT1 DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint
#else
#define DPRINT1(...)
#endif
#if !defined(DBG) || !defined(YDEBUG)
#define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#else
#define DPRINT DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint
#endif
#define UNIMPLEMENTED DbgPrint("WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
struct _GUID; struct _GUID;
/* Exported definitions and macros */ /* Exported definitions and macros */

View file

@ -20,6 +20,9 @@
#define NTOS_MODE_USER #define NTOS_MODE_USER
#include <ndk/ntndk.h> #include <ndk/ntndk.h>
/* ELF Support */
#include <elf/elf.h>
/* Internal NTDLL */ /* Internal NTDLL */
#include "ntdllp.h" #include "ntdllp.h"

View file

@ -19,19 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#define __WINE__
#include <user32.h> #include <user32.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "controls.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#ifdef __REACTOS__
HPEN STDCALL GetSysColorPen(int nIndex);
#endif
/* GetWindowLong offsets for window extra information */ /* GetWindowLong offsets for window extra information */
#define STATE_GWL_OFFSET 0 #define STATE_GWL_OFFSET 0
@ -126,33 +114,33 @@ const struct builtin_class_descr BUTTON_builtin_class =
}; };
inline static LONG get_button_state( HWND hwnd ) __inline static LONG get_button_state( HWND hwnd )
{ {
return GetWindowLongA( hwnd, STATE_GWL_OFFSET ); return GetWindowLongA( hwnd, STATE_GWL_OFFSET );
} }
inline static void set_button_state( HWND hwnd, LONG state ) __inline static void set_button_state( HWND hwnd, LONG state )
{ {
SetWindowLongA( hwnd, STATE_GWL_OFFSET, state ); SetWindowLongA( hwnd, STATE_GWL_OFFSET, state );
} }
inline static HFONT get_button_font( HWND hwnd ) __inline static HFONT get_button_font( HWND hwnd )
{ {
return (HFONT)GetWindowLongA( hwnd, HFONT_GWL_OFFSET ); return (HFONT)GetWindowLongA( hwnd, HFONT_GWL_OFFSET );
} }
inline static void set_button_font( HWND hwnd, HFONT font ) __inline static void set_button_font( HWND hwnd, HFONT font )
{ {
SetWindowLongA( hwnd, HFONT_GWL_OFFSET, (LONG)font ); SetWindowLongA( hwnd, HFONT_GWL_OFFSET, (LONG)font );
} }
inline static UINT get_button_type( LONG window_style ) __inline static UINT get_button_type( LONG window_style )
{ {
return (window_style & 0x0f); return (window_style & 0x0f);
} }
/* paint a button of any type */ /* paint a button of any type */
inline static void paint_button( HWND hwnd, LONG style, UINT action ) __inline static void paint_button( HWND hwnd, LONG style, UINT action )
{ {
if (btnPaintFunc[style] && IsWindowVisible(hwnd)) if (btnPaintFunc[style] && IsWindowVisible(hwnd))
{ {
@ -163,7 +151,7 @@ inline static void paint_button( HWND hwnd, LONG style, UINT action )
} }
/* retrieve the button text; returned buffer must be freed by caller */ /* retrieve the button text; returned buffer must be freed by caller */
inline static WCHAR *get_button_text( HWND hwnd ) __inline static WCHAR *get_button_text( HWND hwnd )
{ {
INT len = 512; INT len = 512;
WCHAR *buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ); WCHAR *buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) );

View file

@ -20,18 +20,9 @@
* FIXME: roll up in Netscape 3.01. * FIXME: roll up in Netscape 3.01.
*/ */
#define __WINE__
#include <user32.h> #include <user32.h>
#include <stdarg.h>
#include <string.h>
#define NDEBUG #define NDEBUG
#include <string.h> #include <debug.h>
#include <stdlib.h>
#include <stdio.h>
#include "controls.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(combo); WINE_DEFAULT_DEBUG_CHANNEL(combo);

View file

@ -36,14 +36,9 @@
* *
*/ */
#define __WINE__
#include <user32.h> #include <user32.h>
#include <stdarg.h> #define NDEBUG
#include <string.h> #include <debug.h>
#include <stdlib.h>
#include "controls.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(edit); WINE_DEFAULT_DEBUG_CHANNEL(edit);
WINE_DECLARE_DEBUG_CHANNEL(combo); WINE_DECLARE_DEBUG_CHANNEL(combo);
@ -167,10 +162,10 @@ typedef struct
* We still like to call them internally * We still like to call them internally
* "static inline" makes them more like macro's * "static inline" makes them more like macro's
*/ */
static inline BOOL EDIT_EM_CanUndo(EDITSTATE *es); static __inline BOOL EDIT_EM_CanUndo(EDITSTATE *es);
static inline void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es); static __inline void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es);
static inline void EDIT_WM_Clear(EDITSTATE *es); static __inline void EDIT_WM_Clear(EDITSTATE *es);
static inline void EDIT_WM_Cut(EDITSTATE *es); static __inline void EDIT_WM_Cut(EDITSTATE *es);
/* /*
* Helper functions only valid for one type of control * Helper functions only valid for one type of control
@ -310,7 +305,7 @@ const struct builtin_class_descr EDIT_builtin_class =
* EM_CANUNDO * EM_CANUNDO
* *
*/ */
static inline BOOL EDIT_EM_CanUndo(EDITSTATE *es) static __inline BOOL EDIT_EM_CanUndo(EDITSTATE *es)
{ {
return (es->undo_insert_count || strlenW(es->undo_text)); return (es->undo_insert_count || strlenW(es->undo_text));
} }
@ -321,7 +316,7 @@ static inline BOOL EDIT_EM_CanUndo(EDITSTATE *es)
* EM_EMPTYUNDOBUFFER * EM_EMPTYUNDOBUFFER
* *
*/ */
static inline void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es) static __inline void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es)
{ {
es->undo_insert_count = 0; es->undo_insert_count = 0;
*es->undo_text = '\0'; *es->undo_text = '\0';
@ -333,7 +328,7 @@ static inline void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es)
* WM_CLEAR * WM_CLEAR
* *
*/ */
static inline void EDIT_WM_Clear(EDITSTATE *es) static __inline void EDIT_WM_Clear(EDITSTATE *es)
{ {
static const WCHAR empty_stringW[] = {0}; static const WCHAR empty_stringW[] = {0};
@ -350,7 +345,7 @@ static inline void EDIT_WM_Clear(EDITSTATE *es)
* WM_CUT * WM_CUT
* *
*/ */
static inline void EDIT_WM_Cut(EDITSTATE *es) static __inline void EDIT_WM_Cut(EDITSTATE *es)
{ {
EDIT_WM_Copy(es); EDIT_WM_Copy(es);
EDIT_WM_Clear(es); EDIT_WM_Clear(es);
@ -406,7 +401,7 @@ static HBRUSH EDIT_NotifyCtlColor(EDITSTATE *es, HDC hdc)
return (HBRUSH)SendMessageW(GetParent(es->hwndSelf), msg, (WPARAM)hdc, (LPARAM)es->hwndSelf); return (HBRUSH)SendMessageW(GetParent(es->hwndSelf), msg, (WPARAM)hdc, (LPARAM)es->hwndSelf);
} }
static inline LRESULT DefWindowProcT(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode) static __inline LRESULT DefWindowProcT(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
{ {
if(unicode) if(unicode)
return DefWindowProcW(hwnd, msg, wParam, lParam); return DefWindowProcW(hwnd, msg, wParam, lParam);

View file

@ -18,9 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "user32.h" #include <user32.h>
#include "controls.h"
#include "wine/unicode.h"
#ifdef __REACTOS__ #ifdef __REACTOS__
#define MAKEINTATOMW(atom) ((LPCWSTR)((ULONG_PTR)((WORD)(atom)))) #define MAKEINTATOMW(atom) ((LPCWSTR)((ULONG_PTR)((WORD)(atom))))

View file

@ -18,15 +18,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#define __WINE__
#include <user32.h> #include <user32.h>
#include <string.h> #define NDEBUG
#include <stdlib.h> #include <debug.h>
#include "controls.h"
#include "wine/debug.h"
#ifdef __REACTOS__
#include "wine/unicode.h"
/* Start of hack section -------------------------------- */ /* Start of hack section -------------------------------- */
typedef short *LPINT16; typedef short *LPINT16;
@ -42,10 +37,9 @@ BOOL is_old_app(HWND hwnd)
#define WM_SYSTIMER 280 #define WM_SYSTIMER 280
UINT STDCALL SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC); UINT STDCALL SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
WINBOOL STDCALL KillSystemTimer(HWND,UINT_PTR); BOOL STDCALL KillSystemTimer(HWND,UINT_PTR);
/* End of hack section -------------------------------- */ /* End of hack section -------------------------------- */
#endif
/* Unimplemented yet: /* Unimplemented yet:
* - LBS_USETABSTOPS * - LBS_USETABSTOPS

View file

@ -31,7 +31,9 @@
/* INCLUDES *******************************************************************/ /* INCLUDES *******************************************************************/
#include <user32.h> #include <user32.h>
#include <oleacc.h> #define NDEBUG
#include <debug.h>
/* GLOBAL VARIABLES ***********************************************************/ /* GLOBAL VARIABLES ***********************************************************/
@ -70,7 +72,7 @@ HBRUSH DefWndControlColor(HDC hDC, UINT ctlType);
static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
UINT STDCALL SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC); UINT STDCALL SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
WINBOOL STDCALL KillSystemTimer(HWND,UINT_PTR); BOOL STDCALL KillSystemTimer(HWND,UINT_PTR);
/********************************************************************* /*********************************************************************
* scrollbar class descriptor * scrollbar class descriptor
@ -1272,10 +1274,11 @@ ScrollBarWndProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
// infoPtr->flags = wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH; // infoPtr->flags = wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH;
// SCROLL_RefreshScrollBar(hwnd, SB_CTL, TRUE, TRUE); // SCROLL_RefreshScrollBar(hwnd, SB_CTL, TRUE, TRUE);
// } // }
HDC hdc;
DbgPrint("ScrollBarWndProc WM_ENABLE\n"); DbgPrint("ScrollBarWndProc WM_ENABLE\n");
NtUserEnableScrollBar(Wnd,SB_CTL,(wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH)); NtUserEnableScrollBar(Wnd,SB_CTL,(wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH));
/* Refresh Scrollbars. */ /* Refresh Scrollbars. */
HDC hdc = GetDCEx( Wnd, 0, DCX_CACHE ); hdc = GetDCEx( Wnd, 0, DCX_CACHE );
if (!hdc) return 1; if (!hdc) return 1;
IntDrawScrollBar( Wnd, hdc, SB_CTL); IntDrawScrollBar( Wnd, hdc, SB_CTL);
ReleaseDC( Wnd, hdc ); ReleaseDC( Wnd, hdc );

View file

@ -239,7 +239,7 @@ extern void WDML_BroadcastDDEWindows(const char* clsName, UINT uMsg,
WPARAM wParam, LPARAM lParam); WPARAM wParam, LPARAM lParam);
extern void WDML_NotifyThreadExit(DWORD tid); extern void WDML_NotifyThreadExit(DWORD tid);
static inline void WDML_ExtractAck(WORD status, DDEACK* da) static __inline void WDML_ExtractAck(WORD status, DDEACK* da)
{ {
*da = *((DDEACK*)&status); *da = *((DDEACK*)&status);
} }

View file

@ -1,74 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
* FILE: include/debug.h
* PURPOSE: Debugging support macros
* DEFINES: DBG - Enable debug output
* NASSERT - Disable assertions
*/
#ifndef __DEBUG_H
#define __DEBUG_H
#define NORMAL_MASK 0x000000FF
#define SPECIAL_MASK 0xFFFFFF00
#define MIN_TRACE 0x00000001
#define MID_TRACE 0x00000002
#define MAX_TRACE 0x00000003
#define DEBUG_CHECK 0x00000100
#define DEBUG_OBJECT 0x00000200
#define DEBUG_WINDOW 0x00000400
#define DEBUG_ULTRA 0xFFFFFFFF
#ifdef ASSERT
#undef ASSERT
#endif
#ifdef DBG
extern DWORD DebugTraceLevel;
#define D(_t_, _x_) \
if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
DbgPrint("(%hS:%d)(%hS) ", __FILE__, __LINE__, __FUNCTION__); \
DbgPrint _x_; \
}
#ifdef NASSERT
#define ASSERT(x)
#else /* NASSERT */
#define ASSERT(x) if (!(x)) { D(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); }
#endif /* NASSERT */
#define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x))
#else /* DBG */
#define D(_t_, _x_)
#define ASSERT_IRQL(x)
#define ASSERT(x)
#endif /* DBG */
#ifdef assert
#undef assert
#endif
#define assert(x) ASSERT(x)
#define assert_irql(x) ASSERT_IRQL(x)
#define UNIMPLEMENTED \
D(MIN_TRACE, ("is unimplemented, please try again later.\n"));
#define CHECKPOINT \
D(DEBUG_CHECK, ("\n"));
#define DPRINT(X...) D(DEBUG_CHECK, (X))
#define CP CHECKPOINT
#endif /* __DEBUG_H */
/* EOF */

View file

@ -8,17 +8,17 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#ifndef USER32_H
#define USER32_H
/* C Headers */ /* C Headers */
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <math.h>
/* SDK/NDK Headers */ /* SDK/NDK Headers */
#define _USER32_
#define OEMRESOURCE
#define NTOS_MODE_USER
#include <windows.h> #include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#define NTOS_MODE_USER #include <winnls32.h>
#include <ndk/ntndk.h> #include <ndk/ntndk.h>
/* CSRSS Headers */ /* CSRSS Headers */
@ -32,11 +32,13 @@
#include <win32k/menu.h> #include <win32k/menu.h>
#include <win32k/paint.h> #include <win32k/paint.h>
/* WINE Headers */
#include <wine/debug.h>
#include <wine/unicode.h>
/* Internal User32 Headers */ /* Internal User32 Headers */
#include "user32p.h" #include "user32p.h"
/* FIXME: FILIP */ /* FIXME: FILIP */
HGDIOBJ STDCALL NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj); HGDIOBJ STDCALL NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj);
DWORD STDCALL GdiGetCharDimensions(HDC, LPTEXTMETRICW, DWORD *); DWORD STDCALL GdiGetCharDimensions(HDC, LPTEXTMETRICW, DWORD *);
#endif /* USER32_H */

View file

@ -14,10 +14,9 @@
/* Private User32 Headers */ /* Private User32 Headers */
#include "accel.h" #include "accel.h"
#include "cursor.h" #include "cursor.h"
#ifndef __WINE__ #include "controls.h"
#include "debug.h"
#endif
#include "draw.h" #include "draw.h"
#include "dde_private.h"
#include "menu.h" #include "menu.h"
#include "message.h" #include "message.h"
#include "regcontrol.h" #include "regcontrol.h"

View file

@ -22,21 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "wine/config.h" #include <user32.h>
#include "wine/port.h" #define NDEBUG
#include <debug.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "dde.h"
#include "ddeml.h"
#include "wine/debug.h"
#include "dde_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(ddeml); WINE_DEFAULT_DEBUG_CHANNEL(ddeml);

View file

@ -22,18 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include <user32.h>
#include <string.h> #define NDEBUG
#include "windef.h" #include <debug.h>
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "winnls.h"
#include "dde.h"
#include "ddeml.h"
#include "wine/debug.h"
#include "dde_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(ddeml); WINE_DEFAULT_DEBUG_CHANNEL(ddeml);

View file

@ -22,17 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include <user32.h>
#include <string.h> #define NDEBUG
#include "windef.h" #include <debug.h>
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "dde.h"
#include "ddeml.h"
#include "wine/debug.h"
#include "dde_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(ddeml); WINE_DEFAULT_DEBUG_CHANNEL(ddeml);

View file

@ -29,6 +29,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
#define SIZEOF_DEVMODEA_300 124 #define SIZEOF_DEVMODEA_300 124
#define SIZEOF_DEVMODEA_400 148 #define SIZEOF_DEVMODEA_400 148

View file

@ -1,17 +1,12 @@
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* FIXME: Belongs to some header. */ /* FIXME: Belongs to some header. */
WINBOOL STDCALL GdiDllInitialize(HANDLE, DWORD, LPVOID); BOOL STDCALL GdiDllInitialize(HANDLE, DWORD, LPVOID);
void InitStockObjects(void); void InitStockObjects(void);
VOID DeleteFrameBrushes(VOID); VOID DeleteFrameBrushes(VOID);
#ifdef DBG
/* See debug.h for debug/trace constants */
DWORD DebugTraceLevel = MIN_TRACE;
#endif /* DBG */
extern CRITICAL_SECTION gcsMPH; extern CRITICAL_SECTION gcsMPH;
static ULONG User32TlsIndex; static ULONG User32TlsIndex;
HINSTANCE User32Instance; HINSTANCE User32Instance;

View file

@ -22,25 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <stdarg.h> #include <user32.h>
#include <string.h> #define NDEBUG
#include <stdlib.h> /* abs() */ #include <debug.h>
#include <stddef.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
//#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "wine/unicode.h"
#include "wine/debug.h"
/* Start of Hack section */ /* Start of Hack section */

View file

@ -29,6 +29,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/

View file

@ -11,9 +11,8 @@
*/ */
#include <user32.h> #include <user32.h>
#ifdef __USE_W32API #define NDEBUG
typedef PVOID LPIMEPROW, LPIMEPROA; #include <debug.h>
#endif
/* /*
* @unimplemented * @unimplemented

View file

@ -667,6 +667,9 @@ LoadBitmapW(HINSTANCE hInstance, LPCWSTR lpBitmapName)
HANDLE WINAPI HANDLE WINAPI
CopyImage(HANDLE hnd, UINT type, INT desiredx, INT desiredy, UINT flags) CopyImage(HANDLE hnd, UINT type, INT desiredx, INT desiredy, UINT flags)
{ {
HBITMAP res;
BITMAP bm;
switch (type) switch (type)
{ {
case IMAGE_BITMAP: case IMAGE_BITMAP:
@ -675,8 +678,6 @@ CopyImage(HANDLE hnd, UINT type, INT desiredx, INT desiredy, UINT flags)
/* FIXME: support flags LR_COPYDELETEORG, LR_COPYFROMRESOURCE, /* FIXME: support flags LR_COPYDELETEORG, LR_COPYFROMRESOURCE,
LR_COPYRETURNORG, LR_CREATEDIBSECTION, LR_COPYRETURNORG, LR_CREATEDIBSECTION,
and LR_MONOCHROME; */ and LR_MONOCHROME; */
HBITMAP res;
BITMAP bm;
if (!GetObjectW(hnd, sizeof(bm), &bm)) return 0; if (!GetObjectW(hnd, sizeof(bm), &bm)) return 0;
bm.bmBits = NULL; bm.bmBits = NULL;

View file

@ -29,6 +29,9 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/

View file

@ -29,6 +29,9 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
#undef CopyCursor #undef CopyCursor
HBITMAP HBITMAP

View file

@ -12,6 +12,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
#ifndef WM_SETVISIBLE #ifndef WM_SETVISIBLE
#define WM_SETVISIBLE 9 #define WM_SETVISIBLE 9
@ -369,6 +371,7 @@ UserDrawWindowFrame(HDC hdc, const RECT *rect,
ULONG width, ULONG height) ULONG width, ULONG height)
{ {
static HBRUSH hDraggingRectBrush = NULL; static HBRUSH hDraggingRectBrush = NULL;
HBRUSH hbrush;
if(!hDraggingRectBrush) if(!hDraggingRectBrush)
{ {
@ -379,7 +382,7 @@ UserDrawWindowFrame(HDC hdc, const RECT *rect,
hDraggingRectBrush = CreatePatternBrush(hDraggingPattern); hDraggingRectBrush = CreatePatternBrush(hDraggingPattern);
} }
HBRUSH hbrush = SelectObject( hdc, hDraggingRectBrush ); hbrush = SelectObject( hdc, hDraggingRectBrush );
PatBlt( hdc, rect->left, rect->top, PatBlt( hdc, rect->left, rect->top,
rect->right - rect->left - width, height, PATINVERT ); rect->right - rect->left - width, height, PATINVERT );
PatBlt( hdc, rect->left, rect->top + height, width, PatBlt( hdc, rect->left, rect->top + height, width,

View file

@ -32,6 +32,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* MACROS/DEFINITIONS ********************************************************/ /* MACROS/DEFINITIONS ********************************************************/
@ -1864,7 +1866,7 @@ GetDlgItem(
GETDLGITEMINFO info; GETDLGITEMINFO info;
info.nIDDlgItem = nIDDlgItem; info.nIDDlgItem = nIDDlgItem;
info.control = 0; info.control = 0;
if(hDlg && !EnumChildWindows(hDlg, (ENUMWINDOWSPROC)&GetDlgItemEnumProc, (LPARAM)&info)) if(hDlg && !EnumChildWindows(hDlg, (WNDENUMPROC)&GetDlgItemEnumProc, (LPARAM)&info))
return info.control; return info.control;
else else
return 0; return 0;

View file

@ -29,6 +29,8 @@
/* INCLUDES *******************************************************************/ /* INCLUDES *******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS *******************************************************************/ /* GLOBALS *******************************************************************/

View file

@ -29,6 +29,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/

View file

@ -29,6 +29,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/

View file

@ -29,6 +29,9 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/

View file

@ -29,6 +29,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS *******************************************************************/ /* GLOBALS *******************************************************************/

View file

@ -80,23 +80,10 @@
* *
*/ */
#define __WINE__ #include <user32.h>
#define NDEBUG
#include <debug.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/unicode.h"
#include "user32.h"
#include <winnls.h>
#include "wine/debug.h"
#include "dlgs.h"
WINE_DEFAULT_DEBUG_CHANNEL(mdi); WINE_DEFAULT_DEBUG_CHANNEL(mdi);
@ -208,7 +195,7 @@ static HWND MDI_GetChildByID(HWND hwnd, UINT id)
{ {
#ifdef __REACTOS__ #ifdef __REACTOS__
DWORD Control = id; DWORD Control = id;
if (hwnd && !EnumChildWindows(hwnd, (ENUMWINDOWSPROC)&MDI_GetChildByID_EnumProc, (LPARAM)&Control)) if (hwnd && !EnumChildWindows(hwnd, (WNDENUMPROC)&MDI_GetChildByID_EnumProc, (LPARAM)&Control))
{ {
return (HWND)Control; return (HWND)Control;
} }

View file

@ -34,7 +34,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#include "../controls/controls.h" #define NDEBUG
#include <debug.h>
/* internal popup menu window messages */ /* internal popup menu window messages */
#define MM_SETMENUHANDLE (WM_USER + 0) #define MM_SETMENUHANDLE (WM_USER + 0)

View file

@ -9,6 +9,8 @@
*/ */
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* DDE message exchange /* DDE message exchange
* *

View file

@ -32,6 +32,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
/* DEFINES *******************************************************************/ /* DEFINES *******************************************************************/
@ -82,13 +84,6 @@ typedef struct _MSGBOXINFO {
/* INTERNAL FUNCTIONS ********************************************************/ /* INTERNAL FUNCTIONS ********************************************************/
static inline unsigned int strlenW( const WCHAR *str )
{
const WCHAR *s = str;
while (*s) s++;
return s - str;
}
static INT_PTR CALLBACK MessageBoxProc( HWND hwnd, UINT message, static INT_PTR CALLBACK MessageBoxProc( HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam ) WPARAM wParam, LPARAM lParam )
{ {

View file

@ -31,6 +31,8 @@ Already defined in makefile now.
*/ */
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
#define HAS_DLGFRAME(Style, ExStyle) \ #define HAS_DLGFRAME(Style, ExStyle) \
(((ExStyle) & WS_EX_DLGMODALFRAME) || \ (((ExStyle) & WS_EX_DLGMODALFRAME) || \

View file

@ -29,6 +29,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
static HBRUSH FrameBrushes[13]; static HBRUSH FrameBrushes[13];
static HBITMAP hHatch; static HBITMAP hHatch;

View file

@ -12,6 +12,8 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <user32.h> #include <user32.h>
#define NDEBUG
#include <debug.h>
BOOL ControlsInitialized = FALSE; BOOL ControlsInitialized = FALSE;
@ -383,7 +385,7 @@ STATIC
User32EnumWindows ( User32EnumWindows (
HDESK hDesktop, HDESK hDesktop,
HWND hWndparent, HWND hWndparent,
ENUMWINDOWSPROC lpfn, WNDENUMPROC lpfn,
LPARAM lParam, LPARAM lParam,
DWORD dwThreadId, DWORD dwThreadId,
BOOL bChildren ) BOOL bChildren )
@ -457,7 +459,7 @@ BOOL
STDCALL STDCALL
EnumChildWindows( EnumChildWindows(
HWND hWndParent, HWND hWndParent,
ENUMWINDOWSPROC lpEnumFunc, WNDENUMPROC lpEnumFunc,
LPARAM lParam) LPARAM lParam)
{ {
if ( !hWndParent ) if ( !hWndParent )
@ -472,7 +474,7 @@ EnumChildWindows(
BOOL BOOL
STDCALL STDCALL
EnumThreadWindows(DWORD dwThreadId, EnumThreadWindows(DWORD dwThreadId,
ENUMWINDOWSPROC lpfn, WNDENUMPROC lpfn,
LPARAM lParam) LPARAM lParam)
{ {
if ( !dwThreadId ) if ( !dwThreadId )
@ -485,7 +487,7 @@ EnumThreadWindows(DWORD dwThreadId,
* @implemented * @implemented
*/ */
BOOL STDCALL BOOL STDCALL
EnumWindows(ENUMWINDOWSPROC lpEnumFunc, EnumWindows(WNDENUMPROC lpEnumFunc,
LPARAM lParam) LPARAM lParam)
{ {
return User32EnumWindows ( NULL, NULL, lpEnumFunc, lParam, 0, FALSE ); return User32EnumWindows ( NULL, NULL, lpEnumFunc, lParam, 0, FALSE );
@ -499,7 +501,7 @@ BOOL
STDCALL STDCALL
EnumDesktopWindows( EnumDesktopWindows(
HDESK hDesktop, HDESK hDesktop,
ENUMWINDOWSPROC lpfn, WNDENUMPROC lpfn,
LPARAM lParam) LPARAM lParam)
{ {
return User32EnumWindows ( hDesktop, NULL, lpfn, lParam, 0, FALSE ); return User32EnumWindows ( hDesktop, NULL, lpfn, lParam, 0, FALSE );

View file

@ -0,0 +1,74 @@
#ifndef _WINNLS32_
#define _WINNLS32_
#if __GNUC__ >=3
#pragma GCC system_header
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _tagDATETIME
{
WORD year;
WORD month;
WORD day;
WORD hour;
WORD min;
WORD sec;
} DATETIME;
typedef struct _tagIMEPROA
{
HWND hWnd;
DATETIME InstDate;
UINT wVersion;
BYTE szDescription[50];
BYTE szName[80];
BYTE szOptions[30];
} IMEPROA,*PIMEPROA,NEAR *NPIMEPROA,FAR *LPIMEPROA;
typedef struct _tagIMEPROW
{
HWND hWnd;
DATETIME InstDate;
UINT wVersion;
WCHAR szDescription[50];
WCHAR szName[80];
WCHAR szOptions[30];
} IMEPROW,*PIMEPROW,NEAR *NPIMEPROW,FAR *LPIMEPROW;
#ifdef UNICODE
typedef IMEPROW IMEPRO;
typedef PIMEPROW PIMEPRO;
typedef NPIMEPROW NPIMEPRO;
typedef LPIMEPROW LPIMEPRO;
#define IMPGetIME IMPGetIMEW
#define IMPQueryIME IMPQueryIMEW
#define IMPSetIME IMPSetIMEW
#else
typedef IMEPROA IMEPRO;
typedef PIMEPROA PIMEPRO;
typedef NPIMEPROA NPIMEPRO;
typedef LPIMEPROA LPIMEPRO;
#define IMPGetIME IMPGetIMEA
#define IMPQueryIME IMPQueryIMEA
#define IMPSetIME IMPSetIMEA
#endif
BOOL WINAPI IMPGetIMEA(HWND, LPIMEPROA);
BOOL WINAPI IMPGetIMEW(HWND, LPIMEPROW);
BOOL WINAPI IMPQueryIMEA(LPIMEPROA);
BOOL WINAPI IMPQueryIMEW(LPIMEPROW);
BOOL WINAPI IMPSetIMEA(HWND, LPIMEPROA);
BOOL WINAPI IMPSetIMEW(HWND, LPIMEPROW);
UINT WINAPI WINNLSGetIMEHotkey(HWND);
BOOL WINAPI WINNLSEnableIME(HWND, BOOL);
BOOL WINAPI WINNLSGetEnableStatus(HWND);
#ifdef __cplusplus
}
#endif
#endif /* _USERENV_H */

View file

@ -2459,7 +2459,6 @@ typedef int(CALLBACK *EDITWORDBREAKPROCW)(LPWSTR,int,int,int);
typedef LRESULT(CALLBACK *WNDPROC)(HWND,UINT,WPARAM,LPARAM); typedef LRESULT(CALLBACK *WNDPROC)(HWND,UINT,WPARAM,LPARAM);
typedef BOOL(CALLBACK *DRAWSTATEPROC)(HDC,LPARAM,WPARAM,int,int); typedef BOOL(CALLBACK *DRAWSTATEPROC)(HDC,LPARAM,WPARAM,int,int);
typedef BOOL(CALLBACK *WNDENUMPROC)(HWND,LPARAM); typedef BOOL(CALLBACK *WNDENUMPROC)(HWND,LPARAM);
typedef BOOL(CALLBACK *ENUMWINDOWSPROC)(HWND,LPARAM);
typedef BOOL(CALLBACK* MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM); typedef BOOL(CALLBACK* MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM);
typedef BOOL(CALLBACK *NAMEENUMPROCA)(LPSTR,LPARAM); typedef BOOL(CALLBACK *NAMEENUMPROCA)(LPSTR,LPARAM);
typedef BOOL(CALLBACK *NAMEENUMPROCW)(LPWSTR,LPARAM); typedef BOOL(CALLBACK *NAMEENUMPROCW)(LPWSTR,LPARAM);
@ -3485,11 +3484,11 @@ BOOL WINAPI EndPaint(HWND,const PAINTSTRUCT*);
#if (_WIN32_WINNT >= 0x0500) #if (_WIN32_WINNT >= 0x0500)
BOOL WINAPI EndTask(HWND,BOOL,BOOL); BOOL WINAPI EndTask(HWND,BOOL,BOOL);
#endif #endif
BOOL WINAPI EnumChildWindows(HWND,ENUMWINDOWSPROC,LPARAM); BOOL WINAPI EnumChildWindows(HWND,WNDENUMPROC,LPARAM);
UINT WINAPI EnumClipboardFormats(UINT); UINT WINAPI EnumClipboardFormats(UINT);
BOOL WINAPI EnumDesktopsA(HWINSTA,DESKTOPENUMPROCA,LPARAM); BOOL WINAPI EnumDesktopsA(HWINSTA,DESKTOPENUMPROCA,LPARAM);
BOOL WINAPI EnumDesktopsW(HWINSTA,DESKTOPENUMPROCW,LPARAM); BOOL WINAPI EnumDesktopsW(HWINSTA,DESKTOPENUMPROCW,LPARAM);
BOOL WINAPI EnumDesktopWindows(HDESK,ENUMWINDOWSPROC,LPARAM); BOOL WINAPI EnumDesktopWindows(HDESK,WNDENUMPROC,LPARAM);
BOOL WINAPI EnumDisplayMonitors(HDC,LPCRECT,MONITORENUMPROC,LPARAM); BOOL WINAPI EnumDisplayMonitors(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
#ifndef NOGDI #ifndef NOGDI
BOOL WINAPI EnumDisplaySettingsA(LPCSTR,DWORD,PDEVMODEA); BOOL WINAPI EnumDisplaySettingsA(LPCSTR,DWORD,PDEVMODEA);