Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_WindowCocoa.h
| Show All 23 Lines | |||||
| #pragma once | #pragma once | ||||
| #ifndef __APPLE__ | #ifndef __APPLE__ | ||||
| # error Apple OSX only! | # error Apple OSX only! | ||||
| #endif // __APPLE__ | #endif // __APPLE__ | ||||
| #include "GHOST_Window.h" | #include "GHOST_Window.h" | ||||
| #ifdef WITH_INPUT_IME | |||||
| # include "GHOST_Event.h" | |||||
| #endif | |||||
| @class CAMetalLayer; | @class CAMetalLayer; | ||||
| @class CocoaMetalView; | @class CocoaMetalView; | ||||
| @class CocoaOpenGLView; | @class CocoaOpenGLView; | ||||
| @class CocoaWindow; | @class CocoaWindow; | ||||
| @class NSCursor; | @class NSCursor; | ||||
| @class NSScreen; | @class NSScreen; | ||||
| ▲ Show 20 Lines • Show All 218 Lines • ▼ Show 20 Lines | public: | ||||
| { | { | ||||
| m_immediateDraw = value; | m_immediateDraw = value; | ||||
| } | } | ||||
| bool getImmediateDraw(void) const | bool getImmediateDraw(void) const | ||||
| { | { | ||||
| return m_immediateDraw; | return m_immediateDraw; | ||||
| } | } | ||||
| #ifdef WITH_INPUT_IME | |||||
| void beginIME(GHOST_TInt32 x, GHOST_TInt32 y, GHOST_TInt32 w, GHOST_TInt32 h, int completed); | |||||
| void endIME(); | |||||
| #endif /* WITH_INPUT_IME */ | |||||
| protected: | protected: | ||||
| /** | /** | ||||
| * \param type: The type of rendering context create. | * \param type: The type of rendering context create. | ||||
| * \return Indication of success. | * \return Indication of success. | ||||
| */ | */ | ||||
| GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type); | GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type); | ||||
| /** | /** | ||||
| ▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | protected: | ||||
| NSCursor *m_customCursor; | NSCursor *m_customCursor; | ||||
| GHOST_TabletData m_tablet; | GHOST_TabletData m_tablet; | ||||
| bool m_immediateDraw; | bool m_immediateDraw; | ||||
| bool m_debug_context; // for debug messages during context setup | bool m_debug_context; // for debug messages during context setup | ||||
| bool m_is_dialog; | bool m_is_dialog; | ||||
| }; | }; | ||||
| #ifdef WITH_INPUT_IME | |||||
| class GHOST_EventIME : public GHOST_Event { | |||||
| public: | |||||
| /** | |||||
| * Constructor. | |||||
| * \param msec: The time this event was generated. | |||||
| * \param type: The type of key event. | |||||
| * \param key: The key code of the key. | |||||
| */ | |||||
| GHOST_EventIME(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow *window, void *customdata) | |||||
| : GHOST_Event(msec, type, window) | |||||
| { | |||||
| this->m_data = customdata; | |||||
| } | |||||
| }; | |||||
| typedef int GHOST_ImeStateFlagCocoa; | |||||
| enum { | |||||
| INPUT_FOCUSED = (1 << 0), | |||||
| IME_ENABLED = (1 << 1), | |||||
| IME_COMPOSING = (1 << 2), | |||||
| KEY_CONTROLCHAR = (1 << 3), | |||||
| IME_COMPOSITION_EVENT = (1 << 4), // For Korean input | |||||
| IME_RESULT_EVENT = (1 << 5) // For Korean input | |||||
| }; | |||||
| #endif /* WITH_INPUT_IME */ | |||||
| No newline at end of file | |||||