]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/dope/server/include/window.h
Inital import
[l4.git] / l4 / pkg / dope / server / include / window.h
1 /*
2  * \brief   Interface of DOpE Window widget module
3  * \date    2002-11-13
4  * \author  Norman Feske <nf2@inf.tu-dresden.de>
5  */
6
7 /*
8  * Copyright (C) 2002-2004  Norman Feske  <nf2@os.inf.tu-dresden.de>
9  * Technische Universitaet Dresden, Operating Systems Research Group
10  *
11  * This file is part of the DOpE package, which is distributed under
12  * the  terms  of the  GNU General Public Licence 2.  Please see the
13  * COPYING file for details.
14  */
15
16 #ifndef _DOPE_WINDOW_H_
17 #define _DOPE_WINDOW_H_
18
19 #include "widget.h"
20
21 struct window_methods;
22 struct window_data;
23
24 #define WIN_BORDERS 1
25 #define WIN_TITLE 2
26 #define WIN_CLOSER 4
27 #define WIN_FULLER 8
28
29 #define WINDOW struct window
30
31 struct window {
32         struct widget_methods *gen;
33         struct window_methods *win;
34         struct widget_data    *wd;
35         struct window_data    *wind;
36 };
37
38 struct window_methods {
39         void    (*set_content)   (WINDOW *, WIDGET *content);
40         WIDGET *(*get_content)   (WINDOW *);
41         void    (*set_staytop)   (WINDOW *, s16 staytop_flag);
42         s16     (*get_staytop)   (WINDOW *);
43         void    (*set_elem_mask) (WINDOW *, s32 elem_mask);
44         s32     (*get_elem_mask) (WINDOW *);
45         void    (*set_title)     (WINDOW *, char *new_title);
46         char   *(*get_title)     (WINDOW *);
47         void    (*set_background)(WINDOW *, s16 bg_flag);
48         s16     (*get_background)(WINDOW *);
49         void    (*set_state)     (WINDOW *, s32 state);
50         void    (*activate)      (WINDOW *);
51         void    (*open)          (WINDOW *);
52         void    (*close)         (WINDOW *);
53         void    (*top)           (WINDOW *);
54         void    (*handle_move)   (WINDOW *, WIDGET *);
55         void    (*handle_resize) (WINDOW *, WIDGET *);
56         void    (*set_x)         (WINDOW *, int x);
57         void    (*set_y)         (WINDOW *, int y);
58         void    (*set_kfocus)    (WINDOW *, WIDGETARG *kfocus);
59         WIDGET *(*get_kfocus)    (WINDOW *);
60 };
61
62 struct window_services {
63         WINDOW *(*create) (void);
64
65         int shadow_left;    /* drop shadow size */
66         int shadow_right;
67         int shadow_top;
68         int shadow_bottom;
69 };
70
71
72 #endif /* _DOPE_WINDOW_H_ */