all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Req: images for down-mouse and hover events
@ 2008-05-13  9:39 David Reitter
  2008-05-13 10:00 ` joakim
  0 siblings, 1 reply; 2+ messages in thread
From: David Reitter @ 2008-05-13  9:39 UTC (permalink / raw)
  To: emacs- devel

I'm dealing with images included in a buffer, which implement buttons
for the user to click on.
I'd like to display a slightly darkened image when the user hovers
with the mouse over the images, and an even more darkened image when
they click on it (during mouse-down).  This gives good visual feedback
and improves the UI.

Question is: how do I do it?   While the tool-bar provides image vectors

to do just that, I can't seem to find functionality to implement this  
for general images.

The `mouse-face' property of faces only allows me to specify another
face, so that's not useful to me.  There is no way to darken anything
displayed via a face property, and I wouldn't really want to do that,
because I'm suppling the actual image.

Is this possible now in Emacs 22?

If not, could it be provided in 23? 




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Req: images for down-mouse and hover events
  2008-05-13  9:39 Req: images for down-mouse and hover events David Reitter
@ 2008-05-13 10:00 ` joakim
  0 siblings, 0 replies; 2+ messages in thread
From: joakim @ 2008-05-13 10:00 UTC (permalink / raw)
  To: David Reitter; +Cc: emacs-devel

David Reitter <david.reitter@gmail.com> writes:

AFAIK theres no inbuilt way to do this. There might be solutions
involving building the logic in elisp though(that is, changing the
display property of the image to pregenerated image files on the fly
on input events)

There has been some talk, though, about allowing for image scaling with
inbuilt c api:s. If this was done, other type of image operations might
also be allowed, such as darkening/lightening the image etc.

IMHO this would be a good idea. An obstacle is finding a good image
library that is supported on all emacs plattforms, or providing
emacs abstractions for generic image libraries.

I would be pretty interested in working on this kind of support, since I
think emacs could be a pretty good scanned book reader. I have a lot of
scanned books.

> I'm dealing with images included in a buffer, which implement buttons
> for the user to click on.
> I'd like to display a slightly darkened image when the user hovers
> with the mouse over the images, and an even more darkened image when
> they click on it (during mouse-down).  This gives good visual feedback
> and improves the UI.
>
> Question is: how do I do it?   While the tool-bar provides image vectors
>
> to do just that, I can't seem to find functionality to implement this
> for general images.
>
> The `mouse-face' property of faces only allows me to specify another
> face, so that's not useful to me.  There is no way to darken anything
> displayed via a face property, and I wouldn't really want to do that,
> because I'm suppling the actual image.
>
> Is this possible now in Emacs 22?
>
> If not, could it be provided in 23?
>
-- 
Joakim Verona




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-13 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13  9:39 Req: images for down-mouse and hover events David Reitter
2008-05-13 10:00 ` joakim

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.