| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
| 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ | 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 14 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" | 15 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" |
| 15 #include "chrome/browser/ui/libgtk2ui/gtk2_signal_registrar.h" | 16 #include "chrome/browser/ui/libgtk2ui/gtk2_signal_registrar.h" |
| 16 #include "chrome/browser/ui/libgtk2ui/libgtk2ui_export.h" | 17 #include "chrome/browser/ui/libgtk2ui/libgtk2ui_export.h" |
| 17 #include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h" | 18 #include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h" |
| 18 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h" | 19 #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h" |
| 19 #include "ui/gfx/color_utils.h" | 20 #include "ui/gfx/color_utils.h" |
| 20 #include "ui/views/linux_ui/linux_ui.h" | 21 #include "ui/views/linux_ui/linux_ui.h" |
| 21 #include "ui/views/window/frame_buttons.h" | 22 #include "ui/views/window/frame_buttons.h" |
| 22 | 23 |
| 23 typedef struct _GdkColor GdkColor; | 24 typedef struct _GdkColor GdkColor; |
| 24 typedef struct _GtkBorder GtkBorder; | 25 typedef struct _GtkBorder GtkBorder; |
| 25 typedef struct _GtkStyle GtkStyle; | 26 typedef struct _GtkStyle GtkStyle; |
| 26 typedef struct _GtkWidget GtkWidget; | 27 typedef struct _GtkWidget GtkWidget; |
| 27 | 28 |
| 28 class SkBitmap; | 29 class SkBitmap; |
| 29 | 30 |
| 30 namespace gfx { | 31 namespace gfx { |
| 31 class Image; | 32 class Image; |
| 33 class ScopedPangoFontDescription; |
| 32 } | 34 } |
| 33 | 35 |
| 34 namespace libgtk2ui { | 36 namespace libgtk2ui { |
| 35 class Gtk2Border; | 37 class Gtk2Border; |
| 36 class Gtk2KeyBindingsHandler; | 38 class Gtk2KeyBindingsHandler; |
| 37 class Gtk2SignalRegistrar; | 39 class Gtk2SignalRegistrar; |
| 38 class GConfListener; | 40 class GConfListener; |
| 39 | 41 |
| 40 // Interface to GTK2 desktop features. | 42 // Interface to GTK2 desktop features. |
| 41 // | 43 // |
| (...skipping 16 matching lines...) Expand all Loading... |
| 58 bool focused, | 60 bool focused, |
| 59 bool call_to_action, | 61 bool call_to_action, |
| 60 int width, | 62 int width, |
| 61 int height) const; | 63 int height) const; |
| 62 | 64 |
| 63 // ui::LinuxInputMethodContextFactory: | 65 // ui::LinuxInputMethodContextFactory: |
| 64 virtual scoped_ptr<ui::LinuxInputMethodContext> CreateInputMethodContext( | 66 virtual scoped_ptr<ui::LinuxInputMethodContext> CreateInputMethodContext( |
| 65 ui::LinuxInputMethodContextDelegate* delegate) const OVERRIDE; | 67 ui::LinuxInputMethodContextDelegate* delegate) const OVERRIDE; |
| 66 | 68 |
| 67 // gfx::LinuxFontDelegate: | 69 // gfx::LinuxFontDelegate: |
| 68 virtual bool UseAntialiasing() const OVERRIDE; | 70 virtual gfx::FontRenderParams GetDefaultFontRenderParams() const OVERRIDE; |
| 69 virtual gfx::FontRenderParams::Hinting GetHintingStyle() const OVERRIDE; | 71 virtual scoped_ptr<gfx::ScopedPangoFontDescription> |
| 70 virtual gfx::FontRenderParams::SubpixelRendering | 72 GetDefaultPangoFontDescription() const OVERRIDE; |
| 71 GetSubpixelRenderingStyle() const OVERRIDE; | |
| 72 virtual std::string GetDefaultFontDescription() const OVERRIDE; | |
| 73 | 73 |
| 74 // ui::LinuxShellDialog: | 74 // ui::LinuxShellDialog: |
| 75 virtual ui::SelectFileDialog* CreateSelectFileDialog( | 75 virtual ui::SelectFileDialog* CreateSelectFileDialog( |
| 76 ui::SelectFileDialog::Listener* listener, | 76 ui::SelectFileDialog::Listener* listener, |
| 77 ui::SelectFilePolicy* policy) const OVERRIDE; | 77 ui::SelectFilePolicy* policy) const OVERRIDE; |
| 78 | 78 |
| 79 // ui::LinuxUI: | 79 // ui::LinuxUI: |
| 80 virtual void Initialize() OVERRIDE; | 80 virtual void Initialize() OVERRIDE; |
| 81 virtual gfx::Image GetThemeImageNamed(int id) const OVERRIDE; | 81 virtual gfx::Image GetThemeImageNamed(int id) const OVERRIDE; |
| 82 virtual bool GetColor(int id, SkColor* color) const OVERRIDE; | 82 virtual bool GetColor(int id, SkColor* color) const OVERRIDE; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 SkColor focus_ring_color_; | 219 SkColor focus_ring_color_; |
| 220 SkColor thumb_active_color_; | 220 SkColor thumb_active_color_; |
| 221 SkColor thumb_inactive_color_; | 221 SkColor thumb_inactive_color_; |
| 222 SkColor track_color_; | 222 SkColor track_color_; |
| 223 SkColor active_selection_bg_color_; | 223 SkColor active_selection_bg_color_; |
| 224 SkColor active_selection_fg_color_; | 224 SkColor active_selection_fg_color_; |
| 225 SkColor inactive_selection_bg_color_; | 225 SkColor inactive_selection_bg_color_; |
| 226 SkColor inactive_selection_fg_color_; | 226 SkColor inactive_selection_fg_color_; |
| 227 | 227 |
| 228 // Pango description for the default UI font. | 228 // Pango description for the default UI font. |
| 229 std::string default_font_description_; | 229 scoped_ptr<gfx::ScopedPangoFontDescription> default_font_description_; |
| 230 | 230 |
| 231 #if defined(USE_GCONF) | 231 #if defined(USE_GCONF) |
| 232 // Currently, the only source of window button configuration. This will | 232 // Currently, the only source of window button configuration. This will |
| 233 // change if we ever have to support XFCE's configuration system or KDE's. | 233 // change if we ever have to support XFCE's configuration system or KDE's. |
| 234 scoped_ptr<GConfListener> gconf_listener_; | 234 scoped_ptr<GConfListener> gconf_listener_; |
| 235 #endif // defined(USE_GCONF) | 235 #endif // defined(USE_GCONF) |
| 236 | 236 |
| 237 // If either of these vectors are non-empty, they represent the current | 237 // If either of these vectors are non-empty, they represent the current |
| 238 // window button configuration. | 238 // window button configuration. |
| 239 std::vector<views::FrameButton> leading_buttons_; | 239 std::vector<views::FrameButton> leading_buttons_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 262 } // namespace libgtk2ui | 262 } // namespace libgtk2ui |
| 263 | 263 |
| 264 // Access point to the GTK2 desktop system. This should be the only symbol that | 264 // Access point to the GTK2 desktop system. This should be the only symbol that |
| 265 // is exported in the library; everything else should be used through the | 265 // is exported in the library; everything else should be used through the |
| 266 // interface, because eventually this .so will be loaded through dlopen at | 266 // interface, because eventually this .so will be loaded through dlopen at |
| 267 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or | 267 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or |
| 268 // QT or whatever. | 268 // QT or whatever. |
| 269 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); | 269 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); |
| 270 | 270 |
| 271 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ | 271 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
| OLD | NEW |