Ignore:
Timestamp:
Jul 17, 1999, 1:56:51 PM (26 years ago)
Author:
sandervl
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/windowmsg.cpp

    r314 r321  
    1 /* $Id: windowmsg.cpp,v 1.5 1999-07-16 11:32:10 sandervl Exp $ */
     1/* $Id: windowmsg.cpp,v 1.6 1999-07-17 11:52:24 sandervl Exp $ */
    22/*
    33 * Win32 window message APIs for OS/2
     
    1818#include <win.h>
    1919#include <hooks.h>
     20#include "oslibwin.h"
    2021
    2122//******************************************************************************
     
    2425{
    2526    dprintf(("USER32:  PostQuitMessage\n"));
    26 
    27     O32_PostQuitMessage(nExitCode);
    28 }
    29 //******************************************************************************
    30 //******************************************************************************
    31 LONG WIN32API DispatchMessageA( const MSG * msg)
    32 {
    33   LONG         retval;
    34   int          painting;
    35   Win32Window *window;
    36    
    37       /* Process timer messages */
    38     if ((msg->message == WM_TIMER) || (msg->message == WM_SYSTIMER))
    39     {
    40         if (msg->lParam)
    41         {
    42             return SendMessageA(msg->hwnd, msg->message, msg->wParam, GetTickCount());
    43         }
    44     }
    45 
    46     if (!msg->hwnd) return 0;
    47 
    48     window = Win32Window::GetWindowFromHandle(msg->hwnd);
    49     if(!window) {
    50         dprintf(("DispatchMessageA, window %x not found", msg->hwnd));
    51         return 0;
    52     }
    53 
    54     painting = (msg->message == WM_PAINT);
    55     if (painting) window->setFlags(window->getFlags() | WIN_NEEDS_BEGINPAINT);
    56 
    57     retval = window->SendMessageA(msg->message, msg->wParam, msg->lParam );
    58 
    59 #if 0
    60     window = Win32Window::GetWindowFromHandle(msg->hwnd);
    61     if(!window) {
    62         dprintf(("DispatchMessageA, window %x not found", msg->hwnd));
    63         return 0;
    64     }
    65 
    66     if (painting && (wndPtr->getFlags() & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate)
    67     {
    68         ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n",
    69             msg->hwnd);
    70         wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT;
    71         /* Validate the update region to avoid infinite WM_PAINT loop */
    72         ValidateRect( msg->hwnd, NULL );
    73     }
    74 #endif
    75     return retval;
     27    OSLibWinPostQuitMessage(nExitCode);
     28}
     29//******************************************************************************
     30//******************************************************************************
     31LONG WIN32API DispatchMessageA(const MSG * msg)
     32{
     33  return OSLibWinDispatchMsg((MSG *)msg);
    7634}
    7735//******************************************************************************
     
    7937LONG WIN32API DispatchMessageW( const MSG * msg)
    8038{
    81   LONG         retval;
    82   int          painting;
    83   Win32Window *window;
    84    
    85     /* Process timer messages */
    86     if ((msg->message == WM_TIMER) || (msg->message == WM_SYSTIMER))
    87     {
    88         if (msg->lParam)
    89         {
    90             return SendMessageW(msg->hwnd, msg->message, msg->wParam, GetTickCount());
    91         }
    92     }
    93 
    94     if (!msg->hwnd) return 0;
    95 
    96     window = Win32Window::GetWindowFromHandle(msg->hwnd);
    97     if(!window) {
    98         dprintf(("DispatchMessageW, window %x not found", msg->hwnd));
    99         return 0;
    100     }
    101 
    102     painting = (msg->message == WM_PAINT);
    103     if (painting) window->setFlags(window->getFlags() | WIN_NEEDS_BEGINPAINT);
    104 
    105     retval = window->SendMessageW(msg->message, msg->wParam, msg->lParam );
    106 
    107 #if 0
    108     window = Win32Window::GetWindowFromHandle(msg->hwnd);
    109     if(!window) {
    110         dprintf(("DispatchMessageW, window %x not found", msg->hwnd));
    111         return 0;
    112     }
    113 
    114     if (painting && (wndPtr->getFlags() & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate)
    115     {
    116         ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n",
    117             msg->hwnd);
    118         wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT;
    119         /* Validate the update region to avoid infinite WM_PAINT loop */
    120         ValidateRect( msg->hwnd, NULL );
    121     }
    122 #endif
    123     return retval;
     39  return OSLibWinDispatchMsg((MSG *)msg, TRUE);
    12440}
    12541//******************************************************************************
     
    12743BOOL WIN32API TranslateMessage( const MSG * arg1)
    12844{
    129 #ifdef DEBUG
    130 ////    WriteLog("USER32:  TranslateMessage\n");
    131 #endif
    132     return O32_TranslateMessage(arg1);
     45//    return O32_TranslateMessage(arg1);
     46   return TRUE;
     47}
     48//******************************************************************************
     49//******************************************************************************
     50BOOL WIN32API GetMessageA( LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax)
     51{
     52    return OSLibWinGetMsg(pMsg, hwnd, uMsgFilterMin, uMsgFilterMax);
     53}
     54//******************************************************************************
     55//******************************************************************************
     56BOOL WIN32API GetMessageW( LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax)
     57{
     58    return OSLibWinGetMsg(pMsg, hwnd, uMsgFilterMin, uMsgFilterMax, TRUE);
     59}
     60//******************************************************************************
     61//******************************************************************************
     62LONG WIN32API GetMessageExtraInfo(void)
     63{
     64    dprintf(("USER32:  GetMessageExtraInfo\n"));
     65    return O32_GetMessageExtraInfo();
     66}
     67//******************************************************************************
     68//******************************************************************************
     69DWORD WIN32API GetMessagePos(void)
     70{
     71    dprintf(("USER32:  GetMessagePos\n"));
     72    return O32_GetMessagePos();
     73}
     74//******************************************************************************
     75//******************************************************************************
     76LONG WIN32API GetMessageTime(void)
     77{
     78    dprintf(("USER32:  GetMessageTime\n"));
     79    return O32_GetMessageTime();
    13380}
    13481//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.