electron/atom/browser/ui/event_util.h
Nishanth Shanmugham 74b4522195 Add keyboard modifiers payload to tray click events
* Add keyboard and mouse button bitsum to Tray click events payload
* Move getBoundsFromRect: to common event_util file
* Update documentation
2015-07-27 03:15:51 -07:00

20 lines
496 B
Objective-C

#ifndef ATOM_BROWSER_UI_EVENT_UTIL_H_
#define ATOM_BROWSER_UI_EVENT_UTIL_H_
#import <Cocoa/Cocoa.h>
#include "ui/gfx/geometry/rect.h"
namespace event_util {
bool IsLeftButtonEvent(NSEvent* event);
bool IsRightButtonEvent(NSEvent* event);
bool IsMiddleButtonEvent(NSEvent* event);
// Retrieves a bitsum of ui::EventFlags from NSEvent.
int EventFlagsFromNSEvent(NSEvent* event);
gfx::Rect GetBoundsFromEvent(NSEvent* event);
} // namespace event_util
#endif // ATOM_BROWSER_UI_EVENT_UTIL_H_