| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_WIDGET_NATIVE_WIDGET_H_ | 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_H_ |
| 6 #define VIEWS_WIDGET_NATIVE_WIDGET_H_ | 6 #define VIEWS_WIDGET_NATIVE_WIDGET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // Returns all NativeWidgets in |native_view|'s hierarchy, including itself if | 51 // Returns all NativeWidgets in |native_view|'s hierarchy, including itself if |
| 52 // it is one. | 52 // it is one. |
| 53 static void GetAllNativeWidgets(gfx::NativeView native_view, | 53 static void GetAllNativeWidgets(gfx::NativeView native_view, |
| 54 NativeWidgets* children); | 54 NativeWidgets* children); |
| 55 | 55 |
| 56 // Reparent a NativeView and notify all NativeWidgets in | 56 // Reparent a NativeView and notify all NativeWidgets in |
| 57 // |native_view|'s hierarchy of the change. | 57 // |native_view|'s hierarchy of the change. |
| 58 static void ReparentNativeView(gfx::NativeView native_view, | 58 static void ReparentNativeView(gfx::NativeView native_view, |
| 59 gfx::NativeView new_parent); | 59 gfx::NativeView new_parent); |
| 60 | 60 |
| 61 // Sets the create params for the NativeWidget. | 61 // Initializes the NativeWidget. |
| 62 virtual void SetCreateParams(const Widget::CreateParams& params) = 0; | 62 virtual void InitNativeWidget(const Widget::CreateParams& params) = 0; |
| 63 | 63 |
| 64 // Returns the Widget associated with this NativeWidget. This function is | 64 // Returns the Widget associated with this NativeWidget. This function is |
| 65 // guaranteed to return non-NULL for the lifetime of the NativeWidget. | 65 // guaranteed to return non-NULL for the lifetime of the NativeWidget. |
| 66 virtual Widget* GetWidget() = 0; | 66 virtual Widget* GetWidget() = 0; |
| 67 | 67 |
| 68 // Sets/Gets a native window property on the underlying native window object. | 68 // Sets/Gets a native window property on the underlying native window object. |
| 69 // Returns NULL if the property does not exist. Setting the property value to | 69 // Returns NULL if the property does not exist. Setting the property value to |
| 70 // NULL removes the property. | 70 // NULL removes the property. |
| 71 virtual void SetNativeWindowProperty(const char* name, void* value) = 0; | 71 virtual void SetNativeWindowProperty(const char* name, void* value) = 0; |
| 72 virtual void* GetNativeWindowProperty(const char* name) = 0; | 72 virtual void* GetNativeWindowProperty(const char* name) = 0; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 virtual void RunShellDrag(View* view, | 124 virtual void RunShellDrag(View* view, |
| 125 const ui::OSExchangeData& data, | 125 const ui::OSExchangeData& data, |
| 126 int operation) = 0; | 126 int operation) = 0; |
| 127 virtual void SchedulePaintInRect(const gfx::Rect& rect) = 0; | 127 virtual void SchedulePaintInRect(const gfx::Rect& rect) = 0; |
| 128 virtual void SetCursor(gfx::NativeCursor cursor) = 0; | 128 virtual void SetCursor(gfx::NativeCursor cursor) = 0; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace views | 131 } // namespace views |
| 132 | 132 |
| 133 #endif // VIEWS_WIDGET_NATIVE_WIDGET_H_ | 133 #endif // VIEWS_WIDGET_NATIVE_WIDGET_H_ |
| OLD | NEW |