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

Side by Side Diff: chrome/browser/ui/gtk/gtk_util.h

Issue 9030029: GTK: A bunch more removal of deprecated raw GtkWidget access, focusing on GtkWidget->window (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: tony nits Created 8 years, 11 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
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 CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_UTIL_H_
6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ 6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Get the window open disposition from the state in gtk_get_current_event(). 238 // Get the window open disposition from the state in gtk_get_current_event().
239 // This is designed to be called inside a "clicked" event handler. It is an 239 // This is designed to be called inside a "clicked" event handler. It is an
240 // error to call it when gtk_get_current_event() won't return a GdkEventButton*. 240 // error to call it when gtk_get_current_event() won't return a GdkEventButton*.
241 WindowOpenDisposition DispositionForCurrentButtonPressEvent(); 241 WindowOpenDisposition DispositionForCurrentButtonPressEvent();
242 242
243 // Safely grabs all input (with X grabs and an application grab), returning true 243 // Safely grabs all input (with X grabs and an application grab), returning true
244 // for success. 244 // for success.
245 bool GrabAllInput(GtkWidget* widget); 245 bool GrabAllInput(GtkWidget* widget);
246 246
247 // Returns a rectangle that represents the widget's bounds. The rectangle it 247 // Returns a rectangle that represents the widget's bounds. The rectangle it
248 // returns is the same as widget->allocation, but anchored at (0, 0). 248 // returns is the same as gtk_widget_get_allocation, but anchored at (0, 0).
249 gfx::Rect WidgetBounds(GtkWidget* widget); 249 gfx::Rect WidgetBounds(GtkWidget* widget);
250 250
251 // Update the timestamp for the given window. This is usually the time of the 251 // Update the timestamp for the given window. This is usually the time of the
252 // last user event, but on rare occasions we wish to update it despite not 252 // last user event, but on rare occasions we wish to update it despite not
253 // receiving a user event. 253 // receiving a user event.
254 void SetWMLastUserActionTime(GtkWindow* window); 254 void SetWMLastUserActionTime(GtkWindow* window);
255 255
256 // The current system time, using the format expected by the X server, but not 256 // The current system time, using the format expected by the X server, but not
257 // retrieved from the X server. NOTE: You should almost never need to use this 257 // retrieved from the X server. NOTE: You should almost never need to use this
258 // function, instead using the timestamp from the latest GDK event. 258 // function, instead using the timestamp from the latest GDK event.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 void ApplyMessageDialogQuirks(GtkWidget* dialog); 322 void ApplyMessageDialogQuirks(GtkWidget* dialog);
323 323
324 // Performs Cut/Copy/Paste operation on the |window|. 324 // Performs Cut/Copy/Paste operation on the |window|.
325 void DoCut(BrowserWindow* window); 325 void DoCut(BrowserWindow* window);
326 void DoCopy(BrowserWindow* window); 326 void DoCopy(BrowserWindow* window);
327 void DoPaste(BrowserWindow* window); 327 void DoPaste(BrowserWindow* window);
328 328
329 } // namespace gtk_util 329 } // namespace gtk_util
330 330
331 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ 331 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_custom_menu_item.cc ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698