VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.0/xorg/dixfontstr.h@ 18709

Last change on this file since 18709 was 17236, checked in by vboxsync, 16 years ago

Additions/x11/x11include: blast! Reverted r43555 and r43556

  • Property svn:eol-style set to native
File size: 3.5 KB
Line 
1/* $Xorg: dixfontstr.h,v 1.3 2000/08/17 19:53:29 cpqbld Exp $ */
2/***********************************************************
3Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the name of Digital not be
12used in advertising or publicity pertaining to distribution of the
13software without specific, written prior permission.
14
15DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
16ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
17DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
18ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
19WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
20ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
21SOFTWARE.
22
23******************************************************************/
24
25#ifndef DIXFONTSTRUCT_H
26#define DIXFONTSTRUCT_H
27
28#include "servermd.h"
29#include "dixfont.h"
30#include <X11/fonts/fontstruct.h>
31#include "closure.h"
32#define NEED_REPLIES
33#include <X11/Xproto.h> /* for xQueryFontReply */
34
35#define FONTCHARSET(font) (font)
36#define FONTMAXBOUNDS(font,field) (font)->info.maxbounds.field
37#define FONTMINBOUNDS(font,field) (font)->info.minbounds.field
38#define TERMINALFONT(font) (font)->info.terminalFont
39#define FONTASCENT(font) (font)->info.fontAscent
40#define FONTDESCENT(font) (font)->info.fontDescent
41#define FONTGLYPHS(font) 0
42#define FONTCONSTMETRICS(font) (font)->info.constantMetrics
43#define FONTCONSTWIDTH(font) (font)->info.constantWidth
44#define FONTALLEXIST(font) (font)->info.allExist
45#define FONTFIRSTCOL(font) (font)->info.firstCol
46#define FONTLASTCOL(font) (font)->info.lastCol
47#define FONTFIRSTROW(font) (font)->info.firstRow
48#define FONTLASTROW(font) (font)->info.lastRow
49#define FONTDEFAULTCH(font) (font)->info.defaultCh
50#define FONTINKMIN(font) (&((font)->info.ink_minbounds))
51#define FONTINKMAX(font) (&((font)->info.ink_maxbounds))
52#define FONTPROPS(font) (font)->info.props
53#define FONTGLYPHBITS(base,pci) ((unsigned char *) (pci)->bits)
54#define FONTINFONPROPS(font) (font)->info.nprops
55
56/* some things haven't changed names, but we'll be careful anyway */
57
58#define FONTREFCNT(font) (font)->refcnt
59
60/*
61 * for linear char sets
62 */
63#define N1dChars(pfont) (FONTLASTCOL(pfont) - FONTFIRSTCOL(pfont) + 1)
64
65/*
66 * for 2D char sets
67 */
68#define N2dChars(pfont) (N1dChars(pfont) * \
69 (FONTLASTROW(pfont) - FONTFIRSTROW(pfont) + 1))
70
71#ifndef GLYPHPADBYTES
72#define GLYPHPADBYTES -1
73#endif
74
75#if GLYPHPADBYTES == 0 || GLYPHPADBYTES == 1
76#define GLYPHWIDTHBYTESPADDED(pci) (GLYPHWIDTHBYTES(pci))
77#define PADGLYPHWIDTHBYTES(w) (((w)+7)>>3)
78#endif
79
80#if GLYPHPADBYTES == 2
81#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+1) & ~0x1)
82#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+1) & ~0x1)
83#endif
84
85#if GLYPHPADBYTES == 4
86#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+3) & ~0x3)
87#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+3) & ~0x3)
88#endif
89
90#if GLYPHPADBYTES == 8 /* for a cray? */
91#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+7) & ~0x7)
92#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+7) & ~0x7)
93#endif
94
95#endif /* DIXFONTSTRUCT_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette