]> git.sesse.net Git - vlc/blob - include/interface.h
* ALL: the first libvlc commit.
[vlc] / include / interface.h
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.29 2002/06/01 12:31:57 sam Exp $
8  *
9  * Authors: Vincent Seguin <seguin@via.ecp.fr>
10  *
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.
15  * 
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.
20  *
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  *****************************************************************************/
25
26 /*****************************************************************************
27  * intf_thread_t: describe an interface thread
28  *****************************************************************************
29  * This structe describes all interface-specific data of the main (interface)
30  * thread.
31  *****************************************************************************/
32 struct intf_thread_s
33 {
34     VLC_COMMON_MEMBERS
35
36     /* Thread properties and locks */
37     vlc_bool_t          b_block;
38
39     /* Specific interfaces */
40     intf_console_t *    p_console;                                /* console */
41     intf_sys_t *        p_sys;                           /* system interface */
42     
43     /* Plugin used and shortcuts to access its capabilities */
44     module_t *   p_module;
45     int       ( *pf_open )   ( intf_thread_t * );
46     void      ( *pf_close )  ( intf_thread_t * );
47     void      ( *pf_run )    ( intf_thread_t * );
48
49     /* XXX: new message passing stuff will go here */
50     vlc_mutex_t  change_lock;
51     vlc_bool_t   b_menu_change;
52     vlc_bool_t   b_menu;
53 };
54
55 /*****************************************************************************
56  * Prototypes
57  *****************************************************************************/
58 intf_thread_t * intf_Create     ( vlc_object_t * );
59 vlc_error_t     intf_RunThread  ( intf_thread_t * );
60 void            intf_StopThread ( intf_thread_t * );
61 void            intf_Destroy    ( intf_thread_t * );
62
63 void            msg_Create      ( vlc_object_t * );
64 void            msg_Destroy     ( vlc_object_t * );
65
66 VLC_EXPORT( msg_subscription_t*, msg_Subscribe, ( vlc_object_t * ) );
67 VLC_EXPORT( void, msg_Unsubscribe, ( vlc_object_t *, msg_subscription_t * ) );
68