Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: views/widget/native_widget_gtk.h

Issue 7129022: Move last of event handlers down to NativeWidgetWin/Gtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/widget/native_widget_delegate.h ('k') | views/widget/native_widget_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_GTK_H_ 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_
6 #define VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ 6 #define VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 virtual void ReplaceInputMethod(InputMethod* input_method) OVERRIDE; 181 virtual void ReplaceInputMethod(InputMethod* input_method) OVERRIDE;
182 virtual void CenterWindow(const gfx::Size& size) OVERRIDE; 182 virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
183 virtual void GetWindowBoundsAndMaximizedState(gfx::Rect* bounds, 183 virtual void GetWindowBoundsAndMaximizedState(gfx::Rect* bounds,
184 bool* maximized) const OVERRIDE; 184 bool* maximized) const OVERRIDE;
185 virtual void SetWindowTitle(const std::wstring& title) OVERRIDE; 185 virtual void SetWindowTitle(const std::wstring& title) OVERRIDE;
186 virtual void SetWindowIcons(const SkBitmap& window_icon, 186 virtual void SetWindowIcons(const SkBitmap& window_icon,
187 const SkBitmap& app_icon) OVERRIDE; 187 const SkBitmap& app_icon) OVERRIDE;
188 virtual void SetAccessibleName(const std::wstring& name) OVERRIDE; 188 virtual void SetAccessibleName(const std::wstring& name) OVERRIDE;
189 virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) OVERRIDE; 189 virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) OVERRIDE;
190 virtual void SetAccessibleState(ui::AccessibilityTypes::State state) OVERRIDE; 190 virtual void SetAccessibleState(ui::AccessibilityTypes::State state) OVERRIDE;
191 virtual void BecomeModal() OVERRIDE;
191 virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE; 192 virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE;
192 virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE; 193 virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE;
193 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; 194 virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
194 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 195 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
195 virtual void SetSize(const gfx::Size& size) OVERRIDE; 196 virtual void SetSize(const gfx::Size& size) OVERRIDE;
196 virtual void SetBoundsConstrained(const gfx::Rect& bounds, 197 virtual void SetBoundsConstrained(const gfx::Rect& bounds,
197 Widget* other_widget) OVERRIDE; 198 Widget* other_widget) OVERRIDE;
198 virtual void MoveAbove(gfx::NativeView native_view) OVERRIDE; 199 virtual void MoveAbove(gfx::NativeView native_view) OVERRIDE;
199 virtual void SetShape(gfx::NativeRegion shape) OVERRIDE; 200 virtual void SetShape(gfx::NativeRegion shape) OVERRIDE;
200 virtual void Close() OVERRIDE; 201 virtual void Close() OVERRIDE;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnVisibilityNotify, 276 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnVisibilityNotify,
276 GdkEventVisibility*); 277 GdkEventVisibility*);
277 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnGrabBrokeEvent, GdkEvent*); 278 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnGrabBrokeEvent, GdkEvent*);
278 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, void, OnGrabNotify, gboolean); 279 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, void, OnGrabNotify, gboolean);
279 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnDestroy); 280 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnDestroy);
280 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnShow); 281 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnShow);
281 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnMap); 282 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnMap);
282 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnHide); 283 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnHide);
283 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnWindowStateEvent, 284 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnWindowStateEvent,
284 GdkEventWindowState*); 285 GdkEventWindowState*);
286 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnConfigureEvent,
287 GdkEventConfigure*);
285 288
286 // Invoked when the widget is destroyed and right before the object 289 // Invoked when the widget is destroyed and right before the object
287 // destruction. Useful for overriding. 290 // destruction. Useful for overriding.
288 virtual void OnDestroyed(GObject *where_the_object_was); 291 virtual void OnDestroyed(GObject *where_the_object_was);
289 static void OnDestroyedThunk(gpointer data, GObject *where_the_object_was) { 292 static void OnDestroyedThunk(gpointer data, GObject *where_the_object_was) {
290 reinterpret_cast<NativeWidgetGtk*>(data)->OnDestroyed(where_the_object_was); 293 reinterpret_cast<NativeWidgetGtk*>(data)->OnDestroyed(where_the_object_was);
291 } 294 }
292 295
293 // Invoked when gtk grab is stolen by other GtkWidget in the same 296 // Invoked when gtk grab is stolen by other GtkWidget in the same
294 // application. 297 // application.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 void ConfigureWidgetForTransparentBackground(GtkWidget* parent); 341 void ConfigureWidgetForTransparentBackground(GtkWidget* parent);
339 342
340 // Invoked from create widget to enable the various bits needed for a 343 // Invoked from create widget to enable the various bits needed for a
341 // window which doesn't receive events. 344 // window which doesn't receive events.
342 void ConfigureWidgetForIgnoreEvents(); 345 void ConfigureWidgetForIgnoreEvents();
343 346
344 // A utility function to draw a transparent background onto the |widget|. 347 // A utility function to draw a transparent background onto the |widget|.
345 static void DrawTransparentBackground(GtkWidget* widget, 348 static void DrawTransparentBackground(GtkWidget* widget,
346 GdkEventExpose* event); 349 GdkEventExpose* event);
347 350
351 // Asks the delegate if any to save the window's location and size.
352 void SaveWindowPosition();
353
348 // A delegate implementation that handles events received here. 354 // A delegate implementation that handles events received here.
349 // See class documentation for Widget in widget.h for a note about ownership. 355 // See class documentation for Widget in widget.h for a note about ownership.
350 internal::NativeWidgetDelegate* delegate_; 356 internal::NativeWidgetDelegate* delegate_;
351 357
352 // Our native views. If we're a window/popup, then widget_ is the window and 358 // Our native views. If we're a window/popup, then widget_ is the window and
353 // window_contents_ is a GtkFixed. If we're not a window/popup, then widget_ 359 // window_contents_ is a GtkFixed. If we're not a window/popup, then widget_
354 // and window_contents_ point to the same GtkFixed. 360 // and window_contents_ point to the same GtkFixed.
355 GtkWidget* widget_; 361 GtkWidget* widget_;
356 GtkWidget* window_contents_; 362 GtkWidget* window_contents_;
357 363
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 bool painted_; 455 bool painted_;
450 456
451 scoped_ptr<InputMethod> input_method_; 457 scoped_ptr<InputMethod> input_method_;
452 458
453 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk); 459 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk);
454 }; 460 };
455 461
456 } // namespace views 462 } // namespace views
457 463
458 #endif // VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ 464 #endif // VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_
OLDNEW
« no previous file with comments | « views/widget/native_widget_delegate.h ('k') | views/widget/native_widget_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698