]> code.delx.au - gnu-emacs/blobdiff - src/font.h
Don't install keyboard hook when debugged on MS-Windows
[gnu-emacs] / src / font.h
index efc184eef77bcb8e1f0afdf4aa595ecbac2ccb54..cf477290d06fc8855ae2ca005ae264b87a47fad2 100644 (file)
@@ -1,5 +1,5 @@
 /* font.h -- Interface definition for font handling.
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2016 Free Software Foundation, Inc.
    Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H13PRO009
@@ -8,8 +8,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs 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 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,8 +22,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef EMACS_FONT_H
 #define EMACS_FONT_H
 
-#include "ccl.h"
-#include "frame.h"
+struct composition_it;
+struct face;
+struct glyph_string;
 
 INLINE_HEADER_BEGIN
 
@@ -426,6 +427,13 @@ FONT_SPEC_P (Lisp_Object x)
   return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_SPEC_MAX;
 }
 
+/* Like FONT_SPEC_P, but can be used in the garbage collector.  */
+INLINE bool
+GC_FONT_SPEC_P (Lisp_Object x)
+{
+  return FONTP (x) && (gc_asize (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_SPEC_MAX;
+}
+
 /* True iff X is font-entity.  */
 INLINE bool
 FONT_ENTITY_P (Lisp_Object x)
@@ -433,6 +441,13 @@ FONT_ENTITY_P (Lisp_Object x)
   return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_ENTITY_MAX;
 }
 
+/* Like FONT_ENTITY_P, but can be used in the garbage collector.  */
+INLINE bool
+GC_FONT_ENTITY_P (Lisp_Object x)
+{
+  return FONTP (x) && (gc_asize (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_ENTITY_MAX;
+}
+
 /* True iff X is font-object.  */
 INLINE bool
 FONT_OBJECT_P (Lisp_Object x)
@@ -440,6 +455,13 @@ FONT_OBJECT_P (Lisp_Object x)
   return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX;
 }
 
+/* Like FONT_OBJECT_P, but can be used in the garbage collector.  */
+INLINE bool
+GC_FONT_OBJECT_P (Lisp_Object x)
+{
+  return FONTP (x) && (gc_asize (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX;
+}
+
 /* Type checking functions for various font-related objects.  */
 
 INLINE void
@@ -475,6 +497,13 @@ XFONT_SPEC (Lisp_Object p)
   return XUNTAG (p, Lisp_Vectorlike);
 }
 
+INLINE struct font_spec *
+GC_XFONT_SPEC (Lisp_Object p)
+{
+  eassert (GC_FONT_SPEC_P (p));
+  return XUNTAG (p, Lisp_Vectorlike);
+}
+
 INLINE struct font_entity *
 XFONT_ENTITY (Lisp_Object p)
 {
@@ -482,6 +511,13 @@ XFONT_ENTITY (Lisp_Object p)
   return XUNTAG (p, Lisp_Vectorlike);
 }
 
+INLINE struct font_entity *
+GC_XFONT_ENTITY (Lisp_Object p)
+{
+  eassert (GC_FONT_ENTITY_P (p));
+  return XUNTAG (p, Lisp_Vectorlike);
+}
+
 INLINE struct font *
 XFONT_OBJECT (Lisp_Object p)
 {
@@ -489,6 +525,13 @@ XFONT_OBJECT (Lisp_Object p)
   return XUNTAG (p, Lisp_Vectorlike);
 }
 
+INLINE struct font *
+GC_XFONT_OBJECT (Lisp_Object p)
+{
+  eassert (GC_FONT_OBJECT_P (p));
+  return XUNTAG (p, Lisp_Vectorlike);
+}
+
 #define XSETFONT(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FONT))
 
 INLINE struct font *
@@ -714,6 +757,12 @@ struct font_driver
   bool (*cached_font_ok) (struct frame *f,
                           Lisp_Object font_object,
                           Lisp_Object entity);
+
+  /* Optional
+
+     Return non-nil if the driver support rendering of combining
+     characters for FONT according to Unicode combining class.  */
+  Lisp_Object (*combining_capability) (struct font *font);
 };
 
 
@@ -844,6 +893,10 @@ extern struct font_driver nsfont_driver;
 extern void syms_of_nsfont (void);
 extern void syms_of_macfont (void);
 #endif /* HAVE_NS */
+#ifdef USE_CAIRO
+extern struct font_driver ftcrfont_driver;
+extern void syms_of_ftcrfont (void);
+#endif
 
 #ifndef FONT_DEBUG
 #define FONT_DEBUG