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

Side by Side Diff: chrome/common/gtk_util.h

Issue 195071: GTK: Cache our GdkCursor objects, since building them hits the disk. (Closed)
Patch Set: Put in gtk_util Created 11 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_COMMON_GTK_UTIL_H_ 5 #ifndef CHROME_COMMON_GTK_UTIL_H_
6 #define CHROME_COMMON_GTK_UTIL_H_ 6 #define CHROME_COMMON_GTK_UTIL_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // |offscreen_entry| onto |widget_to_draw_on| in the rectangle |rec|. Drawing 164 // |offscreen_entry| onto |widget_to_draw_on| in the rectangle |rec|. Drawing
165 // is only done in the clip rectangle |dirty_rec|. 165 // is only done in the clip rectangle |dirty_rec|.
166 void DrawTextEntryBackground(GtkWidget* offscreen_entry, 166 void DrawTextEntryBackground(GtkWidget* offscreen_entry,
167 GtkWidget* widget_to_draw_on, 167 GtkWidget* widget_to_draw_on,
168 GdkRectangle* dirty_rec, 168 GdkRectangle* dirty_rec,
169 GdkRectangle* rec); 169 GdkRectangle* rec);
170 170
171 // Returns the two colors averaged together. 171 // Returns the two colors averaged together.
172 GdkColor AverageColors(GdkColor color_one, GdkColor color_two); 172 GdkColor AverageColors(GdkColor color_one, GdkColor color_two);
173 173
174 // Returns a static instance of a GdkCursor* object, sharable across the
175 // process. Returns a GdkCursor with a +1 refcount, as if it was just created
176 // with gdk_cursor_new(); owner must gdk_cursor_unref() it when done with it.
177 GdkCursor* GetCursor(GdkCursorType type);
178
174 } // namespace gtk_util 179 } // namespace gtk_util
175 180
176 #endif // CHROME_COMMON_GTK_UTIL_H_ 181 #endif // CHROME_COMMON_GTK_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698