mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:27:39 +00:00
Implement buttonNumber
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12950 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c1ffddcdc8
commit
8f96915e63
3 changed files with 8 additions and 5 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
* Headers/AppKit/NSEvent.h: Rename 'middle' mouse to 'other' as
|
||||
MacOS-X has caught up with the functionality but not adopted our
|
||||
names.
|
||||
names. Add -buttonNumber
|
||||
* Headers/AppKit/NSResponder.h: ditto
|
||||
* Source/Functions.m: ditto
|
||||
* Source/GSComboSupport.m: ditto
|
||||
|
|
|
@ -114,7 +114,8 @@ enum {
|
|||
struct
|
||||
{
|
||||
int event_num;
|
||||
int click;
|
||||
short click;
|
||||
short button;
|
||||
float pressure;
|
||||
} mouse;
|
||||
struct
|
||||
|
|
|
@ -444,7 +444,7 @@ static Class eventClass;
|
|||
/*
|
||||
* Getting Mouse Event Information
|
||||
*/
|
||||
+ (NSPoint)mouseLocation
|
||||
+ (NSPoint) mouseLocation
|
||||
{
|
||||
float x, y;
|
||||
|
||||
|
@ -454,8 +454,10 @@ static Class eventClass;
|
|||
|
||||
- (int) buttonNumber
|
||||
{
|
||||
/* FIXME */
|
||||
return 0;
|
||||
if (event_type < NSLeftMouseDown || event_type > NSMouseExited)
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"buttonNumber requested for non-mouse event"];
|
||||
return event_data.mouse.button;
|
||||
}
|
||||
|
||||
- (int) clickCount
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue