view console/libgnt/gntutils.h @ 14425:3a91ef295cbb

[gaim-migrate @ 17133] If the window-title has wide-characters, and you go in move/resize mode, then reversing the colors screws up the title. This is a fix for that. It's a bit hackish, but that's the way it's gotta be for now. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 03 Sep 2006 02:12:26 +0000
parents cfd5bcc06a7e
children 8a0cfee11af8
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);