OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_HOST_VIEW_GTK_H_ | 5 #ifndef VIEWS_CONTROLS_NATIVE_HOST_VIEW_GTK_H_ |
6 #define VIEWS_CONTROLS_NATIVE_HOST_VIEW_GTK_H_ | 6 #define VIEWS_CONTROLS_NATIVE_HOST_VIEW_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 void CreateFixed(bool needs_window); | 47 void CreateFixed(bool needs_window); |
48 | 48 |
49 // Destroys the GtkFixed that performs clipping on our hosted GtkWidget. | 49 // Destroys the GtkFixed that performs clipping on our hosted GtkWidget. |
50 void DestroyFixed(); | 50 void DestroyFixed(); |
51 | 51 |
52 WidgetGtk* GetHostWidget() const; | 52 WidgetGtk* GetHostWidget() const; |
53 | 53 |
54 // Invoked from the 'destroy' signal. | 54 // Invoked from the 'destroy' signal. |
55 static void CallDestroy(GtkObject* object, NativeViewHostGtk* host); | 55 static void CallDestroy(GtkObject* object, NativeViewHostGtk* host); |
56 | 56 |
| 57 // Invoked from the 'focus-in-event' signal. |
| 58 static void CallFocusIn(GtkWidget* widget, |
| 59 GdkEventFocus* event, |
| 60 NativeViewHostGtk* button); |
| 61 |
57 // Our associated NativeViewHost. | 62 // Our associated NativeViewHost. |
58 NativeViewHost* host_; | 63 NativeViewHost* host_; |
59 | 64 |
60 // Have we installed a region on the gfx::NativeView used to clip to only the | 65 // Have we installed a region on the gfx::NativeView used to clip to only the |
61 // visible portion of the gfx::NativeView ? | 66 // visible portion of the gfx::NativeView ? |
62 bool installed_clip_; | 67 bool installed_clip_; |
63 | 68 |
64 // The installed clip rect. InstallClip doesn't actually perform the clipping, | 69 // The installed clip rect. InstallClip doesn't actually perform the clipping, |
65 // a call to ShowWidget will. | 70 // a call to ShowWidget will. |
66 gfx::Rect installed_clip_bounds_; | 71 gfx::Rect installed_clip_bounds_; |
67 | 72 |
68 // Signal handle id for 'destroy' signal. | 73 // Signal handle id for 'destroy' signal. |
69 gulong destroy_signal_id_; | 74 gulong destroy_signal_id_; |
70 | 75 |
| 76 // Signal handle id for 'focus-in-event' signal. |
| 77 gulong focus_signal_id_; |
| 78 |
71 // The GtkFixed that contains the attached gfx::NativeView (used for | 79 // The GtkFixed that contains the attached gfx::NativeView (used for |
72 // clipping). | 80 // clipping). |
73 GtkWidget* fixed_; | 81 GtkWidget* fixed_; |
74 | 82 |
75 DISALLOW_COPY_AND_ASSIGN(NativeViewHostGtk); | 83 DISALLOW_COPY_AND_ASSIGN(NativeViewHostGtk); |
76 }; | 84 }; |
77 | 85 |
78 } // namespace views | 86 } // namespace views |
79 | 87 |
80 #endif // VIEWS_CONTROLS_NATIVE_HOST_VIEW_GTK_H_ | 88 #endif // VIEWS_CONTROLS_NATIVE_HOST_VIEW_GTK_H_ |
81 | 89 |
OLD | NEW |