aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/esdl2.erl4
-rw-r--r--src/sdl_window.erl4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/esdl2.erl b/src/esdl2.erl
index c1e7651..31c4ce9 100644
--- a/src/esdl2.erl
+++ b/src/esdl2.erl
@@ -96,6 +96,7 @@
-export([set_window_maximum_size/3]).
-export([set_window_minimum_size/3]).
-export([set_window_position/3]).
+-export([set_window_size/3]).
%% @todo We probably want to accept an env variable or somthing for the location.
-on_load(on_load/0).
@@ -313,3 +314,6 @@ set_window_minimum_size(_, _, _) ->
set_window_position(_, _, _) ->
erlang:nif_error({not_loaded, ?MODULE}).
+
+set_window_size(_, _, _) ->
+ erlang:nif_error({not_loaded, ?MODULE}).
diff --git a/src/sdl_window.erl b/src/sdl_window.erl
index 80e5376..f44c1cd 100644
--- a/src/sdl_window.erl
+++ b/src/sdl_window.erl
@@ -39,6 +39,7 @@
-export([set_max_size/3]).
-export([set_min_size/3]).
-export([set_pos/3]).
+-export([set_size/3]).
create(Title, X, Y, W, H, Flags) ->
esdl2:create_window(Title, X, Y, W, H, Flags),
@@ -132,3 +133,6 @@ set_min_size(Window, W, H) ->
set_pos(Window, X, Y) ->
esdl2:set_window_position(Window, X, Y).
+
+set_size(Window, W, H) ->
+ esdl2:set_window_size(Window, W, H).