1 /* 2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 package com.acme; 25 26 import java.foreign.annotations.NativeAddressof; 27 import java.foreign.annotations.NativeGetter; 28 import java.foreign.annotations.NativeHeader; 29 import java.foreign.annotations.NativeLocation; 30 import java.foreign.annotations.NativeSetter; 31 import java.foreign.annotations.NativeStruct; 32 import java.foreign.memory.Struct; 33 34 @NativeHeader(path="pad.h") 35 public interface pad { 36 @NativeStruct( 37 "[" + 38 "u8(c1)" + 39 "x56" + 40 "[" + 41 "i64(l)|" + 42 "[" + 43 "u8(x1)" + 44 "x56" + 45 "f64(y1)" + 46 "](anon$pad_h$1123)|" + 47 "${anon$pad_h$1195}(p2)" + 48 "](anon$pad_h$1086)" + 49 "f32(f1)" + 50 "x32" + 51 "](PaddyStruct)") 52 interface PaddyStruct extends Struct<PaddyStruct> { 53 @NativeGetter("c1") 54 public abstract byte c1$get(); 55 @NativeSetter("c1") 56 public abstract void c1$set(byte c1); 57 @NativeAddressof("c1") 58 public abstract java.foreign.memory.Pointer<java.lang.Byte> c1$ptr(); 59 @NativeGetter("l") 60 public abstract long l$get(); 61 @NativeSetter("l") 62 public abstract void l$set(long l); 63 @NativeAddressof("l") 64 public abstract java.foreign.memory.Pointer<java.lang.Long> l$ptr(); 65 @NativeGetter("x1") 66 public abstract byte x1$get(); 67 @NativeSetter("x1") 68 public abstract void x1$set(byte x1); 69 @NativeAddressof("x1") 70 public abstract java.foreign.memory.Pointer<java.lang.Byte> x1$ptr(); 71 @NativeGetter("y1") 72 public abstract double y1$get(); 73 @NativeSetter("y1") 74 public abstract void y1$set(double y1); 75 @NativeAddressof("y1") 76 public abstract java.foreign.memory.Pointer<java.lang.Double> y1$ptr(); 77 @NativeGetter("p2") 78 public abstract anon$pad_h$1195 p2$get(); 79 @NativeSetter("p2") 80 public abstract void p2$set(anon$pad_h$1195 p2); 81 @NativeAddressof("p2") 82 public abstract java.foreign.memory.Pointer<anon$pad_h$1195> p2$ptr(); 83 @NativeGetter("f1") 84 public abstract float f1$get(); 85 @NativeSetter("f1") 86 public abstract void f1$set(float f1); 87 @NativeAddressof("f1") 88 public abstract java.foreign.memory.Pointer<java.lang.Float> f1$ptr(); 89 } 90 91 @NativeStruct( 92 "[" + 93 "f64(x2)" + 94 "f32(y2)" + 95 "u8(z2)" + 96 "x24" + 97 "](anon$pad_h$1195)") 98 interface anon$pad_h$1195 extends java.foreign.memory.Struct<anon$pad_h$1195> { 99 @NativeGetter("x2") 100 public abstract double x2$get(); 101 @NativeSetter("x2") 102 public abstract void x2$set(double x2); 103 @NativeAddressof("x2") 104 public abstract java.foreign.memory.Pointer<java.lang.Double> x2$ptr(); 105 @NativeGetter("y2") 106 public abstract float y2$get(); 107 @NativeSetter("y2") 108 public abstract void y2$set(float y2); 109 @NativeAddressof("y2") 110 public abstract java.foreign.memory.Pointer<java.lang.Float> y2$ptr(); 111 @NativeGetter("z2") 112 public abstract byte z2$get(); 113 @NativeSetter("z2") 114 public abstract void z2$set(byte z2); 115 @NativeAddressof("z2") 116 public abstract java.foreign.memory.Pointer<java.lang.Byte> z2$ptr(); 117 } 118 }