gntutils.h

Go to the documentation of this file.
00001 
00005 /*
00006  * GNT - The GLib Ncurses Toolkit
00007  *
00008  * GNT is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This library is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  */
00026 
00027 #include <glib.h>
00028 
00029 #include "gnt.h"
00030 #include "gnttextview.h"
00031 #include "gntwidget.h"
00032 
00033 typedef gpointer (*GDupFunc)(gconstpointer data);
00034 
00042 void gnt_util_get_text_bound(const char *text, int *width, int *height);
00043 
00044 /* excluding *end */
00055 int gnt_util_onscreen_width(const char *start, const char *end);
00056 
00066 const char *gnt_util_onscreen_width_to_pointer(const char *str, int len, int *w);
00067 
00078 char * gnt_util_onscreen_fit_string(const char *string, int maxw);
00079 
00093 GHashTable * g_hash_table_duplicate(GHashTable *src, GHashFunc hash, GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d, GDupFunc key_dup, GDupFunc value_dup);
00094 
00106 gboolean gnt_boolean_handled_accumulator(GSignalInvocationHint *ihint, GValue *return_accu, const GValue *handler_return, gpointer dummy);
00107 
00115 GntWidget * gnt_widget_bindings_view(GntWidget *widget);
00116 
00133 void gnt_util_parse_widgets(const char *string, int num, ...);
00134 
00145 gboolean gnt_util_parse_xhtml_to_textview(const char *string, GntTextView *tv);
00146 
00156 void gnt_util_set_trigger_widget(GntWidget *widget, const char *key, GntWidget *button);
00157