1 /* mlstring.h --- Multi-line strings for use with Xlib
3 * (c) 2007, Quest Software, Inc. All rights reserved.
5 * This file is part of XScreenSaver,
6 * Copyright (c) 1993-2004 Jamie Zawinski <jwz@jwz.org>
8 * Permission to use, copy, modify, distribute, and sell this software and its
9 * documentation for any purpose is hereby granted without fee, provided that
10 * the above copyright notice appear in all copies and that both that
11 * copyright notice and this permission notice appear in supporting
12 * documentation. No representations are made about the suitability of this
13 * software for any purpose. It is provided "as is" without express or
19 #include <X11/Intrinsic.h>
21 /* mlstring means multi-line string */
25 typedef struct mlstring mlstring;
27 struct mlstr_line *lines; /* linked list */
28 Dimension overall_height;
29 Dimension overall_width;
30 /* XXX: Perhaps it is simpler to keep a reference to the XFontStruct */
39 struct mlstr_line *next_line;
43 mlstring_new(const char *str, XFontStruct *font, Dimension wrap_width);
45 /* Does not have to be called manually */
47 mlstring_wrap(mlstring *mstr, XFontStruct *font, Dimension width);
50 mlstring_free(mlstring *str);
53 mlstring_draw(Display *dpy, Drawable dialog, GC gc, mlstring *string, int x, int y);