gtk_ui_platform_stub.cc 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #include "ui/gtk/gtk_ui_platform_stub.h"
  5. #include "base/callback.h"
  6. namespace gtk {
  7. GtkUiPlatformStub::GtkUiPlatformStub() = default;
  8. GtkUiPlatformStub::~GtkUiPlatformStub() = default;
  9. void GtkUiPlatformStub::OnInitialized(GtkWidget* widget) {}
  10. GdkKeymap* GtkUiPlatformStub::GetGdkKeymap() {
  11. return nullptr;
  12. }
  13. GdkModifierType GtkUiPlatformStub::GetGdkKeyEventState(
  14. const ui::KeyEvent& key_event) {
  15. return static_cast<GdkModifierType>(0);
  16. }
  17. int GtkUiPlatformStub::GetGdkKeyEventGroup(const ui::KeyEvent& key_event) {
  18. return 0;
  19. }
  20. GdkWindow* GtkUiPlatformStub::GetGdkWindow(gfx::AcceleratedWidget window_id) {
  21. return nullptr;
  22. }
  23. bool GtkUiPlatformStub::SetGtkWidgetTransientFor(
  24. GtkWidget* widget,
  25. gfx::AcceleratedWidget parent) {
  26. return false;
  27. }
  28. void GtkUiPlatformStub::ClearTransientFor(gfx::AcceleratedWidget parent) {}
  29. void GtkUiPlatformStub::ShowGtkWindow(GtkWindow* window) {
  30. gtk_window_present(window);
  31. }
  32. } // namespace gtk