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

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

Issue 6976040: Revert 86914 - 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 void SetOpacity(unsigned char opacity) OVERRIDE;
182 virtual void SetAlwaysOnTop(bool on_top) OVERRIDE;
181 virtual bool IsVisible() const OVERRIDE; 183 virtual bool IsVisible() const OVERRIDE;
182 virtual void Activate() OVERRIDE;
183 virtual void Deactivate() OVERRIDE;
184 virtual bool IsActive() const 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;
191 virtual void SetOpacity(unsigned char opacity) OVERRIDE;
192 virtual bool IsAccessibleWidget() const OVERRIDE; 185 virtual bool IsAccessibleWidget() const OVERRIDE;
193 virtual bool ContainsNativeView(gfx::NativeView native_view) const OVERRIDE; 186 virtual bool ContainsNativeView(gfx::NativeView native_view) const OVERRIDE;
194 virtual void RunShellDrag(View* view, 187 virtual void RunShellDrag(View* view,
195 const ui::OSExchangeData& data, 188 const ui::OSExchangeData& data,
196 int operation) OVERRIDE; 189 int operation) OVERRIDE;
197 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; 190 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
198 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; 191 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
199 192
200 protected: 193 protected:
201 // Modifies event coordinates to the targeted widget contained by this widget. 194 // Modifies event coordinates to the targeted widget contained by this widget.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 gint, gint, gboolean, GtkTooltip*); 238 gint, gint, gboolean, GtkTooltip*);
246 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnScroll, GdkEventScroll*); 239 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnScroll, GdkEventScroll*);
247 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnVisibilityNotify, 240 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnVisibilityNotify,
248 GdkEventVisibility*); 241 GdkEventVisibility*);
249 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnGrabBrokeEvent, GdkEvent*); 242 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnGrabBrokeEvent, GdkEvent*);
250 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, void, OnGrabNotify, gboolean); 243 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, void, OnGrabNotify, gboolean);
251 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnDestroy); 244 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnDestroy);
252 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnShow); 245 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnShow);
253 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnMap); 246 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnMap);
254 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnHide); 247 CHROMEGTK_CALLBACK_0(NativeWidgetGtk, void, OnHide);
255 CHROMEGTK_CALLBACK_1(NativeWidgetGtk, gboolean, OnWindowStateEvent,
256 GdkEventWindowState*);
257 248
258 // Invoked when gtk grab is stolen by other GtkWidget in the same 249 // Invoked when gtk grab is stolen by other GtkWidget in the same
259 // application. 250 // application.
260 virtual void HandleGtkGrabBroke(); 251 virtual void HandleGtkGrabBroke();
261 252
262 // Invoked when X input grab is broken. This typically happen 253 // Invoked when X input grab is broken. This typically happen
263 // when a window holding grab is closed without releasing grab. 254 // when a window holding grab is closed without releasing grab.
264 virtual void HandleXGrabBroke(); 255 virtual void HandleXGrabBroke();
265 256
266 // Are we a subclass of NativeWindowGtk? 257 // Are we a subclass of NativeWindowGtk?
267 bool is_window_; 258 bool is_window_;
268 259
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
273 private: 260 private:
274 class DropObserver; 261 class DropObserver;
275 friend class DropObserver; 262 friend class DropObserver;
276 263
277 // Overridden from NativeWidget 264 // Overridden from NativeWidget
278 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 265 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
279 266
280 // Overridden from internal::InputMethodDelegate 267 // Overridden from internal::InputMethodDelegate
281 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE; 268 virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE;
282 269
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 bool painted_; 401 bool painted_;
415 402
416 scoped_ptr<InputMethod> input_method_; 403 scoped_ptr<InputMethod> input_method_;
417 404
418 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk); 405 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk);
419 }; 406 };
420 407
421 } // namespace views 408 } // namespace views
422 409
423 #endif // VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ 410 #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