1 /********************************************************************** 2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold 3 This program is free software; you can redistribute it and/or modify 4 it under the terms of the GNU General Public License as published by 5 the Free Software Foundation; either version 2, or (at your option) 6 any later version. 7 8 This program is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 GNU General Public License for more details. 12 ***********************************************************************/ 13 #ifndef FC__CHATLINE_H 14 #define FC__CHATLINE_H 15 16 #include <gtk/gtk.h> 17 18 /* include */ 19 #include "chatline_g.h" 20 21 void chatline_init(void); 22 23 void inputline_make_chat_link(struct tile *ptile, bool unit); 24 bool inputline_has_focus(void); 25 void inputline_grab_focus(void); 26 bool inputline_is_visible(void); 27 28 void set_output_window_text(const char *text); 29 bool chatline_is_scrolled_to_bottom(void); 30 void chatline_scroll_to_bottom(bool delayed); 31 32 void set_message_buffer_view_link_handlers(GtkWidget *view); 33 34 GtkWidget *inputline_toolkit_view_new(void); 35 void inputline_toolkit_view_append_button(GtkWidget *toolkit_view, 36 GtkWidget *button); 37 38 void apply_text_tag(const struct text_tag *ptag, GtkTextBuffer *buf, 39 ft_offset_t text_start_offset, const char *text); 40 void scroll_if_necessary(GtkTextView *textview, GtkTextMark *scroll_target); 41 42 #endif /* FC__CHATLINE_H */ 43