summaryrefslogtreecommitdiff
path: root/src/dispextern.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h71
1 files changed, 21 insertions, 50 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 673e1c2fab6..5774e3e9514 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -74,10 +74,13 @@ typedef HDC XImagePtr_or_DC;
#ifdef HAVE_NS
#include "nsgui.h"
+#define FACE_COLOR_TO_PIXEL(face_color, frame) ns_color_index_to_rgba(face_color, frame)
/* Following typedef needed to accommodate the MSDOS port, believe it or not. */
typedef struct ns_display_info Display_Info;
typedef Pixmap XImagePtr;
typedef XImagePtr XImagePtr_or_DC;
+#else
+#define FACE_COLOR_TO_PIXEL(face_color, frame) face_color
#endif
#ifdef HAVE_WINDOW_SYSTEM
@@ -306,24 +309,24 @@ INLINE int
GLYPH_CODE_CHAR (Lisp_Object gc)
{
return (CONSP (gc)
- ? XINT (XCAR (gc))
- : XINT (gc) & MAX_CHAR);
+ ? XFIXNUM (XCAR (gc))
+ : XFIXNUM (gc) & MAX_CHAR);
}
INLINE int
GLYPH_CODE_FACE (Lisp_Object gc)
{
- return CONSP (gc) ? XINT (XCDR (gc)) : XINT (gc) >> CHARACTERBITS;
+ return CONSP (gc) ? XFIXNUM (XCDR (gc)) : XFIXNUM (gc) >> CHARACTERBITS;
}
#define SET_GLYPH_FROM_GLYPH_CODE(glyph, gc) \
do \
{ \
if (CONSP (gc)) \
- SET_GLYPH (glyph, XINT (XCAR (gc)), XINT (XCDR (gc))); \
+ SET_GLYPH (glyph, XFIXNUM (XCAR (gc)), XFIXNUM (XCDR (gc))); \
else \
- SET_GLYPH (glyph, (XINT (gc) & ((1 << CHARACTERBITS)-1)), \
- (XINT (gc) >> CHARACTERBITS)); \
+ SET_GLYPH (glyph, (XFIXNUM (gc) & ((1 << CHARACTERBITS)-1)), \
+ (XFIXNUM (gc) >> CHARACTERBITS)); \
} \
while (false)
@@ -1837,8 +1840,8 @@ GLYPH_CODE_P (Lisp_Object gc)
{
return (CONSP (gc)
? (CHARACTERP (XCAR (gc))
- && RANGED_INTEGERP (0, XCDR (gc), MAX_FACE_ID))
- : (RANGED_INTEGERP
+ && RANGED_FIXNUMP (0, XCDR (gc), MAX_FACE_ID))
+ : (RANGED_FIXNUMP
(0, gc,
(MAX_FACE_ID < TYPE_MAXIMUM (EMACS_INT) >> CHARACTERBITS
? ((EMACS_INT) MAX_FACE_ID << CHARACTERBITS) | MAX_CHAR
@@ -2482,7 +2485,7 @@ struct it
If `what' is anything else, these two are undefined (will
probably hold values for the last IT_CHARACTER or IT_COMPOSITION
- traversed by the iterator.
+ traversed by the iterator).
The values are updated by get_next_display_element, so they are
out of sync with the value returned by IT_CHARPOS between the
@@ -2932,34 +2935,6 @@ struct redisplay_interface
#ifdef HAVE_WINDOW_SYSTEM
-/* Each image format (JPEG, TIFF, ...) supported is described by
- a structure of the type below. */
-
-struct image_type
-{
- /* Index of a symbol uniquely identifying the image type, e.g., 'jpeg'. */
- int type;
-
- /* Check that SPEC is a valid image specification for the given
- image type. Value is true if SPEC is valid. */
- bool (* valid_p) (Lisp_Object spec);
-
- /* Load IMG which is used on frame F from information contained in
- IMG->spec. Value is true if successful. */
- bool (* load) (struct frame *f, struct image *img);
-
- /* Free resources of image IMG which is used on frame F. */
- void (* free) (struct frame *f, struct image *img);
-
- /* Initialization function (used for dynamic loading of image
- libraries on Windows), or NULL if none. */
- bool (* init) (void);
-
- /* Next in list of all supported image types. */
- struct image_type *next;
-};
-
-
/* Structure describing an image. Specific image formats like XBM are
converted into this form, so that display only has to deal with
this type of image. */
@@ -3429,11 +3404,12 @@ char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
#ifdef HAVE_WINDOW_SYSTEM
void prepare_face_for_display (struct frame *, struct face *);
#endif
-int lookup_named_face (struct frame *, Lisp_Object, bool);
-int lookup_basic_face (struct frame *, int);
+int lookup_named_face (struct window *, struct frame *, Lisp_Object, bool);
+int lookup_basic_face (struct window *, struct frame *, int);
int smaller_face (struct frame *, int, int);
int face_with_height (struct frame *, int, int);
-int lookup_derived_face (struct frame *, Lisp_Object, int, bool);
+int lookup_derived_face (struct window *, struct frame *,
+ Lisp_Object, int, bool);
void init_frame_faces (struct frame *);
void free_frame_faces (struct frame *);
void recompute_basic_faces (struct frame *);
@@ -3443,7 +3419,7 @@ int face_for_overlay_string (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t,
bool, Lisp_Object);
int face_at_string_position (struct window *, Lisp_Object, ptrdiff_t, ptrdiff_t,
ptrdiff_t *, enum face_id, bool);
-int merge_faces (struct frame *, Lisp_Object, int, int);
+int merge_faces (struct window *, Lisp_Object, int, int);
int compute_char_face (struct frame *, int, Lisp_Object);
void free_all_realized_faces (Lisp_Object);
extern char unspecified_fg[], unspecified_bg[];
@@ -3462,15 +3438,6 @@ void gamma_correct (struct frame *, COLORREF *);
void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
void x_change_tool_bar_height (struct frame *f, int);
-/* The frame used to display a tooltip.
-
- Note: In a GTK build with non-zero x_gtk_use_system_tooltips, this
- variable holds the frame that shows the tooltip, not the frame of
- the tooltip itself, so checking whether a frame is a tooltip frame
- cannot just compare the frame to what this variable holds. */
-extern Lisp_Object tip_frame;
-
-extern Window tip_window;
extern frame_parm_handler x_frame_parm_handlers[];
extern void start_hourglass (void);
@@ -3577,6 +3544,10 @@ extern void create_tty_output (struct frame *);
extern struct terminal *init_tty (const char *, const char *, bool);
extern void tty_append_glyph (struct it *);
+/* All scrolling costs measured in characters.
+ So no cost can exceed the area of a frame, measured in characters.
+ Let's hope this is never more than 1000000 characters. */
+enum { SCROLL_INFINITY = 1000000 };
/* Defined in scroll.c */