diff options
author | Loïc Hoguin <[email protected]> | 2015-10-20 15:58:50 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-10-20 15:58:50 +0200 |
commit | cdaf2699bcb6aa0db3440b1d5906f3031e50b2ac (patch) | |
tree | f2fb92be90aa98d320471ff338703eef1bb218af /src/esdl2.erl | |
parent | 8f19fb094712dd6a871136c8522e0cf87fb3025e (diff) | |
download | esdl2-cdaf2699bcb6aa0db3440b1d5906f3031e50b2ac.tar.gz esdl2-cdaf2699bcb6aa0db3440b1d5906f3031e50b2ac.tar.bz2 esdl2-cdaf2699bcb6aa0db3440b1d5906f3031e50b2ac.zip |
Add sdl_keyboard with 3 text input related functions
The following functions were added:
* sdl_keyboard:start_text_input()
* sdl_keyboard:stop_text_input()
* sdl_keyboard:is_text_input_active()
Calling sdl_keyboard:stop_text_input() at the beginning of the
program allows not receiving unwanted textinput events.
Diffstat (limited to 'src/esdl2.erl')
-rw-r--r-- | src/esdl2.erl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/esdl2.erl b/src/esdl2.erl index 6ffc331..3e0db38 100644 --- a/src/esdl2.erl +++ b/src/esdl2.erl @@ -53,6 +53,11 @@ -export([gl_create_context/1]). -export([gl_swap_window/1]). +%% sdl_keyboard +-export([is_text_input_active/0]). +-export([start_text_input/0]). +-export([stop_text_input/0]). + %% sdl_power -export([get_power_info/0]). @@ -237,6 +242,17 @@ gl_create_context(_) -> gl_swap_window(_) -> erlang:nif_error({not_loaded, ?MODULE}). +%% sdl_keyboard + +is_text_input_active() -> + erlang:nif_error({not_loaded, ?MODULE}). + +start_text_input() -> + erlang:nif_error({not_loaded, ?MODULE}). + +stop_text_input() -> + erlang:nif_error({not_loaded, ?MODULE}). + %% sdl_power get_power_info() -> |