All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.axet.desktop.os.mac.cocoa.NSAppleEventDescriptor Maven / Gradle / Ivy

There is a newer version: 3.0.9
Show newest version
package com.github.axet.desktop.os.mac.cocoa;

import com.github.axet.desktop.os.mac.foundation.Runtime;
import com.sun.jna.Pointer;

// https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSAppleEventDescriptor_Class/Reference/Reference.html

public class NSAppleEventDescriptor extends NSObject {

    static Pointer klass = Runtime.INSTANCE.objc_lookUpClass("NSAppleEventDescriptor");
    static Pointer numberOfItems = Runtime.INSTANCE.sel_getUid("numberOfItems");
    static Pointer descriptorAtIndex = Runtime.INSTANCE.sel_getUid("descriptorAtIndex:");
    static Pointer stringValue = Runtime.INSTANCE.sel_getUid("stringValue");

    public NSAppleEventDescriptor(long l) {
        super(l);
    }

    public NSAppleEventDescriptor(Pointer p) {
        super(Pointer.nativeValue(p));
    }

    public long numberOfItems() {
        return Runtime.INSTANCE.objc_msgSend(this, numberOfItems);
    }

    public NSString stringValue() {
        return new NSString(Runtime.INSTANCE.objc_msgSend(this, stringValue));
    }

    public NSAppleEventDescriptor descriptorAtIndex(int i) {
        return new NSAppleEventDescriptor(Runtime.INSTANCE.objc_msgSend(this, descriptorAtIndex, i));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy