source: window.h @ ca749a9

release-1.10release-1.8release-1.9
Last change on this file since ca749a9 was fe73d0c, checked in by David Benjamin <davidben@mit.edu>, 13 years ago
Just require stdbool.h and tell ncurses to use it Now that Solaris' stdbool.h works for us, we may as well just require it. The preamble is repetitive and didn't actually work anyway. (It conflicts with ncurses' attempts to redefine bool when stdbool.h is unavailable or disabled.) We may need to add a different preamble later if we care about including these headers in C++ (Solaris has a C++-incompatible stdbool.h), but we can deal with that later.
  • Property mode set to 100644
File size: 2.5 KB
Line 
1#ifndef INC_BARNOWL_WINDOW_H
2#define INC_BARNOWL_WINDOW_H
3
4#include <glib.h>
5#include <glib-object.h>
6
7#include <stdbool.h>
8
9G_BEGIN_DECLS
10
11#define OWL_TYPE_WINDOW                  (owl_window_get_type ())
12#define OWL_WINDOW(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), OWL_TYPE_WINDOW, OwlWindow))
13#define OWL_IS_WINDOW(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OWL_TYPE_WINDOW))
14#define OWL_WINDOW_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), OWL_TYPE_WINDOW, OwlWindowClass))
15#define OWL_IS_WINDOW_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), OWL_TYPE_WINDOW))
16#define OWL_WINDOW_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), OWL_TYPE_WINDOW, OwlWindowClass))
17
18typedef struct _owl_window OwlWindow;
19typedef struct _OwlWindowClass OwlWindowClass;
20typedef OwlWindow owl_window; /* meh */
21
22struct _OwlWindowClass
23{
24  GObjectClass parent_class;
25  /* default implementations for signals */
26  void (*redraw)(owl_window *, WINDOW *);
27  void (*resized)(owl_window *);
28};
29
30GType owl_window_get_type(void);
31
32owl_window *owl_window_get_screen(void);
33
34owl_window *owl_window_new(owl_window *parent);
35void owl_window_unlink(owl_window *w);
36
37void owl_window_children_foreach(owl_window *parent, GFunc func, gpointer user_data);
38
39owl_window *owl_window_parent(owl_window *parent);
40owl_window *owl_window_first_child(owl_window *parent);
41owl_window *owl_window_next_sibling(owl_window *w);
42owl_window *owl_window_previous_sibling(owl_window *w);
43
44void owl_window_show(owl_window *w);
45void owl_window_show_all(owl_window *w);
46void owl_window_hide(owl_window *w);
47bool owl_window_is_shown(owl_window *w);
48bool owl_window_is_realized(owl_window *w);
49bool owl_window_is_toplevel(owl_window *w);
50bool owl_window_is_subwin(owl_window *w);
51
52void owl_window_set_cursor(owl_window *w);
53void owl_window_set_default_cursor(owl_window *w);
54
55void owl_window_dirty(owl_window *w);
56void owl_window_dirty_children(owl_window *w);
57void owl_window_redraw_scheduled(void);
58
59void owl_window_get_position(owl_window *w, int *nlines, int *ncols, int *begin_y, int *begin_x);
60void owl_window_set_position(owl_window *w, int nlines, int ncols, int begin_y, int begin_x);
61void owl_window_move(owl_window *w, int begin_y, int begin_x);
62void owl_window_resize(owl_window *w, int nlines, int ncols);
63
64GSource *owl_window_redraw_source_new(void);
65
66/* Standard callback functions in windowcb.c */
67
68void owl_window_erase_cb(owl_window *w, WINDOW *win, void *user_data);
69void owl_window_fill_parent_cb(owl_window *parent, void *user_data);
70
71G_END_DECLS
72
73#endif /* INC_BARNOWL_WINDOW_H */
Note: See TracBrowser for help on using the repository browser.