Changeset 1066 for trunk/src


Ignore:
Timestamp:
Sep 26, 1999, 6:09:04 PM (26 years ago)
Author:
dengert
Message:

SetTimer/KillTimer implemented

Location:
trunk/src/user32
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/Makefile

    r1057 r1066  
    1 # $Id: Makefile,v 1.22 1999-09-26 10:09:59 sandervl Exp $
     1# $Id: Makefile,v 1.23 1999-09-26 16:09:04 dengert Exp $
    22
    33#
     
    3434        oslibutil.obj oslibmsg.obj dib.obj oslibdos.obj win32wmdichild.obj \
    3535        winprop.obj wingdi.obj oslibgdi.obj winaccel.obj \
    36         nativerc.obj oslibres.obj dummy.obj oslibmenu.obj dc.obj\
     36        nativerc.obj oslibres.obj dummy.obj oslibmenu.obj dc.obj timer.obj \
    3737        windlgmsg.obj windlg.obj win32wdesktop.obj
    3838
     
    106106win32wbase.obj:   win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h
    107107win32wnd.obj:   win32wnd.cpp win32class.h win32wbase.h win32wnd.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h oslibmenu.h
    108 win32dlg.obj:   win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h oslibmsg.h 
    109 win32wndchild.obj: win32wndchild.cpp win32wndchild.h gen_object.h 
    110 win32wmdiclient.obj: win32wmdiclient.cpp win32wbase.h win32wmdiclient.h win32wmdichild.h gen_object.h 
    111 win32wmdichild.obj: win32wmdichild.cpp win32wbase.h win32wmdiclient.h win32wmdichild.h gen_object.h 
    112 win32wdesktop.obj: win32wdesktop.cpp win32wbase.h win32wdesktop.h gen_object.h 
     108win32dlg.obj:   win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h oslibmsg.h
     109win32wndchild.obj: win32wndchild.cpp win32wndchild.h gen_object.h
     110win32wmdiclient.obj: win32wmdiclient.cpp win32wbase.h win32wmdiclient.h win32wmdichild.h gen_object.h
     111win32wmdichild.obj: win32wmdichild.cpp win32wbase.h win32wmdiclient.h win32wmdichild.h gen_object.h
     112win32wdesktop.obj: win32wdesktop.cpp win32wbase.h win32wdesktop.h gen_object.h
    113113gen_object.obj: gen_object.cpp gen_object.h heapshared.h
    114114oslibwin.obj:   oslibwin.cpp oslibwin.h oslibutil.h oslibgdi.h $(PDWIN32_INCLUDE)\winconst.h
    115115oslibutil.obj:  oslibutil.cpp oslibutil.h $(PDWIN32_INCLUDE)\wprocess.h oslibmsg.h
    116 oslibmsg.obj:   oslibmsg.cpp oslibmsg.h
     116oslibmsg.obj:   oslibmsg.cpp oslibmsg.h timer.h
    117117oslibmenu.obj:  oslibmenu.cpp oslibmenu.h
    118118oslibgdi.obj:   oslibgdi.cpp oslibgdi.h win32wbase.h
     
    120120oslibdos.obj:   oslibdos.cpp oslibdos.h
    121121dc.obj:         dc.cpp win32wbase.h dc.h
     122timer.obj:      timer.cpp win32wbase.h timer.h
    122123
    123124clipboard.obj:  clipboard.cpp
  • trunk/src/user32/oslibmsg.cpp

    r949 r1066  
    1 /* $Id: oslibmsg.cpp,v 1.1 1999-09-15 23:18:54 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.2 1999-09-26 16:09:04 dengert Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    2222#include <win32wnd.h>
    2323#include "oslibutil.h"
     24#include "timer.h"
    2425
    2526QMSG *MsgThreadPtr = 0;
     
    2930BOOL OSLibInitMsgQueue()
    3031{
    31    if(DosAllocThreadLocalMemory(sizeof(QMSG)/sizeof(ULONG), (PULONG *)&MsgThreadPtr) != 0) 
     32   if(DosAllocThreadLocalMemory(sizeof(QMSG)/sizeof(ULONG), (PULONG *)&MsgThreadPtr) != 0)
    3233   {
    33         dprintf(("OSLibInitMsgQueue: local thread memory alloc failed!!"));
    34         DebugInt3();
    35         return FALSE;
     34        dprintf(("OSLibInitMsgQueue: local thread memory alloc failed!!"));
     35        DebugInt3();
     36        return FALSE;
    3637   }
    3738   return TRUE;
     
    7071//TODO: What to do if app changed msg? (translate)
    7172//  WinToOS2MsgTranslate(msg, &qmsg, isUnicode);
    72  
     73
    7374  return (LONG)WinDispatchMsg(GetThreadHAB(), MsgThreadPtr);
    7475}
    7576//******************************************************************************
    7677//******************************************************************************
    77 BOOL OSLibWinGetMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax, 
     78BOOL OSLibWinGetMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax,
    7879                    BOOL isUnicode)
    7980{
    80  BOOL rc;
     81 BOOL rc, eaten;
    8182
    82   rc = WinGetMsg(GetThreadHAB(), MsgThreadPtr, TranslateWinMsg(uMsgFilterMin), TranslateWinMsg(uMsgFilterMax), 0);
     83  do {
     84    eaten = FALSE;
     85    rc = WinGetMsg(GetThreadHAB(), MsgThreadPtr, TranslateWinMsg(uMsgFilterMin), TranslateWinMsg(uMsgFilterMax), 0);
     86    if (MsgThreadPtr->msg == WM_TIMER)
     87      eaten = TIMER_HandleTimer (MsgThreadPtr);
     88  } while (eaten);
     89
    8390  OS2ToWinMsgTranslate(MsgThreadPtr, pMsg, isUnicode);
    8491  return rc;
     
    8693//******************************************************************************
    8794//******************************************************************************
    88 BOOL  OSLibWinPeekMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax, 
     95BOOL  OSLibWinPeekMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax,
    8996                      BOOL fRemove, BOOL isUnicode)
    9097{
    9198 BOOL rc;
    9299
    93   rc = WinPeekMsg(GetThreadHAB(), MsgThreadPtr, hwnd, TranslateWinMsg(uMsgFilterMin), 
     100  rc = WinPeekMsg(GetThreadHAB(), MsgThreadPtr, hwnd, TranslateWinMsg(uMsgFilterMin),
    94101                  TranslateWinMsg(uMsgFilterMax), (fRemove == MSG_REMOVE) ? PM_REMOVE : PM_NOREMOVE);
    95102  OS2ToWinMsgTranslate(MsgThreadPtr, pMsg, isUnicode);
  • trunk/src/user32/user32.cpp

    r1057 r1066  
    1 /* $Id: user32.cpp,v 1.32 1999-09-26 10:10:00 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.33 1999-09-26 16:09:03 dengert Exp $ */
    22
    33/*
     
    878878//******************************************************************************
    879879//******************************************************************************
     880#if 0
    880881UINT WIN32API SetTimer( HWND hwnd, UINT idTimer, UINT uTimeout, TIMERPROC  tmprc)
    881882{
     
    900901    return O32_KillTimer(hWnd,uIDEvent);
    901902}
     903#endif
    902904//******************************************************************************
    903905//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.