1 /*****************************************************************************
2 * interface.h: interface access for other threads
3 * This library provides basic functions for threads to interact with user
4 * interface, such as message output.
5 *****************************************************************************
6 * Copyright (C) 1999, 2000 VideoLAN
7 * $Id: interface.h,v 1.34 2002/10/03 17:01:59 gbazin Exp $
9 * Authors: Vincent Seguin <seguin@via.ecp.fr>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
24 *****************************************************************************/
26 /*****************************************************************************
27 * intf_thread_t: describe an interface thread
28 *****************************************************************************
29 * This struct describes all interface-specific data of the main (interface)
31 *****************************************************************************/
36 /* Thread properties and locks */
39 /* Specific interfaces */
40 intf_console_t * p_console; /* console */
41 intf_sys_t * p_sys; /* system interface */
43 /* Interface module */
45 void ( *pf_run ) ( intf_thread_t * );
47 /* XXX: new message passing stuff will go here */
48 vlc_mutex_t change_lock;
49 vlc_bool_t b_menu_change;
53 /*****************************************************************************
55 *****************************************************************************/
56 #define intf_Create(a) __intf_Create(VLC_OBJECT(a))
57 VLC_EXPORT( intf_thread_t *, __intf_Create, ( vlc_object_t * ) );
58 VLC_EXPORT( vlc_error_t, intf_RunThread, ( intf_thread_t * ) );
59 VLC_EXPORT( void, intf_StopThread, ( intf_thread_t * ) );
60 VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
62 /*****************************************************************************
64 *****************************************************************************/
66 # define CONSOLE_INTRO_MSG \
68 freopen( "CONOUT$", "w", stdout ); \
69 freopen( "CONOUT$", "w", stderr ); \
70 freopen( "CONIN$", "r", stdin ); \
71 intf_Msg( VERSION_MESSAGE ); \
72 intf_Msg( _("\nWarning: if you can't access the GUI anymore, "\
73 "open a dos command box, go to the directory " \
74 "where you installed VLC and run " \
75 "\"vlc -I win32\"\n") )
77 # define CONSOLE_INTRO_MSG