comparison src/extents.c @ 284:558f606b08ae r21-0b40

Import from CVS: tag r21-0b40
author cvs
date Mon, 13 Aug 2007 10:34:13 +0200
parents 7df0dd720c89
children 70ad99077275
comparison
equal deleted inserted replaced
283:fa3d41851a08 284:558f606b08ae
4923 { 4923 {
4924 return set_extent_glyph_1 (extent, begin_glyph, 0, layout); 4924 return set_extent_glyph_1 (extent, begin_glyph, 0, layout);
4925 } 4925 }
4926 4926
4927 DEFUN ("set-extent-end-glyph", Fset_extent_end_glyph, 2, 3, 0, /* 4927 DEFUN ("set-extent-end-glyph", Fset_extent_end_glyph, 2, 3, 0, /*
4928 Display a bitmap, subwindow or string at the end of the EXTENT. 4928 Display a bitmap, subwindow or string at the end of EXTENT.
4929 END-GLYPH must be a glyph object. The layout policy defaults to `text'. 4929 END-GLYPH must be a glyph object. The layout policy defaults to `text'.
4930 */ 4930 */
4931 (extent, end_glyph, layout)) 4931 (extent, end_glyph, layout))
4932 { 4932 {
4933 return set_extent_glyph_1 (extent, end_glyph, 1, layout); 4933 return set_extent_glyph_1 (extent, end_glyph, 1, layout);
4935 4935
4936 DEFUN ("extent-begin-glyph", Fextent_begin_glyph, 1, 1, 0, /* 4936 DEFUN ("extent-begin-glyph", Fextent_begin_glyph, 1, 1, 0, /*
4937 Return the glyph object displayed at the beginning of EXTENT. 4937 Return the glyph object displayed at the beginning of EXTENT.
4938 If there is none, nil is returned. 4938 If there is none, nil is returned.
4939 */ 4939 */
4940 (extent_obj)) 4940 (extent))
4941 { 4941 {
4942 return extent_begin_glyph (decode_extent (extent_obj, 0)); 4942 return extent_begin_glyph (decode_extent (extent, 0));
4943 } 4943 }
4944 4944
4945 DEFUN ("extent-end-glyph", Fextent_end_glyph, 1, 1, 0, /* 4945 DEFUN ("extent-end-glyph", Fextent_end_glyph, 1, 1, 0, /*
4946 Return the glyph object displayed at the end of EXTENT. 4946 Return the glyph object displayed at the end of EXTENT.
4947 If there is none, nil is returned. 4947 If there is none, nil is returned.
4948 */ 4948 */
4949 (extent_obj)) 4949 (extent))
4950 { 4950 {
4951 return extent_end_glyph (decode_extent (extent_obj, 0)); 4951 return extent_end_glyph (decode_extent (extent, 0));
4952 } 4952 }
4953 4953
4954 DEFUN ("set-extent-begin-glyph-layout", Fset_extent_begin_glyph_layout, 2, 2, 0, /* 4954 DEFUN ("set-extent-begin-glyph-layout", Fset_extent_begin_glyph_layout, 2, 2, 0, /*
4955 Set the layout policy of the given extent's begin glyph. 4955 Set the layout policy of EXTENT's begin glyph.
4956 Access this using the `extent-begin-glyph-layout' function. 4956 Access this using the `extent-begin-glyph-layout' function.
4957 */ 4957 */
4958 (extent, layout)) 4958 (extent, layout))
4959 { 4959 {
4960 EXTENT e = decode_extent (extent, 0); 4960 EXTENT e = decode_extent (extent, 0);
4963 extent_maybe_changed_for_redisplay (e, 1, 0); 4963 extent_maybe_changed_for_redisplay (e, 1, 0);
4964 return layout; 4964 return layout;
4965 } 4965 }
4966 4966
4967 DEFUN ("set-extent-end-glyph-layout", Fset_extent_end_glyph_layout, 2, 2, 0, /* 4967 DEFUN ("set-extent-end-glyph-layout", Fset_extent_end_glyph_layout, 2, 2, 0, /*
4968 Set the layout policy of the given extent's end glyph. 4968 Set the layout policy of EXTENT's end glyph.
4969 Access this using the `extent-end-glyph-layout' function. 4969 Access this using the `extent-end-glyph-layout' function.
4970 */ 4970 */
4971 (extent, layout)) 4971 (extent, layout))
4972 { 4972 {
4973 EXTENT e = decode_extent (extent, 0); 4973 EXTENT e = decode_extent (extent, 0);
4976 extent_maybe_changed_for_redisplay (e, 1, 0); 4976 extent_maybe_changed_for_redisplay (e, 1, 0);
4977 return layout; 4977 return layout;
4978 } 4978 }
4979 4979
4980 DEFUN ("extent-begin-glyph-layout", Fextent_begin_glyph_layout, 1, 1, 0, /* 4980 DEFUN ("extent-begin-glyph-layout", Fextent_begin_glyph_layout, 1, 1, 0, /*
4981 Return the layout policy associated with the given extent's begin glyph. 4981 Return the layout policy associated with EXTENT's begin glyph.
4982 Set this using the `set-extent-begin-glyph-layout' function. 4982 Set this using the `set-extent-begin-glyph-layout' function.
4983 */ 4983 */
4984 (extent)) 4984 (extent))
4985 { 4985 {
4986 EXTENT e = decode_extent (extent, 0); 4986 EXTENT e = decode_extent (extent, 0);
4987 return glyph_layout_to_symbol ((glyph_layout) extent_begin_glyph_layout (e)); 4987 return glyph_layout_to_symbol ((glyph_layout) extent_begin_glyph_layout (e));
4988 } 4988 }
4989 4989
4990 DEFUN ("extent-end-glyph-layout", Fextent_end_glyph_layout, 1, 1, 0, /* 4990 DEFUN ("extent-end-glyph-layout", Fextent_end_glyph_layout, 1, 1, 0, /*
4991 Return the layout policy associated with the given extent's end glyph. 4991 Return the layout policy associated with EXTENT's end glyph.
4992 Set this using the `set-extent-end-glyph-layout' function. 4992 Set this using the `set-extent-end-glyph-layout' function.
4993 */ 4993 */
4994 (extent)) 4994 (extent))
4995 { 4995 {
4996 EXTENT e = decode_extent (extent, 0); 4996 EXTENT e = decode_extent (extent, 0);
5330 return UNBOUNDP (value) ? default_ : value; 5330 return UNBOUNDP (value) ? default_ : value;
5331 } 5331 }
5332 } 5332 }
5333 5333
5334 DEFUN ("extent-properties", Fextent_properties, 1, 1, 0, /* 5334 DEFUN ("extent-properties", Fextent_properties, 1, 1, 0, /*
5335 Return a property list of the attributes of the given extent. 5335 Return a property list of the attributes of EXTENT.
5336 Do not modify this list; use `set-extent-property' instead. 5336 Do not modify this list; use `set-extent-property' instead.
5337 */ 5337 */
5338 (extent)) 5338 (extent))
5339 { 5339 {
5340 EXTENT e, anc; 5340 EXTENT e, anc;
5446 Highlight or unhighlight the given extent. 5446 Highlight or unhighlight the given extent.
5447 If the second arg is non-nil, it will be highlighted, else dehighlighted. 5447 If the second arg is non-nil, it will be highlighted, else dehighlighted.
5448 This is the same as `highlight-extent', except that it will work even 5448 This is the same as `highlight-extent', except that it will work even
5449 on extents without the `mouse-face' property. 5449 on extents without the `mouse-face' property.
5450 */ 5450 */
5451 (extent_obj, highlight_p)) 5451 (extent, highlight_p))
5452 { 5452 {
5453 if (NILP (extent_obj)) 5453 if (NILP (extent))
5454 highlight_p = Qnil; 5454 highlight_p = Qnil;
5455 else 5455 else
5456 XSETEXTENT (extent_obj, decode_extent (extent_obj, DE_MUST_BE_ATTACHED)); 5456 XSETEXTENT (extent, decode_extent (extent, DE_MUST_BE_ATTACHED));
5457 do_highlight (extent_obj, !NILP (highlight_p)); 5457 do_highlight (extent, !NILP (highlight_p));
5458 return Qnil; 5458 return Qnil;
5459 } 5459 }
5460 5460
5461 DEFUN ("highlight-extent", Fhighlight_extent, 1, 2, 0, /* 5461 DEFUN ("highlight-extent", Fhighlight_extent, 1, 2, 0, /*
5462 Highlight the given extent, if it is highlightable 5462 Highlight EXTENT, if it is highlightable.
5463 \(that is, if it has the `mouse-face' property). 5463 \(that is, if it has the `mouse-face' property).
5464 If the second arg is non-nil, it will be highlighted, else dehighlighted. 5464 If the second arg is non-nil, it will be highlighted, else dehighlighted.
5465 Highlighted extents are displayed as if they were merged with the face 5465 Highlighted extents are displayed as if they were merged with the face
5466 or faces specified by the `mouse-face' property. 5466 or faces specified by the `mouse-face' property.
5467 */ 5467 */
5468 (extent_obj, highlight_p)) 5468 (extent, highlight_p))
5469 { 5469 {
5470 if (EXTENTP (extent_obj) && NILP (extent_mouse_face (XEXTENT (extent_obj)))) 5470 if (EXTENTP (extent) && NILP (extent_mouse_face (XEXTENT (extent))))
5471 return Qnil; 5471 return Qnil;
5472 else 5472 else
5473 return Fforce_highlight_extent (extent_obj, highlight_p); 5473 return Fforce_highlight_extent (extent, highlight_p);
5474 } 5474 }
5475 5475
5476 5476
5477 /************************************************************************/ 5477 /************************************************************************/
5478 /* strings and extents */ 5478 /* strings and extents */