OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 WAYLAND_DISPLAY_H_ |
| 6 #define WAYLAND_DISPLAY_H_ |
| 7 |
| 8 #include <list> |
| 9 #include <stdint.h> |
| 10 |
| 11 class WaylandBuffer; |
| 12 class WaylandInputDevice; |
| 13 class WaylandScreen; |
| 14 |
| 15 struct wl_compositor; |
| 16 struct wl_display; |
| 17 struct wl_shell; |
| 18 struct wl_shm; |
| 19 struct wl_surface; |
| 20 struct wl_visual; |
| 21 |
| 22 class WaylandDisplay { |
| 23 public: |
| 24 static WaylandDisplay* Connect(char* name); |
| 25 ~WaylandDisplay(); |
| 26 |
| 27 struct wl_surface* CreateSurface(); |
| 28 void SetCursor(WaylandBuffer* buffer, int32_t x, int32_t y); |
| 29 |
| 30 struct wl_display* GetNativeDisplay() const; |
| 31 std::list<WaylandScreen*> GetScreenList() const; |
| 32 struct wl_shell* GetShell() const; |
| 33 struct wl_shm* GetShm() const; |
| 34 struct wl_visual* GetVisual() const; |
| 35 private: |
| 36 WaylandDisplay(char* name); |
| 37 |
| 38 struct wl_display* display_; |
| 39 struct wl_compositor* compositor_; |
| 40 struct wl_shell* shell_; |
| 41 struct wl_shm* shm_; |
| 42 struct wl_visual* visual_; |
| 43 std::list<WaylandScreen*> screen_list_; |
| 44 std::list<WaylandInputDevice*> input_list_; |
| 45 |
| 46 static void DisplayHandleGlobal(struct wl_display* display, |
| 47 uint32_t id, |
| 48 const char* interface, |
| 49 uint32_t version, |
| 50 void* data); |
| 51 static void CompositorHandleVisual(void* data, |
| 52 struct wl_compositor* compositor, |
| 53 uint32_t id, |
| 54 uint32_t token); |
| 55 static void ShellHandleConfigure(void* data, |
| 56 struct wl_shell* shell, |
| 57 uint32_t time, |
| 58 uint32_t edges, |
| 59 struct wl_surface* surface, |
| 60 int32_t width, |
| 61 int32_t height); |
| 62 }; |
| 63 |
| 64 #endif |
OLD | NEW |