00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef VLC_DIALOG_H_
00022 #define VLC_DIALOG_H_
00023 # include <stdarg.h>
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 typedef struct dialog_fatal_t
00035 {
00036 const char *title;
00037 const char *message;
00038 } dialog_fatal_t;
00039
00040 VLC_EXPORT( void, dialog_VFatal, (vlc_object_t *, bool, const char *, const char *, va_list) );
00041
00042 static inline LIBVLC_FORMAT(3, 4)
00043 void dialog_Fatal (vlc_object_t *obj, const char *title, const char *fmt, ...)
00044 {
00045 va_list ap;
00046
00047 va_start (ap, fmt);
00048 dialog_VFatal(obj, false, title, fmt, ap);
00049 va_end (ap);
00050 }
00051 #define dialog_Fatal(o, t, ...) \
00052 dialog_Fatal(VLC_OBJECT(o), t, __VA_ARGS__)
00053
00054 static inline LIBVLC_FORMAT(3, 4)
00055 void dialog_FatalWait (vlc_object_t *obj, const char *title,
00056 const char *fmt, ...){
00057 va_list ap;
00058
00059 va_start (ap, fmt);
00060 dialog_VFatal(obj, true, title, fmt, ap);
00061 va_end (ap);
00062 }
00063 #define dialog_FatalWait(o, t, ...) \
00064 dialog_FatalWait(VLC_OBJECT(o), t, __VA_ARGS__)
00065
00066
00067
00068
00069 typedef struct dialog_login_t
00070 {
00071 const char *title;
00072 const char *message;
00073 char **username;
00074 char **password;
00075 } dialog_login_t;
00076
00077 VLC_EXPORT( void, dialog_Login, (vlc_object_t *, char **, char **, const char *, const char *, ...) ) LIBVLC_FORMAT (5, 6);
00078 #define dialog_Login(o, u, p, t, ...) \
00079 dialog_Login(VLC_OBJECT(o), u, p, t, __VA_ARGS__)
00080
00081
00082
00083
00084 typedef struct dialog_question_t
00085 {
00086 const char *title;
00087 const char *message;
00088 const char *yes;
00089 const char *no;
00090 const char *cancel;
00091 int answer;
00092 } dialog_question_t;
00093
00094 VLC_EXPORT( int, dialog_Question, (vlc_object_t *, const char *, const char *, const char *, const char *, const char *) );
00095 #define dialog_Question(o, t, m, y, n, c) \
00096 dialog_Question(VLC_OBJECT(o), t, m, y, n, c)
00097
00098 typedef struct dialog_progress_bar_t
00099 {
00100 const char *title;
00101 const char *message;
00102 const char *cancel;
00103
00104 void (*pf_update) (void *, const char *, float);
00105 bool (*pf_check) (void *);
00106 void (*pf_destroy) (void *);
00107 void *p_sys;
00108 } dialog_progress_bar_t;
00109
00110 VLC_EXPORT( dialog_progress_bar_t *, dialog_ProgressCreate, (vlc_object_t *, const char *, const char *, const char *) LIBVLC_USED );
00111 #define dialog_ProgressCreate(o, t, m, c) \
00112 dialog_ProgressCreate(VLC_OBJECT(o), t, m, c)
00113 VLC_EXPORT( void, dialog_ProgressDestroy, (dialog_progress_bar_t *) );
00114 VLC_EXPORT( void, dialog_ProgressSet, (dialog_progress_bar_t *, const char *, float) );
00115 VLC_EXPORT( bool, dialog_ProgressCancelled, (dialog_progress_bar_t *) );
00116
00117 VLC_EXPORT( int, dialog_Register, (vlc_object_t *) );
00118 VLC_EXPORT( int, dialog_Unregister, (vlc_object_t *) );
00119 #define dialog_Register(o) dialog_Register(VLC_OBJECT(o))
00120 #define dialog_Unregister(o) dialog_Unregister(VLC_OBJECT(o))
00121
00122 #endif