[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xdisp.c
From: |
Kim F . Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/xdisp.c |
Date: |
Thu, 27 Jan 2005 17:33:53 -0500 |
Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.973 emacs/src/xdisp.c:1.974
*** emacs/src/xdisp.c:1.973 Thu Jan 27 00:16:28 2005
--- emacs/src/xdisp.c Thu Jan 27 22:33:52 2005
***************
*** 1876,1881 ****
--- 1876,1939 ----
#endif
}
+
+ /* EXPORT:
+ Return the position and height of the phys cursor in window W.
+ Set w->phys_cursor_width to width of phys cursor.
+ */
+
+ int
+ get_phys_cursor_geometry (w, row, glyph, heightp)
+ struct window *w;
+ struct glyph_row *row;
+ struct glyph *glyph;
+ int *heightp;
+ {
+ struct frame *f = XFRAME (WINDOW_FRAME (w));
+ int x, y, wd, h, h0, y0;
+
+ /* Compute the width of the rectangle to draw. If on a stretch
+ glyph, and `x-stretch-block-cursor' is nil, don't draw a
+ rectangle as wide as the glyph, but use a canonical character
+ width instead. */
+ wd = glyph->pixel_width - 1;
+ #ifdef HAVE_NTGUI
+ wd++; /* Why? */
+ #endif
+ if (glyph->type == STRETCH_GLYPH
+ && !x_stretch_cursor_p)
+ wd = min (FRAME_COLUMN_WIDTH (f), wd);
+ w->phys_cursor_width = wd;
+
+ y = w->phys_cursor.y + row->ascent - glyph->ascent;
+
+ /* If y is below window bottom, ensure that we still see a cursor. */
+ h0 = min (FRAME_LINE_HEIGHT (f), row->visible_height);
+
+ h = max (h0, glyph->ascent + glyph->descent);
+ h0 = min (h0, glyph->ascent + glyph->descent);
+
+ y0 = WINDOW_HEADER_LINE_HEIGHT (w);
+ if (y < y0)
+ {
+ h = max (h - (y0 - y) + 1, h0);
+ y = y0 - 1;
+ }
+ else
+ {
+ y0 = window_text_bottom_y (w) - h0;
+ if (y > y0)
+ {
+ h += y - y0;
+ y = y0;
+ }
+ }
+
+ *heightp = h - 1;
+ return WINDOW_TO_FRAME_PIXEL_Y (w, y);
+ }
+
+
#endif /* HAVE_WINDOW_SYSTEM */
- [Emacs-diffs] Changes to emacs/src/xdisp.c, (continued)
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Stefan Monnier, 2005/01/10
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M . Stallman, 2005/01/12
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2005/01/13
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2005/01/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2005/01/22
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2005/01/22
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2005/01/24
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Steven Tamm, 2005/01/24
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2005/01/24
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Kim F . Storm, 2005/01/26
- [Emacs-diffs] Changes to emacs/src/xdisp.c,
Kim F . Storm <=