/usr/include/compiz/text/text.h is in compiz-dev 1:0.9.13.1+18.04.20180302-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | /*
* text.h - adds text image support to compiz.
* Copyright: (C) 2006 Patrick Niklaus
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef _COMPIZ_TEXT_H
#define _COMPIZ_TEXT_H
#define COMPIZ_TEXT_ABI 20090905
class CompText
{
public:
/**
* Flags to be passed into the flags field of CompTextAttrib
*/
typedef enum
{
StyleBold = (1 << 0), /**< render the text in bold */
StyleItalic = (1 << 1), /**< render the text italic */
Ellipsized = (1 << 2), /**< ellipsize the text if the
specified maximum size is
too small */
WithBackground = (1 << 3), /**< render a rounded rectangle as
background behind the text */
NoAutoBinding = (1 << 4) /**< do not automatically bind the
rendered text pixmap to a texture */
} Flags;
typedef struct
{
const char *family; /**< font family */
int size; /**< font size in points */
unsigned short color[4]; /**< font color (RGBA) */
unsigned int flags; /**< rendering flags, see above */
int maxWidth; /**< maximum width of the
generated pixmap */
int maxHeight; /**< maximum height of the
generated pixmap */
int bgHMargin; /**< horizontal margin in pixels
(offset of text into background) */
int bgVMargin; /**< vertical margin */
unsigned short bgColor[4]; /**< background color (RGBA) */
} Attrib;
CompText ();
~CompText();
bool renderText (CompString text,
const Attrib &attrib);
bool renderWindowTitle (Window window,
bool renderViewportNumber,
const Attrib &attrib);
void clear ();
Pixmap getPixmap ();
int getWidth () const;
int getHeight () const;
void draw (const GLMatrix &transform,
float x,
float y,
float alpha) const;
private:
int width;
int height;
Pixmap pixmap;
GLTexture::List texture;
};
#endif
|