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