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 [HMENU.java]

nameclass, %method, %block, %line, %
HMENU.java100% (1/1)100% (11/11)97%  (105/108)99%  (29.7/30)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class HMENU100% (1/1)100% (11/11)97%  (105/108)99%  (29.7/30)
createMenu (): HMENU 100% (1/1)90%  (9/10)97%  (2.9/3)
getMenuItemCount (): int 100% (1/1)92%  (11/12)97%  (2.9/3)
createPopupMenu (): HMENU 100% (1/1)93%  (14/15)98%  (2.9/3)
<static initializer> 100% (1/1)100% (6/6)100% (1/1)
HMENU (long): void 100% (1/1)100% (4/4)100% (2/2)
HMENU (long, boolean): void 100% (1/1)100% (5/5)100% (2/2)
destroyMenu (): void 100% (1/1)100% (9/9)100% (4/4)
getMenuItem (int, boolean, MENUITEMINFO): void 100% (1/1)100% (12/12)100% (3/3)
insertMenuItem (int, boolean, MENUITEMINFO): void 100% (1/1)100% (13/13)100% (3/3)
removeMenuItem (int, boolean): void 100% (1/1)100% (9/9)100% (3/3)
setMenuItem (int, boolean, MENUITEMINFO): void 100% (1/1)100% (13/13)100% (3/3)

1/*
2 * $Id: HMENU.java,v 1.2 2004/08/13 00:54:31 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.*;
16 
17 
18public class HMENU extends HANDLE {
19    HMENU(long hmenu, boolean temporary) {
20        super(hmenu, temporary);
21    }
22    HMENU(long hmenu) {
23        super(hmenu);
24    }
25    public static HMENU createMenu() {
26        HMENU r = jni_createMenu();
27        PlatformSDK.throwWin32OnFalse(r != null);
28        return r;
29    }
30    public static HMENU createPopupMenu() {
31        long r = jni_createPopupMenu();
32        PlatformSDK.throwWin32OnFalse(r != 0);
33        return new HMENU(r);
34    }
35    public void destroyMenu() {
36        boolean r = jni_destroyMenu(_getHandle());
37        PlatformSDK.throwWin32OnFalse(r);
38        detach();
39    }
40    public void insertMenuItem(int item, boolean by_position, MENUITEMINFO mi) {
41        boolean r = jni_insertMenuItem(_getHandle(), item, by_position, mi.m_native_mii, mi.m_type_data);
42        PlatformSDK.throwWin32OnFalse(r);
43    }
44    public void getMenuItem(int item, boolean by_position, MENUITEMINFO mi) {
45        boolean r = jni_getMenuItem(_getHandle(), item, by_position, mi.m_native_mii, mi);
46        PlatformSDK.throwWin32OnFalse(r);
47    }
48    public void setMenuItem(int item, boolean by_position, MENUITEMINFO mi) {
49        boolean r = jni_setMenuItem(_getHandle(), item, by_position, mi.m_native_mii, mi.m_type_data);
50        PlatformSDK.throwWin32OnFalse(r);
51    }
52    public int getMenuItemCount() {
53        int r = jni_getMenuItemCount(_getHandle());
54        PlatformSDK.throwWin32OnFalse(r >= 0);
55        return r;
56    }
57    public void removeMenuItem(int item, boolean by_position) {
58        boolean r = jni_removeMenuItem(_getHandle(), item, by_position);
59        PlatformSDK.throwWin32OnFalse(r);
60    }
61    public static final HMENU NULL = new HMENU(0);
62 
63    private static native HMENU jni_createMenu();
64    private static native long jni_createPopupMenu();
65    private static native boolean jni_destroyMenu(long handle);
66    private static native boolean jni_insertMenuItem(long handle, int item, boolean by_position,
67                                                     ByteBuffer native_mii, String type_data);
68    private static native boolean jni_getMenuItem(long handle, int item, boolean by_position,
69                                                  ByteBuffer native_mii, MENUITEMINFO mii);
70    private static native boolean jni_setMenuItem(long handle, int item, boolean by_position,
71                                                  ByteBuffer native_mii, String type_data);
72    private static native int jni_getMenuItemCount(long handle);
73    private static native boolean jni_removeMenuItem(long handle, int item, boolean by_position);
74}

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