GRASS Programmer's Manual  6.4.2(2012)
Get_location.c
Go to the documentation of this file.
00001 #include "driver.h"
00002 #include "driverlib.h"
00003 
00004 int COM_Get_location_with_pointer(int *wx, int *wy, int *button)
00005 {
00006     int ret = 0;
00007 
00008     if (driver->Get_with_pointer) {
00009         ret = (*driver->Get_with_pointer) (wx, wy, button);
00010         if (*button >= 1 && *button <= 3)
00011             *button = mouse_button[*button - 1];
00012     }
00013 
00014     return ret;
00015 }
00016 
00017 int COM_Get_location_with_line(int cx, int cy, int *wx, int *wy, int *button)
00018 {
00019     int ret = 0;
00020 
00021     if (driver->Get_with_line) {
00022         ret = (*driver->Get_with_line) (cx, cy, wx, wy, button);
00023         if (*button >= 1 && *button <= 3)
00024             *button = mouse_button[*button - 1];
00025     }
00026 
00027     return ret;
00028 }
00029 
00030 int COM_Get_location_with_box(int cx, int cy, int *wx, int *wy, int *button)
00031 {
00032     int ret = 0;
00033 
00034     if (driver->Get_with_box) {
00035         ret = (*driver->Get_with_box) (cx, cy, wx, wy, button);
00036         if (*button >= 1 && *button <= 3)
00037             *button = mouse_button[*button - 1];
00038     }
00039 
00040     return ret;
00041 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines