1 /*****************************************************************************
2 * vlc_interaction.h: structures and function for user interaction
3 *****************************************************************************
4 * Copyright (C) 1999-2004 VideoLAN
5 * $Id: vlc_interaction.h 7954 2004-06-07 22:19:12Z fenrir $
7 * Authors: Clément Stenac <zorglub@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
25 * This structure describes an interaction widget
29 int i_type; //< Type identifier;
30 char *psz_text; //< Free text
36 * Possible widget types
40 WIDGET_TEXT, //< Text display
41 WIDGET_PROGRESS, //< A progress bar
42 WIDGET_INPUT //< Input (backed up by a variable)
46 * This structure describes a piece of interaction with the user
48 struct interaction_dialog_t
50 int i_id; //< Unique ID
51 int i_type; //< Type identifier
52 char *psz_title; //< Title
53 char *psz_description; //< Descriptor string
56 int i_widgets; //< Nu,ber of dialog widgets
57 user_widget_t **pp_widgets; //< Dialog widgets
59 vlc_bool_t b_have_answer; //< Has an answer been given ?
60 vlc_bool_t b_reusable; //< Do we have to reuse this ?
62 void * p_private; //< Private interface data
66 * This structure contains the active interaction dialogs, and is
73 int i_dialogs; //< Number of dialogs
74 interaction_dialog_t **pp_dialogs; //< Dialogs
78 * Possible interaction types
82 INTERACT_PROGRESS, //< Progress bar
83 INTERACT_WARNING, //< Warning message ("codec not supported")
84 INTERACT_FATAL, //< Fatal message ("File not found")
85 INTERACT_ASK, //< Full-featured dialog box (password)
88 #define intf_Interact( a,b ) __intf_Interact( VLC_OBJECT(a), b )
89 VLC_EXPORT( int,__intf_Interact,( vlc_object_t *,interaction_dialog_t * ) );
92 VLC_NO_EXPORT_YET( int,__intf_InteractionManage,( playlist_t *) );
95 VLC_EXPORT( void, intf_UserFatal,( vlc_object_t*, const char*, const char*, ...));