emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Console based mouse face highlighting.


From: Nick Roberts
Subject: Re: [PATCH] Console based mouse face highlighting.
Date: Sun, 13 May 2007 16:19:05 +1200

 > > OK, thanks, that helped.  I've now replaced calls to x_y_to_hpos_vpos with
 > > code in that file.  It looks a bit better now, but the mouse highlighting
 > > is from text adjacent to the pointer, appears in a slightly different
 > > location and only when there is some input e.g a mouse click, and remains
 > > until I do a refresh (^L).
 > 
 > I'm afraid I don't quite understand what you are saying here.  What do
 > you mean by ``mouse highlighting is from text adjacent to the
 > pointer''? can you show an image or describe this with a specific
 > example?  Also, in what ``slightly different location'' does the
 > highlight appear?

I dont know how to make a screenshot on a text terminal but I'll try to
explain more clearly.  In dired with something like

  -rw-r--r--  1 nickrob nickrob    22289 2007-04-23 05:00 abbrev.c
  -rw-r--r--  1 nickrob nickrob   185308 2007-05-09 23:02 abbrev.o
  -rw-r--r--  1 nickrob nickrob     1311 2007-02-11 11:34 acldef.h
  -rw-r--r--  1 nickrob nickrob    14768 2004-01-31 06:10 alloca.c

The filenames have mouse face highlighting.  If I click on acldef.h, then the
text "alloca.c" might appear after abbrev.c, say, with the mouse face overlay
(green background, black foreground).  If I click on other filenames, I get
similar output (sometimes more than one filename).  These all accumulate until
I do ^L, when they disappear.

Perhaps some of my glyph row/column calculations are a bit wrong.

 > > 1) Does write_glyphs *overwrite* existing glyphs (while insert_glyphs adds
 > >    to them) ?
 > 
 > Yes (on both accounts).  More accurately, write_glyphs simply dumps
 > the glyphs to the screen (with a call to fwrite), which on a tty will
 > overwrite whatever is displayed in the respective screen locations,
 > while insert_glyphs first switches the screen to insert mode, and then
 > calls write_glyphs.
 > 
 > > It would be nice if a comment said what these functions do.
 > 
 > Feel free to add comments.  Personally, I think the code speaks very
 > well for itself (I didn't write it), but that's me.

It probably speaks for itself if you are generally familiar with terminal
control.  I'll add comments when I have a better understanding.

 > > 2) After a call to write_glyphs, does the cursor position move?
 > 
 > I'm not sure.  Why is this important?  Anyway, Emacs always
 > repositions the cursor at point at redisplay end.

I've not considered the cursor up till now and it sometimes seems to jump
around (but perhaps I'm confusing the cursor with the pointer, which are the
same shape with Gpm).

 > > 3) Any hints on frame updating ? (both xterm.c and msdos.c use dpyinfo)
 > 
 > Sorry, I don't understand the question.  Please elaborate.

I'll explore further.

-- 
Nick                                           http://www.inet.net.nz/~nickrob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]