minesweeper/src/main/java/org/apidesign/demo/minesweeper/Foo.java
branchibrwsr
changeset 101 5ef40158eb9c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/minesweeper/src/main/java/org/apidesign/demo/minesweeper/Foo.java	Mon Mar 10 12:56:48 2014 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +/*
     1.5 + * To change this license header, choose License Headers in Project Properties.
     1.6 + * To change this template file, choose Tools | Templates
     1.7 + * and open the template in the editor.
     1.8 + */
     1.9 +package org.apidesign.demo.minesweeper;
    1.10 +
    1.11 +import org.robovm.cocoatouch.foundation.NSURL;
    1.12 +import org.robovm.cocoatouch.foundation.NSURLRequest;
    1.13 +import org.robovm.objc.ObjCClass;
    1.14 +import org.robovm.objc.Selector;
    1.15 +import org.robovm.rt.bro.Bro;
    1.16 +import org.robovm.rt.bro.annotation.Bridge;
    1.17 +import org.robovm.rt.bro.annotation.Library;
    1.18 +
    1.19 +@Library("Foundation")
    1.20 +public class Foo {
    1.21 +    static {
    1.22 +        Bro.bind();
    1.23 +    }
    1.24 +
    1.25 +    private static final Selector requestWithURL$ = Selector.register("requestWithURL:");
    1.26 +    @Bridge(symbol = "objc_msgSend")
    1.27 +    private native static NSURLRequest objc_requestWithURL(ObjCClass __self__, Selector __cmd__, NSURL URL);
    1.28 +    public static NSURLRequest requestWithURL(NSURL url) {
    1.29 +        return objc_requestWithURL(ObjCClass.getByType(NSURLRequest.class), requestWithURL$, url);
    1.30 +    }
    1.31 +    
    1.32 +    
    1.33 +}