17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.acme;
27
28 import java.foreign.annotations.NativeAddressof;
29 import java.foreign.annotations.NativeGetter;
30 import java.foreign.annotations.NativeHeader;
31 import java.foreign.annotations.NativeSetter;
32 import java.foreign.annotations.NativeStruct;
33 import java.foreign.memory.Pointer;
34 import java.foreign.memory.Struct;
35
36 @NativeHeader(path="bitfields.h")
37 public interface bitfields {
38
39 @NativeStruct("[" +
40 "u64=[" +
41 "i2(x)" +
42 "x6" +
43 "i15(y)" +
44 "x9" +
45 "i20(z)" +
46 "x12]" +
47 "u64=[" +
48 "i13(w)" +
49 "x51]" +
50 "](bitfields1)")
51 interface bitfields1 extends Struct<bitfields1> {
52 @NativeGetter("x")
53 long x$get();
54 @NativeSetter("x")
55 void x$set(long value);
56 @NativeGetter("y")
57 long y$get();
262 public interface bitfields9 extends Struct<bitfields9> {
263 @NativeGetter("x")
264 int x$get();
265 @NativeSetter("x")
266 void x$set(int var1);
267
268 @NativeGetter("y")
269 int y$get();
270 @NativeSetter("y")
271 void y$set(int var1);
272
273 @NativeGetter("z")
274 int z$get();
275 @NativeSetter("z")
276 void z$set(int var1);
277 @NativeAddressof("z")
278 Pointer<Integer> z$ptr();
279 }
280
281 @NativeStruct("[u32=[u1(x)]|x64](bitfields10)")
282 public interface bitfields10 extends Struct<bitfields.bitfields10> {
283 @NativeGetter("x")
284 int x$get();
285
286 @NativeSetter("x")
287 void x$set(int var1);
288 }
289
290 }
|
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.acme;
27
28 import java.foreign.annotations.NativeAddressof;
29 import java.foreign.annotations.NativeGetter;
30 import java.foreign.annotations.NativeHeader;
31 import java.foreign.annotations.NativeSetter;
32 import java.foreign.annotations.NativeStruct;
33 import java.foreign.memory.Pointer;
34 import java.foreign.memory.Struct;
35
36 @NativeHeader(path="bitfields.h")
37 public interface bitfields_h {
38
39 @NativeStruct("[" +
40 "u64=[" +
41 "i2(x)" +
42 "x6" +
43 "i15(y)" +
44 "x9" +
45 "i20(z)" +
46 "x12]" +
47 "u64=[" +
48 "i13(w)" +
49 "x51]" +
50 "](bitfields1)")
51 interface bitfields1 extends Struct<bitfields1> {
52 @NativeGetter("x")
53 long x$get();
54 @NativeSetter("x")
55 void x$set(long value);
56 @NativeGetter("y")
57 long y$get();
262 public interface bitfields9 extends Struct<bitfields9> {
263 @NativeGetter("x")
264 int x$get();
265 @NativeSetter("x")
266 void x$set(int var1);
267
268 @NativeGetter("y")
269 int y$get();
270 @NativeSetter("y")
271 void y$set(int var1);
272
273 @NativeGetter("z")
274 int z$get();
275 @NativeSetter("z")
276 void z$set(int var1);
277 @NativeAddressof("z")
278 Pointer<Integer> z$ptr();
279 }
280
281 @NativeStruct("[u32=[u1(x)]|x64](bitfields10)")
282 public interface bitfields10 extends Struct<bitfields10> {
283 @NativeGetter("x")
284 int x$get();
285
286 @NativeSetter("x")
287 void x$set(int var1);
288 }
289
290 }
|