Chameleon

Chameleon Svn Source Tree

Root/tags/2.0/i386/config/nconf.h

Source at commit 1753 created 12 years 6 months ago.
By blackosx, Merge recent package installer changes from my branch in to trunk. Includes updates to Credits, installation log messages and localizable strings. Check for existence of EFI system partition before running the check for previous Chameleon installations. Only backup /Extra folder if necessary when running upgrade install.
1/*
2 * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?
3 * Released under the terms of the GNU GPL v2.0.
4 *
5 * Derived from menuconfig.
6 *
7 */
8
9#include <ctype.h>
10#include <errno.h>
11#include <fcntl.h>
12#include <limits.h>
13#include <stdarg.h>
14#include <stdlib.h>
15#include <string.h>
16#include <unistd.h>
17#include <locale.h>
18#include <curses.h>
19#include <menu.h>
20#include <panel.h>
21#include <form.h>
22
23#include <stdio.h>
24#include <time.h>
25#include <sys/time.h>
26
27#include "ncurses.h"
28
29#define max(a, b) ({\
30typeof(a) _a = a;\
31typeof(b) _b = b;\
32_a > _b ? _a : _b; })
33
34#define min(a, b) ({\
35typeof(a) _a = a;\
36typeof(b) _b = b;\
37_a < _b ? _a : _b; })
38
39typedef enum {
40NORMAL = 1,
41MAIN_HEADING,
42MAIN_MENU_BOX,
43MAIN_MENU_FORE,
44MAIN_MENU_BACK,
45MAIN_MENU_GREY,
46MAIN_MENU_HEADING,
47SCROLLWIN_TEXT,
48SCROLLWIN_HEADING,
49SCROLLWIN_BOX,
50DIALOG_TEXT,
51DIALOG_MENU_FORE,
52DIALOG_MENU_BACK,
53DIALOG_BOX,
54INPUT_BOX,
55INPUT_HEADING,
56INPUT_TEXT,
57INPUT_FIELD,
58FUNCTION_TEXT,
59FUNCTION_HIGHLIGHT,
60ATTR_MAX
61} attributes_t;
62extern attributes_t attributes[];
63
64typedef enum {
65F_HELP = 1,
66F_SYMBOL = 2,
67F_INSTS = 3,
68F_CONF = 4,
69F_BACK = 5,
70F_SAVE = 6,
71F_LOAD = 7,
72F_SEARCH = 8,
73F_EXIT = 9,
74} function_key;
75
76void set_colors(void);
77
78/* this changes the windows attributes !!! */
79void print_in_middle(WINDOW *win,
80int starty,
81int startx,
82int width,
83const char *string,
84chtype color);
85int get_line_length(const char *line);
86int get_line_no(const char *text);
87const char *get_line(const char *text, int line_no);
88void fill_window(WINDOW *win, const char *text);
89int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...);
90int dialog_inputbox(WINDOW *main_window,
91const char *title, const char *prompt,
92const char *init, char *result, int result_len);
93void refresh_all_windows(WINDOW *main_window);
94void show_scroll_win(WINDOW *main_window,
95const char *title,
96const char *text);
97

Archive Download this file

Revision: 1753