home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Src / Win32Api / MMTIME.java < prev    next >
Encoding:
Java Source  |  1998-03-05  |  1.3 KB  |  52 lines

  1. // Copyright (C) 1997 Microsoft Corporation  All Rights Reserved
  2.  
  3. // These classes provide direct, low-overhead access to commonly used
  4. // Windows api. These classes use the new J/Direct feature.
  5. //
  6. // Information on how to use J/Direct to write your own declarations
  7. // can be found in the Microsoft SDK for Java 2.0.
  8.  
  9. package com.ms.win32;
  10.  
  11. /** @dll.struct(pack=4) */
  12. public class MMTIME {
  13.         public int wTime;
  14.         public int ms;  
  15.         public int hi;
  16.  
  17.         public MMTIME(int wType, int val) {
  18.             this.wTime = wType;
  19.             this.ms    = val;
  20.         }
  21.  
  22.  
  23.         public MMTIME(int hour, int min, int sec, int frame, int fps) {
  24.             this.wTime = com.ms.win32.win.TIME_SMPTE;
  25.             this.ms = ((hour & 0xff)) |
  26.                       ((min & 0xff) << 8) |
  27.                       ((sec & 0xff) << 16) |
  28.                       ((frame & 0xff) << 24);
  29.             this.hi = fps;
  30.         }
  31.  
  32.         public int getHour() {
  33.            return ms & 0xff;
  34.         }
  35.         public int getMin() {
  36.            return ( (ms >> 8) & 0xff );
  37.         }
  38.         public int getSec() {
  39.            return ( (ms >> 16) & 0xff );
  40.         }
  41.         public int getFrame() {
  42.            return ( (ms >> 24) & 0xff );
  43.         }
  44.         public int getFps() {
  45.            return ( hi & 0xff );
  46.         }
  47.  
  48. }
  49.  
  50.  
  51.  
  52.