| 1 | /* |
| 2 | * $Id: HGDIOBJ.java,v 1.1.1.5 2004/05/25 20:23:23 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 | |
| 13 | package com.moesol.bindings.platform_sdk.windows_api; |
| 14 | |
| 15 | /** |
| 16 | * @author Robert Hastings |
| 17 | */ |
| 18 | public class HGDIOBJ extends HANDLE { |
| 19 | |
| 20 | /** |
| 21 | * @param handle |
| 22 | * @param temporary |
| 23 | */ |
| 24 | protected HGDIOBJ(long handle, boolean temporary) { |
| 25 | super(handle, temporary); |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * @param handle |
| 30 | */ |
| 31 | protected HGDIOBJ(long handle) { |
| 32 | super(handle); |
| 33 | } |
| 34 | |
| 35 | public void deleteObject() { |
| 36 | boolean r = jni_deleteObject(_getHandle()); |
| 37 | if (!r) { |
| 38 | throw new RuntimeException("deleteObject"); |
| 39 | } |
| 40 | detach(); |
| 41 | } |
| 42 | |
| 43 | private static native boolean jni_deleteObject(long handle); |
| 44 | } |