Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
7e8c7910
Commit
7e8c7910
authored
Jul 12, 2010
by
dewyatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed Start/StopTextInput back to not take any parameters.
We call SDL_GetKeyboardFocus internally now.
parent
3d5a6d85
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
23 deletions
+31
-23
SDL_keyboard.h
include/SDL_keyboard.h
+2
-2
SDL_compat.c
src/SDL_compat.c
+2
-2
SDL_keyboard.c
src/events/SDL_keyboard.c
+1
-1
SDL_sysvideo.h
src/video/SDL_sysvideo.h
+2
-2
SDL_video.c
src/video/SDL_video.c
+4
-4
SDL_win32keyboard.c
src/video/win32/SDL_win32keyboard.c
+18
-10
SDL_win32keyboard.h
src/video/win32/SDL_win32keyboard.h
+2
-2
No files found.
include/SDL_keyboard.h
View file @
7e8c7910
...
@@ -140,14 +140,14 @@ extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key);
...
@@ -140,14 +140,14 @@ extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key);
* \sa SDL_StopTextInput()
* \sa SDL_StopTextInput()
* \sa SDL_SetTextInputRect()
* \sa SDL_SetTextInputRect()
*/
*/
extern
DECLSPEC
void
SDLCALL
SDL_StartTextInput
(
SDL_Window
*
window
);
extern
DECLSPEC
void
SDLCALL
SDL_StartTextInput
(
void
);
/**
/**
* \brief Stop receiving any text input events.
* \brief Stop receiving any text input events.
*
*
* \sa SDL_StartTextInput()
* \sa SDL_StartTextInput()
*/
*/
extern
DECLSPEC
void
SDLCALL
SDL_StopTextInput
(
SDL_Window
*
window
);
extern
DECLSPEC
void
SDLCALL
SDL_StopTextInput
(
void
);
/**
/**
* \brief Set the rectangle used to type Unicode text inputs.
* \brief Set the rectangle used to type Unicode text inputs.
...
...
src/SDL_compat.c
View file @
7e8c7910
...
@@ -1740,11 +1740,11 @@ SDL_EnableUNICODE(int enable)
...
@@ -1740,11 +1740,11 @@ SDL_EnableUNICODE(int enable)
switch
(
enable
)
{
switch
(
enable
)
{
case
1
:
case
1
:
SDL_enabled_UNICODE
=
1
;
SDL_enabled_UNICODE
=
1
;
SDL_StartTextInput
(
SDL_VideoWindow
);
SDL_StartTextInput
();
break
;
break
;
case
0
:
case
0
:
SDL_enabled_UNICODE
=
0
;
SDL_enabled_UNICODE
=
0
;
SDL_StopTextInput
(
SDL_VideoWindow
);
SDL_StopTextInput
();
break
;
break
;
}
}
return
previous
;
return
previous
;
...
...
src/events/SDL_keyboard.c
View file @
7e8c7910
...
@@ -617,7 +617,7 @@ SDL_SetKeyboardFocus(SDL_Window * window)
...
@@ -617,7 +617,7 @@ SDL_SetKeyboardFocus(SDL_Window * window)
0
,
0
);
0
,
0
);
if
(
SDL_EventState
(
SDL_TEXTINPUT
,
SDL_QUERY
))
{
if
(
SDL_EventState
(
SDL_TEXTINPUT
,
SDL_QUERY
))
{
SDL_StartTextInput
(
window
);
SDL_StartTextInput
();
}
}
}
}
}
}
...
...
src/video/SDL_sysvideo.h
View file @
7e8c7910
...
@@ -299,8 +299,8 @@ struct SDL_VideoDevice
...
@@ -299,8 +299,8 @@ struct SDL_VideoDevice
void
(
*
SuspendScreenSaver
)
(
_THIS
);
void
(
*
SuspendScreenSaver
)
(
_THIS
);
/* Text input */
/* Text input */
void
(
*
StartTextInput
)
(
_THIS
,
SDL_Window
*
window
);
void
(
*
StartTextInput
)
(
_THIS
);
void
(
*
StopTextInput
)
(
_THIS
,
SDL_Window
*
window
);
void
(
*
StopTextInput
)
(
_THIS
);
void
(
*
SetTextInputRect
)
(
_THIS
,
SDL_Rect
*
rect
);
void
(
*
SetTextInputRect
)
(
_THIS
,
SDL_Rect
*
rect
);
/* * * */
/* * * */
...
...
src/video/SDL_video.c
View file @
7e8c7910
...
@@ -3385,20 +3385,20 @@ SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info)
...
@@ -3385,20 +3385,20 @@ SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info)
}
}
void
void
SDL_StartTextInput
(
SDL_Window
*
window
)
SDL_StartTextInput
(
void
)
{
{
if
(
_this
&&
_this
->
StartTextInput
)
{
if
(
_this
&&
_this
->
StartTextInput
)
{
_this
->
StartTextInput
(
_this
,
window
);
_this
->
StartTextInput
(
_this
);
}
}
SDL_EventState
(
SDL_TEXTINPUT
,
SDL_ENABLE
);
SDL_EventState
(
SDL_TEXTINPUT
,
SDL_ENABLE
);
SDL_EventState
(
SDL_TEXTEDITING
,
SDL_ENABLE
);
SDL_EventState
(
SDL_TEXTEDITING
,
SDL_ENABLE
);
}
}
void
void
SDL_StopTextInput
(
SDL_Window
*
window
)
SDL_StopTextInput
(
void
)
{
{
if
(
_this
&&
_this
->
StopTextInput
)
{
if
(
_this
&&
_this
->
StopTextInput
)
{
_this
->
StopTextInput
(
_this
,
window
);
_this
->
StopTextInput
(
_this
);
}
}
SDL_EventState
(
SDL_TEXTINPUT
,
SDL_DISABLE
);
SDL_EventState
(
SDL_TEXTINPUT
,
SDL_DISABLE
);
SDL_EventState
(
SDL_TEXTEDITING
,
SDL_DISABLE
);
SDL_EventState
(
SDL_TEXTEDITING
,
SDL_DISABLE
);
...
...
src/video/win32/SDL_win32keyboard.c
View file @
7e8c7910
...
@@ -141,21 +141,29 @@ WIN_QuitKeyboard(_THIS)
...
@@ -141,21 +141,29 @@ WIN_QuitKeyboard(_THIS)
}
}
void
void
WIN_StartTextInput
(
_THIS
,
SDL_Window
*
window
)
WIN_StartTextInput
(
_THIS
)
{
{
HWND
hwnd
=
((
SDL_WindowData
*
)
window
->
driverdata
)
->
hwnd
;
SDL_Window
*
window
=
SDL_GetKeyboardFocus
();
SDL_VideoData
*
videodata
=
(
SDL_VideoData
*
)
_this
->
driverdata
;
if
(
window
)
IME_Init
(
videodata
,
hwnd
);
{
IME_Enable
(
videodata
,
hwnd
);
HWND
hwnd
=
((
SDL_WindowData
*
)
window
->
driverdata
)
->
hwnd
;
SDL_VideoData
*
videodata
=
(
SDL_VideoData
*
)
_this
->
driverdata
;
IME_Init
(
videodata
,
hwnd
);
IME_Enable
(
videodata
,
hwnd
);
}
}
}
void
void
WIN_StopTextInput
(
_THIS
,
SDL_Window
*
window
)
WIN_StopTextInput
(
_THIS
)
{
{
HWND
hwnd
=
((
SDL_WindowData
*
)
window
->
driverdata
)
->
hwnd
;
SDL_Window
*
window
=
SDL_GetKeyboardFocus
();
SDL_VideoData
*
videodata
=
(
SDL_VideoData
*
)
_this
->
driverdata
;
if
(
window
)
IME_Init
(
videodata
,
hwnd
);
{
IME_Disable
(
videodata
,
hwnd
);
HWND
hwnd
=
((
SDL_WindowData
*
)
window
->
driverdata
)
->
hwnd
;
SDL_VideoData
*
videodata
=
(
SDL_VideoData
*
)
_this
->
driverdata
;
IME_Init
(
videodata
,
hwnd
);
IME_Disable
(
videodata
,
hwnd
);
}
}
}
void
void
...
...
src/video/win32/SDL_win32keyboard.h
View file @
7e8c7910
...
@@ -31,8 +31,8 @@ extern void WIN_InitKeyboard(_THIS);
...
@@ -31,8 +31,8 @@ extern void WIN_InitKeyboard(_THIS);
extern
void
WIN_UpdateKeymap
(
void
);
extern
void
WIN_UpdateKeymap
(
void
);
extern
void
WIN_QuitKeyboard
(
_THIS
);
extern
void
WIN_QuitKeyboard
(
_THIS
);
extern
void
WIN_StartTextInput
(
_THIS
,
SDL_Window
*
window
);
extern
void
WIN_StartTextInput
(
_THIS
);
extern
void
WIN_StopTextInput
(
_THIS
,
SDL_Window
*
window
);
extern
void
WIN_StopTextInput
(
_THIS
);
extern
void
WIN_SetTextInputRect
(
_THIS
,
SDL_Rect
*
rect
);
extern
void
WIN_SetTextInputRect
(
_THIS
,
SDL_Rect
*
rect
);
extern
SDL_bool
IME_HandleMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
*
lParam
,
struct
SDL_VideoData
*
videodata
);
extern
SDL_bool
IME_HandleMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
*
lParam
,
struct
SDL_VideoData
*
videodata
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment