minesweeper/src/main/java/org/apidesign/demo/minesweeper/Foo.java
author Jaroslav Tulach <jtulach@netbeans.org>
Mon, 10 Mar 2014 12:56:48 +0100
branchibrwsr
changeset 101 5ef40158eb9c
permissions -rw-r--r--
Can play minesweeper on iPad
     1 /*
     2  * To change this license header, choose License Headers in Project Properties.
     3  * To change this template file, choose Tools | Templates
     4  * and open the template in the editor.
     5  */
     6 package org.apidesign.demo.minesweeper;
     7 
     8 import org.robovm.cocoatouch.foundation.NSURL;
     9 import org.robovm.cocoatouch.foundation.NSURLRequest;
    10 import org.robovm.objc.ObjCClass;
    11 import org.robovm.objc.Selector;
    12 import org.robovm.rt.bro.Bro;
    13 import org.robovm.rt.bro.annotation.Bridge;
    14 import org.robovm.rt.bro.annotation.Library;
    15 
    16 @Library("Foundation")
    17 public class Foo {
    18     static {
    19         Bro.bind();
    20     }
    21 
    22     private static final Selector requestWithURL$ = Selector.register("requestWithURL:");
    23     @Bridge(symbol = "objc_msgSend")
    24     private native static NSURLRequest objc_requestWithURL(ObjCClass __self__, Selector __cmd__, NSURL URL);
    25     public static NSURLRequest requestWithURL(NSURL url) {
    26         return objc_requestWithURL(ObjCClass.getByType(NSURLRequest.class), requestWithURL$, url);
    27     }
    28     
    29     
    30 }