Mercurial > hg > xemacs-beta
comparison src/redisplay-output.c @ 5080:5502045ec510
The background-placement face property.
-------------------- ChangeLog entries follow: --------------------
lisp/ChangeLog addition:
2010-02-25 Didier Verna <didier@xemacs.org>
The background-placement face property.
* cl-macs.el (face-background-placement): New defsetf.
* cus-face.el (custom-face-attributes):
* faces.el (face-interactive):
* faces.el (set-face-property):
* faces.el (face-equal):
* faces.el (init-other-random-faces): Update.
* faces.el (face-background-placement):
* faces.el (set-face-background-placement):
* faces.el (face-background-placement-instance):
* faces.el (face-background-placement-instance-p):
* frame.el (set-frame-background-placement):
* frame.el (frame-background-placement):
* frame.el (frame-background-placement-instance):
* objects.el (make-face-background-placement-specifier): New.
man/ChangeLog addition:
2010-02-25 Didier Verna <didier@xemacs.org>
The background-placement face property.
* xemacs/custom.texi (Faces): Document it.
src/ChangeLog addition:
2010-02-25 Didier Verna <didier@xemacs.org>
The background-placement face property.
* console-x-impl.h (struct x_frame): Add new slots x and y.
* console-x-impl.h (FRAME_X_X, FRAME_X_Y): New slot accessors.
* console-gtk-impl.h: Fake something similar for potential port.
* frame-x.c (x_get_frame_text_position): New function.
* frame-x.c (x_init_frame_3): Use it.
* event-Xt.c (emacs_Xt_handle_magic_event): Eat spurious
ConfigureNotify events, get the frame position and mark frame
faces changed.
* objects-impl.h: The face_background_placement_specifier
structure and its accessors.
* objects.c: New symbols Qabsolute and Qrelative.
* objects.c (face_background_placement_create):
* objects.c (face_background_placement_mark):
* objects.c (face_background_placement_instantiate):
* objects.c (face_background_placement_validate):
* objects.c (face_background_placement_after_change):
* objects.c (set_face_background_placement_attached_to): New.
* objects.h (set_face_background_palcement_attached_to): Declare
the one above.
* objects.c (syms_of_objects):
* objects.c (specifier_type_create_objects):
* objects.c (reinit_specifier_type_create_objects):
* objects.c (reinit_vars_of_objects): Update for the modifications
above.
* console-xlike-inc.h (XLIKE_GC_TS_X_ORIGIN, XLIKE_GC_TS_X_ORIGIN):
New X11/Gtk compatibility macros.
* redisplay-xlike-inc.c (XLIKE_get_gc): Add a background placement
argument and handle it.
* gtk-glue.c (face_to_gc):
* redisplay-xlike-inc.c (XLIKE_output_string):
* redisplay-xlike-inc.c (XLIKE_output_pixmap):
* redisplay-xlike-inc.c (XLIKE_output_blank):
* redisplay-xlike-inc.c (XLIKE_output_horizontal_line):
* redisplay-xlike-inc.c (XLIKE_output_eol_cursor): Update
accordingly.
* console-impl.h (struct console_methods): Add a background
placement (Lisp_Object) argument to the clear_region method.
* console-stream.c (stream_clear_region):
* redisplay-tty.c (tty_clear_region):
* redisplay-msw.c (mswindows_clear_region):
* redisplay-xlike-inc.c (XLIKE_clear_region): Update accordingly.
* redisplay-output.c (redisplay_clear_region): Handle the
background placement property and update the call to the
clear_region method.
* faces.h (struct Lisp_Face):
* faces.h (struct face_cachel): Add a background placement slot.
* faces.h (WINDOW_FACE_CACHEL_BACKGROUND_PLACEMENT): New accessor.
* faces.c (mark_face):
* faces.c (face_equal):
* faces.c (face_getprop):
* faces.c (face_putprop):
* faces.c (face_remprop):
* faces.c (face_plist):
* faces.c (reset_face):
* faces.c (mark_face_cachels):
* faces.c (update_face_cachel_data):
* faces.c (merge_face_cachel_data):
* faces.c (reset_face_cachel):
* faces.c (Fmake_face):
* faces.c (Fcopy_face): Handle the background placement property.
* faces.c (syms_of_faces):
* faces.c (vars_of_faces):
* faces.c (complex_vars_of_faces): Update accordingly.
author | Didier Verna <didier@lrde.epita.fr> |
---|---|
date | Thu, 25 Feb 2010 16:19:01 +0100 |
parents | 8af6a32b170d |
children | 0ca81354c4c7 |
comparison
equal
deleted
inserted
replaced
5079:aa4cae427255 | 5080:5502045ec510 |
---|---|
1 /* Synchronize redisplay structures and output changes. | 1 /* Synchronize redisplay structures and output changes. |
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. | 2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. |
3 Copyright (C) 1995, 1996, 2002, 2003 Ben Wing. | 3 Copyright (C) 1995, 1996, 2002, 2003 Ben Wing. |
4 Copyright (C) 1996 Chuck Thompson. | 4 Copyright (C) 1996 Chuck Thompson. |
5 Copyright (C) 1999, 2002 Andy Piper. | 5 Copyright (C) 1999, 2002 Andy Piper. |
6 Copyright (C) 2010 Didier Verna | |
6 | 7 |
7 This file is part of XEmacs. | 8 This file is part of XEmacs. |
8 | 9 |
9 XEmacs is free software; you can redistribute it and/or modify it | 10 XEmacs is free software; you can redistribute it and/or modify it |
10 under the terms of the GNU General Public License as published by the | 11 under the terms of the GNU General Public License as published by the |
1719 { | 1720 { |
1720 struct window *w = NULL; | 1721 struct window *w = NULL; |
1721 struct frame *f = NULL; | 1722 struct frame *f = NULL; |
1722 struct device *d; | 1723 struct device *d; |
1723 Lisp_Object background_pixmap = Qunbound; | 1724 Lisp_Object background_pixmap = Qunbound; |
1725 Lisp_Object background_placement = Qunbound; | |
1724 Lisp_Object fcolor = Qnil, bcolor = Qnil; | 1726 Lisp_Object fcolor = Qnil, bcolor = Qnil; |
1725 | 1727 |
1726 if (!width || !height) | 1728 if (!width || !height) |
1727 return; | 1729 return; |
1728 | 1730 |
1763 && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (temp))) | 1765 && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (temp))) |
1764 { | 1766 { |
1765 /* #### maybe we could implement such that a string | 1767 /* #### maybe we could implement such that a string |
1766 can be a background pixmap? */ | 1768 can be a background pixmap? */ |
1767 background_pixmap = temp; | 1769 background_pixmap = temp; |
1770 background_placement | |
1771 = WINDOW_FACE_CACHEL_BACKGROUND_PLACEMENT (w, findex); | |
1768 } | 1772 } |
1769 } | 1773 } |
1770 else | 1774 else |
1771 { | 1775 { |
1772 temp = FACE_BACKGROUND_PIXMAP (Vdefault_face, locale); | 1776 temp = FACE_BACKGROUND_PIXMAP (Vdefault_face, locale); |
1773 | 1777 |
1774 if (IMAGE_INSTANCEP (temp) | 1778 if (IMAGE_INSTANCEP (temp) |
1775 && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (temp))) | 1779 && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (temp))) |
1776 { | 1780 { |
1777 background_pixmap = temp; | 1781 background_pixmap = temp; |
1782 background_placement | |
1783 = FACE_BACKGROUND_PLACEMENT (Vdefault_face, locale); | |
1778 } | 1784 } |
1779 } | 1785 } |
1780 } | 1786 } |
1781 | 1787 |
1782 if (!UNBOUNDP (background_pixmap) && | 1788 if (!UNBOUNDP (background_pixmap) |
1783 XIMAGE_INSTANCE_PIXMAP_DEPTH (background_pixmap) == 0) | 1789 && XIMAGE_INSTANCE_PIXMAP_DEPTH (background_pixmap) == 0) |
1784 { | 1790 { |
1785 if (w) | 1791 if (w) |
1786 { | 1792 { |
1787 fcolor = WINDOW_FACE_CACHEL_FOREGROUND (w, findex); | 1793 fcolor = WINDOW_FACE_CACHEL_FOREGROUND (w, findex); |
1788 bcolor = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); | 1794 bcolor = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); |
1803 | 1809 |
1804 if (UNBOUNDP (background_pixmap)) | 1810 if (UNBOUNDP (background_pixmap)) |
1805 background_pixmap = Qnil; | 1811 background_pixmap = Qnil; |
1806 | 1812 |
1807 DEVMETH (d, clear_region, (locale, d, f, findex, x, y, width, height, | 1813 DEVMETH (d, clear_region, (locale, d, f, findex, x, y, width, height, |
1808 fcolor, bcolor, background_pixmap)); | 1814 fcolor, bcolor, |
1815 background_pixmap, background_placement)); | |
1809 } | 1816 } |
1810 | 1817 |
1811 /**************************************************************************** | 1818 /**************************************************************************** |
1812 redisplay_clear_clipped_region | 1819 redisplay_clear_clipped_region |
1813 | 1820 |