12a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Copyright (c) 2013 The Chromium Authors. All rights reserved.
22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// found in the LICENSE file.
42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "ui/base/win/touch_input.h"
62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace ui {
82a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)BOOL GetTouchInputInfoWrapper(HTOUCHINPUT handle,
105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                              UINT count,
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                              PTOUCHINPUT pointer,
125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                              int size) {
132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  typedef BOOL(WINAPI *GetTouchInputInfoPtr)(HTOUCHINPUT, UINT,
142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                             PTOUCHINPUT, int);
152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  static GetTouchInputInfoPtr get_touch_input_info_func =
162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      reinterpret_cast<GetTouchInputInfoPtr>(
172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          GetProcAddress(GetModuleHandleA("user32.dll"), "GetTouchInputInfo"));
182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  if (get_touch_input_info_func)
192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    return get_touch_input_info_func(handle, count, pointer, size);
202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  return FALSE;
212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}  // namespace ui
24