Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/cpp/iedriver/ActionSimulators/PersistentEventSimulator.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_PERSISTENTEVENTSIMULATOR_H_
18
#define WEBDRIVER_IE_PERSISTENTEVENTSIMULATOR_H_
19
20
namespace webdriver {
21
22
class PersistentEventSimulator {
23
public:
24
PersistentEventSimulator(void);
25
virtual ~PersistentEventSimulator(void);
26
27
void StartPersistentEventFiring(HWND inputTo, long toX, long toY, WPARAM buttonValue);
28
void StopPersistentEventFiring();
29
30
static DWORD WINAPI MouseEventFiringFunction(LPVOID lpParam);
31
32
bool is_firing_events(void) const { return this->is_firing_events_; }
33
void set_is_firing_events(const bool value) { this->is_firing_events_ = value; }
34
35
bool is_running(void) const { return this->is_running_; }
36
void set_is_running(const bool value) { this->is_running_ = value; }
37
38
HWND target_window_handle(void) const { return this->target_window_handle_; }
39
long x_coordinate(void) const { return this->x_coordinate_; }
40
long y_coordinate(void) const { return this->y_coordinate_; }
41
WPARAM button_state(void) const { return this->button_state_; }
42
43
private:
44
bool is_firing_events_;
45
bool is_running_;
46
HWND target_window_handle_;
47
long x_coordinate_;
48
long y_coordinate_;
49
WPARAM button_state_;
50
51
PersistentEventSimulator* persistent_event_simulator_;
52
HANDLE event_firing_thread_handle_;
53
};
54
55
} // namespace webdriver
56
57
#endif // WEBDRIVER_IE_PERSISTENTEVENTSIMULATOR_H_
58
59