macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

NSEventMaskFromType

指定したイベントのイベントマスクを返します
unsigned int   NSEventMaskFromType ( 
                NSEventType   type );

解説

指定したイベントのイベントマスクを返します。
● NSLeftMouseDown
● NSLeftMouseUp
● NSRightMouseDown
● NSRightMouseUp
● NSMouseMoved
● NSLeftMouseDragged
● NSRightMouseDragged
● NSMouseEntered
● NSMouseExited
● NSKeyDown
● NSKeyUp
● NSFlagsChanged
● NSAppKitDefined
● NSSystemDefined
● NSApplicationDefined
● NSPeriodic
● NSCursorUpdate
● NSScrollWheel
● NSOtherMouseDown
● NSOtherMouseUp
● NSOtherMouseDragged

返り値

引数

( NSEventType )type

フレームワーク

ApplicationKit

クラス

NSEventMaskFromType

Function

使用可能

10.0

参照

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
unsigned int  mask;

mask = NSEventMaskFromType(NSLeftMouseDown);

NSLog([NSString stringWithFormat:@"mask = %u",mask]);
}

@end