Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: chrome/browser/ui/gtk/gtk_util.h

Issue 7712001: WindowOpenDisposition should not be exposed in base and ui modules. (1) Gdk refactoring (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: minor fix. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_GTK_GTK_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_UTIL_H_
6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ 6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 #include <string> 10 #include <string>
(...skipping 19 matching lines...) Expand all
30 const int kSkiaToGDKMultiplier = 257; 30 const int kSkiaToGDKMultiplier = 257;
31 31
32 // Define a macro for creating GdkColors from RGB values. This is a macro to 32 // Define a macro for creating GdkColors from RGB values. This is a macro to
33 // allow static construction of literals, etc. Use this like: 33 // allow static construction of literals, etc. Use this like:
34 // GdkColor white = GDK_COLOR_RGB(0xff, 0xff, 0xff); 34 // GdkColor white = GDK_COLOR_RGB(0xff, 0xff, 0xff);
35 #define GDK_COLOR_RGB(r, g, b) {0, r * kSkiaToGDKMultiplier, \ 35 #define GDK_COLOR_RGB(r, g, b) {0, r * kSkiaToGDKMultiplier, \
36 g * kSkiaToGDKMultiplier, b * kSkiaToGDKMultiplier} 36 g * kSkiaToGDKMultiplier, b * kSkiaToGDKMultiplier}
37 37
38 namespace event_utils { 38 namespace event_utils {
39 39
40 // Translates event flags into what kind of disposition they represent. 40 // Translates GdkEvent state into what kind of disposition they represent.
41 // For example, a middle click would mean to open a background tab. 41 // For example, a middle click would mean to open a background tab.
42 // event_flags are the state in the GdkEvent structure. 42 WindowOpenDisposition DispositionFromGdkState(guint state);
43 WindowOpenDisposition DispositionFromEventFlags(guint state); 43
44 // Translates event flags into plaform independent event flags.
45 int EventFlagsFromGdkState(guint state);
44 46
45 } // namespace event_utils 47 } // namespace event_utils
46 48
47 namespace gtk_util { 49 namespace gtk_util {
48 50
49 extern const GdkColor kGdkWhite; 51 extern const GdkColor kGdkWhite;
50 extern const GdkColor kGdkGray; 52 extern const GdkColor kGdkGray;
51 extern const GdkColor kGdkBlack; 53 extern const GdkColor kGdkBlack;
52 extern const GdkColor kGdkGreen; 54 extern const GdkColor kGdkGreen;
53 55
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 void ApplyMessageDialogQuirks(GtkWidget* dialog); 373 void ApplyMessageDialogQuirks(GtkWidget* dialog);
372 374
373 // Performs Cut/Copy/Paste operation on the |window|. 375 // Performs Cut/Copy/Paste operation on the |window|.
374 void DoCut(BrowserWindow* window); 376 void DoCut(BrowserWindow* window);
375 void DoCopy(BrowserWindow* window); 377 void DoCopy(BrowserWindow* window);
376 void DoPaste(BrowserWindow* window); 378 void DoPaste(BrowserWindow* window);
377 379
378 } // namespace gtk_util 380 } // namespace gtk_util
379 381
380 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ 382 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/bookmarks/bookmark_menu_controller_gtk.cc ('k') | chrome/browser/ui/gtk/gtk_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698