From 6fdb343acd0805ef4b8fc78de329ebcb47a1c52d Mon Sep 17 00:00:00 2001 From: Craig Everett Date: Thu, 23 Jan 2020 21:26:53 +0900 Subject: [PATCH] Trying to fix a messed up file path --- .../zx/0.9.1/templates/hellowx/src/con.erl | 130 ------------------ 1 file changed, 130 deletions(-) delete mode 100644 zomp/lib/otpr/zx/0.9.1/templates/hellowx/src/con.erl diff --git a/zomp/lib/otpr/zx/0.9.1/templates/hellowx/src/con.erl b/zomp/lib/otpr/zx/0.9.1/templates/hellowx/src/con.erl deleted file mode 100644 index 3e1639a..0000000 --- a/zomp/lib/otpr/zx/0.9.1/templates/hellowx/src/con.erl +++ /dev/null @@ -1,130 +0,0 @@ -%%% @doc -%%% 〘*PROJECT NAME*〙 Controller -%%% -%%% This process is a in charge of maintaining the program's state. -%%% @end - --module(〘*PREFIX*〙con). --vsn("〘*VERSION*〙"). -〘*AUTHOR*〙 -〘*COPYRIGHT*〙 -〘*LICENSE*〙 - --behavior(gen_server). --export([start_link/0, stop/0]). --export([init/1, terminate/2, code_change/3, - handle_call/3, handle_cast/2, handle_info/2]). --include("$zx_include/zx_logger.hrl"). - - -%%% Type and Record Definitions - - --record(s, - {window = none :: none | wx:wx_object()}). - --type state() :: #s{}. - - - -%% Interface - --spec stop() -> ok. - -stop() -> - gen_server:cast(?MODULE, stop). - - - -%%% Startup Functions - - --spec start_link() -> Result - when Result :: {ok, pid()} - | {error, Reason}, - Reason :: {already_started, pid()} - | {shutdown, term()} - | term(). -%% @private -%% Called by 〘*PREFIX*〙sup. - -start_link() -> - gen_server:start_link({local, ?MODULE}, ?MODULE, none, []). - - --spec init(none) -> no_return(). - -init(none) -> - ok = log(info, "Starting"), - Window = 〘*PREFIX*〙gui:start_link("Hello, WX!"), - ok = log(info, "Window: ~p", [Window]), - State = #s{window = Window}, - ArgV = zx_daemon:argv(), - ok = 〘*PREFIX*〙gui:show(ArgV), - {ok, State}. - - - -%%% gen_server Message Handling Callbacks - - --spec handle_call(Message, From, State) -> Result - when Message :: term(), - From :: {pid(), reference()}, - State :: state(), - Result :: {reply, Response, NewState} - | {noreply, State}, - Response :: ok - | {error, {listening, inet:port_number()}}, - NewState :: state(). -%% @private -%% The gen_server:handle_call/3 callback. -%% See: http://erlang.org/doc/man/gen_server.html#Module:handle_call-3 - -handle_call(Unexpected, From, State) -> - ok = log(warning, "Unexpected call from ~tp: ~tp~n", [From, Unexpected]), - {noreply, State}. - - --spec handle_cast(Message, State) -> {noreply, NewState} - when Message :: term(), - State :: state(), - NewState :: state(). -%% @private -%% The gen_server:handle_cast/2 callback. -%% See: http://erlang.org/doc/man/gen_server.html#Module:handle_cast-2 - -handle_cast(stop, State) -> - ok = log(info, "Received a 'stop' message."), -% {noreply, State}; - {stop, normal, State}; -handle_cast(Unexpected, State) -> - ok = log(warning, "Unexpected cast: ~tp~n", [Unexpected]), - {noreply, State}. - - --spec handle_info(Message, State) -> {noreply, NewState} - when Message :: term(), - State :: state(), - NewState :: state(). -%% @private -%% The gen_server:handle_info/2 callback. -%% See: http://erlang.org/doc/man/gen_server.html#Module:handle_info-2 - -handle_info(Unexpected, State) -> - ok = log(warning, "Unexpected info: ~tp~n", [Unexpected]), - {noreply, State}. - - - -%% @private -%% gen_server callback to handle state transformations necessary for hot -%% code updates. This template performs no transformation. - -code_change(_, State, _) -> - {ok, State}. - - -terminate(Reason, State) -> - ok = log(info, "Reason: ~tp, State: ~tp", [Reason, State]), - zx:stop().