annotate src/xft-fonts.h @ 3305:1043bbfa24cf

[xemacs-hg @ 2006-03-26 15:24:25 by crestani] 2006-03-26 Marcus Crestani <crestani@xemacs.org> * alloc.c (malloc_warning): Move function into scope of MALLOC_END, add MALLOC_END. * alloc.c (memory_full): Add memory shortage indication, adjust error messages. * mc-alloc.c: Add memory_shortage. * mc-alloc.c (expand_heap): If memory is short, allocate only the needed pages, not more. * mc-alloc.h: Add memory_shortage.
author crestani
date Sun, 26 Mar 2006 15:24:27 +0000
parents ad2f4ae9895b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3094
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
1 /* Lisp font data structures for X and Xft.
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
2
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
3 Copyright (C) 2003 Eric Knauel and Matthias Neubauer
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
4 Copyright (C) 2005 Eric Knauel
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
5 Copyright (C) 2004, 2005 Free Software Foundation, Inc.
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
6
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
7 Authors: Eric Knauel <knauel@informatik.uni-tuebingen.de>
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
8 Matthias Neubauer <neubauer@informatik.uni-freiburg.de>
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
9 Stephen J. Turnbull <stephen@xemacs.org>
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
10 Created: 27 Oct 2003
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
11 Updated: 05 Mar 2005 by Stephen J. Turnbull
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
12
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
13 This file is part of XEmacs.
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
14
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
15 XEmacs is free software; you can redistribute it and/or modify it
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
16 under the terms of the GNU General Public License as published by the
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
17 Free Software Foundation; either version 2, or (at your option) any
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
18 later version.
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
19
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
20 XEmacs is distributed in the hope that it will be useful, but WITHOUT
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
22 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
23 for more details.
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
24
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
25 You should have received a copy of the GNU General Public License
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
26 along with XEmacs; see the file COPYING. If not, write to
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
27 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
28 Boston, MA 02111-1307, USA. */
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
29
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
30 /* Synched up with: Not in GNU Emacs. */
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
31
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
32 /* This module provides the Lisp interface to fonts in X11, including Xft,
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
33 but (at least at first) not GTK+ or Qt.
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
34
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
35 It should be renamed to fonts-x.h.
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
36
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
37 Sealevel code should be in ../lwlib/lwlib-fonts.h or
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
38 ../lwlib/lwlib-colors.h.
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
39 */
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
40
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
41
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
42 #ifndef INCLUDED_xft_fonts_h_
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
43 #define INCLUDED_xft_fonts_h_
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
44
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
45 #include "../lwlib/lwlib-fonts.h"
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
46 #include "../lwlib/lwlib-colors.h"
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
47
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
48 extern Fixnum debug_xft;
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
49
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
50 /* Standard for fontconfig. Use a macro to show we're not guessing. */
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
51 #define Qxft_font_name_encoding Qutf_8
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
52
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
53 #define XE_XLFD_MAKE_LISP_STRING(s) (make_string(s, strlen(s)))
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
54
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
55 struct fc_pattern
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
56 {
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
57 struct LCRECORD_HEADER header;
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
58 FcPattern *fcpatPtr;
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
59 };
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
60
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
61 typedef struct fc_pattern fc_pattern;
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
62
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
63 DECLARE_LRECORD(fc_pattern, struct fc_pattern);
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
64 #define XFCPATTERN(x) XRECORD (x, fc_pattern, struct fc_pattern)
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
65 #define wrap_fcpattern(p) wrap_record (p, fc_pattern)
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
66 #define FCPATTERNP(x) RECORDP (x, fc_pattern)
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
67 #define CHECK_FCPATTERN(x) CHECK_RECORD (x, fc_pattern)
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
68 #define CONCHECK_FCPATTERN(x) CONCHECK_RECORD (x, fc_pattern)
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
69 #define XFCPATTERN_PTR(x) (XFCPATTERN(x)->fcpatPtr)
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
70
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents:
diff changeset
71 #endif /* INCLUDED_xft_fonts_h_ */