Commit d5ca2edf authored by Olivier Teulière's avatar Olivier Teulière

* ./modules/gui/skins/src/vlcproc.cpp: added the "title" option to the

   "display" attribute of ControlText. It allows to show the title of
   the current stream, without the full path.
 * ./doc/skins/*: updated the doc
parent 36b3260b
Before reading this document, you should first take a look at skins-howto.txt Before reading this document, you should first take a look at skins-howto.txt
to understand general purpose about VLC skins. to understand the general functioning of VLC skins.
What is an event ? What is an event ?
================== ==================
...@@ -16,7 +16,7 @@ How to create an event ? ...@@ -16,7 +16,7 @@ How to create an event ?
======================== ========================
An event describes a simple action as seen above. An event describes a simple action as seen above.
All attibutes are explained in the 'skins-howto.txt' file except the 'event' All attiributes are explained in the 'skins-howto.txt' file except the 'event'
attribute wich is a bit special. attribute wich is a bit special.
In the 'event' attribute you will enter a simple script with the following In the 'event' attribute you will enter a simple script with the following
syntax : syntax :
...@@ -25,7 +25,7 @@ syntax : ...@@ -25,7 +25,7 @@ syntax :
The number of parameters depends on EVENT. The number of parameters depends on EVENT.
All this is case sensitive. All this is case sensitive.
Don't add spaces. Don't add spaces.
EVENT is the action to execute, it can be one of the followings EVENT is the action to execute, it can be one of the following:
- VLC_NOTHING: - VLC_NOTHING:
Action : none, it executes nothing so don't use it ! Action : none, it executes nothing so don't use it !
...@@ -65,23 +65,23 @@ EVENT is the action to execute, it can be one of the followings ...@@ -65,23 +65,23 @@ EVENT is the action to execute, it can be one of the followings
Parameters: none. Parameters: none.
- VLC_CHANGE_TRAY: - VLC_CHANGE_TRAY:
Action : if VLC is not visible in system tray, show it, else, hide it. Action : if VLC is not visible in system tray, show it, else hide it.
Parameters: none. Parameters: none.
- VLC_CHANGE_TASKBAR: - VLC_CHANGE_TASKBAR:
Action : if VLC is not visible in taskbar, show it, else, hide it. Action : if VLC is not visible in taskbar, show it, else hide it.
Parameters: none. Parameters: none.
- VLC_FULLSCREEN: - VLC_FULLSCREEN:
Action : switch current playing file to fullscreen mode. Action : switch current playlist item to fullscreen mode.
Parameters: none. Parameters: none.
- VLC_PLAY: - VLC_PLAY:
Action : play stream. Action : play the stream.
Parameters: none. Parameters: none.
- VLC_STOP: - VLC_STOP:
Action : stop playing stream. Action : stop the stream.
Parameters: none. Parameters: none.
- VLC_PAUSE: - VLC_PAUSE:
...@@ -89,11 +89,11 @@ EVENT is the action to execute, it can be one of the followings ...@@ -89,11 +89,11 @@ EVENT is the action to execute, it can be one of the followings
Parameters: none. Parameters: none.
- VLC_NEXT: - VLC_NEXT:
Action : go to next file in playlist. Action : go to the next file in the playlist.
Parameters: none. Parameters: none.
- VLC_PREV: - VLC_PREV:
Action : go to previous file in playlist. Action : go to the previous file in the playlist.
Parameters: none. Parameters: none.
- VLC_STREAMPOS: - VLC_STREAMPOS:
...@@ -122,14 +122,14 @@ EVENT is the action to execute, it can be one of the followings ...@@ -122,14 +122,14 @@ EVENT is the action to execute, it can be one of the followings
Parameters: Parameters:
1: ID of the window to open. 1: ID of the window to open.
2: Describe what to do. Nothing is opening. 'TRUE' is the same. 'FALSE' is 2: Describe what to do. Nothing is opening. 'TRUE' is the same. 'FALSE' is
closing window. 'CHANGE' is switching between this to state. closing window. 'CHANGE' is switching between these two states.
- VLC_WINDOW_CLOSE: - VLC_WINDOW_CLOSE:
Action : close a window with a fading effect if selected. Action : close a window with a fading effect if selected.
Parameters: Parameters:
1: ID of the window to close. 1: ID of the window to close.
2: Describe what to do. Nothing is closing. 'TRUE' is the same. 'FALSE' is 2: Describe what to do. Nothing is closing. 'TRUE' is the same. 'FALSE' is
opening window. 'CHANGE' is switching between this to state. opening window. 'CHANGE' is switching between these two states.
- CTRL_SET_SLIDER: - CTRL_SET_SLIDER:
Not supported yet. Not supported yet.
...@@ -141,8 +141,9 @@ EVENT is the action to execute, it can be one of the followings ...@@ -141,8 +141,9 @@ EVENT is the action to execute, it can be one of the followings
Action : hide/show a control. Action : hide/show a control.
Parameters: Parameters:
1: ID of the control to hide/show. 1: ID of the control to hide/show.
2: Describe what to do. Nothing is showing control. TRUE is the same. FALSE 2: Describe what to do. Nothing is showing control. 'TRUE' is the same.
is hiding control. CHANGE is switching between this to state. 'FALSE' is hiding control. 'CHANGE' is switching between these two
states.
- CTRL_ID_ENABLED: - CTRL_ID_ENABLED:
Not supported yet. Not supported yet.
...@@ -160,13 +161,13 @@ EVENT is the action to execute, it can be one of the followings ...@@ -160,13 +161,13 @@ EVENT is the action to execute, it can be one of the followings
1: ID of the playlist. 1: ID of the playlist.
What to do with event ? What to do with events ?
======================= =======================
When creating your event, you must assign an ID to each of them. When creating your event, you must assign an ID to each of them.
Now you have to associate events with controls. Now you have to associate events with controls.
Some attributes of some controls are supposed to be filled with those IDs. That 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, is to say that when the action corresponding to the attribute will be done,
the event associated will be executed. The best exemple is assigning an event 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 to the 'onclick' attribute of a button control. The event will be executed when
clicking on the button. clicking on the button.
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class * vlcproc.cpp: VlcProc class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.35 2003/06/11 10:42:34 gbazin Exp $ * $Id: vlcproc.cpp,v 1.36 2003/06/20 19:50:29 ipkiss Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -269,12 +269,18 @@ void VlcProc::InterfaceRefresh( bool All ) ...@@ -269,12 +269,18 @@ void VlcProc::InterfaceRefresh( bool All )
else else
EnabledEvent( "next", true ); EnabledEvent( "next", true );
// Update file name
// Update file name text
if( PlayList->i_index != Sys->i_index ) if( PlayList->i_index != Sys->i_index )
{ {
string long_name = PlayList->pp_items[PlayList->i_index]->psz_name;
int pos = long_name.rfind( DIRECTORY_SEPARATOR, long_name.size() );
// Complete file name
Thema->EvtBank->Get( "file_name" )->PostTextMessage( Thema->EvtBank->Get( "file_name" )->PostTextMessage(
PlayList->pp_items[PlayList->i_index]->psz_name ); PlayList->pp_items[PlayList->i_index]->psz_name );
// File name without path
Thema->EvtBank->Get( "title" )->PostTextMessage(
PlayList->pp_items[PlayList->i_index]->psz_name + pos + 1 );
} }
// Update playlists // Update playlists
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment