1 | #ifndef INC_BARNOWL_WINDOW_H |
---|
2 | #define INC_BARNOWL_WINDOW_H |
---|
3 | |
---|
4 | #include <glib.h> |
---|
5 | #include <glib-object.h> |
---|
6 | |
---|
7 | G_BEGIN_DECLS |
---|
8 | |
---|
9 | #define OWL_TYPE_WINDOW (owl_window_get_type ()) |
---|
10 | #define OWL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), OWL_TYPE_WINDOW, OwlWindow)) |
---|
11 | #define OWL_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OWL_TYPE_WINDOW)) |
---|
12 | #define OWL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), OWL_TYPE_WINDOW, OwlWindowClass)) |
---|
13 | #define OWL_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OWL_TYPE_WINDOW)) |
---|
14 | #define OWL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OWL_TYPE_WINDOW, OwlWindowClass)) |
---|
15 | |
---|
16 | typedef struct _owl_window OwlWindow; |
---|
17 | typedef struct _OwlWindowClass OwlWindowClass; |
---|
18 | typedef OwlWindow owl_window; /* meh */ |
---|
19 | |
---|
20 | struct _OwlWindowClass |
---|
21 | { |
---|
22 | GObjectClass parent_class; |
---|
23 | /* default implementations for signals */ |
---|
24 | void (*redraw)(owl_window *, WINDOW *); |
---|
25 | void (*resized)(owl_window *); |
---|
26 | }; |
---|
27 | |
---|
28 | GType owl_window_get_type(void); |
---|
29 | |
---|
30 | owl_window *owl_window_get_screen(void); |
---|
31 | |
---|
32 | owl_window *owl_window_new(owl_window *parent); |
---|
33 | void owl_window_unlink(owl_window *w); |
---|
34 | |
---|
35 | void owl_window_children_foreach(owl_window *parent, GFunc func, gpointer user_data); |
---|
36 | |
---|
37 | owl_window *owl_window_parent(owl_window *parent); |
---|
38 | owl_window *owl_window_first_child(owl_window *parent); |
---|
39 | owl_window *owl_window_next_sibling(owl_window *w); |
---|
40 | owl_window *owl_window_previous_sibling(owl_window *w); |
---|
41 | |
---|
42 | void owl_window_show(owl_window *w); |
---|
43 | void owl_window_show_all(owl_window *w); |
---|
44 | void owl_window_hide(owl_window *w); |
---|
45 | int owl_window_is_shown(owl_window *w); |
---|
46 | int owl_window_is_realized(owl_window *w); |
---|
47 | int owl_window_is_toplevel(owl_window *w); |
---|
48 | int owl_window_is_subwin(owl_window *w); |
---|
49 | |
---|
50 | void owl_window_set_cursor(owl_window *w); |
---|
51 | void owl_window_set_default_cursor(owl_window *w); |
---|
52 | |
---|
53 | void owl_window_dirty(owl_window *w); |
---|
54 | void owl_window_dirty_children(owl_window *w); |
---|
55 | void owl_window_redraw_scheduled(void); |
---|
56 | |
---|
57 | void owl_window_get_position(owl_window *w, int *nlines, int *ncols, int *begin_y, int *begin_x); |
---|
58 | void owl_window_set_position(owl_window *w, int nlines, int ncols, int begin_y, int begin_x); |
---|
59 | void owl_window_move(owl_window *w, int begin_y, int begin_x); |
---|
60 | void owl_window_resize(owl_window *w, int nlines, int ncols); |
---|
61 | |
---|
62 | /* Standard callback functions in windowcb.c */ |
---|
63 | |
---|
64 | void owl_window_erase_cb(owl_window *w, WINDOW *win, void *user_data); |
---|
65 | void owl_window_fill_parent_cb(owl_window *parent, void *user_data); |
---|
66 | |
---|
67 | G_END_DECLS |
---|
68 | |
---|
69 | #endif /* INC_BARNOWL_WINDOW_H */ |
---|