[Bf-blender-cvs] [23c7716] input_method_editor: Cleanup: Whitespace, Comments, etc.
Severin
noreply at git.blender.org
Mon Nov 17 23:33:46 CET 2014
Commit: 23c7716bbbdef9958274e19f03be201d34506a1b
Author: Severin
Date: Mon Nov 17 23:28:59 2014 +0100
Branches: input_method_editor
https://developer.blender.org/rB23c7716bbbdef9958274e19f03be201d34506a1b
Cleanup: Whitespace, Comments, etc.
It may be a bit early to do such cleanups, there are more important things
to do first, but those things are extremely time consuming and I wanted to
get rid of them first ;)
===================================================================
M intern/ghost/GHOST_C-api.h
M intern/ghost/GHOST_IWindow.h
M intern/ghost/GHOST_Types.h
M intern/ghost/intern/GHOST_C-api.cpp
M intern/ghost/intern/GHOST_SystemWin32.cpp
M intern/ghost/intern/GHOST_SystemWin32.h
M intern/ghost/intern/GHOST_Window.h
M intern/ghost/intern/GHOST_WindowWin32.cpp
M intern/ghost/intern/GHOST_WindowWin32.h
===================================================================
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index b5d39ac..702963c 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -898,35 +898,27 @@ extern int GHOST_UseNativePixels(void);
extern float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle);
/**
- * Enable the IME attached to the given window, i.e. allows user-input
+ * Enable IME attached to the given window, i.e. allows user-input
* events to be dispatched to the IME.
- * \param window_handle
- * Represents the window handle of the caller.
- * \param x requested x-coordinate of the rectangle
- * \param y requested y-coordinate of the rectangle
- * \param w requested width of the rectangle
- * \param h requested height of the rectangle
- * \param complete
- * Represents whether or not to complete the ongoing composition.
- * + true
- * After finishing the ongoing composition and close its IME windows,
- * start another composition and display its IME windows to the given
- * position.
- * + false
- * Just move the IME windows of the ongoing composition to the given
- * position without finishing it.
+ * \param windowhandle Window handle of the caller
+ * \param x Requested x-coordinate of the rectangle
+ * \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_EnableIME(GHOST_WindowHandle windowhandle,
- GHOST_TInt32 x,
- GHOST_TInt32 y,
- GHOST_TInt32 w,
- GHOST_TInt32 h,
- int complete);
+ GHOST_TInt32 x,
+ GHOST_TInt32 y,
+ GHOST_TInt32 w,
+ GHOST_TInt32 h,
+ int complete);
/**
* Disable the IME attached to the given window, i.e. prohibits any user-input
* events from being dispatched to the IME.
- * \param window_handle
- * Represents the window handle of the caller.
+ * \param windowhandle The window handle of the caller
*/
extern void GHOST_DisableIME(GHOST_WindowHandle windowhandle);
diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h
index 376fee7..4bed354 100644
--- a/intern/ghost/GHOST_IWindow.h
+++ b/intern/ghost/GHOST_IWindow.h
@@ -332,27 +332,21 @@ public:
virtual float getNativePixelSize(void) = 0;
/**
- * Enable the IME attached to the given window, i.e. allows user-input
+ * Enable IME attached to the given window, i.e. allows user-input
* events to be dispatched to the IME.
- * \param x requested x-coordinate of the rectangle
- * \param y requested y-coordinate of the rectangle
- * \param w requested width of the rectangle
- * \param h requested height of the rectangle
- * \param complete
- * Represents whether or not to complete the ongoing composition.
- * + true
- * After finishing the ongoing composition and close its IME windows,
- * start another composition and display its IME windows to the given
- * position.
- * + false
- * Just move the IME windows of the ongoing composition to the given
- * position without finishing it.
+ * \param x Requested x-coordinate of the rectangle
+ * \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.
*/
virtual void enableIME(GHOST_TInt32 x,
- GHOST_TInt32 y,
- GHOST_TInt32 w,
- GHOST_TInt32 h,
- int completed) = 0;
+ GHOST_TInt32 y,
+ GHOST_TInt32 w,
+ GHOST_TInt32 h,
+ int completed) = 0;
/**
* Disable the IME attached to the given window, i.e. prohibits any user-input
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index d89379b..5d9fc33 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -440,14 +440,20 @@ typedef struct {
GHOST_TEventDataPtr data;
} GHOST_TEventDragnDropData;
-/** same with wmImeData */
+/** similar to wmImeData */
typedef struct {
- GHOST_TUserDataPtr result_len, composite_len; /** size_t */
- GHOST_TUserDataPtr result, composite; /** char * utf8 encoding */
- int cursor_position; /* Represents the cursor position in the IME composition. */
- int target_start; /* Represents the position of the beginning of the selection */
- int target_end; /* Represents the position of the end of the selection */
- GHOST_TUserDataPtr tmp; /* custom temporal data */
+ /** size_t */
+ GHOST_TUserDataPtr result_len, composite_len;
+ /** char * utf8 encoding */
+ GHOST_TUserDataPtr result, composite;
+ /** Cursor position in the IME composition. */
+ int cursor_position;
+ /** Represents the position of the beginning of the selection */
+ int target_start;
+ /** Represents the position of the end of the selection */
+ int target_end;
+ /** custom temporal data */
+ GHOST_TUserDataPtr tmp;
} GHOST_TEventImeData;
typedef struct {
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index 3592645..19bde38 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -916,18 +916,18 @@ float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle)
}
void GHOST_EnableIME(GHOST_WindowHandle windowhandle,
- GHOST_TInt32 x,
- GHOST_TInt32 y,
- GHOST_TInt32 w,
- GHOST_TInt32 h,
- int complete)
+ GHOST_TInt32 x,
+ GHOST_TInt32 y,
+ GHOST_TInt32 w,
+ GHOST_TInt32 h,
+ int complete)
{
- GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
+ GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
window->enableIME(x, y, w, h, complete);
}
void GHOST_DisableIME(GHOST_WindowHandle windowhandle)
{
- GHOST_IWindow *window = (GHOST_IWindow *)windowhandle;
+ GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
window->disableIME();
}
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 6321fa8..9fd2151 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -787,15 +787,14 @@ GHOST_Event *GHOST_SystemWin32::processWindowEvent(GHOST_TEventType type, GHOST_
return new GHOST_Event(system->getMilliSeconds(), type, window);
}
-GHOST_Event *GHOST_SystemWin32::processImeEvent(
- GHOST_TEventType type,
- GHOST_IWindow *window,
- GHOST_TEventImeData *data)
+
+GHOST_Event *GHOST_SystemWin32::processImeEvent(GHOST_TEventType type, GHOST_IWindow *window, GHOST_TEventImeData *data)
{
GHOST_System *system = (GHOST_System *)getSystem();
return new GHOST_EventIME(system->getMilliSeconds(), type, window, data);
}
+
GHOST_TSuccess GHOST_SystemWin32::pushDragDropEvent(
GHOST_TEventType eventType,
GHOST_TDragnDropTypes draggedObjectType,
@@ -919,9 +918,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
case WM_INPUTLANGCHANGE:
{
system->handleKeyboardChange();
-
window->getImeInput()->SetInputLanguage();
-
break;
}
////////////////////////////////////////////////////////////////////////
@@ -977,10 +974,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
eventManager->removeTypeEvents(GHOST_kEventKeyDown, window);
window->getImeInput()->CreateImeWindow(window->getHWND());
window->getImeInput()->ResetComposition(window->getHWND());
- event = processImeEvent(
- GHOST_kEventImeCompositionStart,
- window,
- &window->getImeInput()->eventImeData);
+ event = processImeEvent(GHOST_kEventImeCompositionStart, window, &window->getImeInput()->eventImeData);
break;
}
case WM_IME_COMPOSITION:
@@ -988,10 +982,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
eventHandled = true;
window->getImeInput()->UpdateImeWindow(window->getHWND());
window->getImeInput()->UpdateInfo(window->getHWND());
- event = processImeEvent(
- GHOST_kEventImeComposition,
- window,
- &window->getImeInput()->eventImeData);
+ event = processImeEvent(GHOST_kEventImeComposition, window, &window->getImeInput()->eventImeData);
break;
}
case WM_IME_ENDCOMPOSITION:
@@ -1001,10 +992,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
eventManager->removeTypeEvents(GHOST_kEventKeyDown, window);
window->getImeInput()->ResetComposition(window->getHWND());
window->getImeInput()->DestroyImeWindow(window->getHWND());
- event = processImeEvent(
- GHOST_kEventImeCompositionEnd,
- window,
- &window->getImeInput()->eventImeData);
+ event = processImeEvent(GHOST_kEventImeCompositionEnd, window, &window->getImeInput()->eventImeData);
break;
}
////////////////////////////////////////////////////////////////////////
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index 04dacf4..cb3b8ee 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -307,12 +307,12 @@ protected:
static GHOST_Event *processWindowEvent(GHOST_TEventType type, GHOST_IWindow *window);
/**
- * Creates a IME event.
- * \param type The type of event to create.
- * \param window The window receiving the event (the active window).
- * \param data IME data.
- * \return The event created.
- */
+ * Creates a IME event.
+ * \param type The type of event to create.
+ * \param window The window receiving the event (the active window).
+ * \param data IME data.
+ * \retu
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list