diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-11 21:50:41 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-11 21:50:41 +0000 |
commit | 5590f8286b568b29e67f0d575dad0cb84f071e87 (patch) | |
tree | 76a5cc4ce0cdb148a3a4d258104e1f249878bc91 /base | |
parent | 35a61135047d83c9b87fdb57f86367c05efeeb26 (diff) | |
download | chromium_src-5590f8286b568b29e67f0d575dad0cb84f071e87.zip chromium_src-5590f8286b568b29e67f0d575dad0cb84f071e87.tar.gz chromium_src-5590f8286b568b29e67f0d575dad0cb84f071e87.tar.bz2 |
Rename ViewHandle to NativeView et al.
ViewHandle is a very unfortunate name when we actually start dealing with
views, so we are renaming the cross-platform typedefs to make it clear
that they refer to platform specific native UI elements.
Review URL: http://codereview.chromium.org/13754
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/gfx/native_widget_types.h | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/base/gfx/native_widget_types.h b/base/gfx/native_widget_types.h index b711b27..1f696b0 100644 --- a/base/gfx/native_widget_types.h +++ b/base/gfx/native_widget_types.h @@ -7,6 +7,17 @@ #include "build/build_config.h" +// This file provides cross platform typedefs for native widget types. +// NativeWindow: this is a handle to a native, top-level window +// NativeView: this is a handle to a native UI element. It may be the +// same type as a NativeWindow on some platforms. +// NativeEditView: a handle to a native edit-box. The Mac folks wanted +// this specific typedef. +// +// 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'. + #if defined(OS_WIN) #include <windows.h> #elif defined(OS_MACOSX) @@ -26,21 +37,19 @@ typedef struct _GtkWidget GtkWidget; namespace gfx { #if defined(OS_WIN) -typedef HWND ViewHandle; -typedef HWND WindowHandle; -typedef HWND EditViewHandle; +typedef HWND NativeView; +typedef HWND NativeWindow; +typedef HWND NativeEditView; #elif defined(OS_MACOSX) -typedef NSView *ViewHandle; -typedef NSWindow *WindowHandle; -typedef NSTextField *EditViewHandle; +typedef NSView* NativeView; +typedef NSWindow* NativeWindow; +typedef NSTextField* NativeEditView; #elif defined(OS_LINUX) -typedef GtkWidget* ViewHandle; -typedef GtkWidget* WindowHandle; -typedef GtkWidget* EditViewHandle; +typedef GtkWidget* NativeView; +typedef GtkWidget* NativeWindow; +typedef GtkWidget* NativeEditView; #else // null port. -typedef void* ViewHandle; -typedef void* WindowHandle; -typedef void* EditViewHandle; +#error No known OS defined #endif } // namespace gfx |