Minor syntactical changes for readability.
[xuni.git] / src / gui.h
blobbb27998154caf8eca54904bd64602f05e5640409
1 /*! \file gui.h
3 */
5 #ifndef XUNI_GUARD_GUI_H
6 #define XUNI_GUARD_GUI_H
8 #include "widget/widgets.h"
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
14 struct wid_init_t {
15 size_t id;
16 const char *name;
19 void init_theme_structure(struct theme_t *theme);
20 void init_gui(struct xuni_t *xuni);
21 void init_edit(struct widget_edit_t *edit);
22 void clear_gui(struct xuni_t *xuni, panel_type_t panel, int keep);
23 void clear_sel(struct widget_sel_t *sel);
24 void clear_edit(struct widget_edit_t *edit);
25 void clear_active(struct xuni_t *xuni, struct widget_p_t *wp, int keep);
26 void clear_tab(struct widget_tab_t *tab, panel_type_t panel);
27 void edit_add_char(struct widget_edit_t *edit, char c);
28 void edit_del_chars(struct widget_edit_t *edit, size_t n);
29 int clear_widget_sel(struct widget_t *widget);
30 int clear_widget_sel_keep(struct widget_t *widget, struct widget_t *keep,
31 int n);
32 struct widget_t *set_widget_sel_rec(struct widget_sel_t *sel, int xp, int yp,
33 struct widget_t *widget, int *repaint);
34 int set_widget_sel_repaint(struct xuni_t *xuni, struct widget_sel_t *sel,
35 int xp, int yp, int click, struct widget_t *widget);
36 int set_widget_sel(struct widget_sel_t *sel, int xp, int yp, int click,
37 struct widget_t *widget);
38 int set_widget_repaint(struct xuni_t *xuni, struct widget_sel_t *sel,
39 int xp, int yp, int click, struct widget_t *widget);
40 int set_compose_sel(struct widget_sel_t *sel, int xp, int yp, int any);
41 void load_resource_widgets(struct xuni_t *xuni, struct widget_t **widget,
42 struct resource_data_t *data);
43 struct nameid_t *allocate_nameid(void);
44 void init_wid_widget(struct nameid_t *nameid, struct widget_t *widget,
45 size_t id, const char *name);
46 void init_wid_possible_zero(struct widget_t *base, struct nameid_t *nameid,
47 size_t id, const char *name);
48 void init_wid(struct widget_t *base, struct widget_t *use, size_t id,
49 const char *name);
50 void init_wid_array(struct widget_t *base, struct widget_t *use,
51 struct wid_init_t *init, size_t n);
52 int widget_process_character(struct xuni_t *xuni, SDL_keysym *sym);
53 int widget_can_be_active(struct widget_t *widget);
54 void update_widget(struct xuni_t *xuni, struct widget_t *widget);
55 void enable_unicode(const struct widget_t *widget);
56 void activate_widget(struct widget_t *widget, struct xuni_t *xuni,
57 int xp, int yp);
58 void revert_widget(struct xuni_t *xuni, struct widget_t *widget);
59 void deactivate_widget(struct widget_t *widget, struct xuni_t *xuni);
60 void perform_widget_click(struct xuni_t *xuni, struct widget_t *widget);
61 void free_gui(struct xuni_t *xuni);
63 #ifdef __cplusplus
65 #endif
67 #endif