Class Foundation

java.lang.Object
com.intellij.ui.mac.foundation.Foundation

public class Foundation extends Object
  • Method Details

    • init

      public static void init()
    • getObjcClass

      public static ID getObjcClass(String className)
      Get the ID of the NSClass with className
    • getProtocol

      public static ID getProtocol(String name)
    • createSelector

      public static Pointer createSelector(String s)
    • invoke

      public static ID invoke(ID id, Pointer selector, Object... args)
    • invoke

      public static ID invoke(String cls, String selector, Object... args)
    • invoke

      public static ID invoke(ID id, String selector, Object... args)
    • allocateObjcClassPair

      public static ID allocateObjcClassPair(ID superCls, String name)
    • registerObjcClassPair

      public static void registerObjcClassPair(ID cls)
    • isClassRespondsToSelector

      public static boolean isClassRespondsToSelector(ID cls, Pointer selectorName)
    • addMethod

      public static boolean addMethod(ID cls, Pointer selectorName, Callback impl, String types)
      Parameters:
      cls - The class to which to add a method.
      selectorName - A selector that specifies the name of the method being added.
      impl - A function which is the implementation of the new method. The function must take at least two arguments-self and _cmd.
      types - An array of characters that describe the types of the arguments to the method. See
      Returns:
      true if the method was added successfully, otherwise false (for example, the class already contains a method implementation with that name).
    • addProtocol

      public static boolean addProtocol(ID aClass, ID protocol)
    • addMethodByID

      public static boolean addMethodByID(ID cls, Pointer selectorName, ID impl, String types)
    • isMetaClass

      public static boolean isMetaClass(ID cls)
    • stringFromSelector

      @Nullable public static String stringFromSelector(Pointer selector)
    • getClass

      public static Pointer getClass(Pointer clazz)
    • fullUserName

      public static String fullUserName()
    • class_replaceMethod

      public static ID class_replaceMethod(ID cls, Pointer selector, Callback impl, String types)
    • getMetaClass

      public static ID getMetaClass(String className)
    • isPackageAtPath

      public static boolean isPackageAtPath(@NotNull String path)
    • isPackageAtPath

      public static boolean isPackageAtPath(@NotNull File file)
    • nsString

      public static ID nsString(@NotNull String s)
    • toStringViaUTF8

      @Nullable public static String toStringViaUTF8(ID cfString)
    • getEncodingName

      @Nullable public static String getEncodingName(long nsStringEncoding)
    • getEncodingCode

      public static long getEncodingCode(@Nullable String encodingName)
    • cfRetain

      public static void cfRetain(ID id)
    • cgWindowListCreateImage

      public static ID cgWindowListCreateImage(Foundation.NSRect screenBounds, int windowOption, ID windowID, int imageOption)
    • cfRelease

      public static void cfRelease(ID... ids)
    • isMainThread

      public static boolean isMainThread()
    • executeOnMainThread

      public static void executeOnMainThread(Runnable runnable, boolean withAutoreleasePool, boolean waitUntilDone)
    • fillArray

      public static ID fillArray(Object[] a)
    • createDict

      public static ID createDict(@NotNull String[] keys, @NotNull Object[] values)