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

Unified Diff: base/gfx/gtk_util.h

Issue 43077: Add a GDK_COLOR_RGB macro for constructing GdkColors. (Closed)
Patch Set: Merge to trunk Created 11 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/gfx/gtk_util.h
diff --git a/base/gfx/gtk_util.h b/base/gfx/gtk_util.h
index bf6e6aa9f45f658a89261900c6e8c30d634f2009..40a7855505c7461903b5e94d9c1eb3b8773a89ae 100755
--- a/base/gfx/gtk_util.h
+++ b/base/gfx/gtk_util.h
@@ -11,6 +11,11 @@ typedef struct _GdkPixbuf GdkPixbuf;
typedef struct _GdkRegion GdkRegion;
class SkBitmap;
+// Define a macro for creating GdkColors from RGB values. This is a macro to
+// allow static construction of literals, etc. Use this like:
+// GdkColor white = GDK_COLOR_RGB(0xff, 0xff, 0xff);
+#define GDK_COLOR_RGB(r, g, b) {0, r * 257, g * 257, b * 257}
+
namespace gfx {
class Rect;
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698