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 | |
63 // Invoked from the 'destroy' signal. | 60 // Invoked from the 'destroy' signal. |
64 static void CallDestroy(GtkObject* object, NativeViewHostGtk* host); | 61 static void CallDestroy(GtkObject* object, NativeViewHostGtk* host); |
65 | 62 |
66 // Invoked from the 'focus-in-event' signal. | 63 // Invoked from the 'focus-in-event' signal. |
67 static gboolean CallFocusIn(GtkWidget* widget, | 64 static gboolean CallFocusIn(GtkWidget* widget, |
68 GdkEventFocus* event, | 65 GdkEventFocus* event, |
69 NativeViewHostGtk* button); | 66 NativeViewHostGtk* button); |
70 | 67 |
71 // Our associated NativeViewHost. | 68 // Our associated NativeViewHost. |
72 NativeViewHost* host_; | 69 NativeViewHost* host_; |
(...skipping 15 matching lines...) Expand all Loading... |
88 // The GtkFixed that contains the attached gfx::NativeView (used for | 85 // The GtkFixed that contains the attached gfx::NativeView (used for |
89 // clipping). | 86 // clipping). |
90 GtkWidget* fixed_; | 87 GtkWidget* fixed_; |
91 | 88 |
92 DISALLOW_COPY_AND_ASSIGN(NativeViewHostGtk); | 89 DISALLOW_COPY_AND_ASSIGN(NativeViewHostGtk); |
93 }; | 90 }; |
94 | 91 |
95 } // namespace views | 92 } // namespace views |
96 | 93 |
97 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ | 94 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ |
OLD | NEW |