# HG changeset patch # User Kim F. Storm # Date 1076282316 0 # Node ID c3e8576e5ba2bef12618cfda181d4afe21c80188 # Parent e3771c262410823eafaa78807959f4afc5e01f2a (FRINGE_ID_BITS): New definition for number of bits allocated to hold a fringe number. Increase number of bits from 4 to 8 to allow user defined fringe bitmaps. (struct glyph_row, struct it): New members left_user_fringe_bitmap, left_user_fringe_face_id, right_user_fringe_bitmap, right_user_fringe_face_id. (enum fringe_bitmap_type, struct fringe_bitmap, fringe_bitmaps): Move to new file fringe.c. (MAX_FRINGE_BITMAPS): Define here. (struct draw_fringe_bitmap_params): New members bits, cursor_p, and overlay_p. Change member which to int. (struct redisplay_interface): New members define_fringe_bitmap and destroy_fringe_bitmap. (valid_fringe_bitmap_id_p): Add prototype. (w32_init_fringe, w32_reset_fringes) [WINDOWS_NT]: Add prototypes. diff -r e3771c262410 -r c3e8576e5ba2 src/dispextern.h --- a/src/dispextern.h Sun Feb 08 23:18:16 2004 +0000 +++ b/src/dispextern.h Sun Feb 08 23:18:36 2004 +0000 @@ -126,6 +126,9 @@ ON_RIGHT_MARGIN }; +/* Number of bits allocated to store fringe bitmap numbers. */ +#define FRINGE_ID_BITS 8 + /*********************************************************************** @@ -710,10 +713,28 @@ struct display_pos end; /* Left fringe bitmap number (enum fringe_bitmap_type). */ - unsigned left_fringe_bitmap : 4; + unsigned left_user_fringe_bitmap : FRINGE_ID_BITS; + + /* Face of the left fringe glyph. */ + unsigned left_user_fringe_face_id : FACE_ID_BITS; /* Right fringe bitmap number (enum fringe_bitmap_type). */ - unsigned right_fringe_bitmap : 4; + unsigned right_user_fringe_bitmap : FRINGE_ID_BITS; + + /* Face of the right fringe glyph. */ + unsigned right_user_fringe_face_id : FACE_ID_BITS; + + /* Left fringe bitmap number (enum fringe_bitmap_type). */ + unsigned left_fringe_bitmap : FRINGE_ID_BITS; + + /* Face of the left fringe glyph. */ + unsigned left_fringe_face_id : FACE_ID_BITS; + + /* Right fringe bitmap number (enum fringe_bitmap_type). */ + unsigned right_fringe_bitmap : FRINGE_ID_BITS; + + /* Face of the right fringe glyph. */ + unsigned right_fringe_face_id : FACE_ID_BITS; /* 1 means that we must draw the bitmaps of this row. */ unsigned redraw_fringe_bitmaps_p : 1; @@ -1609,35 +1630,6 @@ Fringes ***********************************************************************/ -enum fringe_bitmap_type -{ - NO_FRINGE_BITMAP = 0, - LEFT_TRUNCATION_BITMAP, - RIGHT_TRUNCATION_BITMAP, - UP_ARROW_BITMAP, - DOWN_ARROW_BITMAP, - CONTINUED_LINE_BITMAP, - CONTINUATION_LINE_BITMAP, - OVERLAY_ARROW_BITMAP, - FIRST_LINE_BITMAP, - LAST_LINE_BITMAP, - FILLED_BOX_CURSOR_BITMAP, - HOLLOW_BOX_CURSOR_BITMAP, - BAR_CURSOR_BITMAP, - HBAR_CURSOR_BITMAP, - ZV_LINE_BITMAP, - HOLLOW_SQUARE_BITMAP, - MAX_FRINGE_BITMAPS -}; - -struct fringe_bitmap -{ - int width; - int height; - int period; - unsigned char *bits; -}; - /* Structure used to describe where and how to draw a fringe bitmap. WHICH is the fringe bitmap to draw. WD and H is the (adjusted) width and height of the bitmap, DH is the height adjustment (if @@ -1648,14 +1640,17 @@ struct draw_fringe_bitmap_params { - enum fringe_bitmap_type which; + int which; /* enum fringe_bitmap_type */ + unsigned char *bits; int wd, h, dh; int x, y; int bx, nx, by, ny; + unsigned cursor_p : 1; + unsigned overlay_p : 1; struct face *face; }; -extern struct fringe_bitmap fringe_bitmaps[MAX_FRINGE_BITMAPS]; +#define MAX_FRINGE_BITMAPS (1<