gtk_ui_platform_stub.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2022 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. #ifndef UI_GTK_GTK_UI_PLATFORM_STUB_H_
  5. #define UI_GTK_GTK_UI_PLATFORM_STUB_H_
  6. #include "ui/gtk/gtk_ui_platform.h"
  7. namespace gtk {
  8. class GtkUiPlatformStub : public GtkUiPlatform {
  9. public:
  10. GtkUiPlatformStub();
  11. GtkUiPlatformStub(const GtkUiPlatformStub&) = delete;
  12. GtkUiPlatformStub& operator=(const GtkUiPlatformStub&) = delete;
  13. ~GtkUiPlatformStub() override;
  14. // GtkUiPlatform:
  15. void OnInitialized(GtkWidget* widget) override;
  16. GdkKeymap* GetGdkKeymap() override;
  17. GdkModifierType GetGdkKeyEventState(const ui::KeyEvent& key_event) override;
  18. int GetGdkKeyEventGroup(const ui::KeyEvent& key_event) override;
  19. GdkWindow* GetGdkWindow(gfx::AcceleratedWidget window_id) override;
  20. bool SetGtkWidgetTransientFor(GtkWidget* widget,
  21. gfx::AcceleratedWidget parent) override;
  22. void ClearTransientFor(gfx::AcceleratedWidget parent) override;
  23. void ShowGtkWindow(GtkWindow* window) override;
  24. };
  25. } // namespace gtk
  26. #endif // UI_GTK_GTK_UI_PLATFORM_STUB_H_