Re: Finding out mouse button state outside of event stream
Re: Finding out mouse button state outside of event stream
- Subject: Re: Finding out mouse button state outside of event stream
- From: Greg Hurrell <email@hidden>
- Date: Tue, 12 Jul 2005 19:39:36 +0200
The answer is GetCurrentButtonState(). See CarbonEventsCore.h for
more info.
Greg
El 12/07/2005, a las 19:32, Greg Hurrell escribió:
To partly answer my own question, looks like the answer *could* be:
UInt32 GetCurrentEventButtonState(void);
GetCurrentEventButtonState determines the queue-synchronized state
of the mouse button(s). You should use this function instead of
the Button or GetCurrentButtonState functions.
http://developer.apple.com/documentation/Carbon/Conceptual/
Carbon_Event_Manager/Tasks/chapter_3_section_7.html
Not sure though exactly what it means by "queue-synchronized"... if
it's referring to the current event for the application then it may
not be what I am looking for (I want to be able to find out the
button state even when my application is in the background and not
handling any events).
Any other hints still welcome...
Greg
El 12/07/2005, a las 19:16, Greg Hurrell escribió:
Does anyone know of an API for querying the current state of the
mouse button(s) outside of the event stream?
Basically I am looking for something like NSEvent's mouseLocation
or NSWindow's mouseLocationOutsideOfEventStream methods, except
for button state instead of location.
The Quartz Services Reference has some useful APIs in it -- for
example you can use CGPostMouseEvent to generate events at any
time (including *setting* the button state) -- but I can't see
anything for *getting* the button state.
Basically I just want to do a test in my app to make sure the
mouse button isn't down before I go ahead and do something. Any
ideas?
Thanks in advance,
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden