Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_WindowViewCocoa.h
| Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | struct { | ||||
| std::string combined_result; | std::string combined_result; | ||||
| } ime; | } ime; | ||||
| #endif | #endif | ||||
| } | } | ||||
| - (void)setSystemAndWindowCocoa:(GHOST_SystemCocoa *)sysCocoa | - (void)setSystemAndWindowCocoa:(GHOST_SystemCocoa *)sysCocoa | ||||
| windowCocoa:(GHOST_WindowCocoa *)winCocoa; | windowCocoa:(GHOST_WindowCocoa *)winCocoa; | ||||
| #ifdef WITH_INPUT_IME | #ifdef WITH_INPUT_IME | ||||
| - (void)beginIME:(GHOST_TInt32)x | - (void)beginIME:(int32_t)x | ||||
| y:(GHOST_TInt32)y | y:(int32_t)y | ||||
| w:(GHOST_TInt32)w | w:(int32_t)w | ||||
| h:(GHOST_TInt32)h | h:(int32_t)h | ||||
| completed:(bool)completed; | completed:(bool)completed; | ||||
| - (void)endIME; | - (void)endIME; | ||||
| #endif | #endif | ||||
| @end | @end | ||||
| @implementation COCOA_VIEW_CLASS | @implementation COCOA_VIEW_CLASS | ||||
| ▲ Show 20 Lines • Show All 364 Lines • ▼ Show 20 Lines | - (void)checkImeEnabled | ||||
| return; | return; | ||||
| } | } | ||||
| - (void)ImeDidChangeCallback:(NSNotification *)notification | - (void)ImeDidChangeCallback:(NSNotification *)notification | ||||
| { | { | ||||
| [self checkImeEnabled]; | [self checkImeEnabled]; | ||||
| } | } | ||||
| - (void)setImeCandidateWinPos:(GHOST_TInt32)x y:(GHOST_TInt32)y w:(GHOST_TInt32)w h:(GHOST_TInt32)h | - (void)setImeCandidateWinPos:(int32_t)x y:(int32_t)y w:(int32_t)w h:(int32_t)h | ||||
| { | { | ||||
| GHOST_TInt32 outX, outY; | int32_t outX, outY; | ||||
| associatedWindow->clientToScreen(x, y, outX, outY); | associatedWindow->clientToScreen(x, y, outX, outY); | ||||
| ime.candidate_window_position = NSMakeRect((CGFloat)outX, (CGFloat)outY, (CGFloat)w, (CGFloat)h); | ime.candidate_window_position = NSMakeRect((CGFloat)outX, (CGFloat)outY, (CGFloat)w, (CGFloat)h); | ||||
| } | } | ||||
| - (void)beginIME:(GHOST_TInt32)x | - (void)beginIME:(int32_t)x | ||||
| y:(GHOST_TInt32)y | y:(int32_t)y | ||||
| w:(GHOST_TInt32)w | w:(int32_t)w | ||||
| h:(GHOST_TInt32)h | h:(int32_t)h | ||||
| completed:(bool)completed | completed:(bool)completed | ||||
| { | { | ||||
| ime.state_flag |= GHOST_IME_INPUT_FOCUSED; | ime.state_flag |= GHOST_IME_INPUT_FOCUSED; | ||||
| [self checkImeEnabled]; | [self checkImeEnabled]; | ||||
| [self setImeCandidateWinPos:x y:y w:w h:h]; | [self setImeCandidateWinPos:x y:y w:w h:h]; | ||||
| } | } | ||||
| - (void)endIME | - (void)endIME | ||||
| ▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines | |||||