source: window.h @ 7a70e26

release-1.10release-1.7release-1.8release-1.9
Last change on this file since 7a70e26 was 7a70e26, checked in by David Benjamin <davidben@mit.edu>, 15 years ago
Punt owl_window_children_foreach_onearg Use GFunc casts everywhere. This horrid and depends on calling convention, but glib relies on it EVERYWHERE. If our environment doesn't support it, we'll have worse problems anyway.
  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[e96b4ce]1#ifndef __BARNOWL_WINDOW_H__
2#define __BARNOWL_WINDOW_H__
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;
23};
24
25GType owl_window_get_type(void);
[e96b4ce]26
27owl_window *owl_window_get_screen(void);
28
29owl_window *owl_window_new(owl_window *parent);
[3da1f4f]30void owl_window_unlink(owl_window *w);
[e96b4ce]31
32void owl_window_set_redraw_cb(owl_window *w, void (*cb)(owl_window*, WINDOW*, void*), void *cbdata, void (*cbdata_destroy)(void*));
33void owl_window_set_size_cb(owl_window *w, void (*cb)(owl_window*, void*), void *cbdata, void (*cbdata_destroy)(void*));
34
35void owl_window_children_foreach(owl_window *parent, GFunc func, gpointer user_data);
36owl_window *owl_window_get_parent(owl_window *w);
37
[402ed3d3]38void owl_window_show(owl_window *w);
39void owl_window_show_all(owl_window *w);
[50031f0]40void owl_window_hide(owl_window *w);
41int owl_window_is_shown(owl_window *w);
[ce7c6c3]42int owl_window_is_realized(owl_window *w);
[e96b4ce]43int owl_window_is_toplevel(owl_window *w);
44
45void owl_window_dirty(owl_window *w);
46void owl_window_dirty_children(owl_window *w);
47void owl_window_redraw_scheduled(void);
48
49void owl_window_get_position(owl_window *w, int *nlines, int *ncols, int *begin_y, int *begin_x);
50void owl_window_set_position(owl_window *w, int nlines, int ncols, int begin_y, int begin_x);
51void owl_window_move(owl_window *w, int begin_y, int begin_x);
52void owl_window_resize(owl_window *w, int nlines, int ncols);
53void owl_window_recompute_position(owl_window *w);
54
55void owl_window_top(owl_window *w);
56owl_window *owl_window_above(owl_window *w);
57owl_window *owl_window_below(owl_window *w);
58
59void owl_window_erase_cb(owl_window *w, WINDOW *win, void *user_data);
60
[053f751]61G_END_DECLS
62
[e96b4ce]63#endif /* __BARNOWL_WINDOW_H__ */
Note: See TracBrowser for help on using the repository browser.