Class NFD

java.lang.Object
overrungl.nfd.NFD

public final class NFD extends Object

Native File Dialog Extended binding.

See the source repository for basic usages.

Important

NFD uses UTF-16 on Windows. You should use NFD_AllocString and NFD_NativeString instead of the MemoryUtil version.

Since:
0.1.0
Author:
squid233
  • Field Details

    • NFD_INTERFACE_VERSION

      public static final int NFD_INTERFACE_VERSION
      See Also:
    • NFD_ERROR

      public static final int NFD_ERROR
      See Also:
    • NFD_OKAY

      public static final int NFD_OKAY
      See Also:
    • NFD_CANCEL

      public static final int NFD_CANCEL
      See Also:
    • NFD_WINDOW_HANDLE_TYPE_UNSET

      public static final int NFD_WINDOW_HANDLE_TYPE_UNSET
      See Also:
    • NFD_WINDOW_HANDLE_TYPE_WINDOWS

      public static final int NFD_WINDOW_HANDLE_TYPE_WINDOWS
      See Also:
    • NFD_WINDOW_HANDLE_TYPE_COCOA

      public static final int NFD_WINDOW_HANDLE_TYPE_COCOA
      See Also:
    • NFD_WINDOW_HANDLE_TYPE_X11

      public static final int NFD_WINDOW_HANDLE_TYPE_X11
      See Also:
    • NFD_CHARSET

      public static final Charset NFD_CHARSET
      On Windows, this is UTF-16 little-endian; on others, this is UTF-8
    • nfdnchar_t

      public static final ValueLayout nfdnchar_t
      On Windows, this is wchar_t; on others, this is byte
    • nfdpathsetsize_t

      public static final ValueLayout nfdpathsetsize_t
      On macOS, this is C long; on Windows and others, this is int
  • Method Details

    • NFD_FreePath

      public static void NFD_FreePath(@NonNull MemorySegment filePath)

      Invokes NFD_FreePathN.

      void NFD_FreePathN(nfdnchar_t* filePath);
      
    • NFD_Init

      public static int NFD_Init()

      Invokes NFD_Init.

      (int) nfdresult_t NFD_Init();
      
    • NFD_Quit

      public static void NFD_Quit()

      Invokes NFD_Quit.

      void NFD_Quit();
      
    • NFD_OpenDialog

      public static int NFD_OpenDialog(@NonNull MemorySegment outPath, @NonNull MemorySegment filterList, int filterCount, @NonNull MemorySegment defaultPath)

      Invokes NFD_OpenDialogN.

      (int) nfdresult_t NFD_OpenDialogN(nfdnchar_t** outPath, const nfdnfilteritem_t* filterList, (unsigned int) nfdfiltersize_t filterCount, const nfdnchar_t* defaultPath);
      
    • NFD_OpenDialog_With_Impl

      public static int NFD_OpenDialog_With_Impl(long version, @NonNull MemorySegment outPath, @NonNull MemorySegment args)

      Invokes NFD_OpenDialogN_With_Impl.

      (int) nfdresult_t NFD_OpenDialogN_With_Impl((size_t) nfdversion_t version, nfdnchar_t** outPath, const nfdopendialognargs_t* args);
      
    • NFD_OpenDialog_With

      public static int NFD_OpenDialog_With(@NonNull MemorySegment outPath, @NonNull MemorySegment args)

      Invokes NFD_OpenDialog_With.

      (int) nfdresult_t NFD_OpenDialog_With(nfdnchar_t** outPath, const nfdopendialognargs_t* args);
      
    • NFD_OpenDialogMultiple

      public static int NFD_OpenDialogMultiple(@NonNull MemorySegment outPaths, @NonNull MemorySegment filterList, int filterCount, @NonNull MemorySegment defaultPath)

      Invokes NFD_OpenDialogMultipleN.

      (int) nfdresult_t NFD_OpenDialogMultipleN(const nfdpathset_t** outPaths, const nfdnfilteritem_t* filterList, (unsigned int) nfdfiltersize_t filterCount, const nfdnchar_t* defaultPath);
      
    • NFD_OpenDialogMultiple_With_Impl

      public static int NFD_OpenDialogMultiple_With_Impl(long version, @NonNull MemorySegment outPaths, @NonNull MemorySegment args)

      Invokes NFD_OpenDialogMultipleN_With_Impl.

      (int) nfdresult_t NFD_OpenDialogMultipleN_With_Impl((size_t) nfdversion_t version, const nfdpathset_t** outPaths, const nfdopendialognargs_t* args);
      
    • NFD_OpenDialogMultiple_With

      public static int NFD_OpenDialogMultiple_With(@NonNull MemorySegment outPaths, @NonNull MemorySegment args)

      Invokes NFD_OpenDialogMultiple_With.

      (int) nfdresult_t NFD_OpenDialogMultiple_With(const nfdpathset_t** outPaths, const nfdopendialognargs_t* args);
      
    • NFD_SaveDialog

      public static int NFD_SaveDialog(@NonNull MemorySegment outPath, @NonNull MemorySegment filterList, int filterCount, @NonNull MemorySegment defaultPath, @NonNull MemorySegment defaultName)

      Invokes NFD_SaveDialogN.

      (int) nfdresult_t NFD_SaveDialogN(nfdnchar_t** outPath, const nfdnfilteritem_t* filterList, (unsigned int) nfdfiltersize_t filterCount, const nfdnchar_t* defaultPath, const nfdnchar_t* defaultName);
      
    • NFD_SaveDialog_With_Impl

      public static int NFD_SaveDialog_With_Impl(long version, @NonNull MemorySegment outPath, @NonNull MemorySegment args)

      Invokes NFD_SaveDialogN_With_Impl.

      (int) nfdresult_t NFD_SaveDialogN_With_Impl((size_t) nfdversion_t version, nfdnchar_t** outPath, const nfdsavedialognargs_t* args);
      
    • NFD_SaveDialog_With

      public static int NFD_SaveDialog_With(@NonNull MemorySegment outPath, @NonNull MemorySegment args)

      Invokes NFD_SaveDialog_With.

      (int) nfdresult_t NFD_SaveDialog_With(nfdnchar_t** outPath, const nfdsavedialognargs_t* args);
      
    • NFD_PickFolder

      public static int NFD_PickFolder(@NonNull MemorySegment outPath, @NonNull MemorySegment defaultPath)

      Invokes NFD_PickFolderN.

      (int) nfdresult_t NFD_PickFolderN(nfdnchar_t** outPath, const nfdnchar_t* defaultPath);
      
    • NFD_PickFolder_With_Impl

      public static int NFD_PickFolder_With_Impl(long version, @NonNull MemorySegment outPath, @NonNull MemorySegment args)

      Invokes NFD_PickFolderN_With_Impl.

      (int) nfdresult_t NFD_PickFolderN_With_Impl((size_t) nfdversion_t version, nfdnchar_t** outPath, const nfdpickfoldernargs_t* args);
      
    • NFD_PickFolder_With

      public static int NFD_PickFolder_With(@NonNull MemorySegment outPath, @NonNull MemorySegment args)

      Invokes NFD_PickFolder_With.

      (int) nfdresult_t NFD_PickFolder_With(nfdnchar_t** outPath, const nfdpickfoldernargs_t* args);
      
    • NFD_PickFolderMultiple

      public static int NFD_PickFolderMultiple(@NonNull MemorySegment outPaths, @NonNull MemorySegment defaultPath)

      Invokes NFD_PickFolderMultipleN.

      (int) nfdresult_t NFD_PickFolderMultipleN(const nfdpathset_t** outPaths, const nfdnchar_t* defaultPath);
      
    • NFD_PickFolderMultiple_With_Impl

      public static int NFD_PickFolderMultiple_With_Impl(long version, @NonNull MemorySegment outPaths, @NonNull MemorySegment args)

      Invokes NFD_PickFolderMultipleN_With_Impl.

      (int) nfdresult_t NFD_PickFolderMultipleN_With_Impl((size_t) nfdversion_t version, const nfdpathset_t** outPaths, const nfdpickfoldernargs_t* args);
      
    • NFD_PickFolderMultiple_With

      public static int NFD_PickFolderMultiple_With(@NonNull MemorySegment outPaths, @NonNull MemorySegment args)

      Invokes NFD_PickFolderMultiple_With.

      (int) nfdresult_t NFD_PickFolderMultiple_With(const nfdpathset_t** outPaths, const nfdpickfoldernargs_t* args);
      
    • NFD_GetError

      public static @NonNull MemorySegment NFD_GetError()

      Invokes NFD_GetError.

      const char* NFD_GetError();
      
    • NFD_ClearError

      public static void NFD_ClearError()

      Invokes NFD_ClearError.

      void NFD_ClearError();
      
    • NFD_PathSet_GetCount

      public static int NFD_PathSet_GetCount(@NonNull MemorySegment pathSet, @NonNull MemorySegment count)

      Invokes NFD_PathSet_GetCount.

      (int) nfdresult_t NFD_PathSet_GetCount(const nfdpathset_t* pathSet, nfdpathsetsize_t* count);
      
    • NFD_PathSet_GetPath

      public static int NFD_PathSet_GetPath(@NonNull MemorySegment pathSet, long index, @NonNull MemorySegment outPath)

      Invokes NFD_PathSet_GetPathN.

      (int) nfdresult_t NFD_PathSet_GetPathN(const nfdpathset_t* pathSet, (size_t) nfdpathsetsize_t index, nfdnchar_t** outPath);
      
    • NFD_PathSet_FreePath

      public static void NFD_PathSet_FreePath(@NonNull MemorySegment filePath)

      Invokes NFD_PathSet_FreePathN.

      void NFD_PathSet_FreePathN(const nfdnchar_t* filePath);
      
    • NFD_PathSet_GetEnum

      public static int NFD_PathSet_GetEnum(@NonNull MemorySegment pathSet, @NonNull MemorySegment outEnumerator)

      Invokes NFD_PathSet_GetEnum.

      (int) nfdresult_t NFD_PathSet_GetEnum(const nfdpathset_t* pathSet, nfdpathsetenum_t* outEnumerator);
      
    • NFD_PathSet_FreeEnum

      public static void NFD_PathSet_FreeEnum(@NonNull MemorySegment enumerator)

      Invokes NFD_PathSet_FreeEnum.

      void NFD_PathSet_FreeEnum(nfdpathsetenum_t* enumerator);
      
    • NFD_PathSet_EnumNext

      public static int NFD_PathSet_EnumNext(@NonNull MemorySegment enumerator, @NonNull MemorySegment outPath)

      Invokes NFD_PathSet_EnumNextN.

      (int) nfdresult_t NFD_PathSet_EnumNextN(nfdpathsetenum_t* enumerator, nfdnchar_t** outPath);
      
    • NFD_PathSet_Free

      public static void NFD_PathSet_Free(@NonNull MemorySegment pathSet)

      Invokes NFD_PathSet_Free.

      void NFD_PathSet_Free(const nfdpathset_t* pathSet);
      
    • NFD_AllocString

      public static @NonNull MemorySegment NFD_AllocString(SegmentAllocator allocator, @Nullable String string)
    • NFD_NativeString

      public static @Nullable String NFD_NativeString(@Nullable MemorySegment segment)