|
Mirror :
|
Events are the dynamic part of the skins. It means that beyond visual aspect, the interface must react with the user actions. An event describes a simple interaction, in fact one simple action such as playing a file, hiding a window... So when designing a skin you will have to specify what those interactions are. For this you will use simple actions that are described in event tags and you would be able to add them and associate them to controls.
An event describes a simple action as seen above. All attributes are explained in the 'skins-howto.txt' file except the 'event' attribute wich is a bit special. In the 'event' attribute you will enter a simple script with the following syntax :
"EVENT(parameter1,parameter2,...)"
EVENT is the action to execute, it can be one of the followings
| EVENT | Description and parameters |
| VLC_NOTHING | None, it executes nothing so don't use it ! |
| VLC_SHOW | Open all windows of the interface with a fading effect if selected. |
| VLC_HIDE | Close all windows of the interface with a
fading effect if selected. Parameters:
|
| VLC_QUIT | Quit the interface |
| VLC_OPEN | Open an "open file dialog box" to open a file to play. |
| VLC_ON_TOP | Toggle the "Always on top" status |
| VLC_LOAD_SKIN | Open an "open file dialog box" to change the current skin. |
| VLC_LOG_SHOW | Not supported yet |
| VLC_INTF_REFRESH | Force refreshing of the interface. |
| VLC_CHANGE_TRAY | If VLC is not visible in system tray, show it, else, hide it. |
| VLC_CHANGE_TASKBAR | If VLC is not visible in taskbar, show it, else, hide it. |
| VLC_FULLSCREEN | Switch current playing file to fullscreen mode. |
| VLC_PLAY | Play stream. |
| VLC_STOP | Stop playing stream. |
| VLC_PAUSE | Pause the stream. |
| VLC_NEXT | Go to next file in playlist. |
| VLC_PREV | Go to previous file in playlist. |
| VLC_SLOWER | Play a stream slower. |
| VLC_FASTER | Play a stream faster. |
| VLC_STREAMPOS | Not supported yet. |
| VLC_VOLUME_CHANGE | Change sound volume. Parameters:
|
| VLC_PLAYLIST_ADD_FILE | Open an "open file dialog box" to add files to playlist. |
| WINDOW_MOVE | Initiate manual window movement. Parameters:
|
| WINDOW_OPEN | Open a window with a fading effect if
selected. Parameters:
|
| WINDOW_CLOSE | Close a window with a fading effect if
selected. Parameters:
|
| CTRL_SET_SLIDER | Not supported yet. |
| CTRL_SET_TEXT | Not supported yet. |
| CTRL_ID_VISIBLE | Hide/show a control. Parameters:
|
| CTRL_ID_ENABLED | Not supported yet. |
| CTRL_ID_MOVE | Moves a control. Parameters:
|
| PLAYLIST_ID_DEL | Remove items from playlist. Parameters:
|
When creating your event, you must assign an ID to each of them. Now you have to associate events with controls. Some attributes of some controls are supposed to be filled with those IDs. That is to say that when the action correspounding to the attribute will be done, the event associated will be executed. The best exemple is assigning an event to the 'onclick' attribute of a button control. The event will be executed when clicking on the button. You can execute several events. To do this you just have to separate them with semicolon.
Exemple:
<ButtonControl [...] onclick="event1;event2;event3"/>
No, a set of predefined events are present. Here they are with their ID and shortcut.
| ID | Description | Shortcut |
| tray | Hide or show in the system tray. | |
| taskbar | Hide or show in the taskbar. | CTRL+B |
| play | Play. | X |
| pause | Pause. | C |
| stop | Stop. | V |
| next | Next file. | B |
| prev | Previous file. | Z |
| slow | Play slower. | |
| fast | Play faster. | |
| fullscreen | Switch to fullscreen mode. | F |
| mute | Mute the sound. | |
| volume_up | Volume up | |
| volume_down | Volume down | |
| quit | Quit VLC. | CTRL+C |
| open | Open a file. | CTRL+O |
| add_file | Add a file. | CTRL+A |
| load_skin | Change skin. | CTRL+S |
| on_top | Toggle the "Always on top" status. | CTRL+T |
| show_prefs | Show the Preferences dialog box. | |
| show_info | Show the FileInfo dialog box. | |
| show_log | Show the Messages dialog box. | |
| hide_log | Hide the Messages dialog box. |
| VideoLAN - See the statistics - $Id: skins-event.php 2907 2004-11-23 14:41:24Z courmisch $ | valid XHTML 1.1 and CSS |