source: window.h @ 8ee712e0

release-1.10release-1.7release-1.8release-1.9
Last change on this file since 8ee712e0 was 06adc25, checked in by David Benjamin <davidben@mit.edu>, 14 years ago
Sanitize our include guards somewhat Avoid double underscores to avoid clashing with reserved symbols. Also adding BARNOWL to guard names. While I'm at it, owl_prototypes.h could use guards.
  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[06adc25]1#ifndef INC_BARNOWL_WINDOW_H
2#define INC_BARNOWL_WINDOW_H
[e96b4ce]3
4#include <glib.h>
[053f751]5#include <glib-object.h>
[e96b4ce]6
[053f751]7G_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
16typedef struct _owl_window OwlWindow;
17typedef struct _OwlWindowClass OwlWindowClass;
18typedef OwlWindow owl_window; /* meh */
19
20struct _OwlWindowClass
21{
22  GObjectClass parent_class;
[7a6e6c7]23  /* default implementations for signals */
24  void (*redraw)(owl_window *, WINDOW *);
25  void (*resized)(owl_window *);
[053f751]26};
27
28GType owl_window_get_type(void);
[e96b4ce]29
30owl_window *owl_window_get_screen(void);
31
32owl_window *owl_window_new(owl_window *parent);
[3da1f4f]33void owl_window_unlink(owl_window *w);
[e96b4ce]34
35void owl_window_children_foreach(owl_window *parent, GFunc func, gpointer user_data);
[1aa4cc4]36
37owl_window *owl_window_parent(owl_window *parent);
38owl_window *owl_window_first_child(owl_window *parent);
39owl_window *owl_window_next_sibling(owl_window *w);
40owl_window *owl_window_previous_sibling(owl_window *w);
[e96b4ce]41
[402ed3d3]42void owl_window_show(owl_window *w);
43void owl_window_show_all(owl_window *w);
[50031f0]44void owl_window_hide(owl_window *w);
45int owl_window_is_shown(owl_window *w);
[ce7c6c3]46int owl_window_is_realized(owl_window *w);
[e96b4ce]47int owl_window_is_toplevel(owl_window *w);
[9379760]48int owl_window_is_subwin(owl_window *w);
[e96b4ce]49
[84a4aca]50void owl_window_set_cursor(owl_window *w);
[f70a7a3]51void owl_window_set_default_cursor(owl_window *w);
[84a4aca]52
[e96b4ce]53void owl_window_dirty(owl_window *w);
54void owl_window_dirty_children(owl_window *w);
55void owl_window_redraw_scheduled(void);
56
57void owl_window_get_position(owl_window *w, int *nlines, int *ncols, int *begin_y, int *begin_x);
58void owl_window_set_position(owl_window *w, int nlines, int ncols, int begin_y, int begin_x);
59void owl_window_move(owl_window *w, int begin_y, int begin_x);
60void owl_window_resize(owl_window *w, int nlines, int ncols);
61
[8f9a044]62/* Standard callback functions in windowcb.c */
63
[e96b4ce]64void owl_window_erase_cb(owl_window *w, WINDOW *win, void *user_data);
[853f397]65void owl_window_fill_parent_cb(owl_window *parent, void *user_data);
[e96b4ce]66
[053f751]67G_END_DECLS
68
[06adc25]69#endif /* INC_BARNOWL_WINDOW_H */
Note: See TracBrowser for help on using the repository browser.