x_window_utils.h 892 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright (c) 2014 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ATOM_BROWSER_UI_X_X_WINDOW_UTILS_H_
  5. #define ATOM_BROWSER_UI_X_X_WINDOW_UTILS_H_
  6. #include <string>
  7. #include "ui/gfx/x/x11.h"
  8. namespace atom {
  9. ::Atom GetAtom(const char* name);
  10. // Sends a message to the x11 window manager, enabling or disabling the |state|
  11. // for _NET_WM_STATE.
  12. void SetWMSpecState(::Window xwindow, bool enabled, ::Atom state);
  13. // Sets the _NET_WM_WINDOW_TYPE of window.
  14. void SetWindowType(::Window xwindow, const std::string& type);
  15. // Returns true if the bus name "com.canonical.AppMenu.Registrar" is available.
  16. bool ShouldUseGlobalMenuBar();
  17. // Bring the given window to the front and give it the focus.
  18. void MoveWindowToForeground(::Window xwindow);
  19. } // namespace atom
  20. #endif // ATOM_BROWSER_UI_X_X_WINDOW_UTILS_H_