Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: ui/platform_window/x11/x11_window.h

Issue 391583002: ui/platform_window: Introduce PlatformWindow for windowing primitives. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nits Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 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.
4
5 #ifndef UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_
6 #define UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_
7
8 #include "ui/events/platform/platform_event_dispatcher.h"
9 #include "ui/gfx/geometry/rect.h"
10 #include "ui/gfx/x/x11_atom_cache.h"
11 #include "ui/platform_window/platform_window.h"
12 #include "ui/platform_window/platform_window_delegate.h"
13 #include "ui/platform_window/x11/x11_window_export.h"
14
15 typedef struct _XDisplay XDisplay;
16 typedef unsigned long XID;
17
18 namespace ui {
19
20 class X11_WINDOW_EXPORT X11Window : public PlatformWindow,
21 public PlatformEventDispatcher {
22 public:
23 explicit X11Window(PlatformWindowDelegate* delegate);
24 virtual ~X11Window();
25
26 private:
27 void Destroy();
28
29 // PlatformWindow:
30 virtual void Show() OVERRIDE;
31 virtual void Hide() OVERRIDE;
32 virtual void Close() OVERRIDE;
33 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
34 virtual void SetCapture() OVERRIDE;
35 virtual void ReleaseCapture() OVERRIDE;
36 virtual void ToggleFullscreen() OVERRIDE;
37 virtual void Maximize() OVERRIDE;
38 virtual void Minimize() OVERRIDE;
39 virtual void Restore() OVERRIDE;
40
41 // PlatformEventDispatcher:
42 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE;
43 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE;
44
45 PlatformWindowDelegate* delegate_;
46
47 XDisplay* xdisplay_;
48 XID xwindow_;
49 XID xroot_window_;
50 X11AtomCache atom_cache_;
51
52 gfx::Rect requested_bounds_;
53 bool window_mapped_;
54
55 DISALLOW_COPY_AND_ASSIGN(X11Window);
56 };
57
58 } // namespace ui
59
60 #endif // UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698