view console/libgnt/gntutils.h @ 14978:e601bc7880a6

[gaim-migrate @ 17756] Make it easy to move buddies around. Press 't' in the buddylist to tag/untag buddies/contacts (more than one if necessary). Then select the target contact or group and press 'a' to attach the tagged nodes. This should also fix LSchiere's earlier crash, if the bug I thought I was seeing. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 16 Nov 2006 00:27:30 +0000
parents 8a0cfee11af8
children 68385f5bbd61
line wrap: on
line source

#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);