From 059ada86139b0cd42675180e553dc916323311d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 3 Apr 2014 13:02:52 +0200 Subject: Add sdl_window:get_max_size/1 --- src/esdl2.erl | 4 ++++ src/sdl_window.erl | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/esdl2.erl b/src/esdl2.erl index b069662..788d5fb 100644 --- a/src/esdl2.erl +++ b/src/esdl2.erl @@ -78,6 +78,7 @@ -export([get_window_flags/1]). -export([get_window_grab/1]). -export([get_window_id/1]). +-export([get_window_maximum_size/1]). %% @todo We probably want to accept an env variable or somthing for the location. -on_load(on_load/0). @@ -241,3 +242,6 @@ get_window_grab(_) -> get_window_id(_) -> erlang:nif_error({not_loaded, ?MODULE}). + +get_window_maximum_size(_) -> + erlang:nif_error({not_loaded, ?MODULE}). diff --git a/src/sdl_window.erl b/src/sdl_window.erl index 7b7afca..f3376f8 100644 --- a/src/sdl_window.erl +++ b/src/sdl_window.erl @@ -21,6 +21,7 @@ -export([get_flags/1]). -export([is_input_grabbed/1]). -export([get_id/1]). +-export([get_max_size/1]). create(Title, X, Y, W, H, Flags) -> esdl2:create_window(Title, X, Y, W, H, Flags), @@ -52,3 +53,7 @@ is_input_grabbed(Window) -> get_id(Window) -> esdl2:get_window_id(Window), receive {'_nif_thread_ret_', Ret} -> Ret end. + +get_max_size(Window) -> + esdl2:get_window_maximum_size(Window), + receive {'_nif_thread_ret_', Ret} -> Ret end. -- cgit v1.2.3