diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-07 11:26:06 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-07 11:26:06 +0100 |
commit | a44cc9ffde04c0bd0a28e53f5a64afcaa5479c49 (patch) | |
tree | 3c3a7e2ccbe358306b4454b611953dac5865dac4 /src/gui | |
parent | 3194c641a0e687eef24d8066dab245abc71d7c1b (diff) | |
download | weechat-a44cc9ffde04c0bd0a28e53f5a64afcaa5479c49.zip |
Add new key to zoom a window (meta-z by default) (task #7470)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/gui-curses-keyboard.c | 1 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-main.c | 4 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-main.c | 4 | ||||
-rw-r--r-- | src/gui/gui-buffer.c | 3 | ||||
-rw-r--r-- | src/gui/gui-layout.c | 192 | ||||
-rw-r--r-- | src/gui/gui-layout.h | 35 | ||||
-rw-r--r-- | src/gui/gui-window.c | 40 | ||||
-rw-r--r-- | src/gui/gui-window.h | 1 |
8 files changed, 184 insertions, 96 deletions
diff --git a/src/gui/curses/gui-curses-keyboard.c b/src/gui/curses/gui-curses-keyboard.c index 28a1d64ac..59a88eb58 100644 --- a/src/gui/curses/gui-curses-keyboard.c +++ b/src/gui/curses/gui-curses-keyboard.c @@ -138,6 +138,7 @@ gui_keyboard_default_bindings () gui_keyboard_bind (NULL, /* m-w,m-down */ "meta-wmeta-meta2-B", "/window down"); gui_keyboard_bind (NULL, /* m-w,m-left */ "meta-wmeta-meta2-D", "/window left"); gui_keyboard_bind (NULL, /* m-w,m-right */ "meta-wmeta-meta2-C", "/window right"); + gui_keyboard_bind (NULL, /* m-z */ "meta-z", "/window zoom"); gui_keyboard_bind (NULL, /* m-= */ "meta-=", "/filter toggle"); gui_keyboard_bind (NULL, /* m-0 */ "meta-0", "/buffer 10"); gui_keyboard_bind (NULL, /* m-1 */ "meta-1", "/buffer 1"); diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index f35769b78..ce6571101 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -358,8 +358,8 @@ gui_main_end (int clean_exit) free (gui_input_clipboard); /* delete layout saved */ - gui_layout_window_remove_all (); - gui_layout_buffer_remove_all (); + gui_layout_window_remove_all (&gui_layout_windows); + gui_layout_buffer_remove_all (&gui_layout_buffers, &last_gui_layout_buffer); /* delete all windows */ while (gui_windows) diff --git a/src/gui/gtk/gui-gtk-main.c b/src/gui/gtk/gui-gtk-main.c index 188c9a619..bc5d2d6b7 100644 --- a/src/gui/gtk/gui-gtk-main.c +++ b/src/gui/gtk/gui-gtk-main.c @@ -248,8 +248,8 @@ gui_main_end (int clean_exit) free(gui_input_clipboard); /* delete layout saved */ - gui_layout_window_remove_all (); - gui_layout_buffer_remove_all (); + gui_layout_window_remove_all (&gui_layout_windows); + gui_layout_buffer_remove_all (&gui_layout_buffers, &last_gui_layout_buffer); /* delete all windows */ while (gui_windows) diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index a511a1905..6144f6071 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -292,7 +292,8 @@ gui_buffer_new (struct t_weechat_plugin *plugin, new_buffer->plugin = plugin; new_buffer->plugin_name_for_upgrade = NULL; /* number will be set later (when inserting buffer in list) */ - new_buffer->layout_number = gui_layout_buffer_get_number (plugin_get_name (plugin), + new_buffer->layout_number = gui_layout_buffer_get_number (gui_layout_buffers, + plugin_get_name (plugin), name); new_buffer->name = strdup (name); new_buffer->short_name = strdup (name); diff --git a/src/gui/gui-layout.c b/src/gui/gui-layout.c index 8b4fc4f2b..c673b4996 100644 --- a/src/gui/gui-layout.c +++ b/src/gui/gui-layout.c @@ -41,7 +41,14 @@ struct t_gui_layout_buffer *last_gui_layout_buffer = NULL; struct t_gui_layout_window *gui_layout_windows = NULL; -int internal_id = 0; +/* used to attribute a unique id for each window in tree */ +int gui_layout_internal_id = 0; + +/* internal id of current window, when saving windows layout */ +int gui_layout_internal_id_current_window = 0; + +/* pointer to current window, found when applying windows layout */ +struct t_gui_window *gui_layout_ptr_current_window = NULL; /* @@ -49,7 +56,9 @@ int internal_id = 0; */ void -gui_layout_buffer_remove (struct t_gui_layout_buffer *layout_buffer) +gui_layout_buffer_remove (struct t_gui_layout_buffer **layout_buffers, + struct t_gui_layout_buffer **last_layout_buffer, + struct t_gui_layout_buffer *layout_buffer) { /* free data */ if (layout_buffer->plugin_name) @@ -62,10 +71,10 @@ gui_layout_buffer_remove (struct t_gui_layout_buffer *layout_buffer) (layout_buffer->prev_layout)->next_layout = layout_buffer->next_layout; if (layout_buffer->next_layout) (layout_buffer->next_layout)->prev_layout = layout_buffer->prev_layout; - if (gui_layout_buffers == layout_buffer) - gui_layout_buffers = layout_buffer->next_layout; - if (last_gui_layout_buffer == layout_buffer) - last_gui_layout_buffer = layout_buffer->prev_layout; + if (*layout_buffers == layout_buffer) + *layout_buffers = layout_buffer->next_layout; + if (*last_layout_buffer == layout_buffer) + *last_layout_buffer = layout_buffer->prev_layout; free (layout_buffer); } @@ -75,11 +84,13 @@ gui_layout_buffer_remove (struct t_gui_layout_buffer *layout_buffer) */ void -gui_layout_buffer_remove_all () +gui_layout_buffer_remove_all (struct t_gui_layout_buffer **layout_buffers, + struct t_gui_layout_buffer **last_layout_buffer) { - while (gui_layout_buffers) + while (*layout_buffers) { - gui_layout_buffer_remove (gui_layout_buffers); + gui_layout_buffer_remove (layout_buffers, last_layout_buffer, + *layout_buffers); } } @@ -88,11 +99,12 @@ gui_layout_buffer_remove_all () */ void -gui_layout_buffer_reset () +gui_layout_buffer_reset (struct t_gui_layout_buffer **layout_buffers, + struct t_gui_layout_buffer **last_layout_buffer) { struct t_gui_buffer *ptr_buffer; - gui_layout_buffer_remove_all (); + gui_layout_buffer_remove_all (layout_buffers, last_layout_buffer); for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer) @@ -106,7 +118,9 @@ gui_layout_buffer_reset () */ struct t_gui_layout_buffer * -gui_layout_buffer_add (const char *plugin_name, const char *buffer_name, +gui_layout_buffer_add (struct t_gui_layout_buffer **layout_buffers, + struct t_gui_layout_buffer **last_layout_buffer, + const char *plugin_name, const char *buffer_name, int number) { struct t_gui_layout_buffer *new_layout_buffer; @@ -120,12 +134,12 @@ gui_layout_buffer_add (const char *plugin_name, const char *buffer_name, new_layout_buffer->number = number; /* add layout buffer to list */ - new_layout_buffer->prev_layout = last_gui_layout_buffer; - if (gui_layout_buffers) - last_gui_layout_buffer->next_layout = new_layout_buffer; + new_layout_buffer->prev_layout = *last_layout_buffer; + if (*layout_buffers) + (*last_layout_buffer)->next_layout = new_layout_buffer; else - gui_layout_buffers = new_layout_buffer; - last_gui_layout_buffer = new_layout_buffer; + *layout_buffers = new_layout_buffer; + *last_layout_buffer = new_layout_buffer; new_layout_buffer->next_layout = NULL; } @@ -137,16 +151,21 @@ gui_layout_buffer_add (const char *plugin_name, const char *buffer_name, */ void -gui_layout_buffer_save () +gui_layout_buffer_save (struct t_gui_layout_buffer **layout_buffers, + struct t_gui_layout_buffer **last_layout_buffer) { struct t_gui_buffer *ptr_buffer; - gui_layout_buffer_remove_all (); + if (!layout_buffers || !last_layout_buffer) + return; + + gui_layout_buffer_remove_all (layout_buffers, last_layout_buffer); for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer) { - gui_layout_buffer_add (plugin_get_name (ptr_buffer->plugin), + gui_layout_buffer_add (layout_buffers, last_layout_buffer, + plugin_get_name (ptr_buffer->plugin), ptr_buffer->name, ptr_buffer->number); } @@ -158,11 +177,12 @@ gui_layout_buffer_save () */ int -gui_layout_buffer_get_number (const char *plugin_name, const char *buffer_name) +gui_layout_buffer_get_number (struct t_gui_layout_buffer *layout_buffers, + const char *plugin_name, const char *buffer_name) { struct t_gui_layout_buffer *ptr_layout_buffer; - for (ptr_layout_buffer = gui_layout_buffers; ptr_layout_buffer; + for (ptr_layout_buffer = layout_buffers; ptr_layout_buffer; ptr_layout_buffer = ptr_layout_buffer->next_layout) { if ((string_strcasecmp (ptr_layout_buffer->plugin_name, plugin_name) == 0) @@ -177,22 +197,23 @@ gui_layout_buffer_get_number (const char *plugin_name, const char *buffer_name) } /* - * gui_layout_buffer_apply: apply current layout for buffers + * gui_layout_buffer_apply: apply a layout for buffers */ void -gui_layout_buffer_apply () +gui_layout_buffer_apply (struct t_gui_layout_buffer *layout_buffers) { struct t_gui_buffer *ptr_buffer; const char *plugin_name; - if (gui_layout_buffers) + if (layout_buffers) { for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer) { plugin_name = plugin_get_name (ptr_buffer->plugin); - ptr_buffer->layout_number = gui_layout_buffer_get_number (plugin_name, + ptr_buffer->layout_number = gui_layout_buffer_get_number (layout_buffers, + plugin_name, ptr_buffer->name); if ((ptr_buffer->layout_number > 0) && (ptr_buffer->layout_number != ptr_buffer->number)) @@ -231,12 +252,12 @@ gui_layout_window_remove (struct t_gui_layout_window *layout_window) */ void -gui_layout_window_remove_all () +gui_layout_window_remove_all (struct t_gui_layout_window **layout_windows) { - if (gui_layout_windows) + if (*layout_windows) { - gui_layout_window_remove (gui_layout_windows); - gui_layout_windows = NULL; + gui_layout_window_remove (*layout_windows); + *layout_windows = NULL; } } @@ -245,11 +266,11 @@ gui_layout_window_remove_all () */ void -gui_layout_window_reset () +gui_layout_window_reset (struct t_gui_layout_window **layout_windows) { struct t_gui_window *ptr_win; - gui_layout_window_remove_all (); + gui_layout_window_remove_all (layout_windows); for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) { @@ -267,28 +288,32 @@ gui_layout_window_reset () } /* - * gui_layout_window_search_by_id_tree: search a layout window by internal id - * in a tree + * gui_layout_window_search_by_id: search a layout window by internal id + * in a layout */ struct t_gui_layout_window * -gui_layout_window_search_by_id_tree (struct t_gui_layout_window *tree, int id) +gui_layout_window_search_by_id (struct t_gui_layout_window *layout_windows, + int id) { struct t_gui_layout_window *res; - if (tree->internal_id == id) - return tree; + if (!layout_windows) + return NULL; + + if (layout_windows->internal_id == id) + return layout_windows; - if (tree->child1) + if (layout_windows->child1) { - res = gui_layout_window_search_by_id_tree (tree->child1, id); + res = gui_layout_window_search_by_id (layout_windows->child1, id); if (res) return res; } - if (tree->child2) + if (layout_windows->child2) { - res = gui_layout_window_search_by_id_tree (tree->child2, id); + res = gui_layout_window_search_by_id (layout_windows->child2, id); if (res) return res; } @@ -297,24 +322,12 @@ gui_layout_window_search_by_id_tree (struct t_gui_layout_window *tree, int id) } /* - * gui_layout_window_search_by_id: search a layout window by internal id - */ - -struct t_gui_layout_window * -gui_layout_window_search_by_id (int id) -{ - if (!gui_layout_windows) - return NULL; - - return gui_layout_window_search_by_id_tree (gui_layout_windows, id); -} - -/* * gui_layout_window_add: add a window layout */ struct t_gui_layout_window * -gui_layout_window_add (int internal_id, +gui_layout_window_add (struct t_gui_layout_window **layout_windows, + int internal_id, struct t_gui_layout_window *parent, int split_pct, int split_horiz, const char *plugin_name, const char *buffer_name) @@ -345,7 +358,7 @@ gui_layout_window_add (int internal_id, else { /* no parent? => it's root! */ - gui_layout_windows = new_layout_window; + *layout_windows = new_layout_window; } } @@ -357,14 +370,19 @@ gui_layout_window_add (int internal_id, */ void -gui_layout_window_save_tree (struct t_gui_layout_window *parent_layout, +gui_layout_window_save_tree (struct t_gui_layout_window **layout_windows, + struct t_gui_layout_window *parent_layout, struct t_gui_window_tree *tree) { struct t_gui_layout_window *layout_window; if (tree->window) { - layout_window = gui_layout_window_add (internal_id++, + if (tree->window == gui_current_window) + gui_layout_internal_id_current_window = gui_layout_internal_id; + + layout_window = gui_layout_window_add (layout_windows, + gui_layout_internal_id, parent_layout, 0, 0, plugin_get_name (tree->window->buffer->plugin), @@ -372,7 +390,8 @@ gui_layout_window_save_tree (struct t_gui_layout_window *parent_layout, } else { - layout_window = gui_layout_window_add (internal_id++, + layout_window = gui_layout_window_add (layout_windows, + gui_layout_internal_id, parent_layout, tree->split_pct, tree->split_horizontal, @@ -380,24 +399,33 @@ gui_layout_window_save_tree (struct t_gui_layout_window *parent_layout, NULL); } + gui_layout_internal_id++; + if (tree->child1) - gui_layout_window_save_tree (layout_window, tree->child1); + gui_layout_window_save_tree (layout_windows, + layout_window, tree->child1); if (tree->child2) - gui_layout_window_save_tree (layout_window, tree->child2); + gui_layout_window_save_tree (layout_windows, + layout_window, tree->child2); } /* * gui_layout_window_save: save current layout for windows + * return internal id of current window */ -void -gui_layout_window_save () +int +gui_layout_window_save (struct t_gui_layout_window **layout_windows) { - gui_layout_window_remove_all (); + gui_layout_window_remove_all (layout_windows); + + gui_layout_internal_id = 1; + gui_layout_internal_id_current_window = -1; - internal_id = 1; - gui_layout_window_save_tree (NULL, gui_windows_tree); + gui_layout_window_save_tree (layout_windows, NULL, gui_windows_tree); + + return gui_layout_internal_id_current_window; } /* @@ -464,7 +492,8 @@ gui_layout_window_check_all_buffers () */ void -gui_layout_window_apply_tree (struct t_gui_layout_window *layout_window) +gui_layout_window_apply_tree (struct t_gui_layout_window *layout_window, + int internal_id_current_window) { struct t_gui_window *new_window, *old_window; @@ -485,17 +514,22 @@ gui_layout_window_apply_tree (struct t_gui_layout_window *layout_window) } if (layout_window->child2) - gui_layout_window_apply_tree (layout_window->child2); + gui_layout_window_apply_tree (layout_window->child2, + internal_id_current_window); if (old_window != gui_current_window) gui_window_switch (old_window); if (layout_window->child1) - gui_layout_window_apply_tree (layout_window->child1); + gui_layout_window_apply_tree (layout_window->child1, + internal_id_current_window); } else { /* leaf */ + if (layout_window->internal_id == internal_id_current_window) + gui_layout_ptr_current_window = gui_current_window; + gui_window_set_layout_plugin_name (gui_current_window, layout_window->plugin_name); gui_window_set_layout_buffer_name (gui_current_window, @@ -508,21 +542,25 @@ gui_layout_window_apply_tree (struct t_gui_layout_window *layout_window) */ void -gui_layout_window_apply () +gui_layout_window_apply (struct t_gui_layout_window *layout_windows, + int internal_id_current_window) { struct t_gui_window *old_window; - if (gui_layout_windows) + if (layout_windows) { gui_window_merge_all (gui_current_window); old_window = gui_current_window; + gui_layout_ptr_current_window = NULL; - gui_layout_window_apply_tree (gui_layout_windows); + gui_layout_window_apply_tree (layout_windows, + internal_id_current_window); gui_layout_window_check_all_buffers (); - gui_window_switch (old_window); + gui_window_switch ((gui_layout_ptr_current_window) ? + gui_layout_ptr_current_window : old_window); } } @@ -540,14 +578,14 @@ gui_layout_save_on_exit () case CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_NONE: break; case CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_BUFFERS: - gui_layout_buffer_save (); + gui_layout_buffer_save (&gui_layout_buffers, &last_gui_layout_buffer); break; case CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_WINDOWS: - gui_layout_window_save (); + gui_layout_window_save (&gui_layout_windows); break; case CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_ALL: - gui_layout_buffer_save (); - gui_layout_window_save (); + gui_layout_buffer_save (&gui_layout_buffers, &last_gui_layout_buffer); + gui_layout_window_save (&gui_layout_windows); break; } } diff --git a/src/gui/gui-layout.h b/src/gui/gui-layout.h index bc09e6601..fe81fe34f 100644 --- a/src/gui/gui-layout.h +++ b/src/gui/gui-layout.h @@ -51,32 +51,41 @@ struct t_gui_layout_window /* layout variables */ extern struct t_gui_layout_buffer *gui_layout_buffers; -extern struct t_gui_layout_buffer *gui_layout_last_buffer; +extern struct t_gui_layout_buffer *last_gui_layout_buffer; extern struct t_gui_layout_window *gui_layout_windows; /* layout functions */ -extern void gui_layout_buffer_remove_all (); -extern void gui_layout_buffer_reset (); -extern struct t_gui_layout_buffer *gui_layout_buffer_add (const char *plugin_name, +extern void gui_layout_buffer_remove_all (struct t_gui_layout_buffer **layout_buffers, + struct t_gui_layout_buffer **last_layout_buffer); +extern void gui_layout_buffer_reset (struct t_gui_layout_buffer **layout_buffers, + struct t_gui_layout_buffer **last_layout_buffer); +extern struct t_gui_layout_buffer *gui_layout_buffer_add (struct t_gui_layout_buffer **layout_buffers, + struct t_gui_layout_buffer **last_layout_buffer, + const char *plugin_name, const char *buffer_name, int number); -extern void gui_layout_buffer_save (); -extern int gui_layout_buffer_get_number (const char *plugin_name, +extern void gui_layout_buffer_save (struct t_gui_layout_buffer **layout_buffers, + struct t_gui_layout_buffer **last_layout_buffer); +extern int gui_layout_buffer_get_number (struct t_gui_layout_buffer *layout_buffers, + const char *plugin_name, const char *buffer_name); -extern void gui_layout_buffer_apply (); +extern void gui_layout_buffer_apply (struct t_gui_layout_buffer *layout_buffers); -extern void gui_layout_window_remove_all (); -extern void gui_layout_window_reset (); -extern struct t_gui_layout_window *gui_layout_window_search_by_id (int id); -extern struct t_gui_layout_window *gui_layout_window_add (int internal_id, +extern void gui_layout_window_remove_all (struct t_gui_layout_window **layout_windows); +extern void gui_layout_window_reset (struct t_gui_layout_window **layout_windows); +extern struct t_gui_layout_window *gui_layout_window_search_by_id (struct t_gui_layout_window *layout_windows, + int id); +extern struct t_gui_layout_window *gui_layout_window_add (struct t_gui_layout_window **layout_windows, + int internal_id, struct t_gui_layout_window *parent, int split_pct, int split_horiz, const char *plugin_name, const char *buffer_name); -extern void gui_layout_window_save (); -extern void gui_layout_window_apply (); +extern int gui_layout_window_save (struct t_gui_layout_window **layout_windows); +extern void gui_layout_window_apply (struct t_gui_layout_window *layout_windows, + int internal_id_current_window); extern void gui_layout_window_check_buffer (struct t_gui_buffer *buffer); extern void gui_layout_save_on_exit (); diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index e0e6acc65..906a1f3f9 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -48,6 +48,7 @@ #include "gui-filter.h" #include "gui-input.h" #include "gui-hotlist.h" +#include "gui-layout.h" int gui_init_ok = 0; /* = 1 if GUI is initialized*/ @@ -61,6 +62,11 @@ struct t_gui_window *gui_current_window = NULL; /* current window */ struct t_gui_window_tree *gui_windows_tree = NULL; /* windows tree */ +struct t_gui_layout_window *gui_window_layout_before_zoom = NULL; + /* layout before zooming on a window */ +int gui_window_layout_id_current_window = -1; + /* current window id before zoom */ + /* * gui_window_ask_refresh: set "gui_window_refresh_needed" flag @@ -911,6 +917,34 @@ gui_window_search_stop (struct t_gui_window *window) } /* + * gui_window_zoom: zoom window (maximize it or restore layout before previous + * zoom) + */ + +void +gui_window_zoom (struct t_gui_window *window) +{ + if (!gui_ok) + return; + + if (gui_window_layout_before_zoom) + { + /* restore layout as it was before zooming a window */ + gui_layout_window_apply (gui_window_layout_before_zoom, + gui_window_layout_id_current_window); + gui_layout_window_remove_all (&gui_window_layout_before_zoom); + gui_window_layout_id_current_window = -1; + } + else + { + /* save layout and zoom on current window */ + gui_window_layout_id_current_window = + gui_layout_window_save (&gui_window_layout_before_zoom); + gui_window_merge_all (window); + } +} + +/* * gui_window_add_to_infolist: add a window in an infolist * return 1 if ok, 0 if error */ @@ -972,7 +1006,11 @@ gui_window_print_log () struct t_gui_bar_window *ptr_bar_win; log_printf (""); - log_printf ("current window = 0x%lx", gui_current_window); + log_printf ("gui_windows . . . . . . . . . : 0x%lx", gui_windows); + log_printf ("last_gui_window . . . . . . . : 0x%lx", last_gui_window); + log_printf ("gui_current window. . . . . . : 0x%lx", gui_current_window); + log_printf ("gui_windows_tree. . . . . . . : 0x%lx", gui_windows_tree); + log_printf ("gui_window_layout_before_zoom : 0x%lx", gui_window_layout_before_zoom); for (ptr_window = gui_windows; ptr_window; ptr_window = ptr_window->next_window) { diff --git a/src/gui/gui-window.h b/src/gui/gui-window.h index fce3221fe..ae81801c7 100644 --- a/src/gui/gui-window.h +++ b/src/gui/gui-window.h @@ -135,6 +135,7 @@ extern void gui_window_search_start (struct t_gui_window *window); extern void gui_window_search_restart (struct t_gui_window *window); extern void gui_window_search_stop (struct t_gui_window *window); extern int gui_window_search_text (struct t_gui_window *window); +extern void gui_window_zoom (struct t_gui_window *window); extern int gui_window_add_to_infolist (struct t_infolist *infolist, struct t_gui_window *window); extern void gui_window_print_log (); |