Ignore:
Timestamp:
Aug 19, 1999, 8:46:54 PM (26 years ago)
Author:
phaller
Message:

Add: added ODINWRAP support for WINMM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/winmm/winmm.cpp

    r95 r588  
    1 /* $Id: winmm.cpp,v 1.3 1999-06-10 16:24:35 phaller Exp $ */
     1/* $Id: winmm.cpp,v 1.4 1999-08-19 18:46:05 phaller Exp $ */
    22
    33/*
     
    1010 *
    1111 */
     12
     13
     14/****************************************************************************
     15 * Includes                                                                 *
     16 ****************************************************************************/
     17
    1218#include <os2win.h>
     19#include <odinwrap.h>
    1320#include "misc.h"
    1421
    1522#include "os2timer.h"
    1623
     24ODINDEBUGCHANNEL(WINMM-WINMM)
     25
     26
    1727/******************************************************************************/
    18 UINT WIN32API mmsystemGetVersion(void)
     28ODINFUNCTION0(UINT, mmsystemGetVersion)
    1929{
    20   dprintf(("WINMM:mmsystemGetVersion\n"));
    2130  return 4;
    2231}
    2332
    2433/******************************************************************************/
    25 MMRESULT WIN32API timeGetDevCaps(LPTIMECAPS ptc, UINT cbtc)
     34ODINFUNCTION2(MMRESULT, timeGetDevCaps,
     35              LPTIMECAPS, ptc,
     36              UINT, cbtc)
    2637{
    27     dprintf(("WINMM:timeGetDevCaps Not really Implemented\n"));
    28     ptc->wPeriodMin = 1;
    29     ptc->wPeriodMax = 20;
    30     return TIMERR_NOERROR;
     38  dprintf(("WINMM:timeGetDevCaps Not really Implemented\n"));
     39  ptc->wPeriodMin = 1;
     40  ptc->wPeriodMax = 20;
     41  return TIMERR_NOERROR;
    3142}
    3243
    3344/******************************************************************************/
    34 MMRESULT WIN32API timeBeginPeriod(UINT cMilliseconds)
     45ODINFUNCTION1(MMRESULT, timeBeginPeriod,
     46              UINT, cMilliseconds)
    3547{
    36     dprintf(("WINMM:timeBeginPeriod %d ms\n", cMilliseconds));
    37     return TIMERR_NOERROR;
     48  dprintf(("WINMM: timeBeginPeriod not implemented.\n"));
     49  return TIMERR_NOERROR;
    3850}
    3951/******************************************************************************/
    4052/******************************************************************************/
    41 MMRESULT WIN32API timeEndPeriod(UINT cMilliseconds)
     53ODINFUNCTION1(MMRESULT, timeEndPeriod,
     54              UINT, cMilliseconds)
    4255{
    43     dprintf(("WINMM:timeEndPeriod %d ms\n", cMilliseconds));
    44     return TIMERR_NOERROR;
     56  dprintf(("WINMM: timeEndPeriod not implemented.\n"));
     57  return TIMERR_NOERROR;
    4558}
    4659/******************************************************************************/
    4760/******************************************************************************/
    48 MMRESULT WIN32API timeKillEvent(UINT IDEvent)
     61ODINFUNCTION1(MMRESULT, timeKillEvent,
     62              UINT, IDEvent)
    4963{
    50     dprintf(("WINMM:timeKillEvent Not Implemented\n"));
    51     delete((OS2Timer *)IDEvent);
    52     return TIMERR_NOERROR;
     64  dprintf(("WINMM:timeKillEvent Not Implemented\n"));
     65  delete((OS2Timer *)IDEvent);
     66  return TIMERR_NOERROR;
    5367}
    5468/******************************************************************************/
    5569/******************************************************************************/
    56 MMRESULT WIN32API timeSetEvent(UINT wDelay, UINT wResolution, LPTIMECALLBACK lptc,
    57                                   DWORD dwUser, UINT fuEvent)
     70ODINFUNCTION5(MMRESULT, timeSetEvent,
     71              UINT, wDelay,
     72              UINT, wResolution,
     73              LPTIMECALLBACK, lptc,
     74              DWORD, dwUser,
     75              UINT, fuEvent)
    5876{
    59  OS2Timer *timer;
     77  OS2Timer *timer;
    6078
    61     dprintf(("WINMM:timeSetEvent %d\n", wDelay));
     79  timer = new OS2Timer();
     80  if(timer == NULL)
     81      return(0);
    6282
    63     timer = new OS2Timer();
    64     if(timer == NULL) {
    65         return(0);
    66     }
    67     if(timer->StartTimer(wDelay, wResolution, lptc, dwUser, fuEvent) == FALSE) {
    68         dprintf(("WINMM:timeSetEvent: couldn't start timer!\n"));
    69         delete(timer);
    70         return(0);
    71     }
    72     return(MMRESULT)timer;
     83  if(timer->StartTimer(wDelay, wResolution, lptc, dwUser, fuEvent) == FALSE)
     84  {
     85    dprintf(("WINMM:timeSetEvent: couldn't start timer!\n"));
     86    delete(timer);
     87    return(0);
     88  }
     89  return(MMRESULT)timer;
    7390}
    7491
    7592/******************************************************************************/
    76 MMRESULT WIN32API timeGetSystemTime( LPMMTIME arg1, UINT  arg2)
     93ODINFUNCTION2(MMRESULT, timeGetSystemTime,
     94              LPMMTIME, arg1,
     95              UINT, arg2)
    7796{
    78     dprintf(("WINMM:timeGetSystemTime\n"));
    79     return O32_timeGetSystemTime(arg1, arg2);
     97  return O32_timeGetSystemTime(arg1, arg2);
    8098}
     99
Note: See TracChangeset for help on using the changeset viewer.