2
* text.h - adds text image support to compiz.
3
* Copyright: (C) 2006 Patrick Niklaus
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
* Boston, MA 02110-1301, USA.
22
#ifndef _COMPIZ_TEXT_H
23
#define _COMPIZ_TEXT_H
25
#define COMPIZ_TEXT_ABI 20090905
31
* Flags to be passed into the flags field of CompTextAttrib
34
StyleBold = (1 << 0), /**< render the text in bold */
35
StyleItalic = (1 << 1), /**< render the text italic */
36
Ellipsized = (1 << 2), /**< ellipsize the text if the
37
specified maximum size is
39
WithBackground = (1 << 3), /**< render a rounded rectangle as
40
background behind the text */
41
NoAutoBinding = (1 << 4) /**< do not automatically bind the
42
rendered text pixmap to a texture */
46
const char *family; /**< font family */
47
int size; /**< font size in points */
48
unsigned short color[4]; /**< font color (RGBA) */
50
unsigned int flags; /**< rendering flags, see above */
52
int maxWidth; /**< maximum width of the
54
int maxHeight; /**< maximum height of the
57
int bgHMargin; /**< horizontal margin in pixels
58
(offset of text into background) */
59
int bgVMargin; /**< vertical margin */
60
unsigned short bgColor[4]; /**< background color (RGBA) */
66
bool renderText (CompString text,
67
const Attrib &attrib);
70
bool renderWindowTitle (Window window,
71
bool renderViewportNumber,
72
const Attrib &attrib);
77
int getWidth () const;
78
int getHeight () const;
89
GLTexture::List texture;