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_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ | 5 #ifndef VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ |
6 #define VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ | 6 #define VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 #include <string> | 10 #include <string> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Destroys the GtkFixed that performs clipping on our hosted GtkWidget. | 51 // Destroys the GtkFixed that performs clipping on our hosted GtkWidget. |
52 void DestroyFixed(); | 52 void DestroyFixed(); |
53 | 53 |
54 NativeWidgetGtk* GetHostWidget() const; | 54 NativeWidgetGtk* GetHostWidget() const; |
55 | 55 |
56 // Returns the descendant of fixed_ that has focus, or NULL if focus is not | 56 // Returns the descendant of fixed_ that has focus, or NULL if focus is not |
57 // on a descendant of fixed_. | 57 // on a descendant of fixed_. |
58 GtkWidget* GetFocusedDescendant(); | 58 GtkWidget* GetFocusedDescendant(); |
59 | 59 |
| 60 // Connects a new host widget. |
| 61 void AttachHostWidget(); |
| 62 |
60 // Invoked from the 'destroy' signal. | 63 // Invoked from the 'destroy' signal. |
61 static void CallDestroy(GtkObject* object, NativeViewHostGtk* host); | 64 static void CallDestroy(GtkObject* object, NativeViewHostGtk* host); |
62 | 65 |
63 // Invoked from the 'focus-in-event' signal. | 66 // Invoked from the 'focus-in-event' signal. |
64 static gboolean CallFocusIn(GtkWidget* widget, | 67 static gboolean CallFocusIn(GtkWidget* widget, |
65 GdkEventFocus* event, | 68 GdkEventFocus* event, |
66 NativeViewHostGtk* button); | 69 NativeViewHostGtk* button); |
67 | 70 |
68 // Our associated NativeViewHost. | 71 // Our associated NativeViewHost. |
69 NativeViewHost* host_; | 72 NativeViewHost* host_; |
(...skipping 15 matching lines...) Expand all Loading... |
85 // The GtkFixed that contains the attached gfx::NativeView (used for | 88 // The GtkFixed that contains the attached gfx::NativeView (used for |
86 // clipping). | 89 // clipping). |
87 GtkWidget* fixed_; | 90 GtkWidget* fixed_; |
88 | 91 |
89 DISALLOW_COPY_AND_ASSIGN(NativeViewHostGtk); | 92 DISALLOW_COPY_AND_ASSIGN(NativeViewHostGtk); |
90 }; | 93 }; |
91 | 94 |
92 } // namespace views | 95 } // namespace views |
93 | 96 |
94 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ | 97 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ |
OLD | NEW |