Upstream version 9.38.204.0
[platform/framework/web/crosswalk.git] / src / ozone / ui / events / window_change_observer.h
1 // Copyright 2013 Intel Corporation. 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.
4
5 #ifndef OZONE_UI_EVENTS_WINDOW_CHANGE_OBSERVER_H_
6 #define OZONE_UI_EVENTS_WINDOW_CHANGE_OBSERVER_H_
7
8 #include <string>
9
10 #include "ozone/platform/ozone_export_wayland.h"
11 namespace ui {
12
13 // A simple observer interface for all clients interested in recieving various
14 // window state change notifications like when the pointer enters a
15 // particular window.
16 class OZONE_WAYLAND_EXPORT WindowChangeObserver {
17  public:
18   // Called when the pointer enters a window and recieves a button down
19   // notification.
20   virtual void OnWindowFocused(unsigned windowhandle) = 0;
21   // Called when the pointer enters a window.
22   virtual void OnWindowEnter(unsigned windowhandle) = 0;
23   // Called when the pointer leaves a window.
24   virtual void OnWindowLeave(unsigned windowhandle) = 0;
25   // Called when a window is closed.
26   virtual void OnWindowClose(unsigned windowhandle) = 0;
27   // Called when a window is resized by server.
28   virtual void OnWindowResized(unsigned windowhandle,
29                                unsigned width,
30                                unsigned height) = 0;
31   virtual void OnWindowUnminimized(unsigned windowhandle) = 0;
32   // FIXME(joone): Move to IMEChangeObserver?
33   virtual void OnPreeditChanged(unsigned handle,
34                                 const std::string& text,
35                                 const std::string& commit) = 0;
36   virtual void OnCommit(unsigned handle, const std::string& text) = 0;
37
38  protected:
39   virtual ~WindowChangeObserver() {}
40 };
41
42 }  // namespace ui
43
44 #endif  // OZONE_UI_EVENTS_WINDOW_CHANGE_OBSERVER_H_