%
% anyRemote template configuration file for an presentation / document viewer management (Server-mode)
%

% STATUS stable
% XTEST no
% SOUND no
% ENV no
% FBROWSER v.4i
% DEF_PRESENTATION   
% ALL_IN_ONE 
% MEDIACENTER presentation

GuiAppName=Some Presentation
GuiAppBinary=presentation.exe
GuiAppRun= U=`id -u`;P=`pgrep -l -u $U presentation.exe`; if [ "x$P" = "x" ]; then echo NOK; else echo OK; fi
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=anyRemote template configuration file for an presentation / document viewer management

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
    Include($(CfgDir)/Utils/aliases-server-fbrowser-v4i.cfg);\
	Macro(FBROWSER_IC_INIT);\
	Include($(CfgDir)/Utils/aliases-server-presentation.cfg);\
	Make(var,app_name,by_value,Some Presentation);\
	Make(var,open_file,by_value,);\
	Make(var,app_manage_mode,by_value,some_presentation_manage);

(Exit)=\
	Macro(FBROWSER_IC_EXIT);

(Connect)=\
	Make(mode,some_presentation_init);

[Mode]=some_presentation_init : default_presentation_init

APP_IS_RUN=\
	Make(var,app_run,pgrep -l -u `id -u` presentation.exe|head -1|wc -l);
	
[ModeEnd]

[Mode]=some_presentation_manage : default_presentation

% 0-9,*,# assignments by Utils/aliases-server-presentaion.cfg

APP_SETUP=\
	Make(none);

% Application window should be present in output of "wmctrl -l"
APP_RAISE=\
	Exec(echo "Raise Application Window");\
	Exec($(CfgDir)/Utils/run-or-switch-to.sh -switch presentation.exe);

APP_START_IF=\
	Exec(echo "Start Application If It Not Yet Run");\
	Make(var,app_run,pgrep -l -u `id -u` presentation.exe|head -1|wc -l);\
	Exec(if [ "x$(app_run)" = "x0" ]; then cd "$(fbrowser_dir)";presentation.exe $(open_file)& fi 2> /dev/null);
	
APP_QUIT=\
	Exec(echo "Close Application");\
	Set(title, );

APP_MENU=\
	Set(menu,replace,Add,Some,Custom,Items,PowerMgmt);\
	Macro(ALLIN1MENU);\
	Macro(MEDIACENTER_MENU);
	
PRES_START=\
	Exec(echo "Start Presentation");

PRES_PREV_PAGE=\
	Exec(echo "Previous Page");
	
PRES_NEXT_PAGE=\
	Exec(echo "Next Page");

PRES_ZOOM_IN=\
	Exec(echo "Zoom In");
	
PRES_ZOOM_OUT=\
	Exec(echo "Zoom Out");

PRES_FIRST_PAGE=\
	Exec(echo "First Page");
	
PRES_LAST_PAGE=\
	Exec(echo "Last Page");
	
PRES_TOGGLE_FULLSCREEN=\
	Exec(echo "Toggle Fullscreen");
	
PRES_REFRESH=\
	Exec(echo "Refresh Page");

% File Browser by Utils/aliases-server-presentation.cfg 
% PowerMgmt by Utils/aliases-server.cfg 

Add=\
	Exec(echo "Custom Action 1");

Some=\
	Exec(echo "Custom Action 2");

Custom=\
	Exec(echo "Custom Action 3");

Items=\
	Exec(echo "Custom Action 4");

[ModeEnd]

[End]
