OLD | NEW |
| (Empty) |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include <gtk/gtk.h> | |
6 #include <gdk/gdkx.h> | |
7 | |
8 #include "webkit/tools/test_shell/test_shell_x11.h" | |
9 | |
10 namespace test_shell_x11 { | |
11 | |
12 Display* GtkWidgetGetDisplay(GtkWidget* widget) { | |
13 GdkDisplay* gdk_display = gtk_widget_get_display(widget); | |
14 return gdk_x11_display_get_xdisplay(gdk_display); | |
15 } | |
16 | |
17 int GtkWidgetGetScreenNum(GtkWidget* widget) { | |
18 GdkDisplay* gdk_display = gtk_widget_get_display(widget); | |
19 GdkScreen* gdk_screen = gdk_display_get_default_screen(gdk_display); | |
20 return gdk_x11_screen_get_screen_number(gdk_screen); | |
21 } | |
22 | |
23 } // namespace test_shell_x11 | |
OLD | NEW |