From: Kim F. Storm Date: Sun, 8 Feb 2004 23:18:36 +0000 (+0000) Subject: (FRINGE_ID_BITS): New definition for number of X-Git-Tag: ttn-vms-21-2-B4~7686 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2251a6f2b7e145d7e143f79437c2d673b4f96c4b;p=emacs.git (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 --git a/src/dispextern.h b/src/dispextern.h index eed56e55706..ec6750086ea 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -126,6 +126,9 @@ enum window_part ON_RIGHT_MARGIN }; +/* Number of bits allocated to store fringe bitmap numbers. */ +#define FRINGE_ID_BITS 8 + /*********************************************************************** @@ -710,10 +713,28 @@ struct glyph_row 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_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 : 4; + 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 @@ extern int face_change_count; 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 fringe_bitmap 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<