%
% anyremote configuration file for customization of GUI of Java client. (Server-mode)
%

% STATUS stable
% XTEST no
% SOUND no
% ENV no

GuiAppName=Main screen layout configuration example
GuiAppType=Example
GuiAppBinary=true
GuiAppProtocols=Server
GuiAppDesc=Example of anyRemote Android/J2ME clients main screen layout customization.

[Protocol]=Server

(Init)=\
    Include($(CfgDir)/Utils/aliases-server.cfg);
    
(Connect)=\
    Set(parameter,debug,on);\
    Make(var,cover_size,by_value,64);\
    Make(var,stage,by_value,On connect);\
    Set(title,Example of anyRemote client main screen layout customization);\
    Macro(Default);\
    Set(icons,Icons Example,\
        1,vol_down,2,mute,3,vol_up,\
        4,rewind,5,play,6,forward,\
        7,prev,8,stop,9,refresh,\
        *,question,0,pause,#,no);\
    Set(volume,60);\
    Make(var,dummy_sleep,sleep 1;echo 1);\
    Get(screen_size);\
    Get(cover_size);\
    Get(is_exists,cover,cover-audio);\
    Macro(SET_MENU);
    
%    Set(parameter,debug,on);\
%   Set(image,remove,covers);\
%    Get(ping,5);

* *=Set(text,replace,Help,Use menu or buttons,\n0 - set defaults: 3x4 - running text\n1 - fullscreen on\n2 - vibrate\n3 - fullscreen off\n0 - clear cover\nNote: Android client does not supports running text,\n keypad/joystick-only setup and volume bar);

SET_MENU=\
    Set(menu,replace,Default,3x4,7x1,Static Text,Running Text,Joystick Only,Keypad Only,Volume Bar,Fullscreen,Clean Covers);

SET_LAYOUT=\
    Set(layout,$(vlayout),$(vticker));\
    Set(status,$(vlayout) - $(vticker));

Back=Set(text,close);Macro(SET_MENU);

Default=\
    Make(var,vlayout,by_value,default);\
    Make(var,vticker,by_value,ticker);\
    Macro(SET_LAYOUT);

3x4=\
    Make(var,vlayout,by_value,3x4);\
    Macro(SET_LAYOUT);\
    Make(var,stage,by_value,On 3x4 layout);\
    Get(is_exists,cover,cover-audio);

7x1=\
    Set(cover,by_name,cover-audio);\
    Make(var,vlayout,by_value,7x1);\
    Macro(SET_LAYOUT);\
    Make(var,stage,by_value,On 7x1 layout);\
    Get(is_exists,cover,cover-audio);


CoverSize($$)=\
    Make(var,cover_size,by_value,$(Index));\
    Exec(echo "$(stage): Cover Size $(Index)");

Ping=\
    Exec(echo "$(stage): PING");

SizeX($$)=\
    Exec(echo "$(stage): X Size $(Index)");

SizeY($$)=\
    Exec(echo "$(stage): Y Size $(Index)");

CoverSize($$)=\
    Exec(echo "$(stage): Cover Size $(Index)");

CoverExists($$)=\
    Exec(echo "$(stage): Cover exists $(Param)");

CoverNotExists($$)=\
    Exec(echo "$(stage): Cover does not exists $(Param)");

Static Text=Make(var,vticker,by_value,noticker);Macro(SET_LAYOUT);
Running Text=Make(var,vticker,by_value,ticker);Macro(SET_LAYOUT);

Joystick Only=Set(layout,$(vlayout),$(vticker),keypad_only);
Keypad Only=Set(layout,$(vlayout),$(vticker),joystick_only);
Volume Bar=Set(layout,$(vlayout),$(vticker),volume);
Fullscreen=Set(fullscreen,toggle);
Clean Covers=Set(image,remove,covers);

0=Macro(Default);

1=Set(fullscreen,on);
2=Set(vibrate,5);
3=Set(fullscreen,off);

9=Set(disconnect);

#=Make(exit);

[End]
