blob: 67c63a7e5e41f94f9c69ddbe32ff7bd415e7755a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
#define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
#include "ui/gfx/native_widget_types.h"
namespace gfx {
class Rect;
}
namespace ui {
class Event;
enum PlatformWindowState {
PLATFORM_WINDOW_STATE_UNKNOWN,
PLATFORM_WINDOW_STATE_MAXIMIZED,
PLATFORM_WINDOW_STATE_MINIMIZED,
PLATFORM_WINDOW_STATE_NORMAL,
PLATFORM_WINDOW_STATE_FULLSCREEN,
};
class PlatformWindowDelegate {
public:
virtual ~PlatformWindowDelegate() {}
// Note that |new_bounds| is in physical screen coordinates.
virtual void OnBoundsChanged(const gfx::Rect& new_bounds) = 0;
// Note that |damaged_region| is in the platform-window's coordinates, in
// physical pixels.
virtual void OnDamageRect(const gfx::Rect& damaged_region) = 0;
virtual void DispatchEvent(Event* event) = 0;
virtual void OnCloseRequest() = 0;
virtual void OnClosed() = 0;
virtual void OnWindowStateChanged(PlatformWindowState new_state) = 0;
virtual void OnLostCapture() = 0;
virtual void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
float device_pixel_ratio) = 0;
virtual void OnActivationChanged(bool active) = 0;
};
} // namespace ui
#endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_
|