Thread: [Mac-emacs-devel] Patch for Mouse-wheel, Multi mouse-button support & more
Brought to you by:
akochoi
|
From: Steven T. <ste...@ma...> - 2002-07-20 06:56:16
Attachments:
latest.patch.gz
|
While Andrew's on vacation, I figured I'd send this patch out to the
list to get people trying it out.
The main part of this patch is to switch the event handling loop in
XTread_socket from using the Mac OS 9 style WaitNextEvent to using the
preferred carbon method ReceiveNextEvent. This allows the following to
be supported:
1. Mouse button support
Keyboard Modifiers now sent with mouse button events
Right mouse button reported as mouse-2. Third mouse button or
mouse-wheel button reported as mouse-3. This mapping is customizable.
2. Mouse wheel support.
Mouse-wheel events are sent out using the Windows-NT style
[mouse-wheel] event style. Changes to mac-win.el included here use
mwheel.el to support auto scrolling.
3. Drag and drop support onto frames.
Drag a file from the finder onto a specific buffer and it will
autoload the buffer.
4. Preliminary OSX Services menu support
Currently only supports reading the last thing yanked (or current
selection). So you can highlight a URL and invoke the "Open URL in
OmniWeb" menu from the services menu. I'd really like developers more
familiar with emacs-kill ring to try and give this a look, since it
currently relies on the clipboard which is not the best.
5. Iconify-frame now collapses the window into the dock.
Changes to mac-win.el to map C-z to "iconify" the frame to the dock.
Currently this doesn't mark the window as actually being iconified in
emacs. I'm not sure this is the right thing to do.
6. M-h now available since command-h key doesn't automatically turn
into invoking "Hide Emacs"
Most of these changes are guarded by a #ifdef variable called
USE_CARBON_EVENTS which defaults to being on. If this is commented out,
the support for drag and drop and keyboard modifiers on mouse events are
still supported.
Here are the new variables added:
mac-reverse-ctrl-meta. If t, causes the control and meta keys to be
reversed. The default is nil. For people using PC keyboards mapped to
the Mac, this is quite beneficial. Note, this cannot be extended to
switching caps lock and control. I tried.
mac-wheel-button-is-mouse-2. If t, causes the mouse-wheel button to map
to mouse-2 and the "right" mouse button to map to mouse-3. If nil, the
mapping is reversed. The default is t.
|
|
From: Marc-Antoine P. <map...@ro...> - 2002-08-11 16:58:51
|
Good day! I just updated Emacs from CVS. I know I am up-to-date and should have Steven's patch for access to the services menu. However, my Services menu stays empty. (I also tried filling the clipboard, selecting text, removing .emacs, etc.) I am building with gcc version 3.1 20020105 on a 10.1.5 system. If you have an idea or diagnostic procedure to propose, I'd love to help debug this. Marc-Antoine Parent P.S. I sent this before subscribing; the message was described as held. Apologies for repost if the message is then released. MAP |
|
From: Andrew C. <ak...@sh...> - 2002-08-11 17:16:59
|
> Good day!
> I just updated Emacs from CVS. I know I am up-to-date and should have
> Steven's patch for access to the services menu.
> However, my Services menu stays empty. (I also tried filling the
> clipboard, selecting text, removing .emacs, etc.)
> I am building with gcc version 3.1 20020105 on a 10.1.5 system.
> If you have an idea or diagnostic procedure to propose, I'd love to help
> debug this.
>
> Marc-Antoine Parent
>
> P.S. I sent this before subscribing; the message was described as held.
> Apologies for repost if the message is then released.
> MAP
Hi Marc-Antoine,
Not a problem. I've just deleted that pending post. We had a problem
with spam so I thought it was better to manage the list this way.
Regarding Steven's patch for the Services menu, I'm quite sure I've
checked it in with this patch:
2002-08-03 Andrew Choi <ak...@sh...>
* macterm.c (USE_CARBON_EVENTS): New macro.
[...]
(mac_handle_service_event): New function.
(init_service_handler): New function.
[...]
My `Emacs' menu now has an enabled `Services...' submenu very much
like other applications, but most of the further submenus are
disabled. I don't know how to use them. Perhaps Steven can help.
Andrew.
|
|
From: Steven T. <ste...@ma...> - 2002-08-11 19:38:10
|
Not sure what the problem is here. The code here *always* has the services menu activated as if the clipboard is filled with text, so after starting up the application, it should just work. Can you use the mouse-wheel? If you put an "#error" directive in init_service_handler(), does compilation stop. I haven't compiled with gcc3 yet, but I highly doubt that is it. -Steven On Sunday, August 11, 2002, at 09:58 AM, Marc-Antoine Parent wrote: > Good day! > I just updated Emacs from CVS. I know I am up-to-date and should have > Steven's patch for access to the services menu. > However, my Services menu stays empty. (I also tried filling the > clipboard, selecting text, removing .emacs, etc.) > I am building with gcc version 3.1 20020105 on a 10.1.5 system. > If you have an idea or diagnostic procedure to propose, I'd love to > help debug this. |
|
From: Andrew C. <ak...@sh...> - 2002-08-03 23:54:10
|
Hi Everyone, I have just checked in to the CVS a very nice patch contributed by Steven Tamm which lets Emacs recognize 2- and 3-button and wheel mice. Attached below is his description of it, among other things. Also recently changed in the CVS is the creator code of the Emacs application from ???? to EMAx. Andrew. ----- > The main part of this patch is to switch the event handling loop in > XTread_socket from using the Mac OS 9 style WaitNextEvent to using the > preferred carbon method ReceiveNextEvent. This allows the following to > be supported: > > 1. Mouse button support > Keyboard Modifiers now sent with mouse button events > Right mouse button reported as mouse-2. Third mouse button or > mouse-wheel button reported as mouse-3. This mapping is customizable. > > 2. Mouse wheel support. > Mouse-wheel events are sent out using the Windows-NT style > [mouse-wheel] event style. Changes to mac-win.el included here use > mwheel.el to support auto scrolling. > > 3. Drag and drop support onto frames. > Drag a file from the finder onto a specific buffer and it will > autoload the buffer. > > 4. Preliminary OSX Services menu support > Currently only supports reading the last thing yanked (or current > selection). So you can highlight a URL and invoke the "Open URL in > OmniWeb" menu from the services menu. I'd really like developers more > familiar with emacs-kill ring to try and give this a look, since it > currently relies on the clipboard which is not the best. > > 5. Iconify-frame now collapses the window into the dock. > Changes to mac-win.el to map C-z to "iconify" the frame to the dock. > Currently this doesn't mark the window as actually being iconified in > emacs. I'm not sure this is the right thing to do. > > 6. M-h now available since command-h key doesn't automatically turn > into invoking "Hide Emacs" > > Most of these changes are guarded by a #ifdef variable called > USE_CARBON_EVENTS which defaults to being on. If this is commented out, > the support for drag and drop and keyboard modifiers on mouse events are > still supported. > > > Here are the new variables added: > mac-reverse-ctrl-meta. If t, causes the control and meta keys to be > reversed. The default is nil. For people using PC keyboards mapped to > the Mac, this is quite beneficial. Note, this cannot be extended to > switching caps lock and control. I tried. > > mac-wheel-button-is-mouse-2. If t, causes the mouse-wheel button to map > to mouse-2 and the "right" mouse button to map to mouse-3. If nil, the > mapping is reversed. The default is t. |
|
From: <ja...@sw...> - 2002-08-04 09:28:50
|
s=F6ndagen den 4 augusti 2002 kl 01.53 skrev Andrew Choi: > Hi Everyone, > > I have just checked in to the CVS a very nice patch contributed by > Steven Tamm which lets Emacs recognize 2- and 3-button and wheel mice. > Attached below is his description of it, among other things. > > Also recently changed in the CVS is the creator code of the Emacs > application from ???? to EMAx. This version dies instantly for me. Even emacs -nw dies. Here is a=20 backtrace, I can debug some more if that helps. I did: ./configure --prefix=3D/usr/local --verbose --with-x=3Dno make bootstrap Program received signal EXC_BAD_ACCESS, Could not access memory. 0x79005ae0 in ?? () (gdb) where #0 0x79005ae0 in ?? () Cannot access memory at address 0x79005ae0 #1 0x00106048 in unexec_realloc (old_ptr=3D0x6e0110, new_size=3D41) at=20= unexmacosx.c:891 #2 0x00005f0c in adjust_frame_message_buffer (f=3D0x6dfdd0) at = dispnew.c:2435 #3 0x000058ac in adjust_frame_glyphs (f=3D0x6dfdd0) at dispnew.c:2133 #4 0x00005854 in adjust_frame_glyphs_initially () at dispnew.c:2115 #5 0x0000cb18 in init_display () at dispnew.c:6478 #6 0x00066a84 in main (argc=3D1, argv=3D0xbffff74c, envp=3D0x488) at = emacs.c:1528 #7 0x00003668 in _start () #8 0x00003498 in start () (gdb) Jan D. |
|
From: <ja...@sw...> - 2002-08-04 11:57:46
|
s=F6ndagen den 4 augusti 2002 kl 11.27 skrev Jan Dj=E4rv: > > s=F6ndagen den 4 augusti 2002 kl 01.53 skrev Andrew Choi: > >> Hi Everyone, >> >> I have just checked in to the CVS a very nice patch contributed by >> Steven Tamm which lets Emacs recognize 2- and 3-button and wheel = mice. >> Attached below is his description of it, among other things. >> >> Also recently changed in the CVS is the creator code of the Emacs >> application from ???? to EMAx. > > This version dies instantly for me. Even emacs -nw dies. Here is a=20= > backtrace, I can debug some more if that helps. I did: > ./configure --prefix=3D/usr/local --verbose --with-x=3Dno > make bootstrap Nevermind, I did everything from scratch again, and now it is OK. Jan D. |
|
From: Piet v. O. <pi...@cs...> - 2002-08-22 09:25:00
|
>>>>> Andrew Choi <ak...@sh...> (AC) writes: AC> Hi Everyone, AC> I have just checked in to the CVS a very nice patch contributed by AC> Steven Tamm which lets Emacs recognize 2- and 3-button and wheel mice. AC> Attached below is his description of it, among other things. [...] >> mac-wheel-button-is-mouse-2. If t, causes the mouse-wheel button to map >> to mouse-2 and the "right" mouse button to map to mouse-3. If nil, the >> mapping is reversed. The default is t. Actually, as implemented it works just the opposite way. -- Piet van Oostrum <pi...@cs...> URL: http://www.cs.uu.nl/~piet [PGP] Private email: P.v...@hc... |