1 // Aseprite UI Library
2 // Copyright (C) 2001-2018  David Capello
3 //
4 // This file is released under the terms of the MIT license.
5 // Read LICENSE.txt for more information.
6 
7 #ifndef UI_MESSAGE_TYPE_H_INCLUDED
8 #define UI_MESSAGE_TYPE_H_INCLUDED
9 #pragma once
10 
11 namespace ui {
12 
13   // Message types.
14   enum MessageType {
15     // General messages.
16     kFunctionMessage, // Call a function from the UI thread.
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