]> git.sesse.net Git - vlc/blob - include/interface.h
D�but du portage BeOS. Beaucoup de fuchiers ont �t� modifi� car il a fallu
[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  *
8  * Authors:
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public
21  * License along with this program; if not, write to the
22  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23  * Boston, MA 02111-1307, USA.
24  *****************************************************************************/
25
26 /*****************************************************************************
27  * Required headers:
28  *  <sys/uio.h>
29  *  <X11/Xlib.h>
30  *  <X11/extensions/XShm.h>
31  *  "config.h"
32  *  "common.h"
33  *  "mtime.h"
34  *  "threads.h"
35  *  "input.h"
36  *  "video.h"
37  *  "video_output.h"
38  *  "audio_output.h"
39  *  "xconsole.h"
40  *****************************************************************************/
41
42 /*****************************************************************************
43  * intf_thread_t: describe an interface thread
44  *****************************************************************************
45  * This structe describes all interface-specific data of the main (interface)
46  * thread.
47  *****************************************************************************/
48 typedef int   ( intf_sys_create_t )   ( p_intf_thread_t p_intf );
49 typedef void  ( intf_sys_destroy_t )  ( p_intf_thread_t p_intf );
50 typedef void  ( intf_sys_manage_t )   ( p_intf_thread_t p_intf );
51
52 typedef struct intf_thread_s
53 {
54     boolean_t           b_die;                                 /* `die' flag */
55
56     /* Specific interfaces */
57     p_intf_console_t    p_console;                                /* console */
58     p_intf_sys_t        p_sys;                           /* system interface */
59
60     /* Plugin */
61     plugin_id_t             intf_plugin;                 /* interface plugin */
62     intf_sys_create_t *     p_sys_create;         /* create interface thread */
63     intf_sys_manage_t *     p_sys_manage;                       /* main loop */
64     intf_sys_destroy_t *    p_sys_destroy;              /* destroy interface */
65
66     /* Channels array - NULL if not used */
67     p_intf_channel_t    p_channel;                /* description of channels */
68
69     /* Main threads - NULL if not active */
70     p_vout_thread_t     p_vout;
71     p_input_thread_t    p_input;
72
73 } intf_thread_t;
74
75 /*****************************************************************************
76  * Prototypes
77  *****************************************************************************/
78 intf_thread_t * intf_Create             ( void );
79 void            intf_Run                ( intf_thread_t * p_intf );
80 void            intf_Destroy            ( intf_thread_t * p_intf );
81
82 int             intf_SelectChannel      ( intf_thread_t * p_intf, int i_channel );
83 int             intf_ProcessKey         ( intf_thread_t * p_intf, int i_key );
84