EMMA Coverage Report (generated Mon Mar 20 21:34:30 PST 2006)
[all classes][com.moesol.bindings.platform_sdk.windows_api]

COVERAGE SUMMARY FOR SOURCE FILE [MSG.java]

nameclass, %method, %block, %line, %
MSG.java50%  (1/2)43%  (10/23)31%  (63/202)40%  (19/48)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MSG$Array0%   (0/1)0%   (0/6)0%   (0/51)0%   (0/11)
MSG$Array (ByteBuffer): void 0%   (0/1)0%   (0/4)0%   (0/2)
get (int): MSG 0%   (0/1)0%   (0/8)0%   (0/1)
getDynamicSize (): int 0%   (0/1)0%   (0/4)0%   (0/1)
length (): int 0%   (0/1)0%   (0/6)0%   (0/1)
put (int, MSG): void 0%   (0/1)0%   (0/8)0%   (0/2)
toString (): String 0%   (0/1)0%   (0/21)0%   (0/4)
     
class MSG100% (1/1)59%  (10/17)42%  (63/151)51%  (19/37)
MSG (ByteBuffer): void 0%   (0/1)0%   (0/8)0%   (0/3)
get_hwnd (): int 0%   (0/1)0%   (0/4)0%   (0/1)
get_lParam (): int 0%   (0/1)0%   (0/4)0%   (0/1)
get_message (): int 0%   (0/1)0%   (0/4)0%   (0/1)
get_time (): int 0%   (0/1)0%   (0/4)0%   (0/1)
get_wParam (): int 0%   (0/1)0%   (0/4)0%   (0/1)
toString (): String 0%   (0/1)0%   (0/60)0%   (0/10)
MSG (): void 100% (1/1)100% (5/5)100% (2/2)
get_pt (): POINT 100% (1/1)100% (14/14)100% (3/3)
ref_pt (): POINT 100% (1/1)100% (8/8)100% (1/1)
set_hwnd (int): void 100% (1/1)100% (5/5)100% (2/2)
set_lParam (int): void 100% (1/1)100% (5/5)100% (2/2)
set_message (int): void 100% (1/1)100% (5/5)100% (2/2)
set_pt (POINT): void 100% (1/1)100% (9/9)100% (2/2)
set_time (int): void 100% (1/1)100% (5/5)100% (2/2)
set_wParam (int): void 100% (1/1)100% (5/5)100% (2/2)
sizeof (): int 100% (1/1)100% (2/2)100% (1/1)

1/*
2 * $Id: MSG.java,v 1.3 2006/03/07 17:51:46 hastings Exp $
3 *
4 * (c) Copyright, Moebius Solutions, Inc., 2004
5 *
6 *                       All Rights Reserved
7 *
8 * This material may be reproduced by or for the U. S. Government
9 * pursuant to the copyright license under the clause at
10 * DFARS 252.227-7014 (OCT 2001).
11 */
12 
13package com.moesol.bindings.platform_sdk.windows_api;
14 
15import java.nio.ByteBuffer;
16import com.moesol.bindings.NativeStructure;
17 
18/**
19 * @author Robert Hastings
20 */
21public class MSG extends NativeStructure {
22    // MSG
23    public MSG() {
24        super( new byte[sizeof()] );
25    }
26    public MSG(ByteBuffer bb) {
27        super( bb );
28        // set limit based on the dynamic size in byte in bb.
29        bb.limit(sizeof());
30    }
31    public static int sizeof() {
32        return 28;
33    }
34    /**
35     * Represent a native array of these structures
36     */
37    public static class Array extends com.moesol.bindings.NativeArrayOfStructs {
38        public Array(java.nio.ByteBuffer bb) {
39            super(bb);
40        }
41        public MSG get(int index) {
42            return new MSG(getElementSlice(index, MSG.sizeof()));
43        }
44        public void put(int index, MSG value) {
45            get(index).putStruct(0, MSG.sizeof(), value);
46        }
47        public int length() {
48            return _getByteBuffer().limit() / MSG.sizeof();
49        }
50        public int getDynamicSize() {
51            return _getByteBuffer().limit();
52        }
53        public String toString() {
54            StringBuffer sb = new StringBuffer();
55            for (int i = 0; i < length(); i++) {
56                sb.append(get(i));
57            }
58            return sb.toString();
59        }
60    }
61    
62    public void set_hwnd(int v) {
63        putInt(0, v);
64    }
65    public int get_hwnd() {
66        return getInt(0);
67    }
68    public void set_message(int v) {
69        putInt(4, v);
70    }
71    public int get_message() {
72        return getInt(4);
73    }
74    public void set_wParam(int v) {
75        putInt(8, v);
76    }
77    public int get_wParam() {
78        return getInt(8);
79    }
80    public void set_lParam(int v) {
81        putInt(12, v);
82    }
83    public int get_lParam() {
84        return getInt(12);
85    }
86    public void set_time(int v) {
87        putInt(16, v);
88    }
89    public int get_time() {
90        return getInt(16);
91    }
92    public void set_pt(POINT v) {
93        System.arraycopy(v._getStructureBytes(), 0, _getStructureBytes(), 20, 8);
94    }
95    public POINT get_pt() {
96        POINT r = new POINT();
97        System.arraycopy(_getStructureBytes(), 20, r._getStructureBytes(), 0, 8);
98        return r;
99    }
100    public POINT ref_pt() {
101        return new POINT( getSlice(20, 8) );
102    }
103    public String toString() {
104        StringBuffer buf = new StringBuffer();
105        buf.append(getClass().getName());
106        buf.append("[time=").append(get_time());
107        buf.append(",hwnd=").append(get_hwnd());
108        buf.append(",message=0x").append(Integer.toHexString(get_message()));
109        buf.append(",wParam=").append(get_wParam());
110        buf.append(",lParam=").append(get_lParam());
111        buf.append(",pt=").append(get_pt());
112        buf.append("]");
113        return buf.toString();
114    }
115    public static final int WM_KEYDOWN = 0x0100;
116    public static final int WM_KEYUP = 0x0101;
117    public static final int WM_CHAR = 0x0102;
118    public static final int WM_DEADCHAR = 0x0103;
119    public static final int WM_SYSKEYDOWN = 0x0104;
120    public static final int WM_SYSKEYUP = 0x0105;
121    public static final int WM_SYSCHAR = 0x0106;
122    public static final int WM_SYSDEADCHAR = 0x0107;
123}

[all classes][com.moesol.bindings.platform_sdk.windows_api]
EMMA 2.0.5312 (C) Vladimir Roubtsov