Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/GHOST_IWindow.h
| Show First 20 Lines • Show All 332 Lines • ▼ Show 20 Lines | public: | ||||
| virtual float getNativePixelSize(void) = 0; | virtual float getNativePixelSize(void) = 0; | ||||
| /** | /** | ||||
| * Returns the recommended DPI for this window. | * Returns the recommended DPI for this window. | ||||
| * \return The recommended DPI for this window. | * \return The recommended DPI for this window. | ||||
| */ | */ | ||||
| virtual GHOST_TUns16 getDPIHint() = 0; | virtual GHOST_TUns16 getDPIHint() = 0; | ||||
| #ifdef WITH_INPUT_IME | #ifdef WITH_IM_OVERTHESPOT | ||||
| /** | /** | ||||
| * 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 EndIM() and BeginIM() resets the spot location, so the return | ||||
| * \param x Requested x-coordinate of the rectangle | * value becomes true after that. This function makes sense only for | ||||
| * \param y Requested y-coordinate of the rectangle | * over-the-spot input style. | ||||
| * \param w Requested width of the rectangle | * \return true if spot location needs to be set, false if not | ||||
| * \param h Requested height of the rectangle | */ | ||||
| * \param complete Whether or not to complete the ongoing composition | virtual bool isIMSpotNeeded() = 0; | ||||
| * true: Start a new composition | #endif | ||||
| * false: Move the IME windows to the given position without finishing it. | |||||
| */ | #if defined(WITH_IM_OVERTHESPOT) || defined(WITH_IM_ONTHESPOT) | ||||
| virtual void beginIME( | /** | ||||
| GHOST_TInt32 x, GHOST_TInt32 y, | * Start modal input. After this function call, beginIM(), endIM(), | ||||
| GHOST_TInt32 w, GHOST_TInt32 h, | * and setIMSpot() do nothing until calling unsetIMModal(). | ||||
| int completed) = 0; | */ | ||||
| virtual void setIMModal() = 0; | |||||
| /** | |||||
| * End modal input. After this function call, beginIM(), endIM(), | |||||
| * and setIMSpot() works normally. | |||||
| */ | |||||
| virtual void unsetIMModal() = 0; | |||||
| /** | |||||
| * 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 x Requested x-coordinate that the preedit window will be placed | |||||
| * \param y Requested y-coordinate that the preedit window will be placed | |||||
| */ | |||||
| virtual void setIMSpot(GHOST_TInt32 x, GHOST_TInt32 y, GHOST_TInt32 h) = 0; | |||||
| /** | |||||
| * Enable input method attached to the given window, i.e. allows user-input | |||||
| * events to be dispatched to the input method server. | |||||
| */ | |||||
| virtual void beginIM() = 0; | |||||
| /** | /** | ||||
| * 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. | ||||
| */ | */ | ||||
| virtual void endIME() = 0; | virtual void endIM() = 0; | ||||
| #endif /* WITH_INPUT_IME */ | #endif /* defined(WITH_IM_OVERTHESPOT) || defined(WITH_IM_ONTHESPOT) */ | ||||
| #ifdef WITH_CXX_GUARDEDALLOC | #ifdef WITH_CXX_GUARDEDALLOC | ||||
| MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IWindow") | MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IWindow") | ||||
| #endif | #endif | ||||
| }; | }; | ||||
| #endif // __GHOST_IWINDOW_H__ | #endif // __GHOST_IWINDOW_H__ | ||||