mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 12:50:40 +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
|
* Headers/AppKit/NSEvent.h: Rename 'middle' mouse to 'other' as
|
||||||
MacOS-X has caught up with the functionality but not adopted our
|
MacOS-X has caught up with the functionality but not adopted our
|
||||||
names.
|
names. Add -buttonNumber
|
||||||
* Headers/AppKit/NSResponder.h: ditto
|
* Headers/AppKit/NSResponder.h: ditto
|
||||||
* Source/Functions.m: ditto
|
* Source/Functions.m: ditto
|
||||||
* Source/GSComboSupport.m: ditto
|
* Source/GSComboSupport.m: ditto
|
||||||
|
|
|
@ -114,7 +114,8 @@ enum {
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int event_num;
|
int event_num;
|
||||||
int click;
|
short click;
|
||||||
|
short button;
|
||||||
float pressure;
|
float pressure;
|
||||||
} mouse;
|
} mouse;
|
||||||
struct
|
struct
|
||||||
|
|
|
@ -444,7 +444,7 @@ static Class eventClass;
|
||||||
/*
|
/*
|
||||||
* Getting Mouse Event Information
|
* Getting Mouse Event Information
|
||||||
*/
|
*/
|
||||||
+ (NSPoint)mouseLocation
|
+ (NSPoint) mouseLocation
|
||||||
{
|
{
|
||||||
float x, y;
|
float x, y;
|
||||||
|
|
||||||
|
@ -454,8 +454,10 @@ static Class eventClass;
|
||||||
|
|
||||||
- (int) buttonNumber
|
- (int) buttonNumber
|
||||||
{
|
{
|
||||||
/* FIXME */
|
if (event_type < NSLeftMouseDown || event_type > NSMouseExited)
|
||||||
return 0;
|
[NSException raise: NSInvalidArgumentException
|
||||||
|
format: @"buttonNumber requested for non-mouse event"];
|
||||||
|
return event_data.mouse.button;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) clickCount
|
- (int) clickCount
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue