comparison src/gui_riscos.c @ 87:014ba200db86

updated for version 7.0035
author vimboss
date Sat, 08 Jan 2005 21:45:39 +0000
parents f6e33184ccc3
children 2463194c8cdd
comparison
equal deleted inserted replaced
86:8173ec1e9f1f 87:014ba200db86
3012 { 3012 {
3013 /* Always use default RO colour scheme. */ 3013 /* Always use default RO colour scheme. */
3014 } 3014 }
3015 3015
3016 /* 3016 /*
3017 * Get current x mouse coordinate in text window. 3017 * Get current mouse coordinates in text window.
3018 * Note: (0,0) is the bottom left corner, positive y is UP. 3018 * Note: (0,0) is the bottom left corner, positive y is UP.
3019 * Return -1 when unknown. 3019 */
3020 */ 3020 void
3021 int 3021 gui_mch_getmouse(x, y)
3022 gui_mch_get_mouse_x() 3022 int *x;
3023 int *y;
3023 { 3024 {
3024 int left; 3025 int left;
3026 int top;
3025 int block[10]; 3027 int block[10];
3026 3028
3027 block[0] = gui.window_handle; 3029 block[0] = gui.window_handle;
3028 swi(Wimp_GetWindowState, 0, block); 3030 swi(Wimp_GetWindowState, 0, block);
3029 left = block[1]; 3031 left = block[1];
3032 top = block[4];
3030 3033
3031 swi(Wimp_GetPointerInfo, 0, block); 3034 swi(Wimp_GetPointerInfo, 0, block);
3032 return block[0] - left; 3035 *x = block[0] - left;
3033 } 3036 *y = top - block[1];
3034
3035 /*
3036 * Get current y mouse coordinate in text window.
3037 * Return -1 when unknown.
3038 */
3039 int
3040 gui_mch_get_mouse_y()
3041 {
3042 int top;
3043 int block[10];
3044
3045 block[0] = gui.window_handle;
3046 swi(Wimp_GetWindowState, 0, block);
3047 top = block[4];
3048
3049 swi(Wimp_GetPointerInfo, 0, block);
3050 return top - block[1];
3051 } 3037 }
3052 3038
3053 /* MouseTo(x, y) */ 3039 /* MouseTo(x, y) */
3054 void 3040 void
3055 gui_mch_setmouse(x, y) 3041 gui_mch_setmouse(x, y)