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.
5 #include "views/view.h"
9 #include "base/logging.h"
14 int View::GetDoubleClickTimeMS() {
15 GdkDisplay
* display
= gdk_display_get_default();
16 return display
? display
->double_click_time
: 500;
19 ViewAccessibilityWrapper
* View::GetViewAccessibilityWrapper() {
24 int View::GetHorizontalDragThreshold() {
25 static bool determined_threshold
= false;
26 static int drag_threshold
= 8;
27 if (determined_threshold
)
28 return drag_threshold
;
29 determined_threshold
= true;
30 GtkSettings
* settings
= gtk_settings_get_default();
32 return drag_threshold
;
34 g_object_get(G_OBJECT(settings
), "gtk-dnd-drag-threshold", &value
, NULL
);
36 drag_threshold
= value
;
37 return drag_threshold
;
40 int View::GetVerticalDragThreshold() {
41 // Vertical and horizontal drag threshold are the same in Gtk.
42 return GetHorizontalDragThreshold();