mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:23:01 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
74
modules/rostests/apitests/include/msgtrace.h
Normal file
74
modules/rostests/apitests/include/msgtrace.h
Normal file
|
@ -0,0 +1,74 @@
|
|||
#ifndef APITESTS_MSGTRACE_H
|
||||
#define APITESTS_MSGTRACE_H
|
||||
|
||||
typedef enum _MSG_TYPE
|
||||
{
|
||||
SENT,
|
||||
POST,
|
||||
HOOK,
|
||||
EVENT,
|
||||
SENT_RET,
|
||||
MARKER
|
||||
} MSG_TYPE;
|
||||
|
||||
typedef struct _MSG_ENTRY
|
||||
{
|
||||
int iwnd;
|
||||
UINT msg;
|
||||
MSG_TYPE type;
|
||||
int param1;
|
||||
int param2;
|
||||
} MSG_ENTRY;
|
||||
|
||||
typedef struct _MSG_CACHE
|
||||
{
|
||||
MSG_ENTRY last_post_message;
|
||||
MSG_ENTRY message_cache[100];
|
||||
int count;
|
||||
} MSG_CACHE;
|
||||
|
||||
extern MSG_ENTRY empty_chain[];
|
||||
extern MSG_CACHE default_cache;
|
||||
|
||||
void record_message(MSG_CACHE* cache, int iwnd, UINT message, MSG_TYPE type, int param1,int param2);
|
||||
void compare_cache(MSG_CACHE* cache, const char* file, int line, MSG_ENTRY *msg_chain);
|
||||
void trace_cache(MSG_CACHE* cache, const char* file, int line);
|
||||
void empty_message_cache(MSG_CACHE* cache);
|
||||
|
||||
/* filter messages that are affected by dwm */
|
||||
static inline BOOL IsDWmMsg(UINT msg)
|
||||
{
|
||||
switch(msg)
|
||||
{
|
||||
case WM_NCPAINT:
|
||||
case WM_ERASEBKGND:
|
||||
case WM_PAINT:
|
||||
case 0x031f: /*WM_DWMNCRENDERINGCHANGED*/
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static inline BOOL IseKeyMsg(UINT msg)
|
||||
{
|
||||
return (msg == WM_KEYUP || msg == WM_KEYDOWN);
|
||||
}
|
||||
|
||||
#define COMPARE_CACHE(msg_chain) compare_cache(&default_cache, __FILE__, __LINE__, msg_chain)
|
||||
#define TRACE_CACHE() trace_cache(&default_cache, __FILE__, __LINE__)
|
||||
#define EMPTY_CACHE() empty_message_cache(&default_cache);
|
||||
#define RECORD_MESSAGE(...) record_message(&default_cache, ##__VA_ARGS__);
|
||||
|
||||
#define COMPARE_CACHE_(cache, msg_chain) compare_cache(cache, __FILE__, __LINE__, msg_chain)
|
||||
#define TRACE_CACHE_(cache) trace_cache(cache, __FILE__, __LINE__)
|
||||
#define EMPTY_CACHE_(cache) empty_message_cache(cache);
|
||||
|
||||
#define EXPECT_QUEUE_STATUS(expected, notexpected) \
|
||||
{ \
|
||||
DWORD status = HIWORD(GetQueueStatus(QS_ALLEVENTS)); \
|
||||
ok(((status) & (expected))== (expected),"wrong queue status. expected %li, and got %li\n", (DWORD)(expected), status); \
|
||||
if(notexpected) \
|
||||
ok((status & (notexpected))!=(notexpected), "wrong queue status. got non expected %li\n", (DWORD)(notexpected)); \
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue