Examples of NSSize


Examples of org.rococoa.cocoa.foundation.NSSize

    public interface MyLibrary extends Library {
        NSSize objc_msgSend(ID receiver, Selector selector, Object... args);
    }

    @Test public void test() throws Exception {
        NSSize aSize = new NSSize(1f, 3f);
        NSValue value = NSValue.CLASS.valueWithSize(aSize);
       
       
        Foundation.send(value.id(), Foundation.selector("sizeValue"), NSSize.class);
        NSSize size = value.sizeValue();
            // fails here with jna 3.0.6+ in Java 1.5, see StaticStructureReturnTest

        assertEquals(1.0, size.width.doubleValue(), 0.0001);
        assertEquals(3.0, size.height.doubleValue(), 0.0001);       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.