~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to imagery/i.ortho.photo/photo.2target/mouse.c

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <grass/raster.h>
2
 
#include "globals.h"
3
 
 
4
 
static int first = 1;
5
 
static int curx, cury;
6
 
 
7
 
int Mouse_pointer(int *x, int *y, int *button)
8
 
{
9
 
    if (first) {
10
 
        curx = (SCREEN_LEFT + SCREEN_RIGHT) / 2;
11
 
        cury = (SCREEN_TOP + SCREEN_BOTTOM) / 2;
12
 
        first = 0;
13
 
    }
14
 
    R_get_location_with_pointer(&curx, &cury, button);
15
 
    *x = curx;
16
 
    *y = cury;
17
 
 
18
 
#ifdef BUTTON3
19
 
    if (*button == 3)
20
 
        quit(0);
21
 
#endif
22
 
 
23
 
    return 0;
24
 
}
25
 
 
26
 
int Mouse_box_anchored(int x1, int y1, int *x2, int *y2, int *button)
27
 
{
28
 
    R_get_location_with_box(x1, y1, x2, y2, button);
29
 
    curx = *x2;
30
 
    cury = *y2;
31
 
    first = 0;
32
 
 
33
 
#ifdef BUTTON3
34
 
    if (*button == 3)
35
 
        quit(0);
36
 
#endif
37
 
 
38
 
    return 0;
39
 
}
40
 
 
41
 
int Get_mouse_xy(int *x, int *y)
42
 
{
43
 
    *x = curx;
44
 
    *y = cury;
45
 
 
46
 
    return 0;
47
 
}
48
 
 
49
 
int Set_mouse_xy(int x, int y)
50
 
{
51
 
    first = 0;
52
 
    curx = x;
53
 
    cury = y;
54
 
 
55
 
    return 0;
56
 
}