Chameleon

Chameleon Svn Source Tree

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

Source at commit 2862 created 7 years 24 days ago.
By ifabio, Tag 2.3 release, bump svn to 2.4
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
29typedef enum {
30NORMAL = 1,
31MAIN_HEADING,
32MAIN_MENU_BOX,
33MAIN_MENU_FORE,
34MAIN_MENU_BACK,
35MAIN_MENU_GREY,
36MAIN_MENU_HEADING,
37SCROLLWIN_TEXT,
38SCROLLWIN_HEADING,
39SCROLLWIN_BOX,
40DIALOG_TEXT,
41DIALOG_MENU_FORE,
42DIALOG_MENU_BACK,
43DIALOG_BOX,
44INPUT_BOX,
45INPUT_HEADING,
46INPUT_TEXT,
47INPUT_FIELD,
48FUNCTION_TEXT,
49FUNCTION_HIGHLIGHT,
50ATTR_MAX
51} attributes_t;
52extern attributes_t attributes[];
53
54typedef enum {
55F_HELP = 1,
56F_SYMBOL = 2,
57F_INSTS = 3,
58F_CONF = 4,
59F_BACK = 5,
60F_SAVE = 6,
61F_LOAD = 7,
62F_SEARCH = 8,
63F_EXIT = 9,
64} function_key;
65
66void set_colors(void);
67
68/* this changes the windows attributes !!! */
69void print_in_middle(WINDOW *win,
70int starty,
71int startx,
72int width,
73const char *string,
74chtype color);
75int get_line_length(const char *line);
76int get_line_no(const char *text);
77const char *get_line(const char *text, int line_no);
78void fill_window(WINDOW *win, const char *text);
79int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...);
80int dialog_inputbox(WINDOW *main_window,
81const char *title, const char *prompt,
82const char *init, char *result, int result_len);
83void refresh_all_windows(WINDOW *main_window);
84void show_scroll_win(WINDOW *main_window,
85const char *title,
86const char *text);
87

Archive Download this file

Revision: 2862