aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wx/api_gen')
-rw-r--r--lib/wx/api_gen/gl_gen_erl.erl2
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.erl10
-rw-r--r--lib/wx/api_gen/wx_gen_erl.erl8
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl
index c96df4f8f2..1be8d775be 100644
--- a/lib/wx/api_gen/gl_gen_erl.erl
+++ b/lib/wx/api_gen/gl_gen_erl.erl
@@ -463,7 +463,7 @@ doc_return_types(T, Ps0) ->
Ps = [P || P=#arg{in=In, where=Where} <- Ps0,In =/= true, Where =/= c],
doc_return_types2(T, Ps).
-doc_return_types2(void, []) -> "ok";
+doc_return_types2(void, []) -> "'ok'";
doc_return_types2(void, [#arg{type=T}]) -> doc_arg_type2(T);
doc_return_types2(T, []) -> doc_arg_type2(T);
doc_return_types2(void, Ps) ->
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
index 85ebc093f5..17e10fb306 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
@@ -33,7 +33,7 @@
-type wxEvtHandler() :: wx:wx_object().
%% @doc Equivalent to {@link connect/3. connect(This, EventType, [])}
--spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok.
+-spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> 'ok'.
connect(This, EventType) ->
connect(This, EventType, []).
@@ -55,9 +55,9 @@ connect(This, EventType) ->
%% to process the event. Default not specfied i.e. a message will
%% be delivered to the process calling this function.
%% {userData, term()} An erlang term that will be sent with the event. Default: [].
--spec connect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> ok when
- Option :: {id, integer()} | {lastId, integer()} | {skip, boolean()} |
- callback | {callback, function()} | {userData, term()}.
+-spec connect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> 'ok' when
+ Option :: {'id', integer()} | {'lastId', integer()} | {'skip', boolean()} |
+ 'callback' | {'callback', function()} | {'userData', term()}.
connect(This=#wx_ref{type=ThisT}, EventType, Options) ->
EvH = parse_opts(Options, #evh{et=EventType}),
?CLASS(ThisT,wxEvtHandler),
@@ -115,7 +115,7 @@ disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType) when is_atom(EventT
%% EventType may be the atom 'null' to match any eventtype.
%% Notice that the options skip and userdata is not used to match the eventhandler.
-spec disconnect(This::wxEvtHandler(), EventType::wxEventType(), [Option]) -> boolean() when
- Option :: {id, integer()} | {lastId, integer()} | {callback, function()}.
+ Option :: {'id', integer()} | {'lastId', integer()} | {'callback', function()}.
disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
?CLASS(ThisT,wxEvtHandler),
EvH = parse_opts(Opts, #evh{et=EventType}),
diff --git a/lib/wx/api_gen/wx_gen_erl.erl b/lib/wx/api_gen/wx_gen_erl.erl
index 5a31f34cdc..794de25002 100644
--- a/lib/wx/api_gen/wx_gen_erl.erl
+++ b/lib/wx/api_gen/wx_gen_erl.erl
@@ -379,7 +379,7 @@ gen_dest(#class{name=CName,abstract=Abs}, Ms) ->
gen_dest2(Class, Id) ->
w("%% @doc Destroys this object, do not use object again~n", []),
- w("-spec destroy(This::~s()) -> ok.~n", [Class]),
+ w("-spec destroy(This::~s()) -> 'ok'.~n", [Class]),
w("destroy(Obj=#wx_ref{type=Type}) ->~n", []),
w(" ?CLASS(Type,~s),~n",[Class]),
case Id of
@@ -770,7 +770,7 @@ write_spec(Args, Optional, {complex, Res}, Eol) ->
optional_type(Opts, Eol) ->
"Option :: " ++ args(fun optional_type2/1, Eol++"\t\t | ", Opts).
optional_type2(#param{name=Name, def=_Def, type=T}) ->
- "{" ++ erl_option_name(Name) ++ ", " ++ doc_arg_type2(T) ++ "}". %% %% Default: " ++ Def.
+ "{'" ++ erl_option_name(Name) ++ "', " ++ doc_arg_type2(T) ++ "}". %% %% Default: " ++ Def.
doc_link("utils", Func) ->
w("%% @doc See <a href=\"http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#~s\">"
@@ -861,7 +861,7 @@ doc_arg_type3(T, _) -> ?error({unknown_type,T}).
doc_return_types(T, Ps) ->
doc_return_types2(T, [P || P=#param{in=In} <- Ps,In =/= true]).
-doc_return_types2(void, []) -> {simple, "ok"};
+doc_return_types2(void, []) -> {simple, "'ok'"};
doc_return_types2(void, [#param{type=T}]) -> {simple, doc_arg_type2(T, out)};
doc_return_types2(T, []) -> {simple, doc_arg_type2(T, out)};
doc_return_types2(void, Ps) when length(Ps) < 4 ->
@@ -1220,7 +1220,7 @@ gen_event_recs() ->
build_event_rec(Class=#class{name=Name, event=Evs}) ->
EvTypes = [event_type_name(Ev) || Ev <- Evs],
- Str = args(fun(Ev) -> Ev end, " | ", EvTypes),
+ Str = args(fun(Ev) -> "'" ++ Ev ++ "'" end, " | ", EvTypes),
Attr = filter_attrs(Class),
Rec = event_rec_name(Name),
%%GetName = fun(#param{name=N}) ->event_attr_name(N) end,