Пример #1
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSTimeZone_Class/Reference/Reference.html">NSTimeZone
 *     Class Reference</a>
 * @since Available in iOS 2.0 and later. </div>
 */
/*<library>*/ @Library("Foundation") /*</library>*/
@NativeClass
public class /*<name>*/ NSTimeZone /*</name>*/ extends /*<extends>*/ NSObject /*</extends>*/
/*<implements>*/
/*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ NSTimeZone /*</name>*/.class);
  }

  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ NSTimeZone /*</name>*/.class);

  /*<constructors>*/
  protected NSTimeZone(SkipInit skipInit) {
    super(skipInit);
  }

  public NSTimeZone() {}

  /*</constructors>*/
  /*<properties>*/

  /*</properties>*/
  /*<methods>*/

  /*</methods>*/
  /*<callbacks>*/
  /*</callbacks>*/

}
Пример #2
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../../../../Foundation/Reference/NSUUID_Class/Reference/Reference.html">NSUUID
 *     Class Reference</a>
 * @since Available in iOS 6.0 and later. </div>
 */
/*<library>*/ @Library("Foundation") /*</library>*/
@NativeClass
public class /*<name>*/ NSUUID /*</name>*/ extends /*<extends>*/ NSObject /*</extends>*/
/*<implements>*/
/*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ NSUUID /*</name>*/.class);
  }

  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ NSUUID /*</name>*/.class);

  /*<constructors>*/
  protected NSUUID(SkipInit skipInit) {
    super(skipInit);
  }

  public NSUUID() {}

  /*</constructors>*/
  /*<properties>*/

  /*</properties>*/
  /*<methods>*/

  private static final Selector UUIDString = Selector.register("UUIDString");

  @Bridge
  private static native String objc_asString(NSUUID __self__, Selector __cmd__);

  @Bridge
  private static native String objc_asStringSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../../../../Foundation/Reference/NSUUID_Class/Reference/Reference.html#//apple_ref/occ/instm/NSUUID/UUIDString">-
   *     (NSString *)UUIDString</a>
   * @since Available in iOS 6.0 and later.
   */
  public String asString() {
    if (customClass) {
      return objc_asStringSuper(getSuper(), UUIDString);
    } else {
      return objc_asString(this, UUIDString);
    }
  }
  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("UUIDString")
    public static String asString(NSUUID __self__, Selector __cmd__) {
      return __self__.asString();
    }
  }
  /*</callbacks>*/

}
Пример #3
0
@Library(Library.INTERNAL)
@NativeClass()
public class FBAppCall extends NSObject {
  private static final ObjCClass objCClass = ObjCClass.getByType(FBAppCall.class);

  static {
    ObjCRuntime.bind(FBAppCall.class);
  }
}
Пример #4
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSEnumerator_Class/Reference/Reference.html">NSEnumerator
 *     Class Reference</a>
 * @since Available in iOS 2.0 and later. </div>
 */
/*<library>*/ @Library("Foundation") /*</library>*/
@NativeClass
public class /*<name>*/ NSEnumerator /*</name>*/<T extends NSObject>
    extends /*<extends>*/ NSObject /*</extends>*/
/*<implements>*/
/*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ NSEnumerator /*</name>*/.class);
  }

  static class Iterator<T extends NSObject> implements java.util.Iterator<T> {
    private final NSEnumerator<T> enumerator;
    int index;
    T current;
    T next;

    Iterator(NSEnumerator<T> enumerator) {
      this.enumerator = enumerator;
      index = -1;
      current = null;
      next = enumerator.nextObject();
    }

    @Override
    public boolean hasNext() {
      return next != null;
    }

    @Override
    public T next() {
      if (next == null) {
        throw new NoSuchElementException();
      }
      current = next;
      index++;
      next = enumerator.nextObject();
      return current;
    }

    void remove(int index, T o) {
      throw new UnsupportedOperationException();
    }

    @Override
    public void remove() {
      if (current == null || next == null) {
        throw new IllegalStateException();
      }
      remove(index, current);
    }
  }

  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ NSEnumerator /*</name>*/.class);

  /*<constructors>*/
  protected NSEnumerator(SkipInit skipInit) {
    super(skipInit);
  }

  public NSEnumerator() {}

  /*</constructors>*/
  /*<properties>*/

  /*</properties>*/

  @SuppressWarnings("unchecked")
  public T nextObject() {
    return (T) _nextObject();
  }

  /*<methods>*/

  private static final Selector nextObject = Selector.register("nextObject");

  @Bridge
  private static native NSObject objc__nextObject(NSEnumerator __self__, Selector __cmd__);

  @Bridge
  private static native NSObject objc__nextObjectSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSEnumerator_Class/Reference/Reference.html#//apple_ref/occ/instm/NSEnumerator/nextObject">-
   *     (id)nextObject</a>
   * @since Available in iOS 2.0 and later.
   */
  protected NSObject _nextObject() {
    if (customClass) {
      return objc__nextObjectSuper(getSuper(), nextObject);
    } else {
      return objc__nextObject(this, nextObject);
    }
  }

  private static final Selector allObjects = Selector.register("allObjects");

  @Bridge
  private static native NSArray objc_allObjects(NSEnumerator __self__, Selector __cmd__);

  @Bridge
  private static native NSArray objc_allObjectsSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSEnumerator_Class/Reference/Reference.html#//apple_ref/occ/instm/NSEnumerator/allObjects">-
   *     (NSArray *)allObjects</a>
   * @since Available in iOS 2.0 and later.
   */
  public NSArray<T> allObjects() {
    if (customClass) {
      return objc_allObjectsSuper(getSuper(), allObjects);
    } else {
      return objc_allObjects(this, allObjects);
    }
  }
  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("nextObject")
    public static NSObject _nextObject(NSEnumerator __self__, Selector __cmd__) {
      return __self__._nextObject();
    }

    @Callback
    @BindSelector("allObjects")
    public static NSArray allObjects(NSEnumerator __self__, Selector __cmd__) {
      return __self__.allObjects();
    }
  }
  /*</callbacks>*/

}
Пример #5
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html">UIPopoverController
 *     Class Reference</a>
 * @since Available in iOS 3.2 and later. </div>
 */
/*<library>*/ @Library("UIKit") /*</library>*/
@NativeClass
public class /*<name>*/ UIPopoverController /*</name>*/
    extends /*<extends>*/ NSObject /*</extends>*/
    /*<implements>*/ implements UIAppearanceContainer /*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ UIPopoverController /*</name>*/.class);
  }

  private static final boolean X86 = Bro.IS_X86;
  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ UIPopoverController /*</name>*/.class);

  /*<constructors>*/
  protected UIPopoverController(SkipInit skipInit) {
    super(skipInit);
  }

  public UIPopoverController() {}

  private static final Selector initWithContentViewController$ =
      Selector.register("initWithContentViewController:");

  @Bridge(symbol = "objc_msgSend")
  private static native @Pointer long objc_initWithContentViewController(
      UIPopoverController __self__, Selector __cmd__, UIViewController viewController);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instm/UIPopoverController/initWithContentViewController:">-
   *     (id)initWithContentViewController:(UIViewController *)viewController</a>
   * @since Available in iOS 3.2 and later.
   */
  public UIPopoverController(UIViewController viewController) {
    super((SkipInit) null);
    setHandle(
        objc_initWithContentViewController(this, initWithContentViewController$, viewController));
  }
  /*</constructors>*/
  /*<properties>*/

  private static final Selector contentViewController = Selector.register("contentViewController");

  @Bridge(symbol = "objc_msgSend")
  private static native UIViewController objc_getContentViewController(
      UIPopoverController __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native UIViewController objc_getContentViewControllerSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/contentViewController">@property
   *     (nonatomic, retain) UIViewController *contentViewController</a>
   * @since Available in iOS 3.2 and later.
   */
  public UIViewController getContentViewController() {
    if (customClass) {
      return objc_getContentViewControllerSuper(getSuper(), contentViewController);
    } else {
      return objc_getContentViewController(this, contentViewController);
    }
  }

  private static final Selector setContentViewController$ =
      Selector.register("setContentViewController:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setContentViewController(
      UIPopoverController __self__, Selector __cmd__, UIViewController contentViewController);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setContentViewControllerSuper(
      ObjCSuper __super__, Selector __cmd__, UIViewController contentViewController);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/contentViewController">@property
   *     (nonatomic, retain) UIViewController *contentViewController</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setContentViewController(UIViewController contentViewController) {
    if (customClass) {
      objc_setContentViewControllerSuper(
          getSuper(), setContentViewController$, contentViewController);
    } else {
      objc_setContentViewController(this, setContentViewController$, contentViewController);
    }
  }

  private static final Selector delegate = Selector.register("delegate");

  @Bridge(symbol = "objc_msgSend")
  private static native UIPopoverControllerDelegate objc_getDelegate(
      UIPopoverController __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native UIPopoverControllerDelegate objc_getDelegateSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/delegate">@property
   *     (nonatomic, assign) id &amp;lt;UIPopoverControllerDelegate&amp;gt; delegate</a>
   * @since Available in iOS 3.2 and later.
   */
  public UIPopoverControllerDelegate getDelegate() {
    if (customClass) {
      return objc_getDelegateSuper(getSuper(), delegate);
    } else {
      return objc_getDelegate(this, delegate);
    }
  }

  private static final Selector setDelegate$ = Selector.register("setDelegate:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setDelegate(
      UIPopoverController __self__, Selector __cmd__, UIPopoverControllerDelegate delegate);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setDelegateSuper(
      ObjCSuper __super__, Selector __cmd__, UIPopoverControllerDelegate delegate);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/delegate">@property
   *     (nonatomic, assign) id &amp;lt;UIPopoverControllerDelegate&amp;gt; delegate</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setDelegate(UIPopoverControllerDelegate delegate) {
    if (customClass) {
      objc_setDelegateSuper(getSuper(), setDelegate$, delegate);
    } else {
      objc_setDelegate(this, setDelegate$, delegate);
    }
  }

  private static final Selector passthroughViews = Selector.register("passthroughViews");

  @Bridge(symbol = "objc_msgSend")
  private static native NSArray objc_getPassthroughViews(
      UIPopoverController __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native NSArray objc_getPassthroughViewsSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/passthroughViews">@property
   *     (nonatomic, copy) NSArray *passthroughViews</a>
   * @since Available in iOS 3.2 and later.
   */
  public NSArray getPassthroughViews() {
    if (customClass) {
      return objc_getPassthroughViewsSuper(getSuper(), passthroughViews);
    } else {
      return objc_getPassthroughViews(this, passthroughViews);
    }
  }

  private static final Selector setPassthroughViews$ = Selector.register("setPassthroughViews:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setPassthroughViews(
      UIPopoverController __self__, Selector __cmd__, NSArray passthroughViews);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setPassthroughViewsSuper(
      ObjCSuper __super__, Selector __cmd__, NSArray passthroughViews);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/passthroughViews">@property
   *     (nonatomic, copy) NSArray *passthroughViews</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setPassthroughViews(NSArray passthroughViews) {
    if (customClass) {
      objc_setPassthroughViewsSuper(getSuper(), setPassthroughViews$, passthroughViews);
    } else {
      objc_setPassthroughViews(this, setPassthroughViews$, passthroughViews);
    }
  }

  private static final Selector popoverArrowDirection = Selector.register("popoverArrowDirection");

  @Bridge(symbol = "objc_msgSend")
  private static native UIPopoverArrowDirection objc_getPopoverArrowDirection(
      UIPopoverController __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native UIPopoverArrowDirection objc_getPopoverArrowDirectionSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/popoverArrowDirection">@property
   *     (nonatomic, readonly) UIPopoverArrowDirection popoverArrowDirection</a>
   * @since Available in iOS 3.2 and later.
   */
  public UIPopoverArrowDirection getPopoverArrowDirection() {
    if (customClass) {
      return objc_getPopoverArrowDirectionSuper(getSuper(), popoverArrowDirection);
    } else {
      return objc_getPopoverArrowDirection(this, popoverArrowDirection);
    }
  }

  private static final Selector popoverBackgroundViewClass =
      Selector.register("popoverBackgroundViewClass");

  @Bridge(symbol = "objc_msgSend")
  private static native ObjCClass objc_getPopoverBackgroundViewClass(
      UIPopoverController __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native ObjCClass objc_getPopoverBackgroundViewClassSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/popoverBackgroundViewClass">@property
   *     (nonatomic, readwrite, retain) Class popoverBackgroundViewClass</a>
   * @since Available in iOS 5.0 and later.
   */
  public ObjCClass getPopoverBackgroundViewClass() {
    if (customClass) {
      return objc_getPopoverBackgroundViewClassSuper(getSuper(), popoverBackgroundViewClass);
    } else {
      return objc_getPopoverBackgroundViewClass(this, popoverBackgroundViewClass);
    }
  }

  private static final Selector setPopoverBackgroundViewClass$ =
      Selector.register("setPopoverBackgroundViewClass:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setPopoverBackgroundViewClass(
      UIPopoverController __self__, Selector __cmd__, ObjCClass popoverBackgroundViewClass);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setPopoverBackgroundViewClassSuper(
      ObjCSuper __super__, Selector __cmd__, ObjCClass popoverBackgroundViewClass);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/popoverBackgroundViewClass">@property
   *     (nonatomic, readwrite, retain) Class popoverBackgroundViewClass</a>
   * @since Available in iOS 5.0 and later.
   */
  public void setPopoverBackgroundViewClass(ObjCClass popoverBackgroundViewClass) {
    if (customClass) {
      objc_setPopoverBackgroundViewClassSuper(
          getSuper(), setPopoverBackgroundViewClass$, popoverBackgroundViewClass);
    } else {
      objc_setPopoverBackgroundViewClass(
          this, setPopoverBackgroundViewClass$, popoverBackgroundViewClass);
    }
  }

  private static final Selector popoverContentSize = Selector.register("popoverContentSize");

  @Bridge(symbol = "objc_msgSend")
  private static native @ByVal CGSize objc_getPopoverContentSize(
      UIPopoverController __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSend_stret")
  private static native void objc_getPopoverContentSize_stret(
      @StructRet CGSize __ret__, UIPopoverController __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native @ByVal CGSize objc_getPopoverContentSizeSuper(
      ObjCSuper __super__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper_stret")
  private static native void objc_getPopoverContentSizeSuper_stret(
      @StructRet CGSize __ret__, ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/popoverContentSize">@property
   *     (nonatomic) CGSize popoverContentSize</a>
   * @since Available in iOS 3.2 and later.
   */
  public CGSize getPopoverContentSize() {
    if (X86) {
      if (customClass) {
        return objc_getPopoverContentSizeSuper(getSuper(), popoverContentSize);
      } else {
        return objc_getPopoverContentSize(this, popoverContentSize);
      }
    } else {
      CGSize __ret__ = new CGSize();
      if (customClass) {
        objc_getPopoverContentSizeSuper_stret(__ret__, getSuper(), popoverContentSize);
      } else {
        objc_getPopoverContentSize_stret(__ret__, this, popoverContentSize);
      }
      return __ret__;
    }
  }

  private static final Selector setPopoverContentSize$ =
      Selector.register("setPopoverContentSize:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setPopoverContentSize(
      UIPopoverController __self__, Selector __cmd__, @ByVal CGSize popoverContentSize);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setPopoverContentSizeSuper(
      ObjCSuper __super__, Selector __cmd__, @ByVal CGSize popoverContentSize);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/popoverContentSize">@property
   *     (nonatomic) CGSize popoverContentSize</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setPopoverContentSize(CGSize popoverContentSize) {
    if (customClass) {
      objc_setPopoverContentSizeSuper(getSuper(), setPopoverContentSize$, popoverContentSize);
    } else {
      objc_setPopoverContentSize(this, setPopoverContentSize$, popoverContentSize);
    }
  }

  private static final Selector popoverLayoutMargins = Selector.register("popoverLayoutMargins");

  @Bridge(symbol = "objc_msgSend_stret")
  private static native void objc_getPopoverLayoutMargins_stret(
      @StructRet UIEdgeInsets __ret__, UIPopoverController __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper_stret")
  private static native void objc_getPopoverLayoutMarginsSuper_stret(
      @StructRet UIEdgeInsets __ret__, ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/popoverLayoutMargins">@property
   *     (nonatomic, readwrite) UIEdgeInsets popoverLayoutMargins</a>
   * @since Available in iOS 5.0 and later.
   */
  public UIEdgeInsets getPopoverLayoutMargins() {
    UIEdgeInsets __ret__ = new UIEdgeInsets();
    if (customClass) {
      objc_getPopoverLayoutMarginsSuper_stret(__ret__, getSuper(), popoverLayoutMargins);
    } else {
      objc_getPopoverLayoutMargins_stret(__ret__, this, popoverLayoutMargins);
    }
    return __ret__;
  }

  private static final Selector setPopoverLayoutMargins$ =
      Selector.register("setPopoverLayoutMargins:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setPopoverLayoutMargins(
      UIPopoverController __self__, Selector __cmd__, @ByVal UIEdgeInsets popoverLayoutMargins);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setPopoverLayoutMarginsSuper(
      ObjCSuper __super__, Selector __cmd__, @ByVal UIEdgeInsets popoverLayoutMargins);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/popoverLayoutMargins">@property
   *     (nonatomic, readwrite) UIEdgeInsets popoverLayoutMargins</a>
   * @since Available in iOS 5.0 and later.
   */
  public void setPopoverLayoutMargins(UIEdgeInsets popoverLayoutMargins) {
    if (customClass) {
      objc_setPopoverLayoutMarginsSuper(getSuper(), setPopoverLayoutMargins$, popoverLayoutMargins);
    } else {
      objc_setPopoverLayoutMargins(this, setPopoverLayoutMargins$, popoverLayoutMargins);
    }
  }

  private static final Selector isPopoverVisible = Selector.register("isPopoverVisible");

  @Bridge(symbol = "objc_msgSend")
  private static native boolean objc_isPopoverVisible(
      UIPopoverController __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native boolean objc_isPopoverVisibleSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instp/UIPopoverController/popoverVisible">@property
   *     (nonatomic, readonly, getter=isPopoverVisible) BOOL popoverVisible</a>
   * @since Available in iOS 3.2 and later.
   */
  public boolean isPopoverVisible() {
    if (customClass) {
      return objc_isPopoverVisibleSuper(getSuper(), isPopoverVisible);
    } else {
      return objc_isPopoverVisible(this, isPopoverVisible);
    }
  }
  /*</properties>*/
  /*<methods>*/

  private static final Selector dismissPopoverAnimated$ =
      Selector.register("dismissPopoverAnimated:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_dismiss(
      UIPopoverController __self__, Selector __cmd__, boolean animated);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_dismissSuper(
      ObjCSuper __super__, Selector __cmd__, boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instm/UIPopoverController/dismissPopoverAnimated:">-
   *     (void)dismissPopoverAnimated:(BOOL)animated</a>
   * @since Available in iOS 3.2 and later.
   */
  public void dismiss(boolean animated) {
    if (customClass) {
      objc_dismissSuper(getSuper(), dismissPopoverAnimated$, animated);
    } else {
      objc_dismiss(this, dismissPopoverAnimated$, animated);
    }
  }

  private static final Selector presentPopoverFromBarButtonItem$permittedArrowDirections$animated$ =
      Selector.register("presentPopoverFromBarButtonItem:permittedArrowDirections:animated:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_presentFromBarButtonItem(
      UIPopoverController __self__,
      Selector __cmd__,
      UIBarButtonItem item,
      UIPopoverArrowDirection arrowDirections,
      boolean animated);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_presentFromBarButtonItemSuper(
      ObjCSuper __super__,
      Selector __cmd__,
      UIBarButtonItem item,
      UIPopoverArrowDirection arrowDirections,
      boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instm/UIPopoverController/presentPopoverFromBarButtonItem:permittedArrowDirections:animated:">-
   *     (void)presentPopoverFromBarButtonItem:(UIBarButtonItem *)item
   *     permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections
   *     animated:(BOOL)animated</a>
   * @since Available in iOS 3.2 and later.
   */
  public void presentFromBarButtonItem(
      UIBarButtonItem item, UIPopoverArrowDirection arrowDirections, boolean animated) {
    if (customClass) {
      objc_presentFromBarButtonItemSuper(
          getSuper(),
          presentPopoverFromBarButtonItem$permittedArrowDirections$animated$,
          item,
          arrowDirections,
          animated);
    } else {
      objc_presentFromBarButtonItem(
          this,
          presentPopoverFromBarButtonItem$permittedArrowDirections$animated$,
          item,
          arrowDirections,
          animated);
    }
  }

  private static final Selector presentPopoverFromRect$inView$permittedArrowDirections$animated$ =
      Selector.register("presentPopoverFromRect:inView:permittedArrowDirections:animated:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_presentFromRectInView(
      UIPopoverController __self__,
      Selector __cmd__,
      @ByVal CGRect rect,
      UIView view,
      UIPopoverArrowDirection arrowDirections,
      boolean animated);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_presentFromRectInViewSuper(
      ObjCSuper __super__,
      Selector __cmd__,
      @ByVal CGRect rect,
      UIView view,
      UIPopoverArrowDirection arrowDirections,
      boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instm/UIPopoverController/presentPopoverFromRect:inView:permittedArrowDirections:animated:">-
   *     (void)presentPopoverFromRect:(CGRect)rect inView:(UIView *)view
   *     permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections
   *     animated:(BOOL)animated</a>
   * @since Available in iOS 3.2 and later.
   */
  public void presentFromRectInView(
      CGRect rect, UIView view, UIPopoverArrowDirection arrowDirections, boolean animated) {
    if (customClass) {
      objc_presentFromRectInViewSuper(
          getSuper(),
          presentPopoverFromRect$inView$permittedArrowDirections$animated$,
          rect,
          view,
          arrowDirections,
          animated);
    } else {
      objc_presentFromRectInView(
          this,
          presentPopoverFromRect$inView$permittedArrowDirections$animated$,
          rect,
          view,
          arrowDirections,
          animated);
    }
  }

  private static final Selector setContentViewController$animated$ =
      Selector.register("setContentViewController:animated:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setContentViewController(
      UIPopoverController __self__,
      Selector __cmd__,
      UIViewController viewController,
      boolean animated);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setContentViewControllerSuper(
      ObjCSuper __super__, Selector __cmd__, UIViewController viewController, boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instm/UIPopoverController/setContentViewController:animated:">-
   *     (void)setContentViewController:(UIViewController *)viewController
   *     animated:(BOOL)animated</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setContentViewController(UIViewController viewController, boolean animated) {
    if (customClass) {
      objc_setContentViewControllerSuper(
          getSuper(), setContentViewController$animated$, viewController, animated);
    } else {
      objc_setContentViewController(
          this, setContentViewController$animated$, viewController, animated);
    }
  }

  private static final Selector setPopoverContentSize$animated$ =
      Selector.register("setPopoverContentSize:animated:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setPopoverContentSize(
      UIPopoverController __self__, Selector __cmd__, @ByVal CGSize size, boolean animated);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setPopoverContentSizeSuper(
      ObjCSuper __super__, Selector __cmd__, @ByVal CGSize size, boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIPopoverController_class/Reference/Reference.html#//apple_ref/occ/instm/UIPopoverController/setPopoverContentSize:animated:">-
   *     (void)setPopoverContentSize:(CGSize)size animated:(BOOL)animated</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setPopoverContentSize(CGSize size, boolean animated) {
    if (customClass) {
      objc_setPopoverContentSizeSuper(getSuper(), setPopoverContentSize$animated$, size, animated);
    } else {
      objc_setPopoverContentSize(this, setPopoverContentSize$animated$, size, animated);
    }
  }
  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("contentViewController")
    public static UIViewController getContentViewController(
        UIPopoverController __self__, Selector __cmd__) {
      return __self__.getContentViewController();
    }

    @Callback
    @BindSelector("setContentViewController:")
    public static void setContentViewController(
        UIPopoverController __self__, Selector __cmd__, UIViewController contentViewController) {
      __self__.setContentViewController(contentViewController);
    }

    @Callback
    @BindSelector("delegate")
    public static UIPopoverControllerDelegate getDelegate(
        UIPopoverController __self__, Selector __cmd__) {
      return __self__.getDelegate();
    }

    @Callback
    @BindSelector("setDelegate:")
    public static void setDelegate(
        UIPopoverController __self__, Selector __cmd__, UIPopoverControllerDelegate delegate) {
      __self__.setDelegate(delegate);
    }

    @Callback
    @BindSelector("passthroughViews")
    public static NSArray getPassthroughViews(UIPopoverController __self__, Selector __cmd__) {
      return __self__.getPassthroughViews();
    }

    @Callback
    @BindSelector("setPassthroughViews:")
    public static void setPassthroughViews(
        UIPopoverController __self__, Selector __cmd__, NSArray passthroughViews) {
      __self__.setPassthroughViews(passthroughViews);
    }

    @Callback
    @BindSelector("popoverArrowDirection")
    public static UIPopoverArrowDirection getPopoverArrowDirection(
        UIPopoverController __self__, Selector __cmd__) {
      return __self__.getPopoverArrowDirection();
    }

    @Callback
    @BindSelector("popoverBackgroundViewClass")
    public static ObjCClass getPopoverBackgroundViewClass(
        UIPopoverController __self__, Selector __cmd__) {
      return __self__.getPopoverBackgroundViewClass();
    }

    @Callback
    @BindSelector("setPopoverBackgroundViewClass:")
    public static void setPopoverBackgroundViewClass(
        UIPopoverController __self__, Selector __cmd__, ObjCClass popoverBackgroundViewClass) {
      __self__.setPopoverBackgroundViewClass(popoverBackgroundViewClass);
    }

    @Callback
    @BindSelector("popoverContentSize")
    public static @ByVal CGSize getPopoverContentSize(
        UIPopoverController __self__, Selector __cmd__) {
      return __self__.getPopoverContentSize();
    }

    @Callback
    @BindSelector("setPopoverContentSize:")
    public static void setPopoverContentSize(
        UIPopoverController __self__, Selector __cmd__, @ByVal CGSize popoverContentSize) {
      __self__.setPopoverContentSize(popoverContentSize);
    }

    @Callback
    @BindSelector("popoverLayoutMargins")
    public static @ByVal UIEdgeInsets getPopoverLayoutMargins(
        UIPopoverController __self__, Selector __cmd__) {
      return __self__.getPopoverLayoutMargins();
    }

    @Callback
    @BindSelector("setPopoverLayoutMargins:")
    public static void setPopoverLayoutMargins(
        UIPopoverController __self__, Selector __cmd__, @ByVal UIEdgeInsets popoverLayoutMargins) {
      __self__.setPopoverLayoutMargins(popoverLayoutMargins);
    }

    @Callback
    @BindSelector("isPopoverVisible")
    public static boolean isPopoverVisible(UIPopoverController __self__, Selector __cmd__) {
      return __self__.isPopoverVisible();
    }

    @Callback
    @BindSelector("dismissPopoverAnimated:")
    public static void dismiss(UIPopoverController __self__, Selector __cmd__, boolean animated) {
      __self__.dismiss(animated);
    }

    @Callback
    @BindSelector("presentPopoverFromBarButtonItem:permittedArrowDirections:animated:")
    public static void presentFromBarButtonItem(
        UIPopoverController __self__,
        Selector __cmd__,
        UIBarButtonItem item,
        UIPopoverArrowDirection arrowDirections,
        boolean animated) {
      __self__.presentFromBarButtonItem(item, arrowDirections, animated);
    }

    @Callback
    @BindSelector("presentPopoverFromRect:inView:permittedArrowDirections:animated:")
    public static void presentFromRectInView(
        UIPopoverController __self__,
        Selector __cmd__,
        @ByVal CGRect rect,
        UIView view,
        UIPopoverArrowDirection arrowDirections,
        boolean animated) {
      __self__.presentFromRectInView(rect, view, arrowDirections, animated);
    }

    @Callback
    @BindSelector("setContentViewController:animated:")
    public static void setContentViewController(
        UIPopoverController __self__,
        Selector __cmd__,
        UIViewController viewController,
        boolean animated) {
      __self__.setContentViewController(viewController, animated);
    }

    @Callback
    @BindSelector("setPopoverContentSize:animated:")
    public static void setPopoverContentSize(
        UIPopoverController __self__, Selector __cmd__, @ByVal CGSize size, boolean animated) {
      __self__.setPopoverContentSize(size, animated);
    }
  }
  /*</callbacks>*/

}
Пример #6
0
 public static NSIndexPath createIndexPathForItemInSection(
     @MachineSizedSInt long item, @MachineSizedSInt long section) {
   return createIndexPathForItemInSection(ObjCClass.getByType(NSIndexPath.class), item, section);
 }
Пример #7
0
 public static NSIndexPath createIndexPathForRowInSection(
     @MachineSizedSInt long row, @MachineSizedSInt long section) {
   return createIndexPathForRowInSection(ObjCClass.getByType(NSIndexPath.class), row, section);
 }
Пример #8
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="http://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKit_Collection/../GLKTextureInfo_Ref/Reference/Reference.html">GLKTextureInfo
 *     Class Reference</a>
 * @since Available in iOS 5.0 and later. </div>
 */
/*<library>*/ @Library("GLKit") /*</library>*/
@NativeClass
public class /*<name>*/ GLKTextureInfo /*</name>*/ extends /*<extends>*/ NSObject /*</extends>*/
/*<implements>*/
/*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ GLKTextureInfo /*</name>*/.class);
  }

  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ GLKTextureInfo /*</name>*/.class);

  /*<constructors>*/
  protected GLKTextureInfo(SkipInit skipInit) {
    super(skipInit);
  }

  public GLKTextureInfo() {}

  /*</constructors>*/
  /*<properties>*/

  private static final Selector alphaState = Selector.register("alphaState");

  @Bridge
  private static native GLKTextureInfoAlphaState objc_getAlphaState(
      GLKTextureInfo __self__, Selector __cmd__);

  @Bridge
  private static native GLKTextureInfoAlphaState objc_getAlphaStateSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKit_Collection/../GLKTextureInfo_Ref/Reference/Reference.html#//apple_ref/occ/instp/GLKTextureInfo/alphaState">@property(readonly)
   *     GLKTextureInfoAlphaState alphaState</a>
   * @since Available in iOS 5.0 and later.
   */
  public GLKTextureInfoAlphaState getAlphaState() {
    if (customClass) {
      return objc_getAlphaStateSuper(getSuper(), alphaState);
    } else {
      return objc_getAlphaState(this, alphaState);
    }
  }

  private static final Selector containsMipmaps = Selector.register("containsMipmaps");

  @Bridge
  private static native boolean objc_isContainsMipmaps(GLKTextureInfo __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isContainsMipmapsSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKit_Collection/../GLKTextureInfo_Ref/Reference/Reference.html#//apple_ref/occ/instp/GLKTextureInfo/containsMipmaps">@property(readonly)
   *     BOOL containsMipmaps</a>
   * @since Available in iOS 5.0 and later.
   */
  public boolean isContainsMipmaps() {
    if (customClass) {
      return objc_isContainsMipmapsSuper(getSuper(), containsMipmaps);
    } else {
      return objc_isContainsMipmaps(this, containsMipmaps);
    }
  }

  private static final Selector height = Selector.register("height");

  @Bridge
  private static native int objc_getHeight(GLKTextureInfo __self__, Selector __cmd__);

  @Bridge
  private static native int objc_getHeightSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKit_Collection/../GLKTextureInfo_Ref/Reference/Reference.html#//apple_ref/occ/instp/GLKTextureInfo/height">@property(readonly)
   *     GLuint height</a>
   * @since Available in iOS 5.0 and later.
   */
  public int getHeight() {
    if (customClass) {
      return objc_getHeightSuper(getSuper(), height);
    } else {
      return objc_getHeight(this, height);
    }
  }

  private static final Selector name = Selector.register("name");

  @Bridge
  private static native int objc_getName(GLKTextureInfo __self__, Selector __cmd__);

  @Bridge
  private static native int objc_getNameSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKit_Collection/../GLKTextureInfo_Ref/Reference/Reference.html#//apple_ref/occ/instp/GLKTextureInfo/name">@property(readonly)
   *     GLuint name</a>
   * @since Available in iOS 5.0 and later.
   */
  public int getName() {
    if (customClass) {
      return objc_getNameSuper(getSuper(), name);
    } else {
      return objc_getName(this, name);
    }
  }

  private static final Selector target = Selector.register("target");

  @Bridge
  private static native int objc_getTarget(GLKTextureInfo __self__, Selector __cmd__);

  @Bridge
  private static native int objc_getTargetSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKit_Collection/../GLKTextureInfo_Ref/Reference/Reference.html#//apple_ref/occ/instp/GLKTextureInfo/target">@property(readonly)
   *     GLenum target</a>
   * @since Available in iOS 5.0 and later.
   */
  public int getTarget() {
    if (customClass) {
      return objc_getTargetSuper(getSuper(), target);
    } else {
      return objc_getTarget(this, target);
    }
  }

  private static final Selector textureOrigin = Selector.register("textureOrigin");

  @Bridge
  private static native GLKTextureInfoOrigin objc_getTextureOrigin(
      GLKTextureInfo __self__, Selector __cmd__);

  @Bridge
  private static native GLKTextureInfoOrigin objc_getTextureOriginSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKit_Collection/../GLKTextureInfo_Ref/Reference/Reference.html#//apple_ref/occ/instp/GLKTextureInfo/textureOrigin">@property(readonly)
   *     GLKTextureInfoOrigin textureOrigin</a>
   * @since Available in iOS 5.0 and later.
   */
  public GLKTextureInfoOrigin getTextureOrigin() {
    if (customClass) {
      return objc_getTextureOriginSuper(getSuper(), textureOrigin);
    } else {
      return objc_getTextureOrigin(this, textureOrigin);
    }
  }

  private static final Selector width = Selector.register("width");

  @Bridge
  private static native int objc_getWidth(GLKTextureInfo __self__, Selector __cmd__);

  @Bridge
  private static native int objc_getWidthSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKit_Collection/../GLKTextureInfo_Ref/Reference/Reference.html#//apple_ref/occ/instp/GLKTextureInfo/width">@property(readonly)
   *     GLuint width</a>
   * @since Available in iOS 5.0 and later.
   */
  public int getWidth() {
    if (customClass) {
      return objc_getWidthSuper(getSuper(), width);
    } else {
      return objc_getWidth(this, width);
    }
  }
  /*</properties>*/
  /*<methods>*/

  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("alphaState")
    public static GLKTextureInfoAlphaState getAlphaState(
        GLKTextureInfo __self__, Selector __cmd__) {
      return __self__.getAlphaState();
    }

    @Callback
    @BindSelector("containsMipmaps")
    public static boolean isContainsMipmaps(GLKTextureInfo __self__, Selector __cmd__) {
      return __self__.isContainsMipmaps();
    }

    @Callback
    @BindSelector("height")
    public static int getHeight(GLKTextureInfo __self__, Selector __cmd__) {
      return __self__.getHeight();
    }

    @Callback
    @BindSelector("name")
    public static int getName(GLKTextureInfo __self__, Selector __cmd__) {
      return __self__.getName();
    }

    @Callback
    @BindSelector("target")
    public static int getTarget(GLKTextureInfo __self__, Selector __cmd__) {
      return __self__.getTarget();
    }

    @Callback
    @BindSelector("textureOrigin")
    public static GLKTextureInfoOrigin getTextureOrigin(GLKTextureInfo __self__, Selector __cmd__) {
      return __self__.getTextureOrigin();
    }

    @Callback
    @BindSelector("width")
    public static int getWidth(GLKTextureInfo __self__, Selector __cmd__) {
      return __self__.getWidth();
    }
  }
  /*</callbacks>*/

}
@Library("Social")
@NativeClass
public class SLComposeViewController extends UIViewController {
  static {
    ObjCRuntime.bind(SLComposeViewController.class);
  }

  private SLComposeViewController() {}

  private static final ObjCClass objCClass = ObjCClass.getByType(SLComposeViewController.class);

  // + (BOOL)isAvailableForServiceType:(NSString *)serviceType;
  private static final Selector isAvailableForServiceType$ =
      Selector.register("isAvailableForServiceType:");

  @Bridge
  private static native boolean objc_isAvailableForServiceType(
      ObjCClass __self__, Selector __cmd__, NSString serviceType);

  public static boolean isAvailable(NSString serviceType) {
    return objc_isAvailableForServiceType(objCClass, isAvailableForServiceType$, serviceType);
  }

  public static final NSString ServiceTypeTwitter = new NSString("com.apple.social.twitter");
  public static final NSString ServiceTypeFacebook = new NSString("com.apple.social.facebook");
  public static final NSString ServiceTypeSinaWeibo = new NSString("com.apple.social.sinaweibo");

  // // + (SLComposeViewController *)composeViewControllerForServiceType:(NSString *)serviceType;
  // private static final Selector composeViewControllerForServiceType$ =
  // Selector.register("composeViewControllerForServiceType:");
  //
  // @Bridge
  // private native static SLComposeViewController objc_composeViewControllerForServiceType
  // (ObjCClass __self__, Selector __cmd__,
  // NSString serviceType);
  //
  // public static SLComposeViewController fromService (NSString serviceType) {
  // return objc_composeViewControllerForServiceType(objCClass,
  // composeViewControllerForServiceType$, serviceType);
  // }
  //
  // // @property (nonatomic, copy) SLComposeViewControllerCompletionHandler completionHandler;
  // private static final Selector setCompletionHandler$ =
  // Selector.register("setCompletionHandler:");
  //
  // @Bridge
  // private native static void objc_setCompletionHandler (SLComposeViewController __self__,
  // Selector __cmd__,
  // SLComposeViewControllerResultHandler completionHandler);
  //
  // public void setCompletionHandler (SLComposeViewControllerResultHandler completionHandler) {
  // objc_setCompletionHandler(this, setCompletionHandler$, completionHandler);
  // }
  //
  // // - (BOOL)setInitialText:(NSString *)text;
  // private static final Selector setInitialText$ = Selector.register("setInitialText:");
  //
  // @Bridge
  // private native static boolean objc_setInitialText (SLComposeViewController __self__, Selector
  // __cmd__, String text);
  //
  // public boolean setInitialText (String text) {
  // return objc_setInitialText(this, setInitialText$, text);
  // }
}
@Library(Library.INTERNAL)
@NativeClass()
public class Chartboost extends NSObject {
  private static final ObjCClass objCClass = ObjCClass.getByType(Chartboost.class);

  static {
    ObjCRuntime.bind(Chartboost.class);
  }

  // @property (retain) NSString *appId;
  private static final Selector setAppId = Selector.register("setAppId:");

  @Bridge
  private static native void objc_setAppId(Chartboost __self__, Selector __cmd__, String appId);

  @Bridge
  private static native void objc_setAppIdSuper(
      ObjCSuper __super__, Selector __cmd__, String appId);

  public void setAppId(String appId) {
    if (customClass) {
      objc_setAppIdSuper(getSuper(), setAppId, appId);
    } else {
      objc_setAppId(this, setAppId, appId);
    }
  }

  // @property (retain) NSString *appSignature;
  private static final Selector setAppSignature = Selector.register("setAppSignature:");

  @Bridge
  private static native void objc_setAppSignature(
      Chartboost __self__, Selector __cmd__, String appSignature);

  @Bridge
  private static native void objc_setAppSignatureSuper(
      ObjCSuper __super__, Selector __cmd__, String appSignature);

  public void setAppSignature(String appSignature) {
    if (customClass) {
      objc_setAppSignatureSuper(getSuper(), setAppSignature, appSignature);
    } else {
      objc_setAppSignature(this, setAppSignature, appSignature);
    }
  }

  // + (Chartboost *)sharedChartboost;
  private static final Selector sharedChartboost = Selector.register("sharedChartboost");

  @Bridge
  private static native Chartboost objc_sharedChartboost(ObjCClass __self__, Selector __cmd__);

  /**
   * Get the singleton
   *
   * @return
   */
  public static Chartboost sharedChartboost() {
    return objc_sharedChartboost(objCClass, sharedChartboost);
  }

  // - (void)startSession;
  private static final Selector startSession = Selector.register("startSession");

  @Bridge
  private static native void objc_startSession(Chartboost __self__, Selector __cmd__);

  @Bridge
  private static native void objc_startSessionSuper(ObjCSuper __super__, Selector __cmd__);

  /** Start the Chartboost session */
  public void startSession() {
    if (customClass) {
      objc_startSessionSuper(getSuper(), startSession);
    } else {
      objc_startSession(this, startSession);
    }
  }

  // - (void)showInterstitial;
  private static final Selector showInterstitial = Selector.register("showInterstitial");

  @Bridge
  private static native void objc_showInterstitial(Chartboost __self__, Selector __cmd__);

  @Bridge
  private static native void objc_showInterstitialSuper(ObjCSuper __super__, Selector __cmd__);

  /** Show an interstitial */
  public void showInterstitial() {
    if (customClass) {
      objc_showInterstitialSuper(getSuper(), showInterstitial);
    } else {
      objc_showInterstitial(this, showInterstitial);
    }
  }

  // - (void)showInterstitial:(NSString *)location;
  private static final Selector showInterstitialLocation = Selector.register("showInterstitial:");

  @Bridge
  private static native void objc_showInterstitial(
      Chartboost __self__, Selector __cmd__, String location);

  @Bridge
  private static native void objc_showInterstitialSuper(
      ObjCSuper __super__, Selector __cmd__, String location);

  // Show an interstitial, optionally takes a location and/or a view argument
  public void showInterstitial(String location) {
    if (customClass) {
      objc_showInterstitialSuper(getSuper(), showInterstitialLocation, location);
    } else {
      objc_showInterstitial(this, showInterstitialLocation, location);
    }
  }

  // - (void)cacheInterstitial;
  private static final Selector cacheInterstitial = Selector.register("cacheInterstitial");

  @Bridge
  private static native void objc_cacheInterstitial(Chartboost __self__, Selector __cmd__);

  @Bridge
  private static native void objc_cacheInterstitialSuper(ObjCSuper __super__, Selector __cmd__);

  /** Cache an interstitial */
  public void cacheInterstitial() {
    if (customClass) {
      objc_cacheInterstitialSuper(getSuper(), cacheInterstitial);
    } else {
      objc_cacheInterstitial(this, cacheInterstitial);
    }
  }

  // - (void)cacheInterstitial;
  private static final Selector cacheInterstitialLocation = Selector.register("cacheInterstitial:");

  @Bridge
  private static native void objc_cacheInterstitial(
      Chartboost __self__, Selector __cmd__, String location);

  @Bridge
  private static native void objc_cacheInterstitialSuper(
      ObjCSuper __super__, Selector __cmd__, String location);

  // Cache an interstitial, optionally takes a location argument
  public void cacheInterstitial(String location) {
    if (customClass) {
      objc_cacheInterstitialSuper(getSuper(), cacheInterstitialLocation, location);
    } else {
      objc_cacheInterstitial(this, cacheInterstitialLocation, location);
    }
  }

  // - (void)showMoreApps;
  private static final Selector showMoreApps = Selector.register("showMoreApps");

  @Bridge
  private static native void objc_showMoreApps(Chartboost __self__, Selector __cmd__);

  @Bridge
  private static native void objc_showMoreAppsSuper(ObjCSuper __super__, Selector __cmd__);

  // Show the More Apps page
  public void showMoreApps() {
    if (customClass) {
      objc_showMoreAppsSuper(getSuper(), showMoreApps);
    } else {
      objc_showMoreApps(this, showMoreApps);
    }
  }

  // @property (assign) id <ChartboostDelegate> delegate;
  private static final Selector setDelegate = Selector.register("setDelegate:");

  @Bridge
  private static native void objc_setDelegate(
      Chartboost __self__, Selector __cmd__, ChartboostDelegate delegate);

  @Bridge
  private static native void objc_setDelegateSuper(
      ObjCSuper __super__, Selector __cmd__, ChartboostDelegate delegate);

  public void setDelegate(ChartboostDelegate delegate) {
    if (customClass) {
      objc_setDelegateSuper(getSuper(), setDelegate, delegate);
    } else {
      objc_setDelegate(this, setDelegate, delegate);
    }
  }
}
Пример #11
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSArray_Class/NSArray.html">NSArray
 *     Class Reference</a>
 * @since Available in iOS 2.0 and later. </div>
 */
/*<library>*/ @Library("Foundation") /*</library>*/
@NativeClass
public class /*<name>*/ NSArray /*</name>*/<T extends NSObject>
    extends /*<extends>*/ NSObject /*</extends>*/
    /*<implements>*/
    /*</implements>*/ implements List<T> {

  static {
    ObjCRuntime.bind(/*<name>*/ NSArray /*</name>*/.class);
  }

  static class ListAdapter<U extends NSObject> extends AbstractList<U> {
    private final NSArray<U> array;

    ListAdapter(NSArray<U> array) {
      this.array = array;
    }

    @SuppressWarnings("unchecked")
    @Override
    public U get(int index) {
      int size = array.count();
      if (index < 0 || index >= size) {
        throw new IndexOutOfBoundsException("index = " + index + ", size = " + size);
      }
      return (U) array.objectAtIndex(index);
    }

    @Override
    public int size() {
      return array.count();
    }

    @Override
    public boolean contains(Object o) {
      if (o instanceof NSObject) {
        return array.containsObject((NSObject) o);
      }
      return false;
    }
  }

  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ NSArray /*</name>*/.class);

  private AbstractList<T> adapter = createAdapter();

  /*<constructors>*/
  protected NSArray(SkipInit skipInit) {
    super(skipInit);
  }

  public NSArray() {}

  /*</constructors>*/

  public NSArray(Collection<T> c) {
    super((SkipInit) null);
    if (c instanceof NSArray) {
      initObject(objc_initWithArray(this, initWithArray$, (NSArray<T>) c));
    } else {
      NSObject[] objects = c.toArray(new NSObject[c.size()]);
      initWithObjects(objects);
    }
  }

  public NSArray(T... objects) {
    super((SkipInit) null);
    initWithObjects(objects);
  }

  /*<properties>*/

  /*</properties>*/

  private void initWithObjects(NSObject[] objects) {
    VoidPtr.VoidPtrPtr ptr = Struct.allocate(VoidPtr.VoidPtrPtr.class, objects.length);
    for (int i = 0; i < objects.length; i++) {
      ptr.set(objects[i].getHandle());
      ptr = ptr.next();
    }
    ptr = ptr.previous(objects.length);
    initObject(objc_initWithObjects(this, initWithObjects$count$, ptr.getHandle(), objects.length));
  }

  protected AbstractList<T> createAdapter() {
    return new ListAdapter<T>(this);
  }

  @Override
  protected void afterMarshaled() {
    if (adapter == null) {
      adapter = createAdapter();
    }
    super.afterMarshaled();
  }

  public void add(int index, T element) {
    adapter.add(index, element);
  }

  public boolean add(T e) {
    return adapter.add(e);
  }

  public boolean addAll(Collection<? extends T> c) {
    return adapter.addAll(c);
  }

  public boolean addAll(int index, Collection<? extends T> c) {
    return adapter.addAll(index, c);
  }

  public void clear() {
    adapter.clear();
  }

  public boolean contains(Object o) {
    return adapter.contains(o);
  }

  public boolean containsAll(Collection<?> c) {
    return adapter.containsAll(c);
  }

  public T get(int index) {
    return adapter.get(index);
  }

  public int indexOf(Object o) {
    return adapter.indexOf(o);
  }

  public boolean isEmpty() {
    return adapter.isEmpty();
  }

  public Iterator<T> iterator() {
    return adapter.iterator();
  }

  public int lastIndexOf(Object o) {
    return adapter.lastIndexOf(o);
  }

  public ListIterator<T> listIterator() {
    return adapter.listIterator();
  }

  public ListIterator<T> listIterator(int index) {
    return adapter.listIterator(index);
  }

  public T remove(int index) {
    return adapter.remove(index);
  }

  public boolean remove(Object o) {
    return adapter.remove(o);
  }

  public boolean removeAll(Collection<?> c) {
    return adapter.removeAll(c);
  }

  public boolean retainAll(Collection<?> c) {
    return adapter.retainAll(c);
  }

  public T set(int index, T element) {
    return adapter.set(index, element);
  }

  public int size() {
    return adapter.size();
  }

  @SuppressWarnings("unchecked")
  public NSArray<T> subList(int start, int end) {
    if (start >= 0 && end <= size()) {
      if (start <= end) {
        return (NSArray<T>) subarrayWithRange(new NSRange(start, end - start));
      }
      throw new IllegalArgumentException();
    }
    throw new IndexOutOfBoundsException();
  }

  public Object[] toArray() {
    return adapter.toArray();
  }

  public <U> U[] toArray(U[] a) {
    return adapter.toArray(a);
  }

  /*<methods>*/

  private static final Selector containsObject$ = Selector.register("containsObject:");

  @Bridge
  private static native boolean objc_containsObject(
      NSArray __self__, Selector __cmd__, NSObject anObject);

  @Bridge
  private static native boolean objc_containsObjectSuper(
      ObjCSuper __super__, Selector __cmd__, NSObject anObject);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/containsObject:">-
   *     (BOOL)containsObject:(id)anObject</a>
   * @since Available in iOS 2.0 and later.
   */
  protected boolean containsObject(NSObject anObject) {
    if (customClass) {
      return objc_containsObjectSuper(getSuper(), containsObject$, anObject);
    } else {
      return objc_containsObject(this, containsObject$, anObject);
    }
  }

  private static final Selector count = Selector.register("count");

  @Bridge
  private static native int objc_count(NSArray __self__, Selector __cmd__);

  @Bridge
  private static native int objc_countSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/count">-
   *     (NSUInteger)count</a>
   * @since Available in iOS 2.0 and later.
   */
  protected int count() {
    if (customClass) {
      return objc_countSuper(getSuper(), count);
    } else {
      return objc_count(this, count);
    }
  }

  private static final Selector indexOfObject$ = Selector.register("indexOfObject:");

  @Bridge
  private static native int objc_indexOfObject(
      NSArray __self__, Selector __cmd__, NSObject anObject);

  @Bridge
  private static native int objc_indexOfObjectSuper(
      ObjCSuper __super__, Selector __cmd__, NSObject anObject);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/indexOfObject:">-
   *     (NSUInteger)indexOfObject:(id)anObject</a>
   * @since Available in iOS 2.0 and later.
   */
  protected int indexOfObject(NSObject anObject) {
    if (customClass) {
      return objc_indexOfObjectSuper(getSuper(), indexOfObject$, anObject);
    } else {
      return objc_indexOfObject(this, indexOfObject$, anObject);
    }
  }

  private static final Selector initWithArray$ = Selector.register("initWithArray:");

  @Bridge
  private static native @Pointer long objc_initWithArray(
      NSArray __self__, Selector __cmd__, NSArray anArray);

  @Bridge
  private static native @Pointer long objc_initWithArraySuper(
      ObjCSuper __super__, Selector __cmd__, NSArray anArray);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/initWithArray:">-
   *     (id)initWithArray:(NSArray *)anArray</a>
   * @since Available in iOS 2.0 and later.
   */
  protected @Pointer long initWithArray(NSArray anArray) {
    if (customClass) {
      return objc_initWithArraySuper(getSuper(), initWithArray$, anArray);
    } else {
      return objc_initWithArray(this, initWithArray$, anArray);
    }
  }

  private static final Selector initWithObjects$count$ =
      Selector.register("initWithObjects:count:");

  @Bridge
  private static native @Pointer long objc_initWithObjects(
      NSArray __self__, Selector __cmd__, @Pointer long objects, int count);

  @Bridge
  private static native @Pointer long objc_initWithObjectsSuper(
      ObjCSuper __super__, Selector __cmd__, @Pointer long objects, int count);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/initWithObjects:count:">-
   *     (id)initWithObjects:(const id[])objects count:(NSUInteger)count</a>
   * @since Available in iOS 2.0 and later.
   */
  protected @Pointer long initWithObjects(@Pointer long objects, int count) {
    if (customClass) {
      return objc_initWithObjectsSuper(getSuper(), initWithObjects$count$, objects, count);
    } else {
      return objc_initWithObjects(this, initWithObjects$count$, objects, count);
    }
  }

  private static final Selector objectAtIndex$ = Selector.register("objectAtIndex:");

  @Bridge
  private static native NSObject objc_objectAtIndex(NSArray __self__, Selector __cmd__, int index);

  @Bridge
  private static native NSObject objc_objectAtIndexSuper(
      ObjCSuper __super__, Selector __cmd__, int index);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/objectAtIndex:">-
   *     (id)objectAtIndex:(NSUInteger)index</a>
   * @since Available in iOS 2.0 and later.
   */
  protected NSObject objectAtIndex(int index) {
    if (customClass) {
      return objc_objectAtIndexSuper(getSuper(), objectAtIndex$, index);
    } else {
      return objc_objectAtIndex(this, objectAtIndex$, index);
    }
  }

  private static final Selector subarrayWithRange$ = Selector.register("subarrayWithRange:");

  @Bridge
  private static native NSArray objc_subarrayWithRange(
      NSArray __self__, Selector __cmd__, @ByVal NSRange range);

  @Bridge
  private static native NSArray objc_subarrayWithRangeSuper(
      ObjCSuper __super__, Selector __cmd__, @ByVal NSRange range);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/subarrayWithRange:">-
   *     (NSArray *)subarrayWithRange:(NSRange)range</a>
   * @since Available in iOS 2.0 and later.
   */
  protected NSArray subarrayWithRange(NSRange range) {
    if (customClass) {
      return objc_subarrayWithRangeSuper(getSuper(), subarrayWithRange$, range);
    } else {
      return objc_subarrayWithRange(this, subarrayWithRange$, range);
    }
  }
  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("containsObject:")
    public static boolean containsObject(NSArray __self__, Selector __cmd__, NSObject anObject) {
      return __self__.containsObject(anObject);
    }

    @Callback
    @BindSelector("count")
    public static int count(NSArray __self__, Selector __cmd__) {
      return __self__.count();
    }

    @Callback
    @BindSelector("indexOfObject:")
    public static int indexOfObject(NSArray __self__, Selector __cmd__, NSObject anObject) {
      return __self__.indexOfObject(anObject);
    }

    @Callback
    @BindSelector("initWithArray:")
    public static @Pointer long initWithArray(NSArray __self__, Selector __cmd__, NSArray anArray) {
      return __self__.initWithArray(anArray);
    }

    @Callback
    @BindSelector("initWithObjects:count:")
    public static @Pointer long initWithObjects(
        NSArray __self__, Selector __cmd__, @Pointer long objects, int count) {
      return __self__.initWithObjects(objects, count);
    }

    @Callback
    @BindSelector("objectAtIndex:")
    public static NSObject objectAtIndex(NSArray __self__, Selector __cmd__, int index) {
      return __self__.objectAtIndex(index);
    }

    @Callback
    @BindSelector("subarrayWithRange:")
    public static NSArray subarrayWithRange(
        NSArray __self__, Selector __cmd__, @ByVal NSRange range) {
      return __self__.subarrayWithRange(range);
    }
  }
  /*</callbacks>*/

}
Пример #12
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html">UINavigationItem
 *     Class Reference</a>
 * @since Available in iOS 2.0 and later. </div>
 */
/*<library>*/ @Library("UIKit") /*</library>*/
@NativeClass
public class /*<name>*/ UINavigationItem /*</name>*/ extends /*<extends>*/ NSObject /*</extends>*/
/*<implements>*/
/*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ UINavigationItem /*</name>*/.class);
  }

  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ UINavigationItem /*</name>*/.class);

  /*<constructors>*/
  protected UINavigationItem(SkipInit skipInit) {
    super(skipInit);
  }

  public UINavigationItem() {}

  private static final Selector initWithTitle$ = Selector.register("initWithTitle:");

  @Bridge
  private static native @Pointer long objc_initWithTitle(
      UINavigationItem __self__, Selector __cmd__, String title);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instm/UINavigationItem/initWithTitle:">-
   *     (id)initWithTitle:(NSString *)title</a>
   * @since Available in iOS 2.0 and later.
   */
  public UINavigationItem(String title) {
    super((SkipInit) null);
    setHandle(objc_initWithTitle(this, initWithTitle$, title));
  }
  /*</constructors>*/
  /*<properties>*/

  private static final Selector backBarButtonItem = Selector.register("backBarButtonItem");

  @Bridge
  private static native UIBarButtonItem objc_getBackBarButtonItem(
      UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native UIBarButtonItem objc_getBackBarButtonItemSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/backBarButtonItem">@property(nonatomic,
   *     retain) UIBarButtonItem *backBarButtonItem</a>
   * @since Available in iOS 2.0 and later.
   */
  public UIBarButtonItem getBackBarButtonItem() {
    if (customClass) {
      return objc_getBackBarButtonItemSuper(getSuper(), backBarButtonItem);
    } else {
      return objc_getBackBarButtonItem(this, backBarButtonItem);
    }
  }

  private static final Selector setBackBarButtonItem$ = Selector.register("setBackBarButtonItem:");

  @Bridge
  private static native void objc_setBackBarButtonItem(
      UINavigationItem __self__, Selector __cmd__, UIBarButtonItem backBarButtonItem);

  @Bridge
  private static native void objc_setBackBarButtonItemSuper(
      ObjCSuper __super__, Selector __cmd__, UIBarButtonItem backBarButtonItem);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/backBarButtonItem">@property(nonatomic,
   *     retain) UIBarButtonItem *backBarButtonItem</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setBackBarButtonItem(UIBarButtonItem backBarButtonItem) {
    if (customClass) {
      objc_setBackBarButtonItemSuper(getSuper(), setBackBarButtonItem$, backBarButtonItem);
    } else {
      objc_setBackBarButtonItem(this, setBackBarButtonItem$, backBarButtonItem);
    }
  }

  private static final Selector hidesBackButton = Selector.register("hidesBackButton");

  @Bridge
  private static native boolean objc_isHidesBackButton(UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isHidesBackButtonSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/hidesBackButton">@property(nonatomic,
   *     assign) BOOL hidesBackButton</a>
   * @since Available in iOS 2.0 and later.
   */
  public boolean isHidesBackButton() {
    if (customClass) {
      return objc_isHidesBackButtonSuper(getSuper(), hidesBackButton);
    } else {
      return objc_isHidesBackButton(this, hidesBackButton);
    }
  }

  private static final Selector setHidesBackButton$ = Selector.register("setHidesBackButton:");

  @Bridge
  private static native void objc_setHidesBackButton(
      UINavigationItem __self__, Selector __cmd__, boolean hidesBackButton);

  @Bridge
  private static native void objc_setHidesBackButtonSuper(
      ObjCSuper __super__, Selector __cmd__, boolean hidesBackButton);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/hidesBackButton">@property(nonatomic,
   *     assign) BOOL hidesBackButton</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setHidesBackButton(boolean hidesBackButton) {
    if (customClass) {
      objc_setHidesBackButtonSuper(getSuper(), setHidesBackButton$, hidesBackButton);
    } else {
      objc_setHidesBackButton(this, setHidesBackButton$, hidesBackButton);
    }
  }

  private static final Selector leftBarButtonItem = Selector.register("leftBarButtonItem");

  @Bridge
  private static native UIBarButtonItem objc_getLeftBarButtonItem(
      UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native UIBarButtonItem objc_getLeftBarButtonItemSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/leftBarButtonItem">@property(nonatomic,
   *     retain) UIBarButtonItem *leftBarButtonItem</a>
   * @since Available in iOS 2.0 and later.
   */
  public UIBarButtonItem getLeftBarButtonItem() {
    if (customClass) {
      return objc_getLeftBarButtonItemSuper(getSuper(), leftBarButtonItem);
    } else {
      return objc_getLeftBarButtonItem(this, leftBarButtonItem);
    }
  }

  private static final Selector setLeftBarButtonItem$ = Selector.register("setLeftBarButtonItem:");

  @Bridge
  private static native void objc_setLeftBarButtonItem(
      UINavigationItem __self__, Selector __cmd__, UIBarButtonItem leftBarButtonItem);

  @Bridge
  private static native void objc_setLeftBarButtonItemSuper(
      ObjCSuper __super__, Selector __cmd__, UIBarButtonItem leftBarButtonItem);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/leftBarButtonItem">@property(nonatomic,
   *     retain) UIBarButtonItem *leftBarButtonItem</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setLeftBarButtonItem(UIBarButtonItem leftBarButtonItem) {
    if (customClass) {
      objc_setLeftBarButtonItemSuper(getSuper(), setLeftBarButtonItem$, leftBarButtonItem);
    } else {
      objc_setLeftBarButtonItem(this, setLeftBarButtonItem$, leftBarButtonItem);
    }
  }

  private static final Selector leftBarButtonItems = Selector.register("leftBarButtonItems");

  @Bridge
  private static native NSArray objc_getLeftBarButtonItems(
      UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native NSArray objc_getLeftBarButtonItemsSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/leftBarButtonItems">@property(nonatomic,
   *     copy) NSArray *leftBarButtonItems</a>
   * @since Available in iOS 5.0 and later.
   */
  public NSArray getLeftBarButtonItems() {
    if (customClass) {
      return objc_getLeftBarButtonItemsSuper(getSuper(), leftBarButtonItems);
    } else {
      return objc_getLeftBarButtonItems(this, leftBarButtonItems);
    }
  }

  private static final Selector setLeftBarButtonItems$ =
      Selector.register("setLeftBarButtonItems:");

  @Bridge
  private static native void objc_setLeftBarButtonItems(
      UINavigationItem __self__, Selector __cmd__, NSArray leftBarButtonItems);

  @Bridge
  private static native void objc_setLeftBarButtonItemsSuper(
      ObjCSuper __super__, Selector __cmd__, NSArray leftBarButtonItems);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/leftBarButtonItems">@property(nonatomic,
   *     copy) NSArray *leftBarButtonItems</a>
   * @since Available in iOS 5.0 and later.
   */
  public void setLeftBarButtonItems(NSArray leftBarButtonItems) {
    if (customClass) {
      objc_setLeftBarButtonItemsSuper(getSuper(), setLeftBarButtonItems$, leftBarButtonItems);
    } else {
      objc_setLeftBarButtonItems(this, setLeftBarButtonItems$, leftBarButtonItems);
    }
  }

  private static final Selector leftItemsSupplementBackButton =
      Selector.register("leftItemsSupplementBackButton");

  @Bridge
  private static native boolean objc_isLeftItemsSupplementBackButton(
      UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isLeftItemsSupplementBackButtonSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/leftItemsSupplementBackButton">@property
   *     BOOL leftItemsSupplementBackButton</a>
   * @since Available in iOS 5.0 and later.
   */
  public boolean isLeftItemsSupplementBackButton() {
    if (customClass) {
      return objc_isLeftItemsSupplementBackButtonSuper(getSuper(), leftItemsSupplementBackButton);
    } else {
      return objc_isLeftItemsSupplementBackButton(this, leftItemsSupplementBackButton);
    }
  }

  private static final Selector setLeftItemsSupplementBackButton$ =
      Selector.register("setLeftItemsSupplementBackButton:");

  @Bridge
  private static native void objc_setLeftItemsSupplementBackButton(
      UINavigationItem __self__, Selector __cmd__, boolean leftItemsSupplementBackButton);

  @Bridge
  private static native void objc_setLeftItemsSupplementBackButtonSuper(
      ObjCSuper __super__, Selector __cmd__, boolean leftItemsSupplementBackButton);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/leftItemsSupplementBackButton">@property
   *     BOOL leftItemsSupplementBackButton</a>
   * @since Available in iOS 5.0 and later.
   */
  public void setLeftItemsSupplementBackButton(boolean leftItemsSupplementBackButton) {
    if (customClass) {
      objc_setLeftItemsSupplementBackButtonSuper(
          getSuper(), setLeftItemsSupplementBackButton$, leftItemsSupplementBackButton);
    } else {
      objc_setLeftItemsSupplementBackButton(
          this, setLeftItemsSupplementBackButton$, leftItemsSupplementBackButton);
    }
  }

  private static final Selector prompt = Selector.register("prompt");

  @Bridge
  private static native String objc_getPrompt(UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native String objc_getPromptSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/prompt">@property(nonatomic,
   *     copy) NSString *prompt</a>
   * @since Available in iOS 2.0 and later.
   */
  public String getPrompt() {
    if (customClass) {
      return objc_getPromptSuper(getSuper(), prompt);
    } else {
      return objc_getPrompt(this, prompt);
    }
  }

  private static final Selector setPrompt$ = Selector.register("setPrompt:");

  @Bridge
  private static native void objc_setPrompt(
      UINavigationItem __self__, Selector __cmd__, String prompt);

  @Bridge
  private static native void objc_setPromptSuper(
      ObjCSuper __super__, Selector __cmd__, String prompt);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/prompt">@property(nonatomic,
   *     copy) NSString *prompt</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setPrompt(String prompt) {
    if (customClass) {
      objc_setPromptSuper(getSuper(), setPrompt$, prompt);
    } else {
      objc_setPrompt(this, setPrompt$, prompt);
    }
  }

  private static final Selector rightBarButtonItem = Selector.register("rightBarButtonItem");

  @Bridge
  private static native UIBarButtonItem objc_getRightBarButtonItem(
      UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native UIBarButtonItem objc_getRightBarButtonItemSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/rightBarButtonItem">@property(nonatomic,
   *     retain) UIBarButtonItem *rightBarButtonItem</a>
   * @since Available in iOS 2.0 and later.
   */
  public UIBarButtonItem getRightBarButtonItem() {
    if (customClass) {
      return objc_getRightBarButtonItemSuper(getSuper(), rightBarButtonItem);
    } else {
      return objc_getRightBarButtonItem(this, rightBarButtonItem);
    }
  }

  private static final Selector setRightBarButtonItem$ =
      Selector.register("setRightBarButtonItem:");

  @Bridge
  private static native void objc_setRightBarButtonItem(
      UINavigationItem __self__, Selector __cmd__, UIBarButtonItem rightBarButtonItem);

  @Bridge
  private static native void objc_setRightBarButtonItemSuper(
      ObjCSuper __super__, Selector __cmd__, UIBarButtonItem rightBarButtonItem);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/rightBarButtonItem">@property(nonatomic,
   *     retain) UIBarButtonItem *rightBarButtonItem</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setRightBarButtonItem(UIBarButtonItem rightBarButtonItem) {
    if (customClass) {
      objc_setRightBarButtonItemSuper(getSuper(), setRightBarButtonItem$, rightBarButtonItem);
    } else {
      objc_setRightBarButtonItem(this, setRightBarButtonItem$, rightBarButtonItem);
    }
  }

  private static final Selector rightBarButtonItems = Selector.register("rightBarButtonItems");

  @Bridge
  private static native NSArray objc_getRightBarButtonItems(
      UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native NSArray objc_getRightBarButtonItemsSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/rightBarButtonItems">@property(nonatomic,
   *     copy) NSArray *rightBarButtonItems</a>
   * @since Available in iOS 5.0 and later.
   */
  public NSArray getRightBarButtonItems() {
    if (customClass) {
      return objc_getRightBarButtonItemsSuper(getSuper(), rightBarButtonItems);
    } else {
      return objc_getRightBarButtonItems(this, rightBarButtonItems);
    }
  }

  private static final Selector setRightBarButtonItems$ =
      Selector.register("setRightBarButtonItems:");

  @Bridge
  private static native void objc_setRightBarButtonItems(
      UINavigationItem __self__, Selector __cmd__, NSArray rightBarButtonItems);

  @Bridge
  private static native void objc_setRightBarButtonItemsSuper(
      ObjCSuper __super__, Selector __cmd__, NSArray rightBarButtonItems);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/rightBarButtonItems">@property(nonatomic,
   *     copy) NSArray *rightBarButtonItems</a>
   * @since Available in iOS 5.0 and later.
   */
  public void setRightBarButtonItems(NSArray rightBarButtonItems) {
    if (customClass) {
      objc_setRightBarButtonItemsSuper(getSuper(), setRightBarButtonItems$, rightBarButtonItems);
    } else {
      objc_setRightBarButtonItems(this, setRightBarButtonItems$, rightBarButtonItems);
    }
  }

  private static final Selector title = Selector.register("title");

  @Bridge
  private static native String objc_getTitle(UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native String objc_getTitleSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/title">@property(nonatomic,
   *     copy) NSString *title</a>
   * @since Available in iOS 2.0 and later.
   */
  public String getTitle() {
    if (customClass) {
      return objc_getTitleSuper(getSuper(), title);
    } else {
      return objc_getTitle(this, title);
    }
  }

  private static final Selector setTitle$ = Selector.register("setTitle:");

  @Bridge
  private static native void objc_setTitle(
      UINavigationItem __self__, Selector __cmd__, String title);

  @Bridge
  private static native void objc_setTitleSuper(
      ObjCSuper __super__, Selector __cmd__, String title);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/title">@property(nonatomic,
   *     copy) NSString *title</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setTitle(String title) {
    if (customClass) {
      objc_setTitleSuper(getSuper(), setTitle$, title);
    } else {
      objc_setTitle(this, setTitle$, title);
    }
  }

  private static final Selector titleView = Selector.register("titleView");

  @Bridge
  private static native UIView objc_getTitleView(UINavigationItem __self__, Selector __cmd__);

  @Bridge
  private static native UIView objc_getTitleViewSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/titleView">@property(nonatomic,
   *     retain) UIView *titleView</a>
   * @since Available in iOS 2.0 and later.
   */
  public UIView getTitleView() {
    if (customClass) {
      return objc_getTitleViewSuper(getSuper(), titleView);
    } else {
      return objc_getTitleView(this, titleView);
    }
  }

  private static final Selector setTitleView$ = Selector.register("setTitleView:");

  @Bridge
  private static native void objc_setTitleView(
      UINavigationItem __self__, Selector __cmd__, UIView titleView);

  @Bridge
  private static native void objc_setTitleViewSuper(
      ObjCSuper __super__, Selector __cmd__, UIView titleView);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/titleView">@property(nonatomic,
   *     retain) UIView *titleView</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setTitleView(UIView titleView) {
    if (customClass) {
      objc_setTitleViewSuper(getSuper(), setTitleView$, titleView);
    } else {
      objc_setTitleView(this, setTitleView$, titleView);
    }
  }
  /*</properties>*/
  /*<methods>*/

  private static final Selector setHidesBackButton$animated$ =
      Selector.register("setHidesBackButton:animated:");

  @Bridge
  private static native void objc_setHidesBackButton(
      UINavigationItem __self__, Selector __cmd__, boolean hidesBackButton, boolean animated);

  @Bridge
  private static native void objc_setHidesBackButtonSuper(
      ObjCSuper __super__, Selector __cmd__, boolean hidesBackButton, boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instm/UINavigationItem/setHidesBackButton:animated:">-
   *     (void)setHidesBackButton:(BOOL)hidesBackButton animated:(BOOL)animated</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setHidesBackButton(boolean hidesBackButton, boolean animated) {
    if (customClass) {
      objc_setHidesBackButtonSuper(
          getSuper(), setHidesBackButton$animated$, hidesBackButton, animated);
    } else {
      objc_setHidesBackButton(this, setHidesBackButton$animated$, hidesBackButton, animated);
    }
  }

  private static final Selector setLeftBarButtonItem$animated$ =
      Selector.register("setLeftBarButtonItem:animated:");

  @Bridge
  private static native void objc_setLeftBarButtonItem(
      UINavigationItem __self__, Selector __cmd__, UIBarButtonItem item, boolean animated);

  @Bridge
  private static native void objc_setLeftBarButtonItemSuper(
      ObjCSuper __super__, Selector __cmd__, UIBarButtonItem item, boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instm/UINavigationItem/setLeftBarButtonItem:animated:">-
   *     (void)setLeftBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setLeftBarButtonItem(UIBarButtonItem item, boolean animated) {
    if (customClass) {
      objc_setLeftBarButtonItemSuper(getSuper(), setLeftBarButtonItem$animated$, item, animated);
    } else {
      objc_setLeftBarButtonItem(this, setLeftBarButtonItem$animated$, item, animated);
    }
  }

  private static final Selector setLeftBarButtonItems$animated$ =
      Selector.register("setLeftBarButtonItems:animated:");

  @Bridge
  private static native void objc_setLeftBarButtonItems(
      UINavigationItem __self__, Selector __cmd__, NSArray items, boolean animated);

  @Bridge
  private static native void objc_setLeftBarButtonItemsSuper(
      ObjCSuper __super__, Selector __cmd__, NSArray items, boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instm/UINavigationItem/setLeftBarButtonItems:animated:">-
   *     (void)setLeftBarButtonItems:(NSArray *)items animated:(BOOL)animated</a>
   * @since Available in iOS 5.0 and later.
   */
  public void setLeftBarButtonItems(NSArray items, boolean animated) {
    if (customClass) {
      objc_setLeftBarButtonItemsSuper(getSuper(), setLeftBarButtonItems$animated$, items, animated);
    } else {
      objc_setLeftBarButtonItems(this, setLeftBarButtonItems$animated$, items, animated);
    }
  }

  private static final Selector setRightBarButtonItem$animated$ =
      Selector.register("setRightBarButtonItem:animated:");

  @Bridge
  private static native void objc_setRightBarButtonItem(
      UINavigationItem __self__, Selector __cmd__, UIBarButtonItem item, boolean animated);

  @Bridge
  private static native void objc_setRightBarButtonItemSuper(
      ObjCSuper __super__, Selector __cmd__, UIBarButtonItem item, boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instm/UINavigationItem/setRightBarButtonItem:animated:">-
   *     (void)setRightBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated</a>
   * @since Available in iOS 2.0 and later.
   */
  public void setRightBarButtonItem(UIBarButtonItem item, boolean animated) {
    if (customClass) {
      objc_setRightBarButtonItemSuper(getSuper(), setRightBarButtonItem$animated$, item, animated);
    } else {
      objc_setRightBarButtonItem(this, setRightBarButtonItem$animated$, item, animated);
    }
  }

  private static final Selector setRightBarButtonItems$animated$ =
      Selector.register("setRightBarButtonItems:animated:");

  @Bridge
  private static native void objc_setRightBarButtonItems(
      UINavigationItem __self__, Selector __cmd__, NSArray items, boolean animated);

  @Bridge
  private static native void objc_setRightBarButtonItemsSuper(
      ObjCSuper __super__, Selector __cmd__, NSArray items, boolean animated);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instm/UINavigationItem/setRightBarButtonItems:animated:">-
   *     (void)setRightBarButtonItems:(NSArray *)items animated:(BOOL)animated</a>
   * @since Available in iOS 5.0 and later.
   */
  public void setRightBarButtonItems(NSArray items, boolean animated) {
    if (customClass) {
      objc_setRightBarButtonItemsSuper(
          getSuper(), setRightBarButtonItems$animated$, items, animated);
    } else {
      objc_setRightBarButtonItems(this, setRightBarButtonItems$animated$, items, animated);
    }
  }
  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("backBarButtonItem")
    public static UIBarButtonItem getBackBarButtonItem(
        UINavigationItem __self__, Selector __cmd__) {
      return __self__.getBackBarButtonItem();
    }

    @Callback
    @BindSelector("setBackBarButtonItem:")
    public static void setBackBarButtonItem(
        UINavigationItem __self__, Selector __cmd__, UIBarButtonItem backBarButtonItem) {
      __self__.setBackBarButtonItem(backBarButtonItem);
    }

    @Callback
    @BindSelector("hidesBackButton")
    public static boolean isHidesBackButton(UINavigationItem __self__, Selector __cmd__) {
      return __self__.isHidesBackButton();
    }

    @Callback
    @BindSelector("setHidesBackButton:")
    public static void setHidesBackButton(
        UINavigationItem __self__, Selector __cmd__, boolean hidesBackButton) {
      __self__.setHidesBackButton(hidesBackButton);
    }

    @Callback
    @BindSelector("leftBarButtonItem")
    public static UIBarButtonItem getLeftBarButtonItem(
        UINavigationItem __self__, Selector __cmd__) {
      return __self__.getLeftBarButtonItem();
    }

    @Callback
    @BindSelector("setLeftBarButtonItem:")
    public static void setLeftBarButtonItem(
        UINavigationItem __self__, Selector __cmd__, UIBarButtonItem leftBarButtonItem) {
      __self__.setLeftBarButtonItem(leftBarButtonItem);
    }

    @Callback
    @BindSelector("leftBarButtonItems")
    public static NSArray getLeftBarButtonItems(UINavigationItem __self__, Selector __cmd__) {
      return __self__.getLeftBarButtonItems();
    }

    @Callback
    @BindSelector("setLeftBarButtonItems:")
    public static void setLeftBarButtonItems(
        UINavigationItem __self__, Selector __cmd__, NSArray leftBarButtonItems) {
      __self__.setLeftBarButtonItems(leftBarButtonItems);
    }

    @Callback
    @BindSelector("leftItemsSupplementBackButton")
    public static boolean isLeftItemsSupplementBackButton(
        UINavigationItem __self__, Selector __cmd__) {
      return __self__.isLeftItemsSupplementBackButton();
    }

    @Callback
    @BindSelector("setLeftItemsSupplementBackButton:")
    public static void setLeftItemsSupplementBackButton(
        UINavigationItem __self__, Selector __cmd__, boolean leftItemsSupplementBackButton) {
      __self__.setLeftItemsSupplementBackButton(leftItemsSupplementBackButton);
    }

    @Callback
    @BindSelector("prompt")
    public static String getPrompt(UINavigationItem __self__, Selector __cmd__) {
      return __self__.getPrompt();
    }

    @Callback
    @BindSelector("setPrompt:")
    public static void setPrompt(UINavigationItem __self__, Selector __cmd__, String prompt) {
      __self__.setPrompt(prompt);
    }

    @Callback
    @BindSelector("rightBarButtonItem")
    public static UIBarButtonItem getRightBarButtonItem(
        UINavigationItem __self__, Selector __cmd__) {
      return __self__.getRightBarButtonItem();
    }

    @Callback
    @BindSelector("setRightBarButtonItem:")
    public static void setRightBarButtonItem(
        UINavigationItem __self__, Selector __cmd__, UIBarButtonItem rightBarButtonItem) {
      __self__.setRightBarButtonItem(rightBarButtonItem);
    }

    @Callback
    @BindSelector("rightBarButtonItems")
    public static NSArray getRightBarButtonItems(UINavigationItem __self__, Selector __cmd__) {
      return __self__.getRightBarButtonItems();
    }

    @Callback
    @BindSelector("setRightBarButtonItems:")
    public static void setRightBarButtonItems(
        UINavigationItem __self__, Selector __cmd__, NSArray rightBarButtonItems) {
      __self__.setRightBarButtonItems(rightBarButtonItems);
    }

    @Callback
    @BindSelector("title")
    public static String getTitle(UINavigationItem __self__, Selector __cmd__) {
      return __self__.getTitle();
    }

    @Callback
    @BindSelector("setTitle:")
    public static void setTitle(UINavigationItem __self__, Selector __cmd__, String title) {
      __self__.setTitle(title);
    }

    @Callback
    @BindSelector("titleView")
    public static UIView getTitleView(UINavigationItem __self__, Selector __cmd__) {
      return __self__.getTitleView();
    }

    @Callback
    @BindSelector("setTitleView:")
    public static void setTitleView(UINavigationItem __self__, Selector __cmd__, UIView titleView) {
      __self__.setTitleView(titleView);
    }

    @Callback
    @BindSelector("setHidesBackButton:animated:")
    public static void setHidesBackButton(
        UINavigationItem __self__, Selector __cmd__, boolean hidesBackButton, boolean animated) {
      __self__.setHidesBackButton(hidesBackButton, animated);
    }

    @Callback
    @BindSelector("setLeftBarButtonItem:animated:")
    public static void setLeftBarButtonItem(
        UINavigationItem __self__, Selector __cmd__, UIBarButtonItem item, boolean animated) {
      __self__.setLeftBarButtonItem(item, animated);
    }

    @Callback
    @BindSelector("setLeftBarButtonItems:animated:")
    public static void setLeftBarButtonItems(
        UINavigationItem __self__, Selector __cmd__, NSArray items, boolean animated) {
      __self__.setLeftBarButtonItems(items, animated);
    }

    @Callback
    @BindSelector("setRightBarButtonItem:animated:")
    public static void setRightBarButtonItem(
        UINavigationItem __self__, Selector __cmd__, UIBarButtonItem item, boolean animated) {
      __self__.setRightBarButtonItem(item, animated);
    }

    @Callback
    @BindSelector("setRightBarButtonItems:animated:")
    public static void setRightBarButtonItems(
        UINavigationItem __self__, Selector __cmd__, NSArray items, boolean animated) {
      __self__.setRightBarButtonItems(items, animated);
    }
  }
  /*</callbacks>*/

}
/*!
@class FBShareDialogParams

@abstract
This object is used to encapsulate state for parameters to a share dialog that
opens in the Facebook app.
*/
@Library(Library.INTERNAL)
@NativeClass()
public class FBShareDialogParams extends FBDialogsParams {
  private static final ObjCClass objCClass = ObjCClass.getByType(FBShareDialogParams.class);

  static {
    ObjCRuntime.bind(FBShareDialogParams.class);
  }

  /*
   * ! @abstract The URL link to be attached to the post. Only "http" or "https" schemes are supported.
   */
  // @property (nonatomic, copy) NSURL *link;
  private static final Selector link = Selector.register("link");

  @Bridge
  private static native NSURL objc_link(FBShareDialogParams __self__, Selector __cmd__);

  public NSURL getLink() {
    return objc_link(this, link);
  }

  private static final Selector setLink$ = Selector.register("setLink:");

  @Bridge
  private static native void objc_setLink$(
      FBShareDialogParams __self__, Selector __cmd__, NSURL link);

  public void setLink(NSURL link) {
    objc_setLink$(this, setLink$, link);
  }

  /*
   * ! @abstract The name, or title associated with the link. Is only used if the link is non-nil.
   */
  // @property (nonatomic, copy) NSString *name;
  private static final Selector name = Selector.register("name");

  @Bridge
  private static native String objc_name(FBShareDialogParams __self__, Selector __cmd__);

  public String getName() {
    return objc_name(this, name);
  }

  private static final Selector setName$ = Selector.register("setName:");

  @Bridge
  private static native void objc_setName$(
      FBShareDialogParams __self__, Selector __cmd__, String name);

  public void setName(String name) {
    objc_setName$(this, setName$, name);
  }

  /*
   * ! @abstract The caption to be used with the link. Is only used if the link is non-nil.
   */
  // @property (nonatomic, copy) NSString *caption;
  private static final Selector caption = Selector.register("caption");

  @Bridge
  private static native String objc_caption(FBShareDialogParams __self__, Selector __cmd__);

  public String getCaption() {
    return objc_caption(this, caption);
  }

  private static final Selector setCaption$ = Selector.register("setCaption:");

  @Bridge
  private static native void objc_setCaption$(
      FBShareDialogParams __self__, Selector __cmd__, String caption);

  public void setCaption(String caption) {
    objc_setCaption$(this, setCaption$, caption);
  }

  /*
   * ! @abstract The description associated with the link. Is only used if the link is non-nil.
   */
  // @property (nonatomic, copy) NSString *description;
  private static final Selector description = Selector.register("description");

  @Bridge
  private static native String objc_description(FBShareDialogParams __self__, Selector __cmd__);

  public String getDescription() {
    return objc_description(this, description);
  }

  private static final Selector setDescription$ = Selector.register("setDescription:");

  @Bridge
  private static native void objc_setDescription$(
      FBShareDialogParams __self__, Selector __cmd__, String description);

  public void setDescription(String description) {
    objc_setDescription$(this, setDescription$, description);
  }

  /*
   * ! @abstract The link to a thumbnail to associate with the post. Is only used if the link is non-nil. Only "http" or "https" schemes are
   * supported.
   */
  // @property (nonatomic, copy) NSURL *picture;
  private static final Selector picture = Selector.register("picture");

  @Bridge
  private static native NSURL objc_picture(FBShareDialogParams __self__, Selector __cmd__);

  public NSURL getPicture() {
    return objc_picture(this, picture);
  }

  private static final Selector setPicture$ = Selector.register("setPicture:");

  @Bridge
  private static native void objc_setPicture$(
      FBShareDialogParams __self__, Selector __cmd__, NSURL picture);

  public void setPicture(NSURL picture) {
    objc_setPicture$(this, setPicture$, picture);
  }

  /*
   * ! @abstract An array of NSStrings or FBGraphUsers to tag in the post. If using NSStrings, the values must represent the IDs of the users to
   * tag.
   */
  // @property (nonatomic, copy) NSArray *friends;
  private static final Selector friends = Selector.register("friends");

  @Bridge
  private static native NSArray objc_friends(FBShareDialogParams __self__, Selector __cmd__);

  public NSArray getFriends() {
    return objc_friends(this, friends);
  }

  private static final Selector setFriends$ = Selector.register("setFriends:");

  @Bridge
  private static native void objc_setFriends$(
      FBShareDialogParams __self__, Selector __cmd__, NSArray friends);

  public void setFriends(NSArray friends) {
    objc_setFriends$(this, setFriends$, friends);
  }

  /*
   * ! @abstract An NSString or FBGraphPlace to tag in the status update. If NSString, the value must be the ID of the place to tag.
   */
  // @property (nonatomic, copy) id place;

  /*
   * ! @abstract A text reference for the category of the post, used on Facebook Insights.
   */
  // @property (nonatomic, copy) NSString *ref;

  /*
   * ! @abstract If YES, treats any data failures (e.g. failures when getting data for IDs passed through "friends" or "place") as a fatal error,
   * and will not continue with the status update.
   */
  // @property (nonatomic, assign) BOOL dataFailuresFatal;
}
Пример #14
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITapGestureRecognizer_Class/Reference/Reference.html">UITapGestureRecognizer
 *     Class Reference</a>
 * @since Available in iOS 3.2 and later. </div>
 */
/*<library>*/ @Library("UIKit") /*</library>*/
@NativeClass
public class /*<name>*/ UITapGestureRecognizer /*</name>*/
    extends /*<extends>*/ UIGestureRecognizer /*</extends>*/
/*<implements>*/
/*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ UITapGestureRecognizer /*</name>*/.class);
  }

  private static final boolean X86 = Bro.IS_X86;
  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ UITapGestureRecognizer /*</name>*/.class);

  /*<constructors>*/
  protected UITapGestureRecognizer(SkipInit skipInit) {
    super(skipInit);
  }

  public UITapGestureRecognizer() {}

  /*</constructors>*/
  /*<properties>*/

  private static final Selector numberOfTapsRequired = Selector.register("numberOfTapsRequired");

  @Bridge(symbol = "objc_msgSend")
  private static native int objc_getNumberOfTapsRequired(
      UITapGestureRecognizer __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native int objc_getNumberOfTapsRequiredSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITapGestureRecognizer_Class/Reference/Reference.html#//apple_ref/occ/instp/UITapGestureRecognizer/numberOfTapsRequired">@property(nonatomic)
   *     NSUInteger numberOfTapsRequired</a>
   * @since Available in iOS 3.2 and later.
   */
  public int getNumberOfTapsRequired() {
    if (customClass) {
      return objc_getNumberOfTapsRequiredSuper(getSuper(), numberOfTapsRequired);
    } else {
      return objc_getNumberOfTapsRequired(this, numberOfTapsRequired);
    }
  }

  private static final Selector setNumberOfTapsRequired$ =
      Selector.register("setNumberOfTapsRequired:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setNumberOfTapsRequired(
      UITapGestureRecognizer __self__, Selector __cmd__, int numberOfTapsRequired);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setNumberOfTapsRequiredSuper(
      ObjCSuper __super__, Selector __cmd__, int numberOfTapsRequired);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITapGestureRecognizer_Class/Reference/Reference.html#//apple_ref/occ/instp/UITapGestureRecognizer/numberOfTapsRequired">@property(nonatomic)
   *     NSUInteger numberOfTapsRequired</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setNumberOfTapsRequired(int numberOfTapsRequired) {
    if (customClass) {
      objc_setNumberOfTapsRequiredSuper(getSuper(), setNumberOfTapsRequired$, numberOfTapsRequired);
    } else {
      objc_setNumberOfTapsRequired(this, setNumberOfTapsRequired$, numberOfTapsRequired);
    }
  }

  private static final Selector numberOfTouchesRequired =
      Selector.register("numberOfTouchesRequired");

  @Bridge(symbol = "objc_msgSend")
  private static native int objc_getNumberOfTouchesRequired(
      UITapGestureRecognizer __self__, Selector __cmd__);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native int objc_getNumberOfTouchesRequiredSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITapGestureRecognizer_Class/Reference/Reference.html#//apple_ref/occ/instp/UITapGestureRecognizer/numberOfTouchesRequired">@property(nonatomic)
   *     NSUInteger numberOfTouchesRequired</a>
   * @since Available in iOS 3.2 and later.
   */
  public int getNumberOfTouchesRequired() {
    if (customClass) {
      return objc_getNumberOfTouchesRequiredSuper(getSuper(), numberOfTouchesRequired);
    } else {
      return objc_getNumberOfTouchesRequired(this, numberOfTouchesRequired);
    }
  }

  private static final Selector setNumberOfTouchesRequired$ =
      Selector.register("setNumberOfTouchesRequired:");

  @Bridge(symbol = "objc_msgSend")
  private static native void objc_setNumberOfTouchesRequired(
      UITapGestureRecognizer __self__, Selector __cmd__, int numberOfTouchesRequired);

  @Bridge(symbol = "objc_msgSendSuper")
  private static native void objc_setNumberOfTouchesRequiredSuper(
      ObjCSuper __super__, Selector __cmd__, int numberOfTouchesRequired);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITapGestureRecognizer_Class/Reference/Reference.html#//apple_ref/occ/instp/UITapGestureRecognizer/numberOfTouchesRequired">@property(nonatomic)
   *     NSUInteger numberOfTouchesRequired</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setNumberOfTouchesRequired(int numberOfTouchesRequired) {
    if (customClass) {
      objc_setNumberOfTouchesRequiredSuper(
          getSuper(), setNumberOfTouchesRequired$, numberOfTouchesRequired);
    } else {
      objc_setNumberOfTouchesRequired(this, setNumberOfTouchesRequired$, numberOfTouchesRequired);
    }
  }
  /*</properties>*/
  /*<methods>*/

  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("numberOfTapsRequired")
    public static int getNumberOfTapsRequired(UITapGestureRecognizer __self__, Selector __cmd__) {
      return __self__.getNumberOfTapsRequired();
    }

    @Callback
    @BindSelector("setNumberOfTapsRequired:")
    public static void setNumberOfTapsRequired(
        UITapGestureRecognizer __self__, Selector __cmd__, int numberOfTapsRequired) {
      __self__.setNumberOfTapsRequired(numberOfTapsRequired);
    }

    @Callback
    @BindSelector("numberOfTouchesRequired")
    public static int getNumberOfTouchesRequired(
        UITapGestureRecognizer __self__, Selector __cmd__) {
      return __self__.getNumberOfTouchesRequired();
    }

    @Callback
    @BindSelector("setNumberOfTouchesRequired:")
    public static void setNumberOfTouchesRequired(
        UITapGestureRecognizer __self__, Selector __cmd__, int numberOfTouchesRequired) {
      __self__.setNumberOfTouchesRequired(numberOfTouchesRequired);
    }
  }
  /*</callbacks>*/

}
Пример #15
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITextSelectionRect_class/Reference/Reference.html">UITextSelectionRect
 *     Class Reference</a>
 * @since Available in iOS 6.0 and later. </div>
 */
/*<library>*/ @Library("UIKit") /*</library>*/
@NativeClass
public class /*<name>*/ UITextSelectionRect /*</name>*/
    extends /*<extends>*/ NSObject /*</extends>*/
/*<implements>*/
/*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ UITextSelectionRect /*</name>*/.class);
  }

  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ UITextSelectionRect /*</name>*/.class);

  /*<constructors>*/
  protected UITextSelectionRect(SkipInit skipInit) {
    super(skipInit);
  }

  public UITextSelectionRect() {}

  /*</constructors>*/
  /*<properties>*/

  private static final Selector containsEnd = Selector.register("containsEnd");

  @Bridge
  private static native boolean objc_isContainsEnd(UITextSelectionRect __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isContainsEndSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITextSelectionRect_class/Reference/Reference.html#//apple_ref/occ/instp/UITextSelectionRect/containsEnd">@property
   *     (nonatomic, readonly) BOOL containsEnd</a>
   * @since Available in iOS 6.0 and later.
   */
  public boolean isContainsEnd() {
    if (customClass) {
      return objc_isContainsEndSuper(getSuper(), containsEnd);
    } else {
      return objc_isContainsEnd(this, containsEnd);
    }
  }

  private static final Selector containsStart = Selector.register("containsStart");

  @Bridge
  private static native boolean objc_isContainsStart(
      UITextSelectionRect __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isContainsStartSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITextSelectionRect_class/Reference/Reference.html#//apple_ref/occ/instp/UITextSelectionRect/containsStart">@property
   *     (nonatomic, readonly) BOOL containsStart</a>
   * @since Available in iOS 6.0 and later.
   */
  public boolean isContainsStart() {
    if (customClass) {
      return objc_isContainsStartSuper(getSuper(), containsStart);
    } else {
      return objc_isContainsStart(this, containsStart);
    }
  }

  private static final Selector range = Selector.register("range");

  @Bridge
  private static native UITextRange objc_getRange(UITextSelectionRect __self__, Selector __cmd__);

  @Bridge
  private static native UITextRange objc_getRangeSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITextSelectionRect_class/Reference/Reference.html#//apple_ref/occ/instp/UITextSelectionRect/range">@property
   *     (nonatomic, readonly) UITextRange *range</a>
   */
  public UITextRange getRange() {
    if (customClass) {
      return objc_getRangeSuper(getSuper(), range);
    } else {
      return objc_getRange(this, range);
    }
  }

  private static final Selector rect = Selector.register("rect");

  @Bridge
  private static native @ByVal CGRect objc_getRect(UITextSelectionRect __self__, Selector __cmd__);

  @Bridge
  private static native @ByVal CGRect objc_getRectSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITextSelectionRect_class/Reference/Reference.html#//apple_ref/occ/instp/UITextSelectionRect/rect">@property
   *     (nonatomic, readonly) CGRect rect</a>
   * @since Available in iOS 6.0 and later.
   */
  public CGRect getRect() {
    if (customClass) {
      return objc_getRectSuper(getSuper(), rect);
    } else {
      return objc_getRect(this, rect);
    }
  }

  private static final Selector isVertical = Selector.register("isVertical");

  @Bridge
  private static native boolean objc_isVertical(UITextSelectionRect __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isVerticalSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITextSelectionRect_class/Reference/Reference.html#//apple_ref/occ/instp/UITextSelectionRect/isVertical">@property
   *     (nonatomic, readonly) BOOL isVertical</a>
   * @since Available in iOS 6.0 and later.
   */
  public boolean isVertical() {
    if (customClass) {
      return objc_isVerticalSuper(getSuper(), isVertical);
    } else {
      return objc_isVertical(this, isVertical);
    }
  }

  private static final Selector writingDirection = Selector.register("writingDirection");

  @Bridge
  private static native UITextWritingDirection objc_getWritingDirection(
      UITextSelectionRect __self__, Selector __cmd__);

  @Bridge
  private static native UITextWritingDirection objc_getWritingDirectionSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="http://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UITextSelectionRect_class/Reference/Reference.html#//apple_ref/occ/instp/UITextSelectionRect/writingDirection">@property
   *     (nonatomic, readonly) UITextWritingDirection writingDirection</a>
   * @since Available in iOS 6.0 and later.
   */
  public UITextWritingDirection getWritingDirection() {
    if (customClass) {
      return objc_getWritingDirectionSuper(getSuper(), writingDirection);
    } else {
      return objc_getWritingDirection(this, writingDirection);
    }
  }
  /*</properties>*/
  /*<methods>*/

  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("containsEnd")
    public static boolean isContainsEnd(UITextSelectionRect __self__, Selector __cmd__) {
      return __self__.isContainsEnd();
    }

    @Callback
    @BindSelector("containsStart")
    public static boolean isContainsStart(UITextSelectionRect __self__, Selector __cmd__) {
      return __self__.isContainsStart();
    }

    @Callback
    @BindSelector("range")
    public static UITextRange getRange(UITextSelectionRect __self__, Selector __cmd__) {
      return __self__.getRange();
    }

    @Callback
    @BindSelector("rect")
    public static @ByVal CGRect getRect(UITextSelectionRect __self__, Selector __cmd__) {
      return __self__.getRect();
    }

    @Callback
    @BindSelector("isVertical")
    public static boolean isVertical(UITextSelectionRect __self__, Selector __cmd__) {
      return __self__.isVertical();
    }

    @Callback
    @BindSelector("writingDirection")
    public static UITextWritingDirection getWritingDirection(
        UITextSelectionRect __self__, Selector __cmd__) {
      return __self__.getWritingDirection();
    }
  }
  /*</callbacks>*/

}
Пример #16
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UISplitViewController_class/Reference/Reference.html">UISplitViewController
 *     Class Reference</a>
 * @since Available in iOS 3.2 and later. </div>
 */
/*<library>*/ @Library("UIKit") /*</library>*/
@NativeClass
public class /*<name>*/ UISplitViewController /*</name>*/
    extends /*<extends>*/ UIViewController /*</extends>*/
/*<implements>*/
/*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ UISplitViewController /*</name>*/.class);
  }

  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ UISplitViewController /*</name>*/.class);

  /*<constructors>*/
  protected UISplitViewController(SkipInit skipInit) {
    super(skipInit);
  }

  public UISplitViewController() {}

  /*</constructors>*/
  /*<properties>*/

  private static final Selector delegate = Selector.register("delegate");

  @Bridge
  private static native UISplitViewControllerDelegate objc_getDelegate(
      UISplitViewController __self__, Selector __cmd__);

  @Bridge
  private static native UISplitViewControllerDelegate objc_getDelegateSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UISplitViewController_class/Reference/Reference.html#//apple_ref/occ/instp/UISplitViewController/delegate">@property(nonatomic,
   *     assign) id &amp;lt;UISplitViewControllerDelegate&amp;gt; delegate</a>
   * @since Available in iOS 3.2 and later.
   */
  public UISplitViewControllerDelegate getDelegate() {
    if (customClass) {
      return objc_getDelegateSuper(getSuper(), delegate);
    } else {
      return objc_getDelegate(this, delegate);
    }
  }

  private static final Selector setDelegate$ = Selector.register("setDelegate:");

  @Bridge
  private static native void objc_setDelegate(
      UISplitViewController __self__, Selector __cmd__, UISplitViewControllerDelegate delegate);

  @Bridge
  private static native void objc_setDelegateSuper(
      ObjCSuper __super__, Selector __cmd__, UISplitViewControllerDelegate delegate);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UISplitViewController_class/Reference/Reference.html#//apple_ref/occ/instp/UISplitViewController/delegate">@property(nonatomic,
   *     assign) id &amp;lt;UISplitViewControllerDelegate&amp;gt; delegate</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setDelegate(UISplitViewControllerDelegate delegate) {
    if (customClass) {
      objc_setDelegateSuper(getSuper(), setDelegate$, delegate);
    } else {
      objc_setDelegate(this, setDelegate$, delegate);
    }
  }

  private static final Selector presentsWithGesture = Selector.register("presentsWithGesture");

  @Bridge
  private static native boolean objc_isPresentsWithGesture(
      UISplitViewController __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isPresentsWithGestureSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UISplitViewController_class/Reference/Reference.html#//apple_ref/occ/instp/UISplitViewController/presentsWithGesture">@property
   *     (nonatomic) BOOL presentsWithGesture</a>
   * @since Available in iOS 5.1 and later.
   */
  public boolean isPresentsWithGesture() {
    if (customClass) {
      return objc_isPresentsWithGestureSuper(getSuper(), presentsWithGesture);
    } else {
      return objc_isPresentsWithGesture(this, presentsWithGesture);
    }
  }

  private static final Selector setPresentsWithGesture$ =
      Selector.register("setPresentsWithGesture:");

  @Bridge
  private static native void objc_setPresentsWithGesture(
      UISplitViewController __self__, Selector __cmd__, boolean presentsWithGesture);

  @Bridge
  private static native void objc_setPresentsWithGestureSuper(
      ObjCSuper __super__, Selector __cmd__, boolean presentsWithGesture);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UISplitViewController_class/Reference/Reference.html#//apple_ref/occ/instp/UISplitViewController/presentsWithGesture">@property
   *     (nonatomic) BOOL presentsWithGesture</a>
   * @since Available in iOS 5.1 and later.
   */
  public void setPresentsWithGesture(boolean presentsWithGesture) {
    if (customClass) {
      objc_setPresentsWithGestureSuper(getSuper(), setPresentsWithGesture$, presentsWithGesture);
    } else {
      objc_setPresentsWithGesture(this, setPresentsWithGesture$, presentsWithGesture);
    }
  }

  private static final Selector viewControllers = Selector.register("viewControllers");

  @Bridge
  private static native NSArray objc_getViewControllers(
      UISplitViewController __self__, Selector __cmd__);

  @Bridge
  private static native NSArray objc_getViewControllersSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UISplitViewController_class/Reference/Reference.html#//apple_ref/occ/instp/UISplitViewController/viewControllers">@property(nonatomic,
   *     copy) NSArray *viewControllers</a>
   * @since Available in iOS 3.2 and later.
   */
  public NSArray getViewControllers() {
    if (customClass) {
      return objc_getViewControllersSuper(getSuper(), viewControllers);
    } else {
      return objc_getViewControllers(this, viewControllers);
    }
  }

  private static final Selector setViewControllers$ = Selector.register("setViewControllers:");

  @Bridge
  private static native void objc_setViewControllers(
      UISplitViewController __self__, Selector __cmd__, NSArray viewControllers);

  @Bridge
  private static native void objc_setViewControllersSuper(
      ObjCSuper __super__, Selector __cmd__, NSArray viewControllers);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UISplitViewController_class/Reference/Reference.html#//apple_ref/occ/instp/UISplitViewController/viewControllers">@property(nonatomic,
   *     copy) NSArray *viewControllers</a>
   * @since Available in iOS 3.2 and later.
   */
  public void setViewControllers(NSArray viewControllers) {
    if (customClass) {
      objc_setViewControllersSuper(getSuper(), setViewControllers$, viewControllers);
    } else {
      objc_setViewControllers(this, setViewControllers$, viewControllers);
    }
  }
  /*</properties>*/
  /*<methods>*/

  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("delegate")
    public static UISplitViewControllerDelegate getDelegate(
        UISplitViewController __self__, Selector __cmd__) {
      return __self__.getDelegate();
    }

    @Callback
    @BindSelector("setDelegate:")
    public static void setDelegate(
        UISplitViewController __self__, Selector __cmd__, UISplitViewControllerDelegate delegate) {
      __self__.setDelegate(delegate);
    }

    @Callback
    @BindSelector("presentsWithGesture")
    public static boolean isPresentsWithGesture(UISplitViewController __self__, Selector __cmd__) {
      return __self__.isPresentsWithGesture();
    }

    @Callback
    @BindSelector("setPresentsWithGesture:")
    public static void setPresentsWithGesture(
        UISplitViewController __self__, Selector __cmd__, boolean presentsWithGesture) {
      __self__.setPresentsWithGesture(presentsWithGesture);
    }

    @Callback
    @BindSelector("viewControllers")
    public static NSArray getViewControllers(UISplitViewController __self__, Selector __cmd__) {
      return __self__.getViewControllers();
    }

    @Callback
    @BindSelector("setViewControllers:")
    public static void setViewControllers(
        UISplitViewController __self__, Selector __cmd__, NSArray viewControllers) {
      __self__.setViewControllers(viewControllers);
    }
  }
  /*</callbacks>*/

}
Пример #17
0
/**
 * <div class="javadoc">
 *
 * @see <a
 *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html">UIDevice
 *     Class Reference</a>
 * @since Available in iOS 2.0 and later. </div>
 */
/*<library>*/ @Library("UIKit") /*</library>*/
@NativeClass
public class /*<name>*/ UIDevice /*</name>*/ extends /*<extends>*/ NSObject /*</extends>*/
/*<implements>*/
/*</implements>*/ {

  static {
    ObjCRuntime.bind(/*<name>*/ UIDevice /*</name>*/.class);
  }

  private static final ObjCClass objCClass =
      ObjCClass.getByType(/*<name>*/ UIDevice /*</name>*/.class);

  /*<constructors>*/
  protected UIDevice(SkipInit skipInit) {
    super(skipInit);
  }

  public UIDevice() {}

  /*</constructors>*/
  /*<properties>*/

  private static final Selector batteryLevel = Selector.register("batteryLevel");

  @Bridge
  private static native float objc_getBatteryLevel(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native float objc_getBatteryLevelSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/batteryLevel">@property(nonatomic,
   *     readonly) float batteryLevel</a>
   * @since Available in iOS 3.0 and later.
   */
  public float getBatteryLevel() {
    if (customClass) {
      return objc_getBatteryLevelSuper(getSuper(), batteryLevel);
    } else {
      return objc_getBatteryLevel(this, batteryLevel);
    }
  }

  private static final Selector isBatteryMonitoringEnabled =
      Selector.register("isBatteryMonitoringEnabled");

  @Bridge
  private static native boolean objc_isBatteryMonitoringEnabled(
      UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isBatteryMonitoringEnabledSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/batteryMonitoringEnabled">@property(nonatomic,
   *     getter=isBatteryMonitoringEnabled) BOOL batteryMonitoringEnabled</a>
   * @since Available in iOS 3.0 and later.
   */
  public boolean isBatteryMonitoringEnabled() {
    if (customClass) {
      return objc_isBatteryMonitoringEnabledSuper(getSuper(), isBatteryMonitoringEnabled);
    } else {
      return objc_isBatteryMonitoringEnabled(this, isBatteryMonitoringEnabled);
    }
  }

  private static final Selector setBatteryMonitoringEnabled$ =
      Selector.register("setBatteryMonitoringEnabled:");

  @Bridge
  private static native void objc_setBatteryMonitoringEnabled(
      UIDevice __self__, Selector __cmd__, boolean batteryMonitoringEnabled);

  @Bridge
  private static native void objc_setBatteryMonitoringEnabledSuper(
      ObjCSuper __super__, Selector __cmd__, boolean batteryMonitoringEnabled);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/batteryMonitoringEnabled">@property(nonatomic,
   *     getter=isBatteryMonitoringEnabled) BOOL batteryMonitoringEnabled</a>
   * @since Available in iOS 3.0 and later.
   */
  public void setBatteryMonitoringEnabled(boolean batteryMonitoringEnabled) {
    if (customClass) {
      objc_setBatteryMonitoringEnabledSuper(
          getSuper(), setBatteryMonitoringEnabled$, batteryMonitoringEnabled);
    } else {
      objc_setBatteryMonitoringEnabled(
          this, setBatteryMonitoringEnabled$, batteryMonitoringEnabled);
    }
  }

  private static final Selector batteryState = Selector.register("batteryState");

  @Bridge
  private static native UIDeviceBatteryState objc_getBatteryState(
      UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native UIDeviceBatteryState objc_getBatteryStateSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/batteryState">@property(nonatomic,
   *     readonly) UIDeviceBatteryState batteryState</a>
   * @since Available in iOS 3.0 and later.
   */
  public UIDeviceBatteryState getBatteryState() {
    if (customClass) {
      return objc_getBatteryStateSuper(getSuper(), batteryState);
    } else {
      return objc_getBatteryState(this, batteryState);
    }
  }

  private static final Selector isGeneratingDeviceOrientationNotifications =
      Selector.register("isGeneratingDeviceOrientationNotifications");

  @Bridge
  private static native boolean objc_isGeneratesDeviceOrientationNotifications(
      UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isGeneratesDeviceOrientationNotificationsSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/generatesDeviceOrientationNotifications">@property(nonatomic,
   *     readonly, getter=isGeneratingDeviceOrientationNotifications) BOOL
   *     generatesDeviceOrientationNotifications</a>
   * @since Available in iOS 2.0 and later.
   */
  public boolean isGeneratesDeviceOrientationNotifications() {
    if (customClass) {
      return objc_isGeneratesDeviceOrientationNotificationsSuper(
          getSuper(), isGeneratingDeviceOrientationNotifications);
    } else {
      return objc_isGeneratesDeviceOrientationNotifications(
          this, isGeneratingDeviceOrientationNotifications);
    }
  }

  private static final Selector localizedModel = Selector.register("localizedModel");

  @Bridge
  private static native String objc_getLocalizedModel(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native String objc_getLocalizedModelSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/localizedModel">@property(nonatomic,
   *     readonly, retain) NSString *localizedModel</a>
   * @since Available in iOS 2.0 and later.
   */
  public String getLocalizedModel() {
    if (customClass) {
      return objc_getLocalizedModelSuper(getSuper(), localizedModel);
    } else {
      return objc_getLocalizedModel(this, localizedModel);
    }
  }

  private static final Selector model = Selector.register("model");

  @Bridge
  private static native String objc_getModel(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native String objc_getModelSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/model">@property(nonatomic,
   *     readonly, retain) NSString *model</a>
   * @since Available in iOS 2.0 and later.
   */
  public String getModel() {
    if (customClass) {
      return objc_getModelSuper(getSuper(), model);
    } else {
      return objc_getModel(this, model);
    }
  }

  private static final Selector isMultitaskingSupported =
      Selector.register("isMultitaskingSupported");

  @Bridge
  private static native boolean objc_isMultitaskingSupported(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isMultitaskingSupportedSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/multitaskingSupported">@property(nonatomic,
   *     readonly, getter=isMultitaskingSupported) BOOL multitaskingSupported</a>
   * @since Available in iOS 4.0 and later.
   */
  public boolean isMultitaskingSupported() {
    if (customClass) {
      return objc_isMultitaskingSupportedSuper(getSuper(), isMultitaskingSupported);
    } else {
      return objc_isMultitaskingSupported(this, isMultitaskingSupported);
    }
  }

  private static final Selector name = Selector.register("name");

  @Bridge
  private static native String objc_getName(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native String objc_getNameSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/name">@property(nonatomic,
   *     readonly, retain) NSString *name</a>
   * @since Available in iOS 2.0 and later.
   */
  public String getName() {
    if (customClass) {
      return objc_getNameSuper(getSuper(), name);
    } else {
      return objc_getName(this, name);
    }
  }

  private static final Selector orientation = Selector.register("orientation");

  @Bridge
  private static native UIDeviceOrientation objc_getOrientation(
      UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native UIDeviceOrientation objc_getOrientationSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/orientation">@property(nonatomic,
   *     readonly) UIDeviceOrientation orientation</a>
   * @since Available in iOS 2.0 and later.
   */
  public UIDeviceOrientation getOrientation() {
    if (customClass) {
      return objc_getOrientationSuper(getSuper(), orientation);
    } else {
      return objc_getOrientation(this, orientation);
    }
  }

  private static final Selector isProximityMonitoringEnabled =
      Selector.register("isProximityMonitoringEnabled");

  @Bridge
  private static native boolean objc_isProximityMonitoringEnabled(
      UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isProximityMonitoringEnabledSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/proximityMonitoringEnabled">@property(nonatomic,
   *     getter=isProximityMonitoringEnabled) BOOL proximityMonitoringEnabled</a>
   * @since Available in iOS 3.0 and later.
   */
  public boolean isProximityMonitoringEnabled() {
    if (customClass) {
      return objc_isProximityMonitoringEnabledSuper(getSuper(), isProximityMonitoringEnabled);
    } else {
      return objc_isProximityMonitoringEnabled(this, isProximityMonitoringEnabled);
    }
  }

  private static final Selector setProximityMonitoringEnabled$ =
      Selector.register("setProximityMonitoringEnabled:");

  @Bridge
  private static native void objc_setProximityMonitoringEnabled(
      UIDevice __self__, Selector __cmd__, boolean proximityMonitoringEnabled);

  @Bridge
  private static native void objc_setProximityMonitoringEnabledSuper(
      ObjCSuper __super__, Selector __cmd__, boolean proximityMonitoringEnabled);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/proximityMonitoringEnabled">@property(nonatomic,
   *     getter=isProximityMonitoringEnabled) BOOL proximityMonitoringEnabled</a>
   * @since Available in iOS 3.0 and later.
   */
  public void setProximityMonitoringEnabled(boolean proximityMonitoringEnabled) {
    if (customClass) {
      objc_setProximityMonitoringEnabledSuper(
          getSuper(), setProximityMonitoringEnabled$, proximityMonitoringEnabled);
    } else {
      objc_setProximityMonitoringEnabled(
          this, setProximityMonitoringEnabled$, proximityMonitoringEnabled);
    }
  }

  private static final Selector proximityState = Selector.register("proximityState");

  @Bridge
  private static native boolean objc_isProximityState(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native boolean objc_isProximityStateSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/proximityState">@property(nonatomic,
   *     readonly) BOOL proximityState</a>
   * @since Available in iOS 3.0 and later.
   */
  public boolean isProximityState() {
    if (customClass) {
      return objc_isProximityStateSuper(getSuper(), proximityState);
    } else {
      return objc_isProximityState(this, proximityState);
    }
  }

  private static final Selector systemName = Selector.register("systemName");

  @Bridge
  private static native String objc_getSystemName(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native String objc_getSystemNameSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/systemName">@property(nonatomic,
   *     readonly, retain) NSString *systemName</a>
   * @since Available in iOS 2.0 and later.
   */
  public String getSystemName() {
    if (customClass) {
      return objc_getSystemNameSuper(getSuper(), systemName);
    } else {
      return objc_getSystemName(this, systemName);
    }
  }

  private static final Selector systemVersion = Selector.register("systemVersion");

  @Bridge
  private static native String objc_getSystemVersion(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native String objc_getSystemVersionSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/systemVersion">@property(nonatomic,
   *     readonly, retain) NSString *systemVersion</a>
   * @since Available in iOS 2.0 and later.
   */
  public String getSystemVersion() {
    if (customClass) {
      return objc_getSystemVersionSuper(getSuper(), systemVersion);
    } else {
      return objc_getSystemVersion(this, systemVersion);
    }
  }

  private static final Selector userInterfaceIdiom = Selector.register("userInterfaceIdiom");

  @Bridge
  private static native UIUserInterfaceIdiom objc_getUserInterfaceIdiom(
      UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native UIUserInterfaceIdiom objc_getUserInterfaceIdiomSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/userInterfaceIdiom">@property(nonatomic,
   *     readonly) UIUserInterfaceIdiom userInterfaceIdiom</a>
   * @since Available in iOS 3.2 and later.
   */
  public UIUserInterfaceIdiom getUserInterfaceIdiom() {
    if (customClass) {
      return objc_getUserInterfaceIdiomSuper(getSuper(), userInterfaceIdiom);
    } else {
      return objc_getUserInterfaceIdiom(this, userInterfaceIdiom);
    }
  }

  private static final Selector identifierForVendor = Selector.register("identifierForVendor");

  @Bridge
  private static native NSUUID objc_getVendorIdentifier(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native NSUUID objc_getVendorIdentifierSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor">@property(nonatomic,
   *     readonly, retain) NSUUID *identifierForVendor</a>
   * @since Available in iOS 6.0 and later.
   */
  public NSUUID getVendorIdentifier() {
    if (customClass) {
      return objc_getVendorIdentifierSuper(getSuper(), identifierForVendor);
    } else {
      return objc_getVendorIdentifier(this, identifierForVendor);
    }
  }
  /*</properties>*/
  /*<methods>*/

  private static final Selector currentDevice = Selector.register("currentDevice");

  @Bridge
  private static native UIDevice objc_getCurrentDevice(ObjCClass __self__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/clm/UIDevice/currentDevice">+
   *     (UIDevice *)currentDevice</a>
   * @since Available in iOS 2.0 and later.
   */
  public static UIDevice getCurrentDevice() {
    return objc_getCurrentDevice(objCClass, currentDevice);
  }

  private static final Selector beginGeneratingDeviceOrientationNotifications =
      Selector.register("beginGeneratingDeviceOrientationNotifications");

  @Bridge
  private static native void objc_beginGeneratingDeviceOrientationNotifications(
      UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native void objc_beginGeneratingDeviceOrientationNotificationsSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instm/UIDevice/beginGeneratingDeviceOrientationNotifications">-
   *     (void)beginGeneratingDeviceOrientationNotifications</a>
   * @since Available in iOS 2.0 and later.
   */
  public void beginGeneratingDeviceOrientationNotifications() {
    if (customClass) {
      objc_beginGeneratingDeviceOrientationNotificationsSuper(
          getSuper(), beginGeneratingDeviceOrientationNotifications);
    } else {
      objc_beginGeneratingDeviceOrientationNotifications(
          this, beginGeneratingDeviceOrientationNotifications);
    }
  }

  private static final Selector endGeneratingDeviceOrientationNotifications =
      Selector.register("endGeneratingDeviceOrientationNotifications");

  @Bridge
  private static native void objc_endGeneratingDeviceOrientationNotifications(
      UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native void objc_endGeneratingDeviceOrientationNotificationsSuper(
      ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instm/UIDevice/endGeneratingDeviceOrientationNotifications">-
   *     (void)endGeneratingDeviceOrientationNotifications</a>
   * @since Available in iOS 2.0 and later.
   */
  public void endGeneratingDeviceOrientationNotifications() {
    if (customClass) {
      objc_endGeneratingDeviceOrientationNotificationsSuper(
          getSuper(), endGeneratingDeviceOrientationNotifications);
    } else {
      objc_endGeneratingDeviceOrientationNotifications(
          this, endGeneratingDeviceOrientationNotifications);
    }
  }

  private static final Selector playInputClick = Selector.register("playInputClick");

  @Bridge
  private static native void objc_playInputClick(UIDevice __self__, Selector __cmd__);

  @Bridge
  private static native void objc_playInputClickSuper(ObjCSuper __super__, Selector __cmd__);
  /**
   * @see <a
   *     href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIKit_Framework/../UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instm/UIDevice/playInputClick">-
   *     (void)playInputClick</a>
   * @since Available in iOS 4.2 and later.
   */
  public void playInputClick() {
    if (customClass) {
      objc_playInputClickSuper(getSuper(), playInputClick);
    } else {
      objc_playInputClick(this, playInputClick);
    }
  }
  /*</methods>*/
  /*<callbacks>*/
  static class Callbacks {
    @Callback
    @BindSelector("batteryLevel")
    public static float getBatteryLevel(UIDevice __self__, Selector __cmd__) {
      return __self__.getBatteryLevel();
    }

    @Callback
    @BindSelector("isBatteryMonitoringEnabled")
    public static boolean isBatteryMonitoringEnabled(UIDevice __self__, Selector __cmd__) {
      return __self__.isBatteryMonitoringEnabled();
    }

    @Callback
    @BindSelector("setBatteryMonitoringEnabled:")
    public static void setBatteryMonitoringEnabled(
        UIDevice __self__, Selector __cmd__, boolean batteryMonitoringEnabled) {
      __self__.setBatteryMonitoringEnabled(batteryMonitoringEnabled);
    }

    @Callback
    @BindSelector("batteryState")
    public static UIDeviceBatteryState getBatteryState(UIDevice __self__, Selector __cmd__) {
      return __self__.getBatteryState();
    }

    @Callback
    @BindSelector("isGeneratingDeviceOrientationNotifications")
    public static boolean isGeneratesDeviceOrientationNotifications(
        UIDevice __self__, Selector __cmd__) {
      return __self__.isGeneratesDeviceOrientationNotifications();
    }

    @Callback
    @BindSelector("localizedModel")
    public static String getLocalizedModel(UIDevice __self__, Selector __cmd__) {
      return __self__.getLocalizedModel();
    }

    @Callback
    @BindSelector("model")
    public static String getModel(UIDevice __self__, Selector __cmd__) {
      return __self__.getModel();
    }

    @Callback
    @BindSelector("isMultitaskingSupported")
    public static boolean isMultitaskingSupported(UIDevice __self__, Selector __cmd__) {
      return __self__.isMultitaskingSupported();
    }

    @Callback
    @BindSelector("name")
    public static String getName(UIDevice __self__, Selector __cmd__) {
      return __self__.getName();
    }

    @Callback
    @BindSelector("orientation")
    public static UIDeviceOrientation getOrientation(UIDevice __self__, Selector __cmd__) {
      return __self__.getOrientation();
    }

    @Callback
    @BindSelector("isProximityMonitoringEnabled")
    public static boolean isProximityMonitoringEnabled(UIDevice __self__, Selector __cmd__) {
      return __self__.isProximityMonitoringEnabled();
    }

    @Callback
    @BindSelector("setProximityMonitoringEnabled:")
    public static void setProximityMonitoringEnabled(
        UIDevice __self__, Selector __cmd__, boolean proximityMonitoringEnabled) {
      __self__.setProximityMonitoringEnabled(proximityMonitoringEnabled);
    }

    @Callback
    @BindSelector("proximityState")
    public static boolean isProximityState(UIDevice __self__, Selector __cmd__) {
      return __self__.isProximityState();
    }

    @Callback
    @BindSelector("systemName")
    public static String getSystemName(UIDevice __self__, Selector __cmd__) {
      return __self__.getSystemName();
    }

    @Callback
    @BindSelector("systemVersion")
    public static String getSystemVersion(UIDevice __self__, Selector __cmd__) {
      return __self__.getSystemVersion();
    }

    @Callback
    @BindSelector("userInterfaceIdiom")
    public static UIUserInterfaceIdiom getUserInterfaceIdiom(UIDevice __self__, Selector __cmd__) {
      return __self__.getUserInterfaceIdiom();
    }

    @Callback
    @BindSelector("identifierForVendor")
    public static NSUUID getVendorIdentifier(UIDevice __self__, Selector __cmd__) {
      return __self__.getVendorIdentifier();
    }

    @Callback
    @BindSelector("beginGeneratingDeviceOrientationNotifications")
    public static void beginGeneratingDeviceOrientationNotifications(
        UIDevice __self__, Selector __cmd__) {
      __self__.beginGeneratingDeviceOrientationNotifications();
    }

    @Callback
    @BindSelector("endGeneratingDeviceOrientationNotifications")
    public static void endGeneratingDeviceOrientationNotifications(
        UIDevice __self__, Selector __cmd__) {
      __self__.endGeneratingDeviceOrientationNotifications();
    }

    @Callback
    @BindSelector("playInputClick")
    public static void playInputClick(UIDevice __self__, Selector __cmd__) {
      __self__.playInputClick();
    }
  }
  /*</callbacks>*/

}