Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/cpp/iedriver/ActionSimulators/SendInputActionSimulator.h
2868 views
1
// Licensed to the Software Freedom Conservancy (SFC) under one
2
// or more contributor license agreements. See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership. The SFC licenses this file
5
// to you under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
17
#ifndef WEBDRIVER_IE_SENDINPUTACTIONSIMULATOR_H_
18
#define WEBDRIVER_IE_SENDINPUTACTIONSIMULATOR_H_
19
20
#include "ActionSimulator.h"
21
22
namespace webdriver {
23
24
class SendInputActionSimulator : public ActionSimulator {
25
public:
26
SendInputActionSimulator(void);
27
virtual ~SendInputActionSimulator(void);
28
29
int SimulateActions(BrowserHandle browser_wrapper,
30
std::vector<INPUT> inputs,
31
InputState* input_state);
32
33
private:
34
void GetNormalizedCoordinates(HWND window_handle,
35
int x,
36
int y,
37
int* normalized_x,
38
int* normalized_y);
39
unsigned long NormalizeButtons(bool is_button_swapped,
40
unsigned long input_flags);
41
42
bool WaitForInputEventProcessing(int input_count);
43
void SendInputToBrowser(BrowserHandle browser_wrapper,
44
std::vector<INPUT> inputs,
45
int start_index,
46
int input_count);
47
};
48
49
} // namespace webdriver
50
51
#endif // WEBDRIVER_IE_SENDINPUTACTIONSIMULATOR_H_
52
53