1 /*****************************************************************************
2 * interface.h: interface access for other threads
4 *****************************************************************************
5 * This library provides basic functions for threads to interact with user
6 * interface, such as message output.
7 *****************************************************************************
11 * <X11/extensions/XShm.h>
21 *****************************************************************************/
23 /*****************************************************************************
24 * intf_thread_t: describe an interface thread
25 *****************************************************************************
26 * This structe describes all interface-specific data of the main (interface)
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 );
33 typedef struct intf_thread_s
35 boolean_t b_die; /* `die' flag */
37 /* Specific interfaces */
38 p_intf_console_t p_console; /* console */
39 p_intf_sys_t p_sys; /* system interface */
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 */
47 /* Channels array - NULL if not used */
48 p_intf_channel_t p_channel; /* description of channels */
50 /* Main threads - NULL if not active */
51 p_vout_thread_t p_vout;
52 p_input_thread_t p_input;
56 /*****************************************************************************
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 );
63 int intf_SelectChannel ( intf_thread_t * p_intf, int i_channel );
64 int intf_ProcessKey ( intf_thread_t * p_intf, int i_key );