| OLD | NEW |
| 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_BROWSER_GTK_ROUNDED_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_GTK_ROUNDED_WINDOW_H_ |
| 6 #define CHROME_BROWSER_GTK_ROUNDED_WINDOW_H_ | 6 #define CHROME_BROWSER_GTK_ROUNDED_WINDOW_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 namespace gtk_util { | 10 namespace gtk_util { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Sets up the passed in widget that has its own GdkWindow with an expose | 32 // Sets up the passed in widget that has its own GdkWindow with an expose |
| 33 // handler that forces the window shape into roundness. Caller should not set | 33 // handler that forces the window shape into roundness. Caller should not set |
| 34 // an "expose-event" handler on |widget|; if caller needs to do custom | 34 // an "expose-event" handler on |widget|; if caller needs to do custom |
| 35 // rendering, use SetRoundedWindowExposeFunction() instead. |rounded_edges| | 35 // rendering, use SetRoundedWindowExposeFunction() instead. |rounded_edges| |
| 36 // control which corners are rounded. |drawn_borders| border control which | 36 // control which corners are rounded. |drawn_borders| border control which |
| 37 // sides have a visible border drawn in |color|. | 37 // sides have a visible border drawn in |color|. |
| 38 void ActAsRoundedWindow( | 38 void ActAsRoundedWindow( |
| 39 GtkWidget* widget, const GdkColor& color, int corner_size, | 39 GtkWidget* widget, const GdkColor& color, int corner_size, |
| 40 int rounded_edges, int drawn_borders); | 40 int rounded_edges, int drawn_borders); |
| 41 | 41 |
| 42 // Undo most of the actions of ActAsRoundedWindow. | 42 // Undoes most of the actions of ActAsRoundedWindow(). |
| 43 void StopActingAsRoundedWindow(GtkWidget* widget); | 43 void StopActingAsRoundedWindow(GtkWidget* widget); |
| 44 | 44 |
| 45 // Sets the color of the border on a widget that was returned from | 45 // Sets edge and border properties on a widget that has already been configured |
| 46 // ActAsRoundedWindow(). | 46 // with ActAsRoundedWindow(). |
| 47 void SetRoundedWindowEdgesAndBorders(GtkWidget* widget, |
| 48 int corner_size, |
| 49 int rounded_edges, |
| 50 int drawn_borders); |
| 51 |
| 52 // Sets the color of the border on a widget that has already been configured |
| 53 // with ActAsRoundedWindow(). |
| 47 void SetRoundedWindowBorderColor(GtkWidget* widget, GdkColor color); | 54 void SetRoundedWindowBorderColor(GtkWidget* widget, GdkColor color); |
| 48 | 55 |
| 56 |
| 49 } // namespace gtk_util | 57 } // namespace gtk_util |
| 50 | 58 |
| 51 #endif // CHROME_BROWSER_GTK_ROUNDED_WINDOW_H_ | 59 #endif // CHROME_BROWSER_GTK_ROUNDED_WINDOW_H_ |
| OLD | NEW |