comparison src/gui_w48.c @ 87:014ba200db86

updated for version 7.0035
author vimboss
date Sat, 08 Jan 2005 21:45:39 +0000
parents af1bcb9a13c0
children e1a8191c6768
comparison
equal deleted inserted replaced
86:8173ec1e9f1f 87:014ba200db86
2409 DestroyWindow(sb->id); 2409 DestroyWindow(sb->id);
2410 } 2410 }
2411 #endif 2411 #endif
2412 2412
2413 /* 2413 /*
2414 * Get current x mouse coordinate in text window. 2414 * Get current mouse coordinates in text window.
2415 * Return -1 when unknown. 2415 */
2416 */ 2416 void
2417 int 2417 gui_mch_get_mouse_(int *x, int *y)
2418 gui_mch_get_mouse_x(void)
2419 { 2418 {
2420 RECT rct; 2419 RECT rct;
2421 POINT mp; 2420 POINT mp;
2422 2421
2423 (void)GetWindowRect(s_textArea, &rct); 2422 (void)GetWindowRect(s_textArea, &rct);
2424 (void)GetCursorPos((LPPOINT)&mp); 2423 (void)GetCursorPos((LPPOINT)&mp);
2425 return (int)(mp.x - rct.left); 2424 *x = (int)(mp.x - rct.left);
2426 } 2425 *y = (int)(mp.y - rct.top);
2427
2428 /*
2429 * Get current y mouse coordinate in text window.
2430 * Return -1 when unknown.
2431 */
2432 int
2433 gui_mch_get_mouse_y(void)
2434 {
2435 RECT rct;
2436 POINT mp;
2437
2438 (void)GetWindowRect(s_textArea, &rct);
2439 (void)GetCursorPos((LPPOINT)&mp);
2440 return (int)(mp.y - rct.top);
2441 } 2426 }
2442 2427
2443 /* 2428 /*
2444 * Move mouse pointer to character at (x, y). 2429 * Move mouse pointer to character at (x, y).
2445 */ 2430 */