X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Finterface.h;h=ba86301b3928b34cb737a2a5317a4f12e82f0399;hb=9530fc9f8c7ab5391974c69e019a68bd9227738b;hp=070843e8cb54ef104730291dea0390fdd7b3f81e;hpb=9a726693158506defdbe4c98f45b80521f32232c;p=vlc diff --git a/include/interface.h b/include/interface.h index 070843e8cb..ba86301b39 100644 --- a/include/interface.h +++ b/include/interface.h @@ -4,28 +4,27 @@ * interface, such as message output. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN + * $Id: interface.h,v 1.22 2001/03/21 13:42:33 sam Exp $ * - * Authors: + * Authors: Vincent Seguin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ /***************************************************************************** * Required headers: - * * * * "config.h" @@ -45,9 +44,20 @@ * This structe describes all interface-specific data of the main (interface) * thread. *****************************************************************************/ -typedef int ( intf_sys_create_t ) ( p_intf_thread_t p_intf ); -typedef void ( intf_sys_destroy_t ) ( p_intf_thread_t p_intf ); -typedef void ( intf_sys_manage_t ) ( p_intf_thread_t p_intf ); +typedef struct _keyparam +{ + int key; + int param; +} keyparm; + +typedef struct _key +{ + int received_key; + keyparm forwarded; + struct _key * next; +} intf_key; + +typedef intf_key * p_intf_key; typedef struct intf_thread_s { @@ -56,31 +66,45 @@ typedef struct intf_thread_s /* Specific interfaces */ p_intf_console_t p_console; /* console */ p_intf_sys_t p_sys; /* system interface */ + p_intf_key p_keys; + + /* Plugin used and shortcuts to access its capabilities */ + struct module_s * p_module; + int ( *pf_open ) ( struct intf_thread_s * ); + void ( *pf_close ) ( struct intf_thread_s * ); + void ( *pf_run ) ( struct intf_thread_s * ); - /* Plugin */ - plugin_id_t intf_plugin; /* interface plugin */ - intf_sys_create_t * p_sys_create; /* create interface thread */ - intf_sys_manage_t * p_sys_manage; /* main loop */ - intf_sys_destroy_t * p_sys_destroy; /* destroy interface */ + /* Interface callback */ + void ( *pf_manage ) ( struct intf_thread_s * ); /* XXX: Channels array - new API */ - //p_intf_channel_t * p_channel[INTF_MAX_CHANNELS];/* channel descriptions */ + //p_intf_channel_t * p_channel[INTF_MAX_CHANNELS];/* channel descriptions */ + /* Channels array - NULL if not used */ p_intf_channel_t p_channel; /* description of channels */ /* Main threads - NULL if not active */ - p_vout_thread_t p_vout; p_input_thread_t p_input; + /* Specific functions */ + keyparm (*p_intf_get_key)(struct intf_thread_s *p_intf, int r_key) ; + + /* XXX: new message passing stuff will go here */ + vlc_mutex_t change_lock; + boolean_t b_menu_change; + boolean_t b_menu; + } intf_thread_t; /***************************************************************************** * Prototypes *****************************************************************************/ intf_thread_t * intf_Create ( void ); -void intf_Run ( intf_thread_t * p_intf ); void intf_Destroy ( intf_thread_t * p_intf ); -int intf_SelectChannel ( intf_thread_t * p_intf, int i_channel ); int intf_ProcessKey ( intf_thread_t * p_intf, int i_key ); +void intf_AssignKey( intf_thread_t *p_intf, int r_key, int f_key, int param); +keyparm intf_GetKey( intf_thread_t *p_intf, int r_key); +void intf_AssignNormalKeys( intf_thread_t *p_intf); +