aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/src/wx.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-03-21 10:23:37 +0100
committerDan Gudmundsson <[email protected]>2012-03-21 10:23:37 +0100
commitd11efce543903a6adf6180f80ebf7ae854f5b6f1 (patch)
treef830bd41c6ec4cc1d1253f4aedfcaef446bbf516 /lib/wx/src/wx.erl
parent17aca0a257880761aa3e86da7ffa906269ed947c (diff)
parent8d5372dcb2aaed98063d9a9c74a052612ecfa3ca (diff)
downloadotp-d11efce543903a6adf6180f80ebf7ae854f5b6f1.tar.gz
otp-d11efce543903a6adf6180f80ebf7ae854f5b6f1.tar.bz2
otp-d11efce543903a6adf6180f80ebf7ae854f5b6f1.zip
Merge branch 'dgud/wx/misc-improvements/OTP-9947' into maint
* dgud/wx/misc-improvements/OTP-9947: [wx] Add more types [wx] Fix listctrl issues [wx] Fix bad defines [wx] Fix bad type references [wx] Fix missing export_types
Diffstat (limited to 'lib/wx/src/wx.erl')
-rw-r--r--lib/wx/src/wx.erl19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/wx/src/wx.erl b/lib/wx/src/wx.erl
index 32e9f5da3f..7d62305048 100644
--- a/lib/wx/src/wx.erl
+++ b/lib/wx/src/wx.erl
@@ -71,13 +71,17 @@
retain_memory/1, release_memory/1]).
-export([demo/0]).
--export_type([wx_colour/0, wx_datetime/0, wx_enum/0, wx_mouseState/0, wx_wxHtmlLinkInfo/0]).
+
+-export_type([wx_object/0, wx_env/0, wx_memory/0]).
+-export_type([wx_colour/0, wx_colour4/0, wx_datetime/0,
+ wx_enum/0, wx_wxMouseState/0, wx_wxHtmlLinkInfo/0]).
+
-include("wxe.hrl").
-include("../include/wx.hrl").
--opaque wx_object() :: #wx_ref{}. %% Opaque object reference
--opaque wx_env() :: #wx_env{}. %% Opaque process environment
--opaque wx_memory() :: binary() | #wx_mem{}. %% Opaque memory reference
+-type wx_object() :: #wx_ref{}. %% Opaque object reference
+-type wx_env() :: #wx_env{}. %% Opaque process environment
+-type wx_memory() :: binary() | #wx_mem{}. %% Opaque memory reference
-type wx_colour4() :: {R::byte(),G::byte(),B::byte(), A::byte()}.
-type wx_colour() :: {R::byte(),G::byte(),B::byte()} | wx_colour4().
@@ -85,7 +89,7 @@
-type wx_datetime() :: {{Year::integer(),Month::integer(),Day::integer()},
{Hour::integer(),Minute::integer(),Second::integer()}}. %% In Local Timezone
--type wx_mouseState() :: #wxMouseState{}. %% See #wxMouseState{} defined in wx.hrl
+-type wx_wxMouseState() :: #wxMouseState{}. %% See #wxMouseState{} defined in wx.hrl
-type wx_enum() :: integer(). %% Constant defined in wx.hrl
-type wx_wxHtmlLinkInfo() :: #wxHtmlLinkInfo{}.
@@ -311,14 +315,15 @@ debug(Level) when is_integer(Level) ->
end.
%% @doc Starts a wxErlang demo if examples directory exists and is compiled
--spec demo() -> ok.
+-spec demo() -> ok | {error, atom()}.
demo() ->
Priv = code:priv_dir(wx),
Demo = filename:join([filename:dirname(Priv),examples,demo]),
Mod = list_to_atom("demo"), %% Fool xref tests
case file:set_cwd(Demo) of
ok ->
- apply(Mod, start, []);
+ apply(Mod, start, []),
+ ok;
_ ->
{error, no_demo_dir}
end.