Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -module(simplewx).
- -behaviour(wx_object).
- -include_lib("wx/include/wx.hrl").
- -record(state, {}).
- %% API
- -export([start_link/0]).
- %% gen_server callbacks
- -export([init/1,
- handle_call/3,
- handle_cast/2,
- handle_info/2,
- terminate/2,
- code_change/3,
- handle_event/2]).
- %% initialize junction server
- start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
- init([]) ->
- wx:new(),
- Frame = wxFrame:new(wx:null(), -1, "hello"),
- State = #state{},
- {Frame, State}.
- handle_info(_Info, State) -> {noreply, State}.
- terminate(_Reason, _State) -> ok.
- code_change(_OldVsn, State, _Extra) -> {ok, State}.
- handle_call(_Request, _From, State) -> {reply, ok, State}.
- handle_cast(_Msg, State) -> {noreply, State}.
- handle_event(_Event, State) -> {noreply, State}.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement