diff options
Diffstat (limited to 'app/theme_provider.h')
-rw-r--r-- | app/theme_provider.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/theme_provider.h b/app/theme_provider.h index 7257886..29ce2ce 100644 --- a/app/theme_provider.h +++ b/app/theme_provider.h @@ -5,8 +5,13 @@ #ifndef APP_THEME_PROVIDER_H_ #define APP_THEME_PROVIDER_H_ +#include "base/basictypes.h" #include "third_party/skia/include/core/SkColor.h" +#if defined(OS_LINUX) +#include <gdk/gdk.h> +#endif + class SkBitmap; //////////////////////////////////////////////////////////////////////////////// @@ -28,6 +33,18 @@ class ThemeProvider { // Get the color specified by |id|. virtual SkColor GetColor(int id) = 0; + +#if defined(OS_LINUX) + // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared + // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme + // provider and should not be freed. + // + // The bitmap is assumed to exist. This function will log in release, and + // assert in debug mode if it does not. On failure, this will return a + // pointer to a shared empty placeholder bitmap so it will be visible what + // is missing. + virtual GdkPixbuf* GetPixbufNamed(int id) = 0; +#endif }; #endif // APP_THEME_PROVIDER_H_ |