ekg2
Strona główna
Dodatkowe strony
Moduły
Struktury Danych
Pliki
Lista plików
Globalne
All
Struktury Danych
Pliki
Funkcje
Zmienne
Definicje typów
Wyliczenia
Wartości wyliczeń
Definicje
Grupay
Strony
remote
vars.h
Idź do dokumentacji tego pliku.
1
/* $Id: vars.h 4062 2008-07-08 08:17:16Z darkjames $ */
2
3
/*
4
* (C) Copyright 2001-2003 Wojtek Kaniewski <wojtekka@irc.pl>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License Version 2 as
8
* published by the Free Software Foundation.
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, write to the Free Software
17
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
*/
19
20
#ifndef __EKG_VARS_H
21
#define __EKG_VARS_H
22
23
#include "
plugins.h
"
24
25
typedef
enum
{
26
VAR_STR
,
/* ciąg znaków */
27
VAR_INT
,
/* liczba całkowita */
28
VAR_BOOL
,
/* 0/1, tak/nie, yes/no, on/off */
29
VAR_MAP
,
/* bitmapa */
30
VAR_FILE
,
/* plik */
31
VAR_DIR
,
/* katalog */
32
VAR_THEME
,
/* theme */
33
34
VAR_REMOTE
/* remote, not used by plugins */
35
}
variable_class_t
;
36
37
typedef
struct
{
38
char
*label;
/* nazwa wartości */
39
int
value;
/* wartość */
40
int
conflicts;
/* wartości, z którymi koliduje */
41
}
variable_map_t
;
42
43
typedef
void (
variable_notify_func_t
)(
const
char
*);
44
typedef
void (
variable_check_func_t
)(
const
char
*,
const
char
*);
45
typedef
int (
variable_display_func_t
)(
const
char
*);
46
47
typedef
struct
variable
{
48
struct
variable
*
next
;
49
50
char
*
name
;
/* ekg2-remote: OK */
51
plugin_t
*
plugin
;
/* ekg2-remote: NONE */
52
int
name_hash
;
/* ekg2-remote: OK */
53
int
type
;
/* ekg2-remote: VAR_STR, ncurses completion BAD */
54
int
display
;
/* ekg2-remote: ? 0 bez wartości, 1 pokazuje, 2 w ogóle */
55
void
*
ptr
;
/* ekg2-remote: OK, olewamy wartosc */
56
variable_check_func_t
*
check
;
/* ekg2-remote: BAD */
57
variable_notify_func_t
*
notify
;
/* ekg2-remote: ? */
58
variable_map_t
*
map
;
/* ekg2-remote: BAD */
59
variable_display_func_t
*
dyndisplay
;
/* ekg2-remote: BAD */
60
}
variable_t
;
61
62
extern
variable_t
*
variables
;
63
64
void
variable_init
();
65
variable_t
*
variable_find
(
const
char
*
name
);
66
variable_map_t
*
variable_map
(
int
count, ...);
67
68
variable_t
*
variable_add
(
plugin_t
*
plugin
,
const
char
*
name
,
int
type
,
int
display
,
void
*
ptr
,
variable_notify_func_t
*
notify
,
variable_map_t
*
map
,
variable_display_func_t
*
dyndisplay
);
69
variable_t
*
remote_variable_add
(
const
char
*
name
,
const
char
*value);
70
71
variable_t
*
variables_removei
(
variable_t
*v);
72
73
void
variables_destroy
();
74
75
#endif
/* __EKG_VARS_H */
76
77
/*
78
* Local Variables:
79
* mode: c
80
* c-file-style: "k&r"
81
* c-basic-offset: 8
82
* indent-tabs-mode: t
83
* End:
84
*/
Wygenerowano So, 9 lut 2013 21:07:50 dla ekg2 programem
1.8.1.2