Path: blob/trunk/cpp/iedriver/ActionSimulators/PersistentEventSimulator.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_PERSISTENTEVENTSIMULATOR_H_17#define WEBDRIVER_IE_PERSISTENTEVENTSIMULATOR_H_1819namespace webdriver {2021class PersistentEventSimulator {22public:23PersistentEventSimulator(void);24virtual ~PersistentEventSimulator(void);2526void StartPersistentEventFiring(HWND inputTo, long toX, long toY, WPARAM buttonValue);27void StopPersistentEventFiring();2829static DWORD WINAPI MouseEventFiringFunction(LPVOID lpParam);3031bool is_firing_events(void) const { return this->is_firing_events_; }32void set_is_firing_events(const bool value) { this->is_firing_events_ = value; }3334bool is_running(void) const { return this->is_running_; }35void set_is_running(const bool value) { this->is_running_ = value; }3637HWND target_window_handle(void) const { return this->target_window_handle_; }38long x_coordinate(void) const { return this->x_coordinate_; }39long y_coordinate(void) const { return this->y_coordinate_; }40WPARAM button_state(void) const { return this->button_state_; }4142private:43bool is_firing_events_;44bool is_running_;45HWND target_window_handle_;46long x_coordinate_;47long y_coordinate_;48WPARAM button_state_;4950PersistentEventSimulator* persistent_event_simulator_;51HANDLE event_firing_thread_handle_;52};5354} // namespace webdriver5556#endif // WEBDRIVER_IE_PERSISTENTEVENTSIMULATOR_H_575859