/
scope.h
46 lines (35 loc) · 1.08 KB
/
scope.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* \brief Interface of MTK Scope widget module
*/
/*
* Copyright (C) 2003-2008 Norman Feske <norman.feske@genode-labs.com>
* Genode Labs, Feske & Helmuth Systementwicklung GbR
*
* This file is part of the MTK package, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _MTK_SCOPE_H_
#define _MTK_SCOPE_H_
#include "hashtab.h"
#include "widget.h"
struct scope_methods;
struct scope_data;
#define SCOPE struct scope
struct scope {
struct widget_methods *gen;
struct scope_methods *scope;
struct widget_data *wd;
struct scope_data *sd;
};
typedef void (*scope_enum)(char *, char *, WIDGET *, void *);
struct scope_methods {
int (*set_var) (SCOPE *s, char *type, char *name, int len, WIDGET *value);
WIDGET *(*get_var) (SCOPE *s, char *name, int len);
char *(*get_vartype) (SCOPE *s, char *name, int len);
SCOPE *(*get_subscope) (SCOPE *s, char *name, int len);
void (*enumerate) (SCOPE *s, scope_enum e, void *user);
};
struct scope_services {
SCOPE *(*create) (void);
};
#endif /* _MTK_SCOPE_H_ */