File: window.h

package info (click to toggle)
ion2 20040729-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,828 kB
  • ctags: 3,466
  • sloc: ansic: 28,432; makefile: 473; sh: 230; perl: 16
file content (62 lines) | stat: -rw-r--r-- 1,979 bytes parent folder | download | duplicates (3)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
 * ion/ioncore/window.h
 *
 * Copyright (c) Tuomo Valkonen 1999-2004. 
 *
 * Ion is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 */

#ifndef ION_IONCORE_WINDOW_H
#define ION_IONCORE_WINDOW_H

#include "common.h"

INTROBJ(WWindow);

#include "region.h"
#include "binding.h"

#define FIND_WINDOW_T(WIN, TYPE) (TYPE*)find_window_t(WIN, &OBJDESCR(TYPE))
#define FIND_WINDOW(WIN) find_window(WIN)


DECLOBJ(WWindow){
    WRegion region;
    Window win;
    XIC xic;
    WRegion *keep_on_top_list;
};


extern bool window_init_new(WWindow *p, WWindow *parent, 
                            const WRectangle *geom);
extern bool window_init(WWindow *p, WWindow *parent, Window win, 
                        const WRectangle *geom);
extern void window_deinit(WWindow *win);

extern WRegion *find_window(Window win);
extern WRegion *find_window_t(Window win, const WObjDescr *descr);

DYNFUN void window_draw(WWindow *wwin, bool complete);
DYNFUN void window_insstr(WWindow *wwin, const char *buf, size_t n);
DYNFUN int window_press(WWindow *wwin, XButtonEvent *ev, WRegion **reg_ret);
DYNFUN void window_release(WWindow *wwin);

/* Only to be used by regions that inherit this */
extern void window_map(WWindow *wwin);
extern void window_unmap(WWindow *wwin);
extern void window_set_focus_to(WWindow *wwin, bool warp);
extern void window_fit(WWindow *wwin, const WRectangle *geom);
extern bool reparent_window(WWindow *wwin, WWindow *parent, 
                            const WRectangle *geom);

extern Window window_restack(WWindow *wwin, Window other, int mode);
extern void do_restack_window(Window win, Window other, int stack_mode);

DYNFUN bool region_reparent(WRegion *reg, WWindow *target, 
                            const WRectangle *geom);

#endif /* ION_IONCORE_WINDOW_H */