Disable TabDragController tests that fail with a real compositor.
[chromium-blink-merge.git] / chrome / browser / ui / libgtk2ui / gtk2_util.h
blobd58038dedcffd55f202f6902bd9fa6e238aed65b
1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_
6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_
8 #include <gtk/gtk.h>
9 #include <string>
11 class CommandLine;
12 class SkBitmap;
14 namespace base {
15 class Environment;
18 namespace ui {
19 class Accelerator;
22 namespace libgtk2ui {
24 void GtkInitFromCommandLine(const CommandLine& command_line);
26 // Returns the name of the ".desktop" file associated with our running process.
27 std::string GetDesktopName(base::Environment* env);
29 // Show the image for the given menu item, even if the user's default is to not
30 // show images. Only to be used for favicons or other menus where the image is
31 // crucial to its functionality.
32 void SetAlwaysShowImage(GtkWidget* image_menu_item);
34 guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator);
36 GdkModifierType GetGdkModifierForAccelerator(
37 const ui::Accelerator& accelerator);
39 // Translates event flags into plaform independent event flags.
40 int EventFlagsFromGdkState(guint state);
42 } // namespace libgtk2ui
44 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UTIL_H_