This source file includes following definitions.
- GetTopLevel
- GetParent
- IsWindowActive
- ActivateWindow
- IsVisible
#include "chrome/browser/platform_util.h"
#include <gtk/gtk.h>
namespace platform_util {
gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
GtkWidget* toplevel = gtk_widget_get_ancestor(view, GTK_TYPE_WINDOW);
return GTK_IS_WINDOW(toplevel) ? GTK_WINDOW(toplevel) : NULL;
}
gfx::NativeView GetParent(gfx::NativeView view) {
return gtk_widget_get_parent(view);
}
bool IsWindowActive(gfx::NativeWindow window) {
return gtk_window_is_active(window);
}
void ActivateWindow(gfx::NativeWindow window) {
gtk_window_present(window);
}
bool IsVisible(gfx::NativeView view) {
return gtk_widget_get_visible(view);
}
}