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 import java.foreign.memory.Pointer; 34 35 @NativeHeader(path="TypedefAnonStruct.h") 36 public interface TypedefAnonStruct_h { 37 @NativeLocation( 38 file="TypedefAnonStruct.h", line=24, column=9 39 ) 40 @NativeStruct("[" + 41 "i32(i)" + 42 "i32(j)" + 43 "](Point)") 44 public static interface Point extends Struct<Point> { 45 @NativeLocation( 46 file="TypedefAnonStruct.h", line=25, column=9 47 ) 48 @NativeGetter("i") 49 public int i$get(); 50 @NativeSetter("i") 51 public void i$set(int arg); 52 @NativeAddressof("i") 53 public Pointer<Integer> i$ptr(); 54 @NativeLocation( 55 file="TypedefAnonStruct.h", line=25, column=12 56 ) 57 @NativeGetter("j") 58 public int j$get(); 59 @NativeSetter("j") 60 public void j$set(int arg); 61 @NativeAddressof("j") 62 public Pointer<Integer> j$ptr(); 63 } 64 65 @NativeLocation( 66 file="TypedefAnonStruct.h", line=28, column=9 67 ) 68 @NativeStruct("[" + 69 "f32(x)" + 70 "f32(y)" + 71 "](FPoint)") 72 public static interface FPoint extends Struct<FPoint> { 73 @NativeLocation( 74 file="TypedefAnonStruct.h", line=29, column=11 75 ) 76 @NativeGetter("x") 77 public float x$get(); 78 @NativeSetter("x") 79 public void x$set(float arg); 80 @NativeAddressof("x") 81 public Pointer<Float> x$ptr(); 82 @NativeLocation( 83 file="TypedefAnonStruct.h", line=29, column=14 84 ) 85 @NativeGetter("y") 86 public float y$get(); 87 @NativeSetter("y") 88 public void y$set(float arg); 89 @NativeAddressof("y") 90 public Pointer<Float> y$ptr(); 91 } 92 }