Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuki Hashimoto <hzuika>2021-07-05 14:11:17 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-07-05 18:24:27 +0300
commit83e2f8c993dc8068eb1145e9b8f4756a54f96144 (patch)
tree5d3df9bb8e8f237c4336371f42f9bb2672107141 /source/blender/makesdna/DNA_windowmanager_types.h
parentac1ed19eaefe356a1ae2ff3bfb471f940231ce06 (diff)
macOS: support Japanese input for text buttons
Blender did not support to input East Asian characters (Chinese, Japanese, Korean) on macOS. This patch adds support for Japanese input, by implementing the appropriate processing for the NSTextInputClient protocol. Technical notes: * The conversion candidate window is drawn by the input method program calling `firstRectForCharacterRange`. * The string before confirmation (called `composite` in blender) is handled in the `setMarkedText` method called by the input method program. * The string after confirmation (called `result` in the blender) is processed in the `insertText` method called by the input method program. Ref T51283 Differential Revision: https://developer.blender.org/D11695
Diffstat (limited to 'source/blender/makesdna/DNA_windowmanager_types.h')
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index cb5c62e4507..94e89944f08 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -217,8 +217,8 @@ enum {
#define WM_KEYCONFIG_STR_DEFAULT "Blender"
-/* IME is win32 only! */
-#if !defined(WIN32) && !defined(DNA_DEPRECATED)
+/* IME is win32 and apple only! */
+#if !(defined(WIN32) || defined(__APPLE__)) && !defined(DNA_DEPRECATED)
# ifdef __GNUC__
# define ime_data ime_data __attribute__((deprecated))
# endif
@@ -302,7 +302,7 @@ typedef struct wmWindow {
struct wmGesture *tweak;
/* Input Method Editor data - complex character input (especially for Asian character input)
- * Currently WIN32, runtime-only data. */
+ * Currently WIN32 and APPLE, runtime-only data. */
struct wmIMEData *ime_data;
/** All events #wmEvent (ghost level events were handled). */