Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 90ee1bc

Browse files
committedOct 5, 2023
wx: fix type specifications
1 parent 8ab304f commit 90ee1bc

File tree

2 files changed

+28
-19
lines changed

2 files changed

+28
-19
lines changed
 

‎lib/wx/src/gen/wxWindow.erl

+4-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,10 @@ clientToScreen(#wx_ref{type=ThisT}=This,{PtX,PtY} = Pt)
232232
wxe_util:rec(?wxWindow_ClientToScreen_1).
233233

234234
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxwindow.html#wxwindowclienttoscreen">external documentation</a>.
235-
-spec clientToScreen(This, X, Y) -> {X::integer(), Y::integer()} when
236-
This::wxWindow(), X::integer(), Y::integer().
235+
-spec clientToScreen(This, X, Y) -> {X, Y} when
236+
This::wxWindow(),
237+
X::integer(),
238+
Y::integer().
237239
clientToScreen(#wx_ref{type=ThisT}=This,X,Y)
238240
when is_integer(X),is_integer(Y) ->
239241
?CLASS(ThisT,wxWindow),

‎lib/wx/src/wx_object.erl

+24-17
Original file line numberDiff line numberDiff line change
@@ -129,28 +129,35 @@
129129

130130
%% -export([behaviour_info/1]).
131131
-callback init(Args :: term()) ->
132-
{#wx_ref{}, State :: term()} | {#wx_ref{}, State :: term(), timeout() | 'hibernate'} |
133-
{'stop', Reason :: term()} | 'ignore'.
132+
{#wx_ref{}, State} | {#wx_ref{}, State, timeout() | 'hibernate'} |
133+
{'stop', Reason :: term()} | 'ignore' when
134+
State :: term().
134135
-callback handle_event(Request :: #wx{}, State :: term()) ->
135-
{'noreply', NewState :: term()} |
136-
{'noreply', NewState :: term(), timeout() | 'hibernate'} |
137-
{'stop', Reason :: term(), NewState :: term()}.
136+
{'noreply', NewState} |
137+
{'noreply', NewState, timeout() | 'hibernate'} |
138+
{'stop', Reason :: term(), NewState} when
139+
NewState :: term().
138140
-callback handle_call(Request :: term(), From :: {pid(), Tag :: term()},
139141
State :: term()) ->
140-
{'reply', Reply :: term(), NewState :: term()} |
141-
{'reply', Reply :: term(), NewState :: term(), timeout() | 'hibernate'} |
142-
{'noreply', NewState :: term()} |
143-
{'noreply', NewState :: term(), timeout() | 'hibernate'} |
144-
{'stop', Reason :: term(), Reply :: term(), NewState :: term()} |
145-
{'stop', Reason :: term(), NewState :: term()}.
142+
{'reply', Reply, NewState} |
143+
{'reply', Reply, NewState, timeout() | 'hibernate'} |
144+
{'noreply', NewState} |
145+
{'noreply', NewState, timeout() | 'hibernate'} |
146+
{'stop', Reason, Reply, NewState} |
147+
{'stop', Reason, NewState} when
148+
Reason :: term(),
149+
NewState :: term(),
150+
Reply :: term().
146151
-callback handle_cast(Request :: term(), State :: term()) ->
147-
{'noreply', NewState :: term()} |
148-
{'noreply', NewState :: term(), timeout() | 'hibernate'} |
149-
{'stop', Reason :: term(), NewState :: term()}.
152+
{'noreply', NewState} |
153+
{'noreply', NewState, timeout() | 'hibernate'} |
154+
{'stop', Reason :: term(), NewState} when
155+
NewState :: term().
150156
-callback handle_info(Info :: timeout() | term(), State :: term()) ->
151-
{'noreply', NewState :: term()} |
152-
{'noreply', NewState :: term(), timeout() | 'hibernate'} |
153-
{'stop', Reason :: term(), NewState :: term()}.
157+
{'noreply', NewState} |
158+
{'noreply', NewState, timeout() | 'hibernate'} |
159+
{'stop', Reason :: term(), NewState} when
160+
NewState :: term().
154161
-callback handle_sync_event(Request :: #wx{}, Ref :: #wx_ref{}, State :: term()) ->
155162
ok.
156163
-callback terminate(Reason :: ('normal' | 'shutdown' | {'shutdown', term()} |

0 commit comments

Comments
 (0)
Please sign in to comment.