diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/esdl2.erl | 4 | ||||
-rw-r--r-- | src/sdl_window.erl | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/esdl2.erl b/src/esdl2.erl index 3c996fb..b069662 100644 --- a/src/esdl2.erl +++ b/src/esdl2.erl @@ -77,6 +77,7 @@ -export([get_window_display_index/1]). -export([get_window_flags/1]). -export([get_window_grab/1]). +-export([get_window_id/1]). %% @todo We probably want to accept an env variable or somthing for the location. -on_load(on_load/0). @@ -237,3 +238,6 @@ get_window_flags(_) -> get_window_grab(_) -> erlang:nif_error({not_loaded, ?MODULE}). + +get_window_id(_) -> + erlang:nif_error({not_loaded, ?MODULE}). diff --git a/src/sdl_window.erl b/src/sdl_window.erl index bc77974..7b7afca 100644 --- a/src/sdl_window.erl +++ b/src/sdl_window.erl @@ -20,6 +20,7 @@ -export([get_display_index/1]). -export([get_flags/1]). -export([is_input_grabbed/1]). +-export([get_id/1]). create(Title, X, Y, W, H, Flags) -> esdl2:create_window(Title, X, Y, W, H, Flags), @@ -47,3 +48,7 @@ get_flags(Window) -> is_input_grabbed(Window) -> esdl2:get_window_grab(Window), receive {'_nif_thread_ret_', Ret} -> Ret end. + +get_id(Window) -> + esdl2:get_window_id(Window), + receive {'_nif_thread_ret_', Ret} -> Ret end. |