emacs-devel
[Top][All Lists]
Advanced

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

Executing Key Sequences directly


From: Steven Tamm
Subject: Executing Key Sequences directly
Date: Thu, 19 Sep 2002 10:00:20 -0700

While working on the Mac OS X carbon port I was trying to switch from using a "polling" style of event handling to a "callback" style of event handling. The intent is that the UI will run in a different thread from the eval loop, in a way similar to the w32 port. However the port also needs to work so that it can work if the UI and the eval loop are in the same thread. The complication comes from the scroll bars; the way that Mac OS X handles scroll bars is through a callback while in an "event loop" for the scroll bar. So while doing live scrolling, the command loop never gets re-entered because it's stuck in another loop. What is the best way to have this callback evaluate the lisp code for a specific keymap (in this case <vertical-scroll-bar> <mouse-down>)? Should I use read_key_sequence?

Previously, the port didn't use this mechanism at all, but instead trapped all mouse down events and passed them to the system. I'm trying to avoid this, but if there is no "good" way to evaluate a key-sequence inside C-code, this is what it will continue to do.

Thanks,
-Steven





reply via email to

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