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.
5 #ifndef OZONE_UI_EVENTS_WINDOW_CHANGE_OBSERVER_H_
6 #define OZONE_UI_EVENTS_WINDOW_CHANGE_OBSERVER_H_
10 #include "ozone/platform/ozone_export_wayland.h"
13 // A simple observer interface for all clients interested in recieving various
14 // window state change notifications like when the pointer enters a
16 class OZONE_WAYLAND_EXPORT WindowChangeObserver {
18 // Called when the pointer enters a window and recieves a button down
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,
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;
39 virtual ~WindowChangeObserver() {}
44 #endif // OZONE_UI_EVENTS_WINDOW_CHANGE_OBSERVER_H_