Interaction
[Interface]

Collaboration diagram for Interaction:

Interaction between user and modules. More...

Data Structures

struct  interaction_dialog_t
 This structure describes a piece of interaction with the user. More...
struct  interaction_t
 This structure contains the active interaction dialogs, and is used by the manager. More...

Defines

#define DIALOG_GOT_ANSWER   0x01
 Possible flags .
#define DIALOG_YES_NO_CANCEL   0x02
#define DIALOG_LOGIN_PW_OK_CANCEL   0x04
#define DIALOG_PSZ_INPUT_OK_CANCEL   0x08
#define DIALOG_BLOCKING_ERROR   0x10
#define DIALOG_NONBLOCKING_ERROR   0x20
#define DIALOG_WARNING   0x40
#define DIALOG_USER_PROGRESS   0x80
#define DIALOG_INTF_PROGRESS   0x100
#define intf_UserFatal(a, b, c, d, e...)   __intf_UserFatal( VLC_OBJECT(a),b,c,d, ## e )
#define intf_UserWarn(a, c, d, e...)   __intf_UserWarn( VLC_OBJECT(a),c,d, ## e )
#define intf_UserLoginPassword(a, b, c, d, e...)   __intf_UserLoginPassword( VLC_OBJECT(a),b,c,d,e)
#define intf_UserYesNo(a, b, c, d, e, f)   __intf_UserYesNo( VLC_OBJECT(a),b,c, d, e, f )
#define intf_UserStringInput(a, b, c, d)   __intf_UserStringInput( VLC_OBJECT(a),b,c,d )
#define intf_IntfProgress(a, b, c)   __intf_Progress( VLC_OBJECT(a), NULL, b,c, -1 )
#define intf_UserProgress(a, b, c, d, e)   __intf_Progress( VLC_OBJECT(a),b,c,d,e )
#define intf_ProgressUpdate(a, b, c, d, e)   __intf_ProgressUpdate( VLC_OBJECT(a),b,c,d,e )
#define intf_ProgressIsCancelled(a, b)   __intf_UserProgressIsCancelled( VLC_OBJECT(a),b )
#define intf_UserHide(a, b)   __intf_UserHide( VLC_OBJECT(a), b )

Enumerations

enum  { DIALOG_DEFAULT, DIALOG_OK_YES, DIALOG_NO, DIALOG_CANCELLED }
 Possible return codes. More...
enum  {
  NEW_DIALOG, SENT_DIALOG, UPDATED_DIALOG, ANSWERED_DIALOG,
  HIDING_DIALOG, HIDDEN_DIALOG, DESTROYED_DIALOG
}
 Possible status. More...
enum  { INTERACT_DIALOG_ONEWAY, INTERACT_DIALOG_TWOWAY }
 Possible interaction types. More...
enum  { INTERACT_NEW, INTERACT_UPDATE, INTERACT_HIDE, INTERACT_DESTROY }
 Possible actions. More...

Functions

int __intf_UserFatal (vlc_object_t *, bool, const char *, const char *,...)
 Send an error message, both in a blocking and non-blocking way.
int __intf_UserWarn (vlc_object_t *, const char *, const char *,...)
 Helper function to send a warning, which is always shown non-blocking.
int __intf_UserLoginPassword (vlc_object_t *, const char *, const char *, char **, char **)
 Helper function to make a login/password dialogue.
int __intf_UserYesNo (vlc_object_t *, const char *, const char *, const char *, const char *, const char *)
 Helper function to ask a yes-no-cancel question.
int __intf_UserStringInput (vlc_object_t *, const char *, const char *, char **)
 Helper function to make a dialogue asking the user for !password string.
int __intf_Progress (vlc_object_t *, const char *, const char *, float, int)
 Helper function to create a dialogue showing a progress-bar with some info.
void __intf_ProgressUpdate (vlc_object_t *, int, const char *, float, int)
 Update a progress bar in a dialogue.
bool __intf_UserProgressIsCancelled (vlc_object_t *, int)
 Helper function to communicate dialogue cancellations between the interface module and the caller.
void __intf_UserHide (vlc_object_t *, int)
 Hide an interaction dialog.

Detailed Description

Interaction between user and modules.


Define Documentation

#define DIALOG_BLOCKING_ERROR   0x10

#define DIALOG_GOT_ANSWER   0x01

Possible flags .

Dialog types

#define DIALOG_INTF_PROGRESS   0x100

#define DIALOG_LOGIN_PW_OK_CANCEL   0x04

#define DIALOG_NONBLOCKING_ERROR   0x20

#define DIALOG_PSZ_INPUT_OK_CANCEL   0x08

#define DIALOG_USER_PROGRESS   0x80

#define DIALOG_WARNING   0x40

#define DIALOG_YES_NO_CANCEL   0x02

#define intf_IntfProgress ( a,
b,
 )     __intf_Progress( VLC_OBJECT(a), NULL, b,c, -1 )

#define intf_ProgressIsCancelled ( a,
 )     __intf_UserProgressIsCancelled( VLC_OBJECT(a),b )

#define intf_ProgressUpdate ( a,
b,
c,
d,
 )     __intf_ProgressUpdate( VLC_OBJECT(a),b,c,d,e )

#define intf_UserFatal ( a,
b,
c,
d,
e...   )     __intf_UserFatal( VLC_OBJECT(a),b,c,d, ## e )

#define intf_UserHide ( a,
 )     __intf_UserHide( VLC_OBJECT(a), b )

#define intf_UserLoginPassword ( a,
b,
c,
d,
e...   )     __intf_UserLoginPassword( VLC_OBJECT(a),b,c,d,e)

#define intf_UserProgress ( a,
b,
c,
d,
 )     __intf_Progress( VLC_OBJECT(a),b,c,d,e )

#define intf_UserStringInput ( a,
b,
c,
 )     __intf_UserStringInput( VLC_OBJECT(a),b,c,d )

#define intf_UserWarn ( a,
c,
d,
e...   )     __intf_UserWarn( VLC_OBJECT(a),c,d, ## e )

#define intf_UserYesNo ( a,
b,
c,
d,
e,
 )     __intf_UserYesNo( VLC_OBJECT(a),b,c, d, e, f )


Enumeration Type Documentation

anonymous enum

Possible return codes.

Enumerator:
DIALOG_DEFAULT 
DIALOG_OK_YES 
DIALOG_NO 
DIALOG_CANCELLED 

anonymous enum

Possible status.

Enumerator:
NEW_DIALOG  Just created.
SENT_DIALOG  Sent to interface.
UPDATED_DIALOG  Update to send.
ANSWERED_DIALOG  Got "answer".
HIDING_DIALOG  Hiding requested.
HIDDEN_DIALOG  Now hidden. Requesting destruction.
DESTROYED_DIALOG  Interface has destroyed it.

anonymous enum

Possible interaction types.

Enumerator:
INTERACT_DIALOG_ONEWAY  Dialog box without feedback.
INTERACT_DIALOG_TWOWAY  Dialog box with feedback.

anonymous enum

Possible actions.

Enumerator:
INTERACT_NEW 
INTERACT_UPDATE 
INTERACT_HIDE 
INTERACT_DESTROY 


Function Documentation

int __intf_Progress ( vlc_object_t p_this,
const char *  psz_title,
const char *  psz_status,
float  f_pos,
int  i_time 
)

Helper function to create a dialogue showing a progress-bar with some info.

Parameters:
p_this Parent vlc_object
psz_title Title for the dialog (NULL implies main intf )
psz_status Current status
f_position Current position (0.0->100.0)
i_timeToGo Time (in sec) to go until process is finished
Returns:
Dialog id, to give to UserProgressUpdate

void __intf_ProgressUpdate ( vlc_object_t p_this,
int  i_id,
const char *  psz_status,
float  f_pos,
int  i_time 
)

Update a progress bar in a dialogue.

Parameters:
p_this Parent vlc_object
i_id Identifier of the dialog
psz_status New status
f_position New position (0.0->100.0)
i_timeToGo Time (in sec) to go until process is finished
Returns:
nothing

int __intf_UserFatal ( vlc_object_t p_this,
bool  b_blocking,
const char *  psz_title,
const char *  psz_format,
  ... 
)

Send an error message, both in a blocking and non-blocking way.

Parameters:
p_this Parent vlc_object
b_blocking Is this dialog blocking or not?
psz_title Title for the dialog
psz_format The message to display
Returns:
VLC_SUCCESS or VLC_EGENERIC

void __intf_UserHide ( vlc_object_t p_this,
int  i_id 
)

Hide an interaction dialog.

Parameters:
p_this the parent vlc object
i_id the id of the item to hide
Returns:
nothing

int __intf_UserLoginPassword ( vlc_object_t p_this,
const char *  psz_title,
const char *  psz_description,
char **  ppsz_login,
char **  ppsz_password 
)

Helper function to make a login/password dialogue.

Parameters:
p_this Parent vlc_object
psz_title Title for the dialog
psz_description A description
ppsz_login Returned login
ppsz_password Returned password
Returns:
Clicked button code

bool __intf_UserProgressIsCancelled ( vlc_object_t p_this,
int  i_id 
)

Helper function to communicate dialogue cancellations between the interface module and the caller.

Parameters:
p_this Parent vlc_object
i_id Identifier of the dialogue
Returns:
Either true or false

int __intf_UserStringInput ( vlc_object_t p_this,
const char *  psz_title,
const char *  psz_description,
char **  ppsz_usersString 
)

Helper function to make a dialogue asking the user for !password string.

Parameters:
p_this Parent vlc_object
psz_title Title for the dialog
psz_description A description
ppsz_usersString Returned login
Returns:
Clicked button code

int __intf_UserWarn ( vlc_object_t p_this,
const char *  psz_title,
const char *  psz_format,
  ... 
)

Helper function to send a warning, which is always shown non-blocking.

Parameters:
p_this Parent vlc_object
psz_title Title for the dialog
psz_format The message to display
Returns:
VLC_SUCCESS or VLC_EGENERIC

int __intf_UserYesNo ( vlc_object_t p_this,
const char *  psz_title,
const char *  psz_description,
const char *  psz_default,
const char *  psz_alternate,
const char *  psz_other 
)

Helper function to ask a yes-no-cancel question.

Parameters:
p_this Parent vlc_object
psz_title Title for the dialog
psz_description A description
psz_default caption for the default button
psz_alternate caption for the alternate button
psz_other caption for the optional 3rd button (== cancel)
Returns:
Clicked button code


Generated on Wed Aug 13 08:05:54 2008 for VLC by  doxygen 1.5.1