aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorAlp Aker2012-06-16 20:32:36 -0400
committerAlp Aker2012-06-16 20:32:36 -0400
commit9b0e3ebaef5aed8097965b14c97a0579763be7fd (patch)
treeeeabc5495c58289454d9c53c9dd409377ec72cf3 /src/dispextern.h
parent40d8bcb854203237c6ad8327bc1fc0644f8734ec (diff)
downloademacs-9b0e3ebaef5aed8097965b14c97a0579763be7fd.tar.gz
emacs-9b0e3ebaef5aed8097965b14c97a0579763be7fd.zip
Implement wave-style variant of underlining.
* doc/lispref/display.texi: Document new face attribute. * lisp/cus-face.el (custom-face-attributes): Add wave-style underline attribute. * lisp/faces.el (set-face-attribute): Update docstring. * src/dispextern.h (face_underline_type): New enum. (face): Add field for underline type. * src/nsterm.m (ns_draw_underwave): New function. (ns_draw_text_decoration): Use it. * src/w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave): New functions. (x_draw_glyph_string): Use them. * src/xfaces.c (Qline, Qwave): New Lisp objects. (check_lface_attrs, merge_face_ref) (Finternal_set_lisp_face_attribute, realize_x_face): Handle wave-style underline face attributes. * src/xterm.c (x_draw_underwave): New function. (x_draw_glyph_string): Use it.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 6e070f3dbef..fc7bec97f7a 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1510,6 +1510,13 @@ enum face_box_type
1510 FACE_SUNKEN_BOX 1510 FACE_SUNKEN_BOX
1511}; 1511};
1512 1512
1513/* Underline type. */
1514
1515enum face_underline_type
1516{
1517 FACE_UNDER_LINE,
1518 FACE_UNDER_WAVE
1519};
1513 1520
1514/* Structure describing a realized face. 1521/* Structure describing a realized face.
1515 1522
@@ -1585,6 +1592,9 @@ struct face
1585 drawing shadows. */ 1592 drawing shadows. */
1586 unsigned use_box_color_for_shadows_p : 1; 1593 unsigned use_box_color_for_shadows_p : 1;
1587 1594
1595 /* Style of underlining. */
1596 enum face_underline_type underline_type;
1597
1588 /* Non-zero if text in this face should be underlined, overlined, 1598 /* Non-zero if text in this face should be underlined, overlined,
1589 strike-through or have a box drawn around it. */ 1599 strike-through or have a box drawn around it. */
1590 unsigned underline_p : 1; 1600 unsigned underline_p : 1;