| 246 | extern "C" |
| 247 | { |
| 248 | WD_RESULT clickAt(WINDOW_HANDLE windowHandle, long x, long y, long button) |
| 249 | { |
| 250 | init_logging(); |
| 251 | |
| 252 | LOG(DEBUG) << "---------- starting clickAt: " << windowHandle << "---------"; |
| 253 | GdkDrawable* hwnd = (GdkDrawable*) windowHandle; |
| 254 | |
| 255 | if (button == 2) { |
| 256 | // the right mouse button has the value 3 in GDK |
| 257 | button = 3; |
| 258 | } else { |
| 259 | // the left mouse button is default |
| 260 | button = 1; |
| 261 | } |
| 262 | |
| 263 | MouseEventsHandler mousep_handler(hwnd); |
| 264 | |
| 265 | list<GdkEvent*> events_for_mouse = mousep_handler.CreateEventsForMouseClick(x, y, button); |
| 266 | const int timePerEvent = 10 /* ms */; |
| 267 | submit_and_free_events_list(events_for_mouse, timePerEvent); |
| 268 | |
| 269 | |
| 270 | if (gLatestEventTime < mousep_handler.get_last_event_time()) { |
| 271 | gLatestEventTime = mousep_handler.get_last_event_time(); |
| 272 | } |
| 273 | |
| 274 | LOG(DEBUG) << "---------- Ending clickAt ----------"; |
| 275 | return 0; |
| 276 | } |
| 277 | |
| 278 | WD_RESULT doubleClickAt(WINDOW_HANDLE windowHandle, long x, long y) |
| 279 | { |
nothing calls this directly
no test coverage detected