* Copyright (C) 1999-2004 VideoLAN
* $Id: vlc_interaction.h 7954 2004-06-07 22:19:12Z fenrir $
*
- * Authors: Clément Stenac <zorglub@videolan.org>
+ * Authors: Clément Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
int i_widgets; //< Nu,ber of dialog widgets
user_widget_t **pp_widgets; //< Dialog widgets
- vlc_bool_t b_have_answer; //< Has an answer been given ?
vlc_bool_t b_reusable; //< Do we have to reuse this ?
void * p_private; //< Private interface data
+ int i_status; //< Dialog status;
+
+ int i_action; //< Action to perform;
+};
+
+/**
+ * Possible status
+ */
+enum
+{
+ NEW_DIALOG,
+ SENT_DIALOG,
+ UPDATED_DIALOG,
+ ANSWERED_DIALOG,
+ HIDING_DIALOG,
+ HIDDEN_DIALOG,
+};
+
+/**
+ * Possible interaction types
+ */
+enum
+{
+ INTERACT_PROGRESS, //< Progress bar
+ INTERACT_WARNING, //< Warning message ("codec not supported")
+ INTERACT_FATAL, //< Fatal message ("File not found")
+ INTERACT_FATAL_LIST, //< List of fatal messages ("File not found")
+ INTERACT_ASK, //< Full-featured dialog box (password)
+};
+
+/**
+ * Predefined reusable dialogs
+ */
+enum
+{
+ DIALOG_FIRST,
+ DIALOG_NOACCESS,
+ DIALOG_NOCODEC,
+ DIALOG_NOAUDIO,
+
+ DIALOG_LAST_PREDEFINED,
};
/**
int i_dialogs; //< Number of dialogs
interaction_dialog_t **pp_dialogs; //< Dialogs
-};
+ intf_thread_t *p_intf; //< Interface to use
+
+ int i_last_id; //< Last attributed ID
+};
/**
- * Possible interaction types
+ * Possible actions
*/
enum
{
- INTERACT_PROGRESS, //< Progress bar
- INTERACT_WARNING, //< Warning message ("codec not supported")
- INTERACT_FATAL, //< Fatal message ("File not found")
- INTERACT_ASK, //< Full-featured dialog box (password)
+ INTERACT_NEW,
+ INTERACT_UPDATE,
+ INTERACT_HIDE
};
+/***************************************************************************
+ * Exported symbols
+ ***************************************************************************/
+
#define intf_Interact( a,b ) __intf_Interact( VLC_OBJECT(a), b )
VLC_EXPORT( int,__intf_Interact,( vlc_object_t *,interaction_dialog_t * ) );
-VLC_EXPORT( int,__intf_InteractionManage,( playlist_t *) );
+#define intf_UserFatal( a,b, c, d, e... ) __intf_UserFatal( a,b,c,d, ## e )
+VLC_EXPORT( void, __intf_UserFatal,( vlc_object_t*, int, const char*, const char*, ...) );
-VLC_EXPORT( void, intf_UserFatal,( vlc_object_t*, const char*, const char*, ...));
+VLC_EXPORT( void, intf_InteractionManage,( playlist_t *) );
+VLC_EXPORT( void, intf_InteractionDestroy,( interaction_t *) );