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