1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_BASE_WIN_WINDOW_EVENT_TARGET_H_
6 #define UI_BASE_WIN_WINDOW_EVENT_TARGET_H_
10 #include "base/basictypes.h"
11 #include "ui/base/ui_base_export.h"
15 // This interface is implemented by classes who get input events forwarded to
16 // them from others. E.g. would be a win32 parent child relationship where the
17 // child forwards input events to the parent after doing minimal processing.
18 class UI_BASE_EXPORT WindowEventTarget
{
20 static const char kWin32InputEventTarget
[];
22 // Handles mouse events like WM_MOUSEMOVE, WM_LBUTTONDOWN, etc.
23 // The |message| parameter identifies the message.
24 // The |w_param| and |l_param| values are dependent on the type of the
26 // The |handled| parameter is an output parameter which when set to false
27 // indicates that the message should be DefProc'ed.
28 // Returns the result of processing the message.
29 virtual LRESULT
HandleMouseMessage(unsigned int message
,
34 // Handles keyboard events like WM_KEYDOWN/WM_KEYUP, etc.
35 // The |message| parameter identifies the message.
36 // The |w_param| and |l_param| values are dependent on the type of the
38 // The |handled| parameter is an output parameter which when set to false
39 // indicates that the message should be DefProc'ed.
40 // Returns the result of processing the message.
41 virtual LRESULT
HandleKeyboardMessage(unsigned int message
,
46 // Handles WM_TOUCH events.
47 // The |message| parameter identifies the message.
48 // The |w_param| and |l_param| values are as per MSDN docs.
49 // The |handled| parameter is an output parameter which when set to false
50 // indicates that the message should be DefProc'ed.
51 // Returns the result of processing the message.
52 virtual LRESULT
HandleTouchMessage(unsigned int message
,
57 // Handles scroll messages like WM_VSCROLL and WM_HSCROLL.
58 // The |message| parameter identifies the scroll message.
59 // The |w_param| and |l_param| values are dependent on the type of scroll.
60 // The |handled| parameter is an output parameter which when set to false
61 // indicates that the message should be DefProc'ed.
62 virtual LRESULT
HandleScrollMessage(unsigned int message
,
67 // Handles the WM_NCHITTEST message
68 // The |message| parameter identifies the message.
69 // The |w_param| and |l_param| values are as per MSDN docs.
70 // The |handled| parameter is an output parameter which when set to false
71 // indicates that the message should be DefProc'ed.
72 // Returns the result of processing the message.
73 virtual LRESULT
HandleNcHitTestMessage(unsigned int message
,
79 virtual ~WindowEventTarget();
84 #endif // UI_BASE_WIN_WINDOW_EVENT_TARGET_H_