Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/GHOST_C-api.h
| Show First 20 Lines • Show All 907 Lines • ▼ Show 20 Lines | |||||
| extern float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle); | extern float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle); | ||||
| /** | /** | ||||
| * Returns the suggested DPI for this window. | * Returns the suggested DPI for this window. | ||||
| */ | */ | ||||
| extern GHOST_TUns16 GHOST_GetDPIHint(GHOST_WindowHandle windowhandle); | extern GHOST_TUns16 GHOST_GetDPIHint(GHOST_WindowHandle windowhandle); | ||||
| /** | /** | ||||
| * Enable IME attached to the given window, i.e. allows user-input | * Return whether input method needs spot location to be set. Typically, | ||||
| * events to be dispatched to the IME. | * calling GHOST_EndIM() and GHOST_BeginIM() resets the spot location, | ||||
| * so the return value becomes true after that. This function makes sense | |||||
| * only for over-the-spot input style. | |||||
| * \param windowhandle Window handle of the caller | * \param windowhandle Window handle of the caller | ||||
| * \param x Requested x-coordinate of the rectangle | * \return true if spot location needs to be set, false if not | ||||
| * \param y Requested y-coordinate of the rectangle | |||||
| * \param w Requested width of the rectangle | |||||
| * \param h Requested height of the rectangle | |||||
| * \param complete Whether or not to complete the ongoing composition | |||||
| * true: Start a new composition | |||||
| * false: Move the IME windows to the given position without finishing it. | |||||
| */ | */ | ||||
| extern void GHOST_BeginIME(GHOST_WindowHandle windowhandle, | extern int GHOST_IsIMSpotNeeded(GHOST_WindowHandle windowhandle); | ||||
| GHOST_TInt32 x, | |||||
| GHOST_TInt32 y, | /** | ||||
| GHOST_TInt32 w, | * Start modal input. After this function call, GHOST_BeginIM(), GHOST_EndIM(), | ||||
| GHOST_TInt32 h, | * and GHOST_SetIMSpot() do nothing until calling GHOST_UnsetIMModal(). | ||||
| int complete); | * \param windowhandle Window handle of the caller | ||||
| */ | |||||
| extern void GHOST_SetIMModal(GHOST_WindowHandle windowhandle); | |||||
| /** | |||||
| * End modal input. After this function call, GHOST_BeginIM(), GHOST_EndIM(), | |||||
| * and GHOST_SetIMSpot() works normally. | |||||
| * \param windowhandle Window handle of the caller | |||||
| */ | |||||
| extern void GHOST_UnsetIMModal(GHOST_WindowHandle windowhandle); | |||||
| /** | |||||
| * Set spot location of input method, used for placing composition window. | |||||
| * This takes effect when the input method server supports over-the-spot or | |||||
| * on-the-spot input style. | |||||
| * \param windowhandle Window handle of the caller | |||||
| * \param x Requested x-coordinate that the preedit window will be placed | |||||
| * \param y Requested y-coordinate that the preedit window will be placed | |||||
| */ | |||||
| extern void GHOST_SetIMSpot(GHOST_WindowHandle windowhandle, GHOST_TInt32 x, GHOST_TInt32 y, GHOST_TInt32 h); | |||||
| /** | |||||
| * Enable input method attached to the given window, i.e. allows user-input | |||||
| * events to be dispatched to the input method server. | |||||
| * \param windowhandle Window handle of the caller | |||||
| */ | |||||
| extern void GHOST_BeginIM(GHOST_WindowHandle windowhandle); | |||||
| /** | /** | ||||
| * Disable the IME attached to the given window, i.e. prohibits any user-input | * Disable the input method attached to the given window, i.e. prohibits any | ||||
| * events from being dispatched to the IME. | * user-input events from being dispatched to the input method server. | ||||
| * \param windowhandle The window handle of the caller | * \param windowhandle The window handle of the caller | ||||
| */ | */ | ||||
| extern void GHOST_EndIME(GHOST_WindowHandle windowhandle); | extern void GHOST_EndIM(GHOST_WindowHandle windowhandle); | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
| #endif | #endif | ||||