// Copyright (c) 2012 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_GTK_GTK_UTIL_H_ #define UI_GTK_GTK_UTIL_H_ #include #include #include "base/component_export.h" #include "ui/base/glib/scoped_gobject.h" #include "ui/color/color_id.h" #include "ui/gtk/gtk_compat.h" #include "ui/native_theme/native_theme.h" #include "ui/views/window/frame_buttons.h" namespace aura { class Window; } namespace base { class CommandLine; } namespace ui { class KeyEvent; } namespace gtk { const char* GtkCssMenu(); const char* GtkCssMenuItem(); const char* GtkCssMenuScrollbar(); void GtkInitFromCommandLine(const base::CommandLine& command_line); // Sets |dialog| as transient for |parent|, which will keep it on top and center // it above |parent|. Do nothing if |parent| is nullptr. void SetGtkTransientForAura(GtkWidget* dialog, aura::Window* parent); // Gets the transient parent aura window for |dialog|. aura::Window* GetAuraTransientParent(GtkWidget* dialog); // Clears the transient parent for |dialog|. void ClearAuraTransientParent(GtkWidget* dialog, aura::Window* parent); // Parses |button_string| into |leading_buttons| and // |trailing_buttons|. The string is of the format // "