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 // Returns the result of processing the message.
27 virtual LRESULT
HandleMouseMessage(unsigned int message
,
31 // Handles keyboard events like WM_KEYDOWN/WM_KEYUP, etc.
32 // The |message| parameter identifies the message.
33 // The |w_param| and |l_param| values are dependent on the type of the
35 // Returns the result of processing the message.
36 virtual LRESULT
HandleKeyboardMessage(unsigned int message
,
40 // Handles WM_TOUCH events.
41 // The |message| parameter identifies the message.
42 // The |w_param| and |l_param| values are as per MSDN docs.
43 // Returns the result of processing the message.
44 virtual LRESULT
HandleTouchMessage(unsigned int message
,
48 // Handles scroll messages like WM_VSCROLL and WM_HSCROLL.
49 // The |message| parameter identifies the scroll message.
50 // The |w_param| and |l_param| values are dependent on the type of scroll.
51 virtual LRESULT
HandleScrollMessage(unsigned int message
,
55 // Handles the WM_NCHITTEST message
56 // The |message| parameter identifies the message.
57 // The |w_param| and |l_param| values are as per MSDN docs.
58 // Returns the result of processing the message.
59 virtual LRESULT
HandleNcHitTestMessage(unsigned int message
,
64 virtual ~WindowEventTarget();
69 #endif // UI_BASE_WIN_WINDOW_EVENT_TARGET_H_