GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Get_location.c
Go to the documentation of this file.
1 #include "driver.h"
2 #include "driverlib.h"
3 
4 int COM_Get_location_with_pointer(int *wx, int *wy, int *button)
5 {
6  int ret = 0;
7 
9  ret = (*driver->Get_with_pointer) (wx, wy, button);
10  if (*button >= 1 && *button <= 3)
11  *button = mouse_button[*button - 1];
12  }
13 
14  return ret;
15 }
16 
17 int COM_Get_location_with_line(int cx, int cy, int *wx, int *wy, int *button)
18 {
19  int ret = 0;
20 
21  if (driver->Get_with_line) {
22  ret = (*driver->Get_with_line) (cx, cy, wx, wy, button);
23  if (*button >= 1 && *button <= 3)
24  *button = mouse_button[*button - 1];
25  }
26 
27  return ret;
28 }
29 
30 int COM_Get_location_with_box(int cx, int cy, int *wx, int *wy, int *button)
31 {
32  int ret = 0;
33 
34  if (driver->Get_with_box) {
35  ret = (*driver->Get_with_box) (cx, cy, wx, wy, button);
36  if (*button >= 1 && *button <= 3)
37  *button = mouse_button[*button - 1];
38  }
39 
40  return ret;
41 }