home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-05 | 1.3 KB | 52 lines |
- // Copyright (C) 1997 Microsoft Corporation All Rights Reserved
-
- // These classes provide direct, low-overhead access to commonly used
- // Windows api. These classes use the new J/Direct feature.
- //
- // Information on how to use J/Direct to write your own declarations
- // can be found in the Microsoft SDK for Java 2.0.
-
- package com.ms.win32;
-
- /** @dll.struct(pack=4) */
- public class MMTIME {
- public int wTime;
- public int ms;
- public int hi;
-
- public MMTIME(int wType, int val) {
- this.wTime = wType;
- this.ms = val;
- }
-
-
- public MMTIME(int hour, int min, int sec, int frame, int fps) {
- this.wTime = com.ms.win32.win.TIME_SMPTE;
- this.ms = ((hour & 0xff)) |
- ((min & 0xff) << 8) |
- ((sec & 0xff) << 16) |
- ((frame & 0xff) << 24);
- this.hi = fps;
- }
-
- public int getHour() {
- return ms & 0xff;
- }
- public int getMin() {
- return ( (ms >> 8) & 0xff );
- }
- public int getSec() {
- return ( (ms >> 16) & 0xff );
- }
- public int getFrame() {
- return ( (ms >> 24) & 0xff );
- }
- public int getFps() {
- return ( hi & 0xff );
- }
-
- }
-
-
-
-