1 | // Aseprite UI Library |
2 | // Copyright (C) 2019 Igara Studio S.A. |
3 | // Copyright (C) 2001-2018 David Capello |
4 | // |
5 | // This file is released under the terms of the MIT license. |
6 | // Read LICENSE.txt for more information. |
7 | |
8 | #ifndef UI_MESSAGE_TYPE_H_INCLUDED |
9 | #define UI_MESSAGE_TYPE_H_INCLUDED |
10 | #pragma once |
11 | |
12 | namespace ui { |
13 | |
14 | // Message types. |
15 | enum MessageType { |
16 | // General messages. |
17 | kOpenMessage, // Windows is open. |
18 | kCloseMessage, // Windows is closed. |
19 | kCloseDisplayMessage, // The user wants to close the entire application. |
20 | kResizeDisplayMessage, |
21 | kPaintMessage, // Widget needs be repainted. |
22 | kTimerMessage, // A timer timeout. |
23 | kDropFilesMessage, // Drop files in the manager. |
24 | kWinMoveMessage, // Window movement. |
25 | |
26 | // Keyboard related messages. |
27 | kKeyDownMessage, // When a any key is pressed. |
28 | kKeyUpMessage, // When a any key is released. |
29 | kFocusEnterMessage, // Widget gets the focus. |
30 | kFocusLeaveMessage, // Widget losts the focus. |
31 | |
32 | // Mouse related messages. |
33 | kMouseDownMessage, // User makes click inside a widget. |
34 | kMouseUpMessage, // User releases mouse button in a widget. |
35 | kDoubleClickMessage, // User makes double click in some widget. |
36 | kMouseEnterMessage, // A widget gets mouse pointer. |
37 | kMouseLeaveMessage, // A widget losts mouse pointer. |
38 | kMouseMoveMessage, // User moves the mouse on some widget. |
39 | kSetCursorMessage, // A widget needs to setup the mouse cursor. |
40 | kMouseWheelMessage, // User moves the wheel. |
41 | |
42 | // Touch related messages. |
43 | kTouchMagnifyMessage, |
44 | |
45 | // TODO Drag'n'drop messages... |
46 | // k...DndMessage |
47 | |
48 | // User widgets. |
49 | kFirstRegisteredMessage, |
50 | kLastRegisteredMessage = 0x7fffffff |
51 | }; |
52 | |
53 | } // namespace ui |
54 | |
55 | #endif // UI_MESSAGE_TYPE_H_INCLUDED |
56 | |