00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef VLC_INTF_H_
00027 #define VLC_INTF_H_
00028
00029 # ifdef __cplusplus
00030 extern "C" {
00031 # endif
00032
00033 typedef struct intf_dialog_args_t intf_dialog_args_t;
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 typedef struct intf_sys_t intf_sys_t;
00048
00049
00050 typedef struct intf_thread_t
00051 {
00052 VLC_COMMON_MEMBERS
00053
00054 struct intf_thread_t *p_next;
00055
00056 #if defined( __APPLE__ ) || defined( WIN32 )
00057 bool b_should_run_on_first_thread;
00058 #endif
00059
00060
00061 intf_sys_t * p_sys;
00062 char * psz_intf;
00063
00064
00065 module_t * p_module;
00066 void ( *pf_run ) ( struct intf_thread_t * );
00067
00068
00069 void ( *pf_show_dialog ) ( struct intf_thread_t *, int, int,
00070 intf_dialog_args_t * );
00071
00072 config_chain_t *p_cfg;
00073 } intf_thread_t;
00074
00075
00076
00077
00078
00079 struct intf_dialog_args_t
00080 {
00081 intf_thread_t *p_intf;
00082 char *psz_title;
00083
00084 char **psz_results;
00085 int i_results;
00086
00087 void (*pf_callback) ( intf_dialog_args_t * );
00088 void *p_arg;
00089
00090
00091 char *psz_extensions;
00092 bool b_save;
00093 bool b_multiple;
00094
00095
00096 struct interaction_dialog_t *p_dialog;
00097 };
00098
00099
00100
00101
00102 VLC_EXPORT( int, intf_Create, ( vlc_object_t *, const char * ) );
00103 #define intf_Create(a,b) intf_Create(VLC_OBJECT(a),b)
00104
00105 #define intf_Eject(a,b) __intf_Eject(VLC_OBJECT(a),b)
00106 VLC_EXPORT( int, __intf_Eject, ( vlc_object_t *, const char * ) );
00107
00108 VLC_EXPORT( void, libvlc_Quit, ( libvlc_int_t * ) );
00109
00110
00111
00112
00113
00114
00115 #if defined( WIN32 ) && !defined( UNDER_CE )
00116 # define CONSOLE_INTRO_MSG \
00117 if( !getenv( "PWD" ) || !getenv( "PS1" ) ) \
00118 { \
00119 AllocConsole(); \
00120 freopen( "CONOUT$", "w", stdout ); \
00121 freopen( "CONOUT$", "w", stderr ); \
00122 freopen( "CONIN$", "r", stdin ); \
00123 } \
00124 msg_Info( p_intf, "%s", COPYRIGHT_MESSAGE ); \
00125 msg_Info( p_intf, _("\nWarning: if you can't access the GUI " \
00126 "anymore, open a command-line window, go to the " \
00127 "directory where you installed VLC and run " \
00128 "\"vlc -I qt\"\n") )
00129 #else
00130 # define CONSOLE_INTRO_MSG
00131 #endif
00132
00133
00134 typedef enum vlc_dialog {
00135 INTF_DIALOG_FILE_SIMPLE = 1,
00136 INTF_DIALOG_FILE,
00137 INTF_DIALOG_DISC,
00138 INTF_DIALOG_NET,
00139 INTF_DIALOG_CAPTURE,
00140 INTF_DIALOG_SAT,
00141 INTF_DIALOG_DIRECTORY,
00142
00143 INTF_DIALOG_STREAMWIZARD,
00144 INTF_DIALOG_WIZARD,
00145
00146 INTF_DIALOG_PLAYLIST,
00147 INTF_DIALOG_MESSAGES,
00148 INTF_DIALOG_FILEINFO,
00149 INTF_DIALOG_PREFS,
00150 INTF_DIALOG_BOOKMARKS,
00151 INTF_DIALOG_EXTENDED,
00152
00153 INTF_DIALOG_POPUPMENU = 20,
00154 INTF_DIALOG_AUDIOPOPUPMENU,
00155 INTF_DIALOG_VIDEOPOPUPMENU,
00156 INTF_DIALOG_MISCPOPUPMENU,
00157
00158 INTF_DIALOG_FILE_GENERIC = 30,
00159 INTF_DIALOG_INTERACTION = 50,
00160
00161 INTF_DIALOG_UPDATEVLC = 90,
00162 INTF_DIALOG_VLM,
00163
00164 INTF_DIALOG_EXIT = 99
00165 } vlc_dialog_t;
00166
00167
00168 #define INTF_ABOUT_MSG LICENSE_MSG
00169
00170 #define EXTENSIONS_AUDIO "*.a52;*.aac;*.ac3;*.aiff;*.aob;*.ape;" \
00171 "*.dts;*.flac;*.it;" \
00172 "*.m4a;*.m4p;*.mka;*.mlp;*.mod;*.mp1;*.mp2;*.mp3;*.mpc" \
00173 "*.oga;*.ogg;*.oma;*.s3m;*.spx;" \
00174 "*.vqf;*.w64;*.wav;*.wma;*.wv;*.xm"
00175
00176 #define EXTENSIONS_VIDEO "*.asf;*.avi;*.divx;*.dv;*.flv;*.gxf;*.iso;*.m1v;*.m2v;" \
00177 "*.m2t;*.m2ts;*.m4v;*.mkv;*.mov;*.mp2;*.mp4;*.mpeg;*.mpeg1;" \
00178 "*.mpeg2;*.mpeg4;*.mpg;*.mts;*.mxf;*.nuv;" \
00179 "*.ogg;*.ogm;*.ogv;*.ogx;*.ps;" \
00180 "*.rec;*.rm;*.rmvb;*.tod;*.ts;*.vob;*.wmv"
00181
00182 #define EXTENSIONS_PLAYLIST "*.asx;*.b4s;*.ifo;*.m3u;*.m3u8;*.pls;*.ram;*.rar;*.sdp;*.vlc;*.xspf;*.zip"
00183
00184 #define EXTENSIONS_MEDIA EXTENSIONS_VIDEO ";" EXTENSIONS_AUDIO ";" \
00185 EXTENSIONS_PLAYLIST
00186
00187 #define EXTENSIONS_SUBTITLE "*.cdg;*.idx;*.srt;*.sub;*.utf;*.ass;*.ssa;*.aqt;" \
00188 "*.jss;*.psb;*.rt;*.smi"
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199 typedef struct interaction_dialog_t
00200 {
00201 int i_type;
00202 char *psz_title;
00203 char *psz_description;
00204 char *psz_default_button;
00205 char *psz_alternate_button;
00206
00207 char *psz_other_button;
00208
00209 char *psz_returned[1];
00210
00211 vlc_value_t val;
00212 int i_timeToGo;
00213 bool b_cancelled;
00214
00215 void * p_private;
00216
00217 int i_status;
00218 int i_action;
00219 int i_flags;
00220 int i_return;
00221
00222 vlc_object_t *p_parent;
00223
00224 intf_thread_t *p_interface;
00225 vlc_mutex_t *p_lock;
00226 } interaction_dialog_t;
00227
00228
00229
00230
00231 #define DIALOG_GOT_ANSWER 0x01
00232 #define DIALOG_YES_NO_CANCEL 0x02
00233 #define DIALOG_LOGIN_PW_OK_CANCEL 0x04
00234 #define DIALOG_PSZ_INPUT_OK_CANCEL 0x08
00235 #define DIALOG_BLOCKING_ERROR 0x10
00236 #define DIALOG_NONBLOCKING_ERROR 0x20
00237 #define DIALOG_USER_PROGRESS 0x80
00238 #define DIALOG_INTF_PROGRESS 0x100
00239
00240
00241 enum
00242 {
00243 DIALOG_OK_YES,
00244 DIALOG_NO,
00245 DIALOG_CANCELLED
00246 };
00247
00248
00249 enum
00250 {
00251 ANSWERED_DIALOG,
00252 DESTROYED_DIALOG,
00253 };
00254
00255
00256 enum
00257 {
00258 INTERACT_NEW,
00259 INTERACT_UPDATE,
00260 INTERACT_HIDE,
00261 INTERACT_DESTROY
00262 };
00263
00264 #define intf_UserStringInput( a, b, c, d ) (VLC_OBJECT(a),b,c,d, VLC_EGENERIC)
00265 #define interaction_Register( t ) (t, VLC_EGENERIC)
00266 #define interaction_Unregister( t ) (t, VLC_EGENERIC)
00267
00268
00269
00270
00271
00272 # ifdef __cplusplus
00273 }
00274 # endif
00275 #endif