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

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

Issue 7075019: Move a bunch of functions from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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.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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE; 171 virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE;
172 virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE; 172 virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE;
173 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 173 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
174 virtual void SetSize(const gfx::Size& size) OVERRIDE; 174 virtual void SetSize(const gfx::Size& size) OVERRIDE;
175 virtual void MoveAbove(gfx::NativeView native_view) OVERRIDE; 175 virtual void MoveAbove(gfx::NativeView native_view) OVERRIDE;
176 virtual void SetShape(gfx::NativeRegion shape) OVERRIDE; 176 virtual void SetShape(gfx::NativeRegion shape) OVERRIDE;
177 virtual void Close() OVERRIDE; 177 virtual void Close() OVERRIDE;
178 virtual void CloseNow() OVERRIDE; 178 virtual void CloseNow() OVERRIDE;
179 virtual void Show() OVERRIDE; 179 virtual void Show() OVERRIDE;
180 virtual void Hide() OVERRIDE; 180 virtual void Hide() OVERRIDE;
181 virtual bool IsVisible() const OVERRIDE;
182 virtual void Activate() OVERRIDE;
183 virtual void Deactivate() OVERRIDE;
184 virtual bool IsActive() const OVERRIDE;
185 virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
186 virtual void Maximize() OVERRIDE;
187 virtual void Minimize() OVERRIDE;
188 virtual bool IsMaximized() const OVERRIDE;
189 virtual bool IsMinimized() const OVERRIDE;
190 virtual void Restore() OVERRIDE;
181 virtual void SetOpacity(unsigned char opacity) OVERRIDE; 191 virtual void SetOpacity(unsigned char opacity) OVERRIDE;
182 virtual void SetAlwaysOnTop(bool on_top) OVERRIDE;
183 virtual bool IsVisible() const OVERRIDE;
184 virtual bool IsActive() const OVERRIDE;
185 virtual bool IsAccessibleWidget() const OVERRIDE; 192 virtual bool IsAccessibleWidget() const OVERRIDE;
186 virtual bool ContainsNativeView(gfx::NativeView native_view) const OVERRIDE; 193 virtual bool ContainsNativeView(gfx::NativeView native_view) const OVERRIDE;
187 virtual void RunShellDrag(View* view, 194 virtual void RunShellDrag(View* view,
188 const ui::OSExchangeData& data, 195 const ui::OSExchangeData& data,
189 int operation) OVERRIDE; 196 int operation) OVERRIDE;
190 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; 197 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
191 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; 198 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
192 199
193 protected: 200 protected:
194 // Modifies event coordinates to the targeted widget contained by this widget. 201 // Modifies event coordinates to the targeted widget contained by this widget.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 gint, gint, gboolean, GtkTooltip*); 245 gint, gint, gboolean, GtkTooltip*);
239 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnScroll, GdkEventScroll*); 246 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnScroll, GdkEventScroll*);
240 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnVisibilityNotify, 247 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnVisibilityNotify,
241 GdkEventVisibility*); 248 GdkEventVisibility*);
242 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnGrabBrokeEvent, GdkEvent*); 249 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnGrabBrokeEvent, GdkEvent*);
243 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, void, OnGrabNotify, gboolean); 250 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, void, OnGrabNotify, gboolean);
244 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnDestroy); 251 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnDestroy);
245 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnShow); 252 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnShow);
246 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnMap); 253 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnMap);
247 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnHide); 254 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnHide);
255 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnWindowStateEvent,
256 GdkEventWindowState*);
248 257
249 // Invoked when gtk grab is stolen by other GtkWidget in the same 258 // Invoked when gtk grab is stolen by other GtkWidget in the same
250 // application. 259 // application.
251 virtual void HandleGtkGrabBroke(); 260 virtual void HandleGtkGrabBroke();
252 261
253 // Invoked when X input grab is broken. This typically happen 262 // Invoked when X input grab is broken. This typically happen
254 // when a window holding grab is closed without releasing grab. 263 // when a window holding grab is closed without releasing grab.
255 virtual void HandleXGrabBroke(); 264 virtual void HandleXGrabBroke();
256 265
257 // Are we a subclass of NativeWindowGtk? 266 // Are we a subclass of NativeWindowGtk?
258 bool is_window_; 267 bool is_window_;
259 268
269 // State of the window, such as fullscreen, hidden...
270 // TODO(beng): move to private once NativeWindowGtk no longer refers to it.
271 GdkWindowState window_state_;
272
260 private: 273 private:
261 class DropObserver; 274 class DropObserver;
262 friend class DropObserver; 275 friend class DropObserver;
263 276
264 // Overridden from NativeWidget 277 // Overridden from NativeWidget
265 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 278 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
266 279
267 // Overridden from internal::InputMethodDelegate 280 // Overridden from internal::InputMethodDelegate
268 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; 281 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE;
269 282
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 bool painted_; 414 bool painted_;
402 415
403 scoped_ptr<InputMethod> input_method_; 416 scoped_ptr<InputMethod> input_method_;
404 417
405 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk); 418 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk);
406 }; 419 };
407 420
408 } // namespace views 421 } // namespace views
409 422
410 #endif // VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ 423 #endif // VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_
OLDNEW
« no previous file with comments | « views/widget/native_widget.h ('k') | views/widget/native_widget_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698