]> git.sesse.net Git - vlc/blob - src/interface/intf_console.c
* Header cleaning: filled all empty authors fields, added CVS $Id stuff.
[vlc] / src / interface / intf_console.c
1 /*****************************************************************************
2  * intf_console.c: generic console for interface
3  *****************************************************************************
4  * Copyright (C) 1998, 1999, 2000 VideoLAN
5  * $Id: intf_console.c,v 1.7 2001/03/21 13:42:34 sam Exp $
6  *
7  * Authors: Vincent Seguin <seguin@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  * 
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27 #include "defs.h"
28
29 #include <stdlib.h>                                              /* malloc() */
30
31 #include "config.h"
32
33 /*****************************************************************************
34  * intf_console_t: console descriptor
35  *****************************************************************************
36  * Generic console object. This object will have a representation depending of
37  * the interface.
38  *****************************************************************************/
39 typedef struct intf_console_s
40 {
41     /* Text and history arrays - last line/command has indice 0 */
42     char *                  psz_text[INTF_CONSOLE_MAX_TEXT];
43     char *                  psz_history[INTF_CONSOLE_MAX_HISTORY];
44 } intf_console_t;
45
46 /*****************************************************************************
47  * Local prototypes
48  *****************************************************************************/
49
50 /*****************************************************************************
51  * intf_ConsoleCreate: create console
52  *****************************************************************************
53  * This function will initialize the console object.
54  * It returns NULL on error.
55  *****************************************************************************/
56 intf_console_t *intf_ConsoleCreate( void )
57 {
58     intf_console_t *p_console;
59
60     p_console = malloc( sizeof( intf_console_t ) );
61     return( p_console );
62 }
63
64 /*****************************************************************************
65  * intf_ConsoleDestroy
66  *****************************************************************************
67  * Destroy the console instance initialized by intf_ConsoleCreate.
68  *****************************************************************************/
69 void intf_ConsoleDestroy( intf_console_t *p_console )
70 {
71     free( p_console );
72 }
73
74 /*****************************************************************************
75  * intf_ConsoleClear: clear console
76  *****************************************************************************
77  * Empty all text.
78  *****************************************************************************/
79 void intf_ConsoleClear( intf_console_t *p_console )
80 {
81     /* XXX?? */
82 }
83
84 /*****************************************************************************
85  * intf_ConsolePrint: print a message to console
86  *****************************************************************************
87  * Print a message to the console.
88  *****************************************************************************/
89 void intf_ConsolePrint( intf_console_t *p_console, char *psz_str )
90 {
91     /* XXX?? */
92 }
93
94
95 /*****************************************************************************
96  * intf_ConsoleExec: execute a command in console
97  *****************************************************************************
98  * This function will run a command and print its result in console.
99  *****************************************************************************/
100 void intf_ConsoleExec( intf_console_t *p_console, char *psz_str )
101 {
102     /* XXX?? */
103 }
104
105 /* following functions are local */