MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / mouseDownAt

Function mouseDownAt

cpp/webdriver-interactions/interactions_linux_mouse.cpp:357–384  ·  view source on GitHub ↗

* mouseDownAt */

Source from the content-addressed store, hash-verified

355 * mouseDownAt
356 */
357WD_RESULT mouseDownAt(WINDOW_HANDLE windowHandle, long x, long y, long button)
358{
359 init_logging();
360
361 const int timePerEvent = 10 /* ms */;
362
363 LOG(DEBUG) << "---------- starting mouseDownAt: " << windowHandle << "---------";
364 GdkDrawable* hwnd = (GdkDrawable*) windowHandle;
365
366 MouseEventsHandler mousep_handler(hwnd);
367
368 struct timespec sleep_time;
369 sleep_time.tv_sec = timePerEvent / 1000;
370 sleep_time.tv_nsec = (timePerEvent % 1000) * 1000000;
371 LOG(DEBUG) << "Sleep time is " << sleep_time.tv_sec << " seconds and " <<
372 sleep_time.tv_nsec << " nanoseconds.";
373
374 list<GdkEvent*> events_for_mouse = mousep_handler.CreateEventsForMouseDown(x, y, button);
375 submit_and_free_events_list(events_for_mouse, timePerEvent);
376
377
378 if (gLatestEventTime < mousep_handler.get_last_event_time()) {
379 gLatestEventTime = mousep_handler.get_last_event_time();
380 }
381
382 LOG(DEBUG) << "---------- Ending mouseDownAt ----------";
383 return 0;
384}
385
386/**
387 * mouseUpAt

Callers

nothing calls this directly

Calls 5

init_loggingFunction · 0.85
LOGClass · 0.70
get_last_event_timeMethod · 0.45

Tested by

no test coverage detected