aee64a021ac4f90cc5dc76299b576459c5845519
[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   // FIXME(joone): Move to IMEChangeObserver?
32   virtual void OnPreeditChanged(unsigned handle,
33                                 const std::string& text,
34                                 const std::string& commit) = 0;
35   virtual void OnCommit(unsigned handle, const std::string& text) = 0;
36
37  protected:
38   virtual ~WindowChangeObserver() {}
39 };
40
41 }  // namespace ui
42
43 #endif  // OZONE_UI_EVENTS_WINDOW_CHANGE_OBSERVER_H_