summaryrefslogtreecommitdiff
path: root/chromium/ui/ozone/platform/wayland/host/gtk_ui_delegate_wayland.h
blob: 4f3f606c5acabc8fb427a5d128a1f5ad60eefaef (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
// Copyright 2020 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_OZONE_PLATFORM_WAYLAND_HOST_GTK_UI_DELEGATE_WAYLAND_H_
#define UI_OZONE_PLATFORM_WAYLAND_HOST_GTK_UI_DELEGATE_WAYLAND_H_

#include "ui/gfx/native_widget_types.h"
#include "ui/gtk/gtk_ui_delegate.h"

namespace ui {

class WaylandConnection;

class GtkUiDelegateWayland : public GtkUiDelegate {
 public:
  explicit GtkUiDelegateWayland(WaylandConnection* connection);
  GtkUiDelegateWayland(const GtkUiDelegateWayland&) = delete;
  GtkUiDelegateWayland& operator=(const GtkUiDelegateWayland&) = delete;
  ~GtkUiDelegateWayland() override;

  // GtkUiDelegate:
  void OnInitialized() override;
  GdkKeymap* GetGdkKeymap() override;
  GdkWindow* GetGdkWindow(gfx::AcceleratedWidget window_id) override;
  bool SetGdkWindowTransientFor(GdkWindow* window,
                                gfx::AcceleratedWidget parent) override;
  void ClearTransientFor(gfx::AcceleratedWidget parent) override;
  void ShowGtkWindow(GtkWindow* window) override;

 private:
  WaylandConnection* const connection_;
};

}  // namespace ui

#endif  // UI_OZONE_PLATFORM_WAYLAND_HOST_GTK_UI_DELEGATE_WAYLAND_H_