JavaDoc for ImGuiIO

This commit is contained in:
SpaiR committed 2020-02-11 01:19:21 +03:00
1 parent f05ff1e571
commit 2a4ed6c5cb
1 file changed
+324 -147
+324 -147
View File
@@ -24,133 +24,173 @@ public final class ImGuiIO {
// Configuration (fill once) // Configuration (fill once)
//------------------------------------------------------------------ //------------------------------------------------------------------
// ConfigFlags /**
// See ImGuiConfigFlags enum. Set by user/application. Gamepad/keyboard navigation options, etc. * See ImGuiConfigFlags enum. Set by user/application. Gamepad/keyboard navigation options, etc.
// */
public native int getConfigFlags(); /* public native int getConfigFlags(); /*
return ImGui::GetIO().ConfigFlags; return ImGui::GetIO().ConfigFlags;
*/ */
/**
* See ImGuiConfigFlags enum. Set by user/application. Gamepad/keyboard navigation options, etc.
*/
public native void setConfigFlags(int configFlags); /* public native void setConfigFlags(int configFlags); /*
ImGui::GetIO().ConfigFlags = configFlags; ImGui::GetIO().ConfigFlags = configFlags;
*/ */
// BackendFlags /**
// See ImGuiBackendFlags enum. Set by back-end to communicate features supported by the back-end. * See ImGuiBackendFlags enum. Set by back-end to communicate features supported by the back-end.
// */
public native int getBackendFlags(); /* public native int getBackendFlags(); /*
return ImGui::GetIO().BackendFlags; return ImGui::GetIO().BackendFlags;
*/ */
/**
* See ImGuiBackendFlags enum. Set by back-end to communicate features supported by the back-end.
*/
public native void setBackendFlags(int backendFlags); /* public native void setBackendFlags(int backendFlags); /*
ImGui::GetIO().BackendFlags = backendFlags; ImGui::GetIO().BackendFlags = backendFlags;
*/ */
// IniSavingRate /**
// Minimum time between saving positions/sizes to .ini file, in seconds. * Minimum time between saving positions/sizes to .ini file, in seconds.
// */
public native float getIniSavingRate(); /* public native float getIniSavingRate(); /*
return ImGui::GetIO().IniSavingRate; return ImGui::GetIO().IniSavingRate;
*/ */
/**
* Minimum time between saving positions/sizes to .ini file, in seconds.
*/
public native void setIniSavingRate(float iniSavingRate); /* public native void setIniSavingRate(float iniSavingRate); /*
ImGui::GetIO().IniSavingRate = iniSavingRate; ImGui::GetIO().IniSavingRate = iniSavingRate;
*/ */
// IniFilename /**
// Path to .ini file. Set NULL to disable automatic .ini loading/saving, if e.g. you want to manually load/save from memory. * Path to .ini file. Set NULL to disable automatic .ini loading/saving, if e.g. you want to manually load/save from memory.
// */
public native String getIniFilename(); /* public native String getIniFilename(); /*
return env->NewStringUTF(ImGui::GetIO().IniFilename); return env->NewStringUTF(ImGui::GetIO().IniFilename);
*/ */
/**
* Path to .ini file. Set NULL to disable automatic .ini loading/saving, if e.g. you want to manually load/save from memory.
*/
public native void setIniFilename(String iniFilename); /*MANUAL public native void setIniFilename(String iniFilename); /*MANUAL
ImGui::GetIO().IniFilename = obj_iniFilename == NULL ? NULL : (char*)env->GetStringUTFChars(obj_iniFilename, JNI_FALSE); ImGui::GetIO().IniFilename = obj_iniFilename == NULL ? NULL : (char*)env->GetStringUTFChars(obj_iniFilename, JNI_FALSE);
*/ */
// LogFilename /**
// Path to .log file (default parameter to ImGui::LogToFile when no file is specified). * Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
// */
public native String getLogFilename(); /* public native String getLogFilename(); /*
return env->NewStringUTF(ImGui::GetIO().LogFilename); return env->NewStringUTF(ImGui::GetIO().LogFilename);
*/ */
/**
* Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
*/
public native void setLogFilename(String logFilename); /*MANUAL public native void setLogFilename(String logFilename); /*MANUAL
ImGui::GetIO().LogFilename = obj_logFilename == NULL ? NULL : (char*)env->GetStringUTFChars(obj_logFilename, JNI_FALSE); ImGui::GetIO().LogFilename = obj_logFilename == NULL ? NULL : (char*)env->GetStringUTFChars(obj_logFilename, JNI_FALSE);
*/ */
// MouseDoubleClickTime /**
// Time for a double-click, in seconds. * Time for a double-click, in seconds.
// */
public native float getMouseDoubleClickTime(); /* public native float getMouseDoubleClickTime(); /*
return ImGui::GetIO().MouseDoubleClickTime; return ImGui::GetIO().MouseDoubleClickTime;
*/ */
/**
* Time for a double-click, in seconds.
*/
public native void setMouseDoubleClickTime(float mouseDoubleClickTime); /* public native void setMouseDoubleClickTime(float mouseDoubleClickTime); /*
ImGui::GetIO().MouseDoubleClickTime = mouseDoubleClickTime; ImGui::GetIO().MouseDoubleClickTime = mouseDoubleClickTime;
*/ */
// MouseDoubleClickTime /**
// Distance threshold to stay in to validate a double-click, in pixels. * Distance threshold to stay in to validate a double-click, in pixels.
// */
public native float getMouseDoubleClickMaxDist(); /* public native float getMouseDoubleClickMaxDist(); /*
return ImGui::GetIO().MouseDoubleClickTime; return ImGui::GetIO().MouseDoubleClickTime;
*/ */
/**
* Distance threshold to stay in to validate a double-click, in pixels.
*/
public native void setMouseDoubleClickMaxDist(float mouseDoubleClickMaxDist); /* public native void setMouseDoubleClickMaxDist(float mouseDoubleClickMaxDist); /*
ImGui::GetIO().MouseDoubleClickMaxDist = mouseDoubleClickMaxDist; ImGui::GetIO().MouseDoubleClickMaxDist = mouseDoubleClickMaxDist;
*/ */
// MouseDoubleClickTime /**
// Distance threshold before considering we are dragging. * Distance threshold before considering we are dragging.
*/
public native float getMouseDragThreshold(); /* public native float getMouseDragThreshold(); /*
return ImGui::GetIO().MouseDoubleClickTime; return ImGui::GetIO().MouseDoubleClickTime;
*/ */
/**
* Distance threshold before considering we are dragging.
*/
public native void setMouseDragThreshold(float mouseDragThreshold); /* public native void setMouseDragThreshold(float mouseDragThreshold); /*
ImGui::GetIO().MouseDragThreshold = mouseDragThreshold; ImGui::GetIO().MouseDragThreshold = mouseDragThreshold;
*/ */
// KeyMap /**
// Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state. * Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
// */
public native void getKeyMap(int[] buff); /* public native void getKeyMap(int[] buff); /*
for(int i = 0; i < ImGuiKey_COUNT; i++) for(int i = 0; i < ImGuiKey_COUNT; i++)
buff[i] = ImGui::GetIO().KeyMap[i]; buff[i] = ImGui::GetIO().KeyMap[i];
*/ */
/**
* Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
*/
public native int getKeyMap(int idx); /* public native int getKeyMap(int idx); /*
return ImGui::GetIO().KeyMap[idx]; return ImGui::GetIO().KeyMap[idx];
*/ */
/**
* Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
*/
public native void setKeyMap(int idx, int code); /* public native void setKeyMap(int idx, int code); /*
ImGui::GetIO().KeyMap[idx] = code; ImGui::GetIO().KeyMap[idx] = code;
*/ */
/**
* Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
*/
public native void setKeyMap(int[] keyMap); /* public native void setKeyMap(int[] keyMap); /*
for (int i = 0; i < ImGuiKey_COUNT; i++) for (int i = 0; i < ImGuiKey_COUNT; i++)
ImGui::GetIO().KeyMap[i] = keyMap[i]; ImGui::GetIO().KeyMap[i] = keyMap[i];
*/ */
// KeyRepeatDelay /**
// When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.). * When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
// */
public native float getKeyRepeatDelay(); /* public native float getKeyRepeatDelay(); /*
return ImGui::GetIO().KeyRepeatDelay; return ImGui::GetIO().KeyRepeatDelay;
*/ */
/**
* When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
*/
public native void setKeyRepeatDelay(float keyRepeatDelay); /* public native void setKeyRepeatDelay(float keyRepeatDelay); /*
ImGui::GetIO().KeyRepeatDelay = keyRepeatDelay; ImGui::GetIO().KeyRepeatDelay = keyRepeatDelay;
*/ */
// KeyRepeatRate /**
// When holding a key/button, rate at which it repeats, in seconds. * When holding a key/button, rate at which it repeats, in seconds.
// */
public native float getKeyRepeatRate(); /* public native float getKeyRepeatRate(); /*
return ImGui::GetIO().KeyRepeatRate; return ImGui::GetIO().KeyRepeatRate;
*/ */
/**
* When holding a key/button, rate at which it repeats, in seconds.
*/
public native void setKeyRepeatRate(float keyRepeatRate); /* public native void setKeyRepeatRate(float keyRepeatRate); /*
ImGui::GetIO().KeyRepeatRate = keyRepeatRate; ImGui::GetIO().KeyRepeatRate = keyRepeatRate;
*/ */
@@ -223,73 +263,96 @@ public final class ImGuiIO {
// Miscellaneous options // Miscellaneous options
// MouseDrawCursor /**
// Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). * Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).
// Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by back-end implementations. * Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by back-end implementations.
// */
public native boolean getMouseDrawCursor(); /* public native boolean getMouseDrawCursor(); /*
return ImGui::GetIO().MouseDrawCursor; return ImGui::GetIO().MouseDrawCursor;
*/ */
/**
* Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).
* Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by back-end implementations.
*/
public native void setMouseDrawCursor(boolean mouseDrawCursor); /* public native void setMouseDrawCursor(boolean mouseDrawCursor); /*
ImGui::GetIO().MouseDrawCursor = mouseDrawCursor; ImGui::GetIO().MouseDrawCursor = mouseDrawCursor;
*/ */
// ConfigMacOSXBehaviors /**
// OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, * OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl,
// Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, * Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text,
// Multi-selection in lists uses Cmd/Super instead of Ctrl (was called io.OptMacOSXBehaviors prior to 1.63) * Multi-selection in lists uses Cmd/Super instead of Ctrl (was called io.OptMacOSXBehaviors prior to 1.63)
// */
public native boolean getConfigMacOSXBehaviors(); /* public native boolean getConfigMacOSXBehaviors(); /*
return ImGui::GetIO().ConfigMacOSXBehaviors; return ImGui::GetIO().ConfigMacOSXBehaviors;
*/ */
/**
* OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl,
* Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text,
* Multi-selection in lists uses Cmd/Super instead of Ctrl (was called io.OptMacOSXBehaviors prior to 1.63)
*/
public native void setConfigMacOSXBehaviors(boolean configMacOSXBehaviors); /* public native void setConfigMacOSXBehaviors(boolean configMacOSXBehaviors); /*
ImGui::GetIO().ConfigMacOSXBehaviors = configMacOSXBehaviors; ImGui::GetIO().ConfigMacOSXBehaviors = configMacOSXBehaviors;
*/ */
// ConfigInputTextCursorBlink /**
// Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63) * Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63)
// */
public native boolean getConfigInputTextCursorBlink(); /* public native boolean getConfigInputTextCursorBlink(); /*
return ImGui::GetIO().ConfigInputTextCursorBlink; return ImGui::GetIO().ConfigInputTextCursorBlink;
*/ */
/**
* Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63)
*/
public native void setConfigInputTextCursorBlink(boolean configInputTextCursorBlink); /* public native void setConfigInputTextCursorBlink(boolean configInputTextCursorBlink); /*
ImGui::GetIO().ConfigInputTextCursorBlink = configInputTextCursorBlink; ImGui::GetIO().ConfigInputTextCursorBlink = configInputTextCursorBlink;
*/ */
// ConfigWindowsResizeFromEdges /**
// Enable resizing of windows from their edges and from the lower-left corner. * Enable resizing of windows from their edges and from the lower-left corner.
// This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. * This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback.
// (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag) * (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
// */
public native boolean getConfigWindowsResizeFromEdges(); /* public native boolean getConfigWindowsResizeFromEdges(); /*
return ImGui::GetIO().ConfigWindowsResizeFromEdges; return ImGui::GetIO().ConfigWindowsResizeFromEdges;
*/ */
/**
* Enable resizing of windows from their edges and from the lower-left corner.
* This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback.
* (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
*/
public native void setConfigWindowsResizeFromEdges(boolean configWindowsResizeFromEdges); /* public native void setConfigWindowsResizeFromEdges(boolean configWindowsResizeFromEdges); /*
ImGui::GetIO().ConfigWindowsResizeFromEdges = configWindowsResizeFromEdges; ImGui::GetIO().ConfigWindowsResizeFromEdges = configWindowsResizeFromEdges;
*/ */
// ConfigWindowsMoveFromTitleBarOnly /**
// [BETA] Set to true to only allow moving windows when clicked+dragged from the title bar. Windows without a title bar are not affected. * [BETA] Set to true to only allow moving windows when clicked+dragged from the title bar. Windows without a title bar are not affected.
// */
public native boolean getConfigWindowsMoveFromTitleBarOnly(); /* public native boolean getConfigWindowsMoveFromTitleBarOnly(); /*
return ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly; return ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly;
*/ */
/**
* [BETA] Set to true to only allow moving windows when clicked+dragged from the title bar. Windows without a title bar are not affected.
*/
public native void setConfigWindowsMoveFromTitleBarOnly(boolean configWindowsMoveFromTitleBarOnly); /* public native void setConfigWindowsMoveFromTitleBarOnly(boolean configWindowsMoveFromTitleBarOnly); /*
ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly = configWindowsMoveFromTitleBarOnly; ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly = configWindowsMoveFromTitleBarOnly;
*/ */
// ConfigWindowsMemoryCompactTimer /**
// [BETA] Compact window memory usage when unused. Set to -1.0f to disable. * [BETA] Compact window memory usage when unused. Set to -1.0f to disable.
// */
public native float getConfigWindowsMemoryCompactTimer(); /* public native float getConfigWindowsMemoryCompactTimer(); /*
return ImGui::GetIO().ConfigWindowsMemoryCompactTimer; return ImGui::GetIO().ConfigWindowsMemoryCompactTimer;
*/ */
/**
* [BETA] Compact window memory usage when unused. Set to -1.0f to disable.
*/
public native void setConfigWindowsMemoryCompactTimer(float configWindowsMemoryCompactTimer); /* public native void setConfigWindowsMemoryCompactTimer(float configWindowsMemoryCompactTimer); /*
ImGui::GetIO().ConfigWindowsMemoryCompactTimer = configWindowsMemoryCompactTimer; ImGui::GetIO().ConfigWindowsMemoryCompactTimer = configWindowsMemoryCompactTimer;
*/ */
@@ -298,23 +361,30 @@ public final class ImGuiIO {
// Platform Functions // Platform Functions
//------------------------------------------------------------------ //------------------------------------------------------------------
// BackendPlatformName /**
// Optional: Platform/Renderer back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff. * Optional: Platform back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff.
// */
public native String getBackendPlatformName(); /* public native String getBackendPlatformName(); /*
return env -> NewStringUTF(ImGui::GetIO().BackendPlatformName); return env -> NewStringUTF(ImGui::GetIO().BackendPlatformName);
*/ */
/**
* Optional: Platform back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff.
*/
public native void setBackendPlatformName(String backendPlatformName); /*MANUAL public native void setBackendPlatformName(String backendPlatformName); /*MANUAL
ImGui::GetIO().BackendPlatformName = obj_backendPlatformName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_backendPlatformName, JNI_FALSE); ImGui::GetIO().BackendPlatformName = obj_backendPlatformName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_backendPlatformName, JNI_FALSE);
*/ */
// BackendRendererName /**
// * Optional: Renderer back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff.
*/
public native String getBackendRendererName(); /* public native String getBackendRendererName(); /*
return env -> NewStringUTF(ImGui::GetIO().BackendRendererName); return env -> NewStringUTF(ImGui::GetIO().BackendRendererName);
*/ */
/**
* Optional: Renderer back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff.
*/
public native void setBackendRendererName(String backendRendererName); /*MANUAL public native void setBackendRendererName(String backendRendererName); /*MANUAL
ImGui::GetIO().BackendRendererName = obj_backendRendererName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_backendRendererName, JNI_FALSE); ImGui::GetIO().BackendRendererName = obj_backendRendererName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_backendRendererName, JNI_FALSE);
*/ */
@@ -359,160 +429,220 @@ public final class ImGuiIO {
// Input - Fill before calling NewFrame() // Input - Fill before calling NewFrame()
//------------------------------------------------------------------ //------------------------------------------------------------------
// DisplaySize /**
// Main display size, in pixels. * Main display size, in pixels.
// BINDING NOTICE: This should be a "Config" part, but since those values may be different for every frame I don't see how it is possible to set them only once. * <p>
// * BINDING NOTICE: This should be a "Config" part, but since those values may be different for every frame I don't see how it is possible to set them only once.
*/
public native void getDisplaySize(ImVec2 dstImVec2); /* public native void getDisplaySize(ImVec2 dstImVec2); /*
Jni::ImVec2Cpy(env, &ImGui::GetIO().DisplaySize, dstImVec2); Jni::ImVec2Cpy(env, &ImGui::GetIO().DisplaySize, dstImVec2);
*/ */
/**
* Main display size, in pixels.
* <p>
* BINDING NOTICE: This should be a "Config" part, but since those values may be different for every frame I don't see how it is possible to set them only once.
*/
public native void setDisplaySize(float x, float y); /* public native void setDisplaySize(float x, float y); /*
ImGui::GetIO().DisplaySize.x = x; ImGui::GetIO().DisplaySize.x = x;
ImGui::GetIO().DisplaySize.y = y; ImGui::GetIO().DisplaySize.y = y;
*/ */
// DisplayFramebufferScale /**
// For retina display or other situations where window coordinates are different from framebuffer coordinates. This generally ends up in ImDrawData::FramebufferScale. * For retina display or other situations where window coordinates are different from framebuffer coordinates. This generally ends up in ImDrawData::FramebufferScale.
// BINDING NOTICE: This should be a "Config" part, but since those values may be different for every frame I don't see how it is possible to set them only once. * <p>
// * BINDING NOTICE: This should be a "Config" part, but since those values may be different for every frame I don't see how it is possible to set them only once.
*/
public native void getDisplayFramebufferScale(ImVec2 dstImVec2); /* public native void getDisplayFramebufferScale(ImVec2 dstImVec2); /*
Jni::ImVec2Cpy(env, &ImGui::GetIO().DisplayFramebufferScale, dstImVec2); Jni::ImVec2Cpy(env, &ImGui::GetIO().DisplayFramebufferScale, dstImVec2);
*/ */
/**
* For retina display or other situations where window coordinates are different from framebuffer coordinates. This generally ends up in ImDrawData::FramebufferScale.
* <p>
* BINDING NOTICE: This should be a "Config" part, but since those values may be different for every frame I don't see how it is possible to set them only once.
*/
public native void setDisplayFramebufferScale(float x, float y); /* public native void setDisplayFramebufferScale(float x, float y); /*
ImGui::GetIO().DisplayFramebufferScale.x = x; ImGui::GetIO().DisplayFramebufferScale.x = x;
ImGui::GetIO().DisplayFramebufferScale.y = y; ImGui::GetIO().DisplayFramebufferScale.y = y;
*/ */
// DeltaTime /**
// Time elapsed since last frame, in seconds. * Time elapsed since last frame, in seconds.
// BINDING NOTICE: Same as for DisplaySize. This should be modified every frame. * <p>
// * BINDING NOTICE: Same as for DisplaySize. This should be modified every frame.
*/
public native float getDeltaTime(); /* public native float getDeltaTime(); /*
return ImGui::GetIO().DeltaTime; return ImGui::GetIO().DeltaTime;
*/ */
/**
* Time elapsed since last frame, in seconds.
* <p>
* BINDING NOTICE: Same as for DisplaySize. This should be modified every frame.
*/
public native void setDeltaTime(float deltaTime); /* public native void setDeltaTime(float deltaTime); /*
ImGui::GetIO().DeltaTime = deltaTime; ImGui::GetIO().DeltaTime = deltaTime;
*/ */
// MousePos /**
// Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.) * Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.)
// */
public native void getMousePos(ImVec2 dstImVec2); /* public native void getMousePos(ImVec2 dstImVec2); /*
Jni::ImVec2Cpy(env, &ImGui::GetIO().MousePos, dstImVec2); Jni::ImVec2Cpy(env, &ImGui::GetIO().MousePos, dstImVec2);
*/ */
/**
* Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.)
*/
public native void setMousePos(float x, float y); /* public native void setMousePos(float x, float y); /*
ImGui::GetIO().MousePos.x = x; ImGui::GetIO().MousePos.x = x;
ImGui::GetIO().MousePos.y = y; ImGui::GetIO().MousePos.y = y;
*/ */
// MouseDown /**
// Mouse buttons: 0=left, 1=right, 2=middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). * Mouse buttons: 0=left, 1=right, 2=middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button).
// Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. * Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
// */
public native void getMouseDown(boolean[] buff); /* public native void getMouseDown(boolean[] buff); /*
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
buff[i] = ImGui::GetIO().MouseDown[i]; buff[i] = ImGui::GetIO().MouseDown[i];
*/ */
/**
* Mouse buttons: 0=left, 1=right, 2=middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button).
* Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
*/
public native boolean getMouseDown(int idx); /* public native boolean getMouseDown(int idx); /*
return ImGui::GetIO().MouseDown[idx]; return ImGui::GetIO().MouseDown[idx];
*/ */
/**
* Mouse buttons: 0=left, 1=right, 2=middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button).
* Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
*/
public native void setMouseDown(int idx, boolean down); /* public native void setMouseDown(int idx, boolean down); /*
ImGui::GetIO().MouseDown[idx] = down; ImGui::GetIO().MouseDown[idx] = down;
*/ */
/**
* Mouse buttons: 0=left, 1=right, 2=middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button).
* Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
*/
public native void setMouseDown(boolean[] mouseDown); /* public native void setMouseDown(boolean[] mouseDown); /*
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
ImGui::GetIO().MouseDown[i] = mouseDown[i]; ImGui::GetIO().MouseDown[i] = mouseDown[i];
*/ */
// MouseWheel /**
// Mouse wheel Vertical: 1 unit scrolls about 5 lines text. * Mouse wheel Vertical: 1 unit scrolls about 5 lines text.
// */
public native float getMouseWheel(); /* public native float getMouseWheel(); /*
return ImGui::GetIO().MouseWheel; return ImGui::GetIO().MouseWheel;
*/ */
/**
* Mouse wheel Vertical: 1 unit scrolls about 5 lines text.
*/
public native void setMouseWheel(float mouseDeltaY); /* public native void setMouseWheel(float mouseDeltaY); /*
ImGui::GetIO().MouseWheel = mouseDeltaY; ImGui::GetIO().MouseWheel = mouseDeltaY;
*/ */
// MouseWheelH /**
// Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all back-ends. * Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all back-ends.
// */
public native float getMouseWheelH(); /* public native float getMouseWheelH(); /*
return ImGui::GetIO().MouseWheelH; return ImGui::GetIO().MouseWheelH;
*/ */
/**
* Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all back-ends.
*/
public native void setMouseWheelH(float mouseDeltaX); /* public native void setMouseWheelH(float mouseDeltaX); /*
ImGui::GetIO().MouseWheelH = mouseDeltaX; ImGui::GetIO().MouseWheelH = mouseDeltaX;
*/ */
// KeyCtrl /**
// Keyboard modifier pressed: Control * Keyboard modifier pressed: Control
// */
public native boolean getKeyCtrl(); /* public native boolean getKeyCtrl(); /*
return ImGui::GetIO().KeyCtrl; return ImGui::GetIO().KeyCtrl;
*/ */
/**
* Keyboard modifier pressed: Control
*/
public native void setKeyCtrl(boolean value); /* public native void setKeyCtrl(boolean value); /*
ImGui::GetIO().KeyCtrl = value; ImGui::GetIO().KeyCtrl = value;
*/ */
// KeyShift /**
// Keyboard modifier pressed: Shift * Keyboard modifier pressed: Shift
// */
public native boolean getKeyShift(); /* public native boolean getKeyShift(); /*
return ImGui::GetIO().KeyShift; return ImGui::GetIO().KeyShift;
*/ */
/**
* Keyboard modifier pressed: Shift
*/
public native void setKeyShift(boolean value); /* public native void setKeyShift(boolean value); /*
ImGui::GetIO().KeyShift = value; ImGui::GetIO().KeyShift = value;
*/ */
// KeyAlt /**
// Keyboard modifier pressed: Alt * Keyboard modifier pressed: Alt
// */
public native boolean getKeyAlt(); /* public native boolean getKeyAlt(); /*
return ImGui::GetIO().KeyAlt; return ImGui::GetIO().KeyAlt;
*/ */
/**
* Keyboard modifier pressed: Alt
*/
public native void setKeyAlt(boolean value); /* public native void setKeyAlt(boolean value); /*
ImGui::GetIO().KeyAlt = value; ImGui::GetIO().KeyAlt = value;
*/ */
// KeySuper /**
// Keyboard modifier pressed: Cmd/Super/Windows * Keyboard modifier pressed: Cmd/Super/Windows
// */
public native boolean getKeySuper(); /* public native boolean getKeySuper(); /*
return ImGui::GetIO().KeySuper; return ImGui::GetIO().KeySuper;
*/ */
/**
* Keyboard modifier pressed: Cmd/Super/Windows
*/
public native void setKeySuper(boolean value); /* public native void setKeySuper(boolean value); /*
ImGui::GetIO().KeySuper = value; ImGui::GetIO().KeySuper = value;
*/ */
// KeysDown /**
// Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys). * Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
// */
public native void getKeysDown(boolean[] buff); /* public native void getKeysDown(boolean[] buff); /*
for (int i = 0; i < 512; i++) for (int i = 0; i < 512; i++)
buff[i] = ImGui::GetIO().KeysDown[i]; buff[i] = ImGui::GetIO().KeysDown[i];
*/ */
/**
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
*/
public native boolean getKeysDown(int idx); /* public native boolean getKeysDown(int idx); /*
return ImGui::GetIO().KeysDown[idx]; return ImGui::GetIO().KeysDown[idx];
*/ */
/**
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
*/
public native void setKeysDown(int idx, boolean pressed); /* public native void setKeysDown(int idx, boolean pressed); /*
ImGui::GetIO().KeysDown[idx] = pressed; ImGui::GetIO().KeysDown[idx] = pressed;
*/ */
/**
* Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
*/
public native void setKeysDown(boolean[] keysDown); /* public native void setKeysDown(boolean[] keysDown); /*
for (int i = 0; i < 512; i++) for (int i = 0; i < 512; i++)
ImGui::GetIO().KeysDown[i] = keysDown[i]; ImGui::GetIO().KeysDown[i] = keysDown[i];
@@ -522,161 +652,208 @@ public final class ImGuiIO {
// Output - Retrieve after calling NewFrame() // Output - Retrieve after calling NewFrame()
//------------------------------------------------------------------ //------------------------------------------------------------------
// WantCaptureMouse /**
// When io.WantCaptureMouse is true, imgui will use the mouse inputs, do not dispatch them to your main game/application (in both cases, always pass on mouse inputs to imgui). * When io.WantCaptureMouse is true, imgui will use the mouse inputs, do not dispatch them to your main game/application (in both cases, always pass on mouse inputs to imgui).
// (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.). * (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
// */
public native boolean getWantCaptureMouse(); /* public native boolean getWantCaptureMouse(); /*
return ImGui::GetIO().WantCaptureMouse; return ImGui::GetIO().WantCaptureMouse;
*/ */
/**
* When io.WantCaptureMouse is true, imgui will use the mouse inputs, do not dispatch them to your main game/application (in both cases, always pass on mouse inputs to imgui).
* (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
*/
public native void setWantCaptureMouse(boolean wantCaptureMouse); /* public native void setWantCaptureMouse(boolean wantCaptureMouse); /*
ImGui::GetIO().WantCaptureMouse = wantCaptureMouse; ImGui::GetIO().WantCaptureMouse = wantCaptureMouse;
*/ */
// WantCaptureKeyboard /**
// When io.WantCaptureKeyboard is true, imgui will use the keyboard inputs, do not dispatch them to your main game/application (in both cases, always pass keyboard inputs to imgui). * When io.WantCaptureKeyboard is true, imgui will use the keyboard inputs, do not dispatch them to your main game/application (in both cases, always pass keyboard inputs to imgui).
// (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.). * (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
// */
public native boolean getWantCaptureKeyboard(); /* public native boolean getWantCaptureKeyboard(); /*
return ImGui::GetIO().WantCaptureKeyboard; return ImGui::GetIO().WantCaptureKeyboard;
*/ */
/**
* When io.WantCaptureKeyboard is true, imgui will use the keyboard inputs, do not dispatch them to your main game/application (in both cases, always pass keyboard inputs to imgui).
* (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
*/
public native void setWantCaptureKeyboard(boolean wantCaptureKeyboard); /* public native void setWantCaptureKeyboard(boolean wantCaptureKeyboard); /*
ImGui::GetIO().WantCaptureKeyboard = wantCaptureKeyboard; ImGui::GetIO().WantCaptureKeyboard = wantCaptureKeyboard;
*/ */
// WantTextInput /**
// Mobile/console: when io.WantTextInput is true, you may display an on-screen keyboard. * Mobile/console: when io.WantTextInput is true, you may display an on-screen keyboard.
// This is set by ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active). * This is set by ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
// */
public native boolean getWantTextInput(); /* public native boolean getWantTextInput(); /*
return ImGui::GetIO().WantTextInput; return ImGui::GetIO().WantTextInput;
*/ */
/**
* Mobile/console: when io.WantTextInput is true, you may display an on-screen keyboard.
* This is set by ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
*/
public native void setWantTextInput(boolean wantTextInput); /* public native void setWantTextInput(boolean wantTextInput); /*
ImGui::GetIO().WantTextInput = wantTextInput; ImGui::GetIO().WantTextInput = wantTextInput;
*/ */
// WantSetMousePos /**
// MousePos has been altered, back-end should reposition mouse on next frame. Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled. * MousePos has been altered, back-end should reposition mouse on next frame. Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.
// */
public native boolean getWantSetMousePos(); /* public native boolean getWantSetMousePos(); /*
return ImGui::GetIO().WantSetMousePos; return ImGui::GetIO().WantSetMousePos;
*/ */
/**
* MousePos has been altered, back-end should reposition mouse on next frame. Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.
*/
public native void setWantSetMousePos(boolean wantSetMousePos); /* public native void setWantSetMousePos(boolean wantSetMousePos); /*
ImGui::GetIO().WantSetMousePos = wantSetMousePos; ImGui::GetIO().WantSetMousePos = wantSetMousePos;
*/ */
// WantSaveIniSettings /**
// When manual .ini load/save is active (io.IniFilename == NULL), * When manual .ini load/save is active (io.IniFilename == NULL),
// this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. * this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself.
// IMPORTANT: You need to clear io.WantSaveIniSettings yourself. * IMPORTANT: You need to clear io.WantSaveIniSettings yourself.
// */
public native boolean getWantSaveIniSettings(); /* public native boolean getWantSaveIniSettings(); /*
return ImGui::GetIO().WantSaveIniSettings; return ImGui::GetIO().WantSaveIniSettings;
*/ */
/**
* When manual .ini load/save is active (io.IniFilename == NULL),
* this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself.
* IMPORTANT: You need to clear io.WantSaveIniSettings yourself.
*/
public native void setWantSaveIniSettings(boolean wantSaveIniSettings); /* public native void setWantSaveIniSettings(boolean wantSaveIniSettings); /*
ImGui::GetIO().WantSaveIniSettings = wantSaveIniSettings; ImGui::GetIO().WantSaveIniSettings = wantSaveIniSettings;
*/ */
// NavActive /**
// Directional navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag. * Directional navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
// */
public native boolean getNavActive(); /* public native boolean getNavActive(); /*
return ImGui::GetIO().NavActive; return ImGui::GetIO().NavActive;
*/ */
/**
* Directional navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
*/
public native void setNavActive(boolean navActive); /* public native void setNavActive(boolean navActive); /*
ImGui::GetIO().NavActive = navActive; ImGui::GetIO().NavActive = navActive;
*/ */
// NavVisible /**
// Directional navigation is visible and allowed (will handle ImGuiKey_NavXXX events). * Directional navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
// */
public native boolean getNavVisible(); /* public native boolean getNavVisible(); /*
return ImGui::GetIO().NavVisible; return ImGui::GetIO().NavVisible;
*/ */
/**
* Directional navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
*/
public native void setNavVisible(boolean navVisible); /* public native void setNavVisible(boolean navVisible); /*
ImGui::GetIO().NavVisible = navVisible; ImGui::GetIO().NavVisible = navVisible;
*/ */
// Framerate /**
// Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames * Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
// */
public native float getFramerate(); /* public native float getFramerate(); /*
return ImGui::GetIO().Framerate; return ImGui::GetIO().Framerate;
*/ */
/**
* Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
*/
public native void setFramerate(float framerate); /* public native void setFramerate(float framerate); /*
ImGui::GetIO().Framerate = framerate; ImGui::GetIO().Framerate = framerate;
*/ */
// MetricsRenderVertices /**
// Vertices output during last call to Render() * Vertices output during last call to Render()
// */
public native int getMetricsRenderVertices(); /* public native int getMetricsRenderVertices(); /*
return ImGui::GetIO().MetricsRenderVertices; return ImGui::GetIO().MetricsRenderVertices;
*/ */
/**
* Vertices output during last call to Render()
*/
public native void setMetricsRenderVertices(int metricsRenderVertices); /* public native void setMetricsRenderVertices(int metricsRenderVertices); /*
ImGui::GetIO().MetricsRenderVertices = metricsRenderVertices; ImGui::GetIO().MetricsRenderVertices = metricsRenderVertices;
*/ */
// MetricsRenderIndices /**
// Indices output during last call to Render() = number of triangles * 3 * Indices output during last call to Render() = number of triangles * 3
// */
public native int getMetricsRenderIndices(); /* public native int getMetricsRenderIndices(); /*
return ImGui::GetIO().MetricsRenderIndices; return ImGui::GetIO().MetricsRenderIndices;
*/ */
/**
* Indices output during last call to Render() = number of triangles * 3
*/
public native void setMetricsRenderIndices(int metricsRenderIndices); /* public native void setMetricsRenderIndices(int metricsRenderIndices); /*
ImGui::GetIO().MetricsRenderIndices = metricsRenderIndices; ImGui::GetIO().MetricsRenderIndices = metricsRenderIndices;
*/ */
// MetricsRenderWindows /**
// Number of visible windows * Number of visible windows
// */
public native int getMetricsRenderWindows(); /* public native int getMetricsRenderWindows(); /*
return ImGui::GetIO().MetricsRenderWindows; return ImGui::GetIO().MetricsRenderWindows;
*/ */
/**
* Number of visible windows
*/
public native void setMetricsRenderWindows(int metricsRenderWindows); /* public native void setMetricsRenderWindows(int metricsRenderWindows); /*
ImGui::GetIO().MetricsRenderWindows = metricsRenderWindows; ImGui::GetIO().MetricsRenderWindows = metricsRenderWindows;
*/ */
// MetricsActiveWindows /**
// Number of active windows * Number of active windows
// */
public native int getMetricsActiveWindows(); /* public native int getMetricsActiveWindows(); /*
return ImGui::GetIO().MetricsActiveWindows; return ImGui::GetIO().MetricsActiveWindows;
*/ */
/**
* Number of active windows
*/
public native void setMetricsActiveWindows(int metricsActiveWindows); /* public native void setMetricsActiveWindows(int metricsActiveWindows); /*
ImGui::GetIO().MetricsActiveWindows = metricsActiveWindows; ImGui::GetIO().MetricsActiveWindows = metricsActiveWindows;
*/ */
// MetricsActiveAllocations /**
// Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts. * Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
// */
public native int getMetricsActiveAllocations(); /* public native int getMetricsActiveAllocations(); /*
return ImGui::GetIO().MetricsActiveAllocations; return ImGui::GetIO().MetricsActiveAllocations;
*/ */
/**
* Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
*/
public native void setMetricsActiveAllocations(int metricsActiveAllocations); /* public native void setMetricsActiveAllocations(int metricsActiveAllocations); /*
ImGui::GetIO().MetricsActiveAllocations = metricsActiveAllocations; ImGui::GetIO().MetricsActiveAllocations = metricsActiveAllocations;
*/ */
// MouseDelta /**
// Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta. * Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
// */
public native void getMouseDelta(ImVec2 dstImVec2); /* public native void getMouseDelta(ImVec2 dstImVec2); /*
Jni::ImVec2Cpy(env, &ImGui::GetIO().MouseDelta, dstImVec2); Jni::ImVec2Cpy(env, &ImGui::GetIO().MouseDelta, dstImVec2);
*/ */
/**
* Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
*/
public native void setMouseDelta(float x, float y); /* public native void setMouseDelta(float x, float y); /*
ImGui::GetIO().MouseDelta.x = x; ImGui::GetIO().MouseDelta.x = x;
ImGui::GetIO().MouseDelta.y = y; ImGui::GetIO().MouseDelta.y = y;