mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-29 14:38:29 +00:00
make SDL_SetTextInputRect take a pointer to const
The documentation doesn't state that the argument is ever modified, and no implementation does so currently. This is a non-breaking change to guarantee as much to callers.
This commit is contained in:
@@ -424,7 +424,7 @@ SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state)
|
||||
}
|
||||
|
||||
void
|
||||
SDL_Fcitx_UpdateTextRect(SDL_Rect *rect)
|
||||
SDL_Fcitx_UpdateTextRect(const SDL_Rect *rect)
|
||||
{
|
||||
SDL_Window *focused_win = NULL;
|
||||
SDL_SysWMinfo info;
|
||||
|
@@ -32,7 +32,7 @@ extern void SDL_Fcitx_Quit(void);
|
||||
extern void SDL_Fcitx_SetFocus(SDL_bool focused);
|
||||
extern void SDL_Fcitx_Reset(void);
|
||||
extern SDL_bool SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state);
|
||||
extern void SDL_Fcitx_UpdateTextRect(SDL_Rect *rect);
|
||||
extern void SDL_Fcitx_UpdateTextRect(const SDL_Rect *rect);
|
||||
extern void SDL_Fcitx_PumpEvents(void);
|
||||
|
||||
#endif /* SDL_fcitx_h_ */
|
||||
|
@@ -639,7 +639,7 @@ SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state)
|
||||
}
|
||||
|
||||
void
|
||||
SDL_IBus_UpdateTextRect(SDL_Rect *rect)
|
||||
SDL_IBus_UpdateTextRect(const SDL_Rect *rect)
|
||||
{
|
||||
SDL_Window *focused_win;
|
||||
SDL_SysWMinfo info;
|
||||
|
@@ -45,7 +45,7 @@ extern SDL_bool SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 st
|
||||
|
||||
/* Update the position of IBus' candidate list. If rect is NULL then this will
|
||||
just reposition it relative to the focused window's new position. */
|
||||
extern void SDL_IBus_UpdateTextRect(SDL_Rect *window_relative_rect);
|
||||
extern void SDL_IBus_UpdateTextRect(const SDL_Rect *window_relative_rect);
|
||||
|
||||
/* Checks DBus for new IBus events, and calls SDL_SendKeyboardText /
|
||||
SDL_SendEditingText for each event it finds */
|
||||
|
@@ -28,7 +28,7 @@ typedef void (*_SDL_IME_Quit)(void);
|
||||
typedef void (*_SDL_IME_SetFocus)(SDL_bool);
|
||||
typedef void (*_SDL_IME_Reset)(void);
|
||||
typedef SDL_bool (*_SDL_IME_ProcessKeyEvent)(Uint32, Uint32, Uint8 state);
|
||||
typedef void (*_SDL_IME_UpdateTextRect)(SDL_Rect *);
|
||||
typedef void (*_SDL_IME_UpdateTextRect)(const SDL_Rect *);
|
||||
typedef void (*_SDL_IME_PumpEvents)(void);
|
||||
|
||||
static _SDL_IME_Init SDL_IME_Init_Real = NULL;
|
||||
@@ -136,7 +136,7 @@ SDL_IME_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state)
|
||||
}
|
||||
|
||||
void
|
||||
SDL_IME_UpdateTextRect(SDL_Rect *rect)
|
||||
SDL_IME_UpdateTextRect(const SDL_Rect *rect)
|
||||
{
|
||||
if (SDL_IME_UpdateTextRect_Real)
|
||||
SDL_IME_UpdateTextRect_Real(rect);
|
||||
|
@@ -32,7 +32,7 @@ extern void SDL_IME_Quit(void);
|
||||
extern void SDL_IME_SetFocus(SDL_bool focused);
|
||||
extern void SDL_IME_Reset(void);
|
||||
extern SDL_bool SDL_IME_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state);
|
||||
extern void SDL_IME_UpdateTextRect(SDL_Rect *rect);
|
||||
extern void SDL_IME_UpdateTextRect(const SDL_Rect *rect);
|
||||
extern void SDL_IME_PumpEvents(void);
|
||||
|
||||
#endif /* SDL_ime_h_ */
|
||||
|
Reference in New Issue
Block a user