]> git.sesse.net Git - vlc/blob - include/interface.h
eda7ce599170582e1ef857a98e0292d4401863b9
[vlc] / include / interface.h
1 /*****************************************************************************
2  * interface.h: interface access for other threads
3  * (c)1999 VideoLAN
4  *****************************************************************************
5  * This library provides basic functions for threads to interact with user
6  * interface, such as message output.
7  *****************************************************************************
8  * Required headers:
9  *  <sys/uio.h>
10  *  <X11/Xlib.h>
11  *  <X11/extensions/XShm.h>
12  *  "config.h"
13  *  "common.h"
14  *  "mtime.h"
15  *  "vlc_thread.h"
16  *  "input.h"
17  *  "video.h"
18  *  "video_output.h"
19  *  "audio_output.h"
20  *  "xconsole.h"
21  *****************************************************************************/
22
23 /*****************************************************************************
24  * intf_thread_t: describe an interface thread
25  *****************************************************************************
26  * This structe describes all interface-specific data of the main (interface)
27  * thread.
28  *****************************************************************************/
29 typedef int   ( intf_sys_create_t )   ( p_intf_thread_t p_intf );
30 typedef void  ( intf_sys_destroy_t )  ( p_intf_thread_t p_intf );
31 typedef void  ( intf_sys_manage_t )   ( p_intf_thread_t p_intf );
32
33 typedef struct intf_thread_s
34 {
35     boolean_t           b_die;                                 /* `die' flag */
36
37     /* Specific interfaces */
38     p_intf_console_t    p_console;                                /* console */
39     p_intf_sys_t        p_sys;                           /* system interface */
40
41     /* Plugin */
42     void *                  p_intf_plugin;               /* interface plugin */
43     intf_sys_create_t *     p_sys_create;         /* create interface thread */
44     intf_sys_manage_t *     p_sys_manage;                       /* main loop */
45     intf_sys_destroy_t *    p_sys_destroy;              /* destroy interface */
46
47     /* Channels array - NULL if not used */
48     p_intf_channel_t    p_channel;                /* description of channels */
49
50     /* Main threads - NULL if not active */
51     p_vout_thread_t     p_vout;
52     p_input_thread_t    p_input;
53
54 } intf_thread_t;
55
56 /*****************************************************************************
57  * Prototypes
58  *****************************************************************************/
59 intf_thread_t * intf_Create             ( void );
60 void            intf_Run                ( intf_thread_t * p_intf );
61 void            intf_Destroy            ( intf_thread_t * p_intf );
62
63 int             intf_SelectChannel      ( intf_thread_t * p_intf, int i_channel );
64 int             intf_ProcessKey         ( intf_thread_t * p_intf, int i_key );
65