From 5590f8286b568b29e67f0d575dad0cb84f071e87 Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Thu, 11 Dec 2008 21:50:41 +0000 Subject: 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 --- base/gfx/native_widget_types.h | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'base') 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 #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 -- cgit v1.1