Mercurial > emacs
diff src/macgui.h @ 90261:7beb78bc1f8e
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 616-696)
- Add lisp/mh-e/.arch-inventory
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords.
- lisp/gnus/ChangeLog: Remove duplicate entry
* gnus--rel--5.10 (patch 147-181)
- Update from CVS
- Merge from emacs--cvs-trunk--0
- Update from CVS: lisp/mml.el (mml-preview): Doc fix.
- Update from CVS: texi/message.texi: Fix default values.
- Update from CVS: texi/gnus.texi (RSS): Addition.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 16 Jan 2006 08:37:27 +0000 |
parents | 5e2d3828e89f caacdc1a999e |
children | c5406394f567 |
line wrap: on
line diff
--- a/src/macgui.h Mon Jan 16 06:59:21 2006 +0000 +++ b/src/macgui.h Mon Jan 16 08:37:27 2006 +0000 @@ -92,6 +92,12 @@ #endif +#ifndef USE_CG_TEXT_DRAWING +#if USE_ATSUI && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 +#define USE_CG_TEXT_DRAWING 1 +#endif +#endif + /* Emulate XCharStruct. */ typedef struct _XCharStruct { @@ -103,7 +109,6 @@ #if 0 unsigned short attributes; /* per char flags (not predefined) */ #endif - unsigned valid_p : 1; } XCharStruct; #define STORE_XCHARSTRUCT(xcs, w, bds) \ @@ -111,8 +116,19 @@ (xcs).lbearing = (bds).left, \ (xcs).rbearing = (bds).right, \ (xcs).ascent = -(bds).top, \ - (xcs).descent = (bds).bottom, \ - (xcs).valid_p = 1) + (xcs).descent = (bds).bottom) + +typedef struct +{ + char valid_bits[0x100 / 8]; + XCharStruct per_char[0x100]; +} XCharStructRow; + +#define XCHARSTRUCTROW_CHAR_VALID_P(row, byte2) \ + ((row)->valid_bits[(byte2) / 8] & (1 << (byte2) % 8)) + +#define XCHARSTRUCTROW_SET_CHAR_VALID(row, byte2) \ + ((row)->valid_bits[(byte2) / 8] |= (1 << (byte2) % 8)) struct MacFontStruct { char *full_name; @@ -127,6 +143,10 @@ #endif #if USE_ATSUI ATSUStyle mac_style; /* NULL if QuickDraw Text is used */ +#if USE_CG_TEXT_DRAWING + CGFontRef cg_font; /* NULL if ATSUI text drawing is used */ + CGGlyph *cg_glyphs; /* Likewise */ +#endif #endif /* from Xlib.h */ @@ -147,7 +167,10 @@ #endif /* 0 */ XCharStruct min_bounds; /* minimum bounds over all existing char */ XCharStruct max_bounds; /* maximum bounds over all existing char */ - XCharStruct *per_char; /* first_char to last_char information */ + union { + XCharStruct *per_char; /* first_char to last_char information */ + XCharStructRow **rows; /* first row to last row information */ + } bounds; int ascent; /* logical extent above baseline for spacing */ int descent; /* logical decent below baseline for spacing */ };