Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to hook the mouse in OS X?

 
   Macintosh computer (Home) -> General Discussion RSS
Next:  MouseDown Event on ScrollBar  
Author Message
Addle Jones

External


Since: May 06, 2006
Posts: 5



(Msg. 1) Posted: Sat May 06, 2006 2:55 am
Post subject: How to hook the mouse in OS X?
Archived from groups: comp>sys>mac>programmer>misc (more info?)

I'm looking for functionality that you'd get on Windows by hooking the
mouse. I want to write a utility program that changes the way the mouse
interacts with open windows. Specifically, I want a middle click on the
title bar of any window to make that window push back in z-order. This
behavior should work for *any* window, not just the windows of the
application I'm writing. So if I middle click on the title bar of a
Safari window, it goes back in z-order, and if I middle click on the
title bar of iCal, it goes back in z-order, etc.

I'm not really sure where to look to find this. Any help appreciated.

 >> Stay informed about: How to hook the mouse in OS X? 
Back to top
Login to vote
Jens Ayton

External


Since: Apr 22, 2006
Posts: 1



(Msg. 2) Posted: Tue May 09, 2006 9:12 am
Post subject: Re: How to hook the mouse in OS X? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Simon Slavin:
>
> The way to do it under Cocoa wouldn't be to hook the mouse, it would be to
> use a different NSWindow. I would want to do the following:
>
> 1) subclass NSWindow,
> 2) implement an otherMouseDown that checks the position and implements
> your layer change 3) reroute all future creation of NSWindow so that it
> creates one of my subclass instead
>
> The first two are relatively easy and can be debugged inside a toy test
> application.

The third can be achieved using posing. It's probably possible to do
the posing from an APE (Application Enhancer module), but of course
you'd have to find a separate solution for Carbon apps. Patching the
default Carbon Event handler for windows might do it.


--
Jens Ayton

 >> Stay informed about: How to hook the mouse in OS X? 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> General Discussion All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]