15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef UI_BASE_TOUCH_TOUCH_DEVICE_H_ 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define UI_BASE_TOUCH_TOUCH_DEVICE_H_ 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "ui/base/ui_base_export.h" 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 10a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#if defined(OS_ANDROID) 11a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include <jni.h> 12a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#endif 13a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 15a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)namespace ui { 161e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Returns true if a touch device is available. 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)UI_BASE_EXPORT bool IsTouchDevicePresent(); 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 201e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Returns the maximum number of simultaneous touch contacts supported 211e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// by the device. In the case of devices with multiple digitizers (e.g. 221e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// multiple touchscreens), the value MUST be the maximum of the set of 231e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// maximum supported contacts by each individual digitizer. 241e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// For example, suppose a device has 3 touchscreens, which support 2, 5, 251e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// and 10 simultaneous touch contacts, respectively. This returns 10. 261e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// http://www.w3.org/TR/pointerevents/#widl-Navigator-maxTouchPoints 275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)UI_BASE_EXPORT int MaxTouchPoints(); 281e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 29a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#if defined(OS_ANDROID) 30a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)bool RegisterTouchDeviceAndroid(JNIEnv* env); 31a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#endif 32a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace ui 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // UI_BASE_TOUCH_TOUCH_DEVICE_H_ 36