xref: /onnv-gate/usr/src/cmd/parted/ui.h (revision 9663:ace9a2ac3683)
1*9663SMark.Logan@Sun.COM /*
2*9663SMark.Logan@Sun.COM     parted - a frontend to libparted
3*9663SMark.Logan@Sun.COM     Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
4*9663SMark.Logan@Sun.COM 
5*9663SMark.Logan@Sun.COM     This program is free software; you can redistribute it and/or modify
6*9663SMark.Logan@Sun.COM     it under the terms of the GNU General Public License as published by
7*9663SMark.Logan@Sun.COM     the Free Software Foundation; either version 3 of the License, or
8*9663SMark.Logan@Sun.COM     (at your option) any later version.
9*9663SMark.Logan@Sun.COM 
10*9663SMark.Logan@Sun.COM     This program is distributed in the hope that it will be useful,
11*9663SMark.Logan@Sun.COM     but WITHOUT ANY WARRANTY; without even the implied warranty of
12*9663SMark.Logan@Sun.COM     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*9663SMark.Logan@Sun.COM     GNU General Public License for more details.
14*9663SMark.Logan@Sun.COM 
15*9663SMark.Logan@Sun.COM     You should have received a copy of the GNU General Public License
16*9663SMark.Logan@Sun.COM     along with this program.  If not, see <http://www.gnu.org/licenses/>.
17*9663SMark.Logan@Sun.COM */
18*9663SMark.Logan@Sun.COM 
19*9663SMark.Logan@Sun.COM #ifndef UI_H_INCLUDED
20*9663SMark.Logan@Sun.COM #define UI_H_INCLUDED
21*9663SMark.Logan@Sun.COM 
22*9663SMark.Logan@Sun.COM #include "strlist.h"
23*9663SMark.Logan@Sun.COM 
24*9663SMark.Logan@Sun.COM extern char*	prog_name;
25*9663SMark.Logan@Sun.COM 
26*9663SMark.Logan@Sun.COM extern int init_ui ();
27*9663SMark.Logan@Sun.COM extern int non_interactive_mode (PedDevice** dev, Command* cmd_list[],
28*9663SMark.Logan@Sun.COM 				 int argc, char* argv[]);
29*9663SMark.Logan@Sun.COM extern int interactive_mode (PedDevice** dev, Command* cmd_list[]);
30*9663SMark.Logan@Sun.COM extern void done_ui ();
31*9663SMark.Logan@Sun.COM 
32*9663SMark.Logan@Sun.COM extern int screen_width ();
33*9663SMark.Logan@Sun.COM extern void wipe_line ();
34*9663SMark.Logan@Sun.COM 
35*9663SMark.Logan@Sun.COM extern void command_line_push_word (const char* word);
36*9663SMark.Logan@Sun.COM extern char* command_line_pop_word ();
37*9663SMark.Logan@Sun.COM extern char* command_line_peek_word ();
38*9663SMark.Logan@Sun.COM extern void command_line_flush ();
39*9663SMark.Logan@Sun.COM extern int command_line_get_word_count ();
40*9663SMark.Logan@Sun.COM extern void command_line_prompt_words (const char* prompt, const char* def,
41*9663SMark.Logan@Sun.COM 				       const StrList* possibilities,
42*9663SMark.Logan@Sun.COM 				       int multi_word);
43*9663SMark.Logan@Sun.COM extern char* command_line_get_word (const char* prompt, const char* def,
44*9663SMark.Logan@Sun.COM 				    const StrList* possibilities,
45*9663SMark.Logan@Sun.COM 				    int multi_word);
46*9663SMark.Logan@Sun.COM extern int command_line_get_integer (const char* prompt, int* value);
47*9663SMark.Logan@Sun.COM extern int command_line_get_sector (const char* prompt, PedDevice* dev,
48*9663SMark.Logan@Sun.COM 				    PedSector* value, PedGeometry** range);
49*9663SMark.Logan@Sun.COM extern int command_line_get_state (const char* prompt, int* value);
50*9663SMark.Logan@Sun.COM extern int command_line_get_device (const char* prompt, PedDevice** value);
51*9663SMark.Logan@Sun.COM extern int command_line_get_disk (const char* prompt, PedDisk** value);
52*9663SMark.Logan@Sun.COM extern int command_line_get_partition (const char* prompt, PedDisk* disk,
53*9663SMark.Logan@Sun.COM 				       PedPartition** value);
54*9663SMark.Logan@Sun.COM extern int command_line_get_fs_type (const char* prompt,
55*9663SMark.Logan@Sun.COM 				     const PedFileSystemType*(* value));
56*9663SMark.Logan@Sun.COM extern int command_line_get_disk_type (const char* prompt,
57*9663SMark.Logan@Sun.COM 				       const PedDiskType*(* value));
58*9663SMark.Logan@Sun.COM extern int command_line_get_part_flag (const char* prompt,
59*9663SMark.Logan@Sun.COM 				       const PedPartition* part,
60*9663SMark.Logan@Sun.COM 				       PedPartitionFlag* flag);
61*9663SMark.Logan@Sun.COM extern int command_line_get_part_type (const char* prompt, const PedDisk* disk,
62*9663SMark.Logan@Sun.COM 				       PedPartitionType* type);
63*9663SMark.Logan@Sun.COM extern PedExceptionOption command_line_get_ex_opt (const char* prompt,
64*9663SMark.Logan@Sun.COM 						   PedExceptionOption options);
65*9663SMark.Logan@Sun.COM extern int command_line_get_unit (const char* prompt, PedUnit* unit);
66*9663SMark.Logan@Sun.COM 
67*9663SMark.Logan@Sun.COM extern int command_line_is_integer ();
68*9663SMark.Logan@Sun.COM extern int command_line_is_sector ();
69*9663SMark.Logan@Sun.COM 
70*9663SMark.Logan@Sun.COM extern void help_msg ();
71*9663SMark.Logan@Sun.COM 
72*9663SMark.Logan@Sun.COM extern void print_using_dev (PedDevice* dev);
73*9663SMark.Logan@Sun.COM 
74*9663SMark.Logan@Sun.COM /* in parted.c */
75*9663SMark.Logan@Sun.COM extern int	opt_script_mode;
76*9663SMark.Logan@Sun.COM extern int	pretend_input_tty;
77*9663SMark.Logan@Sun.COM 
78*9663SMark.Logan@Sun.COM extern void print_options_help ();
79*9663SMark.Logan@Sun.COM extern void print_commands_help ();
80*9663SMark.Logan@Sun.COM 
81*9663SMark.Logan@Sun.COM 
82*9663SMark.Logan@Sun.COM #endif /* UI_H_INCLUDED */
83