Path: blob/trunk/cpp/iedriver/ActionSimulators/SendInputActionSimulator.h
2868 views
// Licensed to the Software Freedom Conservancy (SFC) under one1// or more contributor license agreements. See the NOTICE file2// distributed with this work for additional information3// regarding copyright ownership. The SFC licenses this file4// to you under the Apache License, Version 2.0 (the "License");5// you may not use this file except in compliance with the License.6// You may obtain a copy of the License at7//8// http://www.apache.org/licenses/LICENSE-2.09//10// Unless required by applicable law or agreed to in writing, software11// distributed under the License is distributed on an "AS IS" BASIS,12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13// See the License for the specific language governing permissions and14// limitations under the License.1516#ifndef WEBDRIVER_IE_SENDINPUTACTIONSIMULATOR_H_17#define WEBDRIVER_IE_SENDINPUTACTIONSIMULATOR_H_1819#include "ActionSimulator.h"2021namespace webdriver {2223class SendInputActionSimulator : public ActionSimulator {24public:25SendInputActionSimulator(void);26virtual ~SendInputActionSimulator(void);2728int SimulateActions(BrowserHandle browser_wrapper,29std::vector<INPUT> inputs,30InputState* input_state);3132private:33void GetNormalizedCoordinates(HWND window_handle,34int x,35int y,36int* normalized_x,37int* normalized_y);38unsigned long NormalizeButtons(bool is_button_swapped,39unsigned long input_flags);4041bool WaitForInputEventProcessing(int input_count);42void SendInputToBrowser(BrowserHandle browser_wrapper,43std::vector<INPUT> inputs,44int start_index,45int input_count);46};4748} // namespace webdriver4950#endif // WEBDRIVER_IE_SENDINPUTACTIONSIMULATOR_H_515253