summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 19:21:41 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 19:21:41 +0000
commitf9cab10c8331d125c6bf31cc43b2a18c2fa2784c (patch)
tree1cf11ee77f4e8741767576171e5a6d6525a9ab09 /gfx
parentaea5a7cf666f0c7077833fb33a255df21b9f9a00 (diff)
downloadchromium_src-f9cab10c8331d125c6bf31cc43b2a18c2fa2784c.zip
chromium_src-f9cab10c8331d125c6bf31cc43b2a18c2fa2784c.tar.gz
chromium_src-f9cab10c8331d125c6bf31cc43b2a18c2fa2784c.tar.bz2
Define gfx::NativeImage and add ResourceBundle::GetNativeImageNamed().
BUG=none TEST=compile Review URL: http://codereview.chromium.org/3597008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61545 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx')
-rw-r--r--gfx/native_widget_types.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/gfx/native_widget_types.h b/gfx/native_widget_types.h
index 729a9e9..b7ff4bb 100644
--- a/gfx/native_widget_types.h
+++ b/gfx/native_widget_types.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -29,6 +29,9 @@
// NativeEditView: a handle to a native edit-box. The Mac folks wanted this
// specific typedef.
//
+// NativeImage: The platform-specific image type used for drawing UI elements
+// in the browser.
+//
// The name 'View' here meshes with OS X where the UI elements are called
// 'views' and with our Chrome UI code where the elements are also called
// 'views'.
@@ -40,11 +43,13 @@ typedef struct HFONT__* HFONT;
struct CGContext;
#ifdef __OBJC__
@class NSFont;
+@class NSImage;
@class NSView;
@class NSWindow;
@class NSTextField;
#else
class NSFont;
+class NSImage;
class NSView;
class NSWindow;
class NSTextField;
@@ -52,11 +57,13 @@ class NSTextField;
#elif defined(TOOLKIT_USES_GTK)
typedef struct _PangoFontDescription PangoFontDescription;
typedef struct _GdkCursor GdkCursor;
+typedef struct _GdkPixbuf GdkPixbuf;
typedef struct _GdkRegion GdkRegion;
typedef struct _GtkWidget GtkWidget;
typedef struct _GtkWindow GtkWindow;
typedef struct _cairo cairo_t;
#endif
+class SkBitmap;
namespace gfx {
@@ -88,6 +95,14 @@ typedef GtkWidget* NativeMenu;
typedef GdkRegion* NativeRegion;
#endif
+#if defined(OS_MACOSX)
+typedef NSImage* NativeImage;
+#elif defined(USE_X11) && !defined(TOOLKIT_VIEWS)
+typedef GdkPixbuf* NativeImage;
+#else
+typedef const SkBitmap* NativeImage;
+#endif
+
// Note: for test_shell we're packing a pointer into the NativeViewId. So, if
// you make it a type which is smaller than a pointer, you have to fix
// test_shell.