~youscribe/parted/3.1

« back to all changes in this revision

Viewing changes to parted/ui.h

  • Committer: Guilhem Lettron
  • Date: 2012-10-22 14:37:59 UTC
  • Revision ID: guilhem+ubuntu@lettron.fr-20121022143759-m403kecgz13sknvp
3.1 from tarball

Show diffs side-by-side

added added

removed removed

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