console/libgnt/gntutils.h

Sun, 10 Dec 2006 09:26:44 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Sun, 10 Dec 2006 09:26:44 +0000
changeset 15220
fc8b223f4b75
parent 14855
84c869823944
child 15365
5a83efd6955d
permissions
-rw-r--r--

[gaim-migrate @ 17944]
Generate the marshal-things during make when necessary.
Allow specifying the hash-functions for a GntTree.

#include <glib.h>

#include "gnt.h"
#include "gntwidget.h"

void gnt_util_get_text_bound(const char *text, int *width, int *height);

/* excluding *end */
int gnt_util_onscreen_width(const char *start, const char *end);

const char *gnt_util_onscreen_width_to_pointer(const char *str, int len, int *w);

/* Inserts newlines in 'string' where necessary so that its onscreen width is
 * no more than 'maxw'.
 * 'maxw' can be <= 0, in which case the maximum screen width is considered.
 *
 * Returns a newly allocated string.
 */
char *gnt_util_onscreen_fit_string(const char *string, int maxw);

GHashTable *g_hash_table_duplicate(GHashTable *src, GHashFunc hash,
		GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d);


/**
 * To be used with g_signal_new. Look in the key_pressed signal-definition in
 * gntwidget.c for usage.
 */
gboolean gnt_boolean_handled_accumulator(GSignalInvocationHint *ihint,
				  GValue                *return_accu,
				  const GValue          *handler_return,
				  gpointer               dummy);

mercurial