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

« back to all changes in this revision

Viewing changes to lib/raster/rem_get.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/config.h>
2
 
 
3
 
#ifdef HAVE_SOCKET
4
 
 
5
 
#include <grass/gis.h>
6
 
#include <grass/raster.h>
7
 
#include <grass/graphics.h>
8
 
 
9
 
#include "transport.h"
10
 
 
11
 
/*!
12
 
 * \brief get mouse location using a box
13
 
 *
14
 
 * Identical to <i>R_get_location_with_line</i> except a rubber-band box is
15
 
 * used instead of a rubber-band line.
16
 
 * <b>button</b> is set to: 1 - left, 2 - middle, 3 - right
17
 
 *
18
 
 *  \param cx
19
 
 *  \param cy
20
 
 *  \param wx
21
 
 *  \param wy
22
 
 *  \param button
23
 
 *  \return ~
24
 
 */
25
 
 
26
 
void REM_get_location_with_box(int cx, int cy, int *wx, int *wy, int *button)
27
 
{
28
 
    _send_ident(GET_LOCATION_WITH_BOX);
29
 
    _send_int(&cx);
30
 
    _send_int(&cy);
31
 
    _send_int(wx);
32
 
    _send_int(wy);
33
 
    _get_int(wx);
34
 
    _get_int(wy);
35
 
    _get_int(button);
36
 
}
37
 
 
38
 
/*!
39
 
 * \brief get mouse location using a line
40
 
 *
41
 
 * Similar to <i>R_get_location_with_pointer</i> except the pointer is
42
 
 * replaced by a line which has one end fixed at the coordinate identified
43
 
 * by the <b>x,y</b> values. The other end of the line is initialized at the
44
 
 * coordinate identified by the <b>nx,ny</b> pointers. This end then tracks
45
 
 * the mouse until a button is pressed. The mouse button (1 for left, 2 for
46
 
 * middle, and 3 for right) is returned in the <b>button</b> pointer.
47
 
 *
48
 
 *  \param cx
49
 
 *  \param cy
50
 
 *  \param wx
51
 
 *  \param wy
52
 
 *  \param button
53
 
 *  \return ~
54
 
 */
55
 
 
56
 
void REM_get_location_with_line(int cx, int cy, int *wx, int *wy, int *button)
57
 
{
58
 
    _send_ident(GET_LOCATION_WITH_LINE);
59
 
    _send_int(&cx);
60
 
    _send_int(&cy);
61
 
    _send_int(wx);
62
 
    _send_int(wy);
63
 
    _get_int(wx);
64
 
    _get_int(wy);
65
 
    _get_int(button);
66
 
}
67
 
 
68
 
/*!
69
 
 * \brief get mouse location using pointer
70
 
 *
71
 
 * A cursor is put on the screen at the location specified by the coordinate
72
 
 * found at the <b>wx,wy</b> pointers. This cursor tracks the mouse (or
73
 
 * other pointing device) until one of three mouse buttons are pressed. Upon
74
 
 * pressing, the cursor is removed from the screen, the current mouse
75
 
 * coordinates are returned by the <b>wx</b> and <b>wy</b> pointers, and the
76
 
 * mouse button (1 for left, 2 for middle, and 3 for right) is returned in
77
 
 * the <b>button</b> pointer.
78
 
 *
79
 
 *  \param wx
80
 
 *  \param wy
81
 
 *  \param button
82
 
 *  \return ~
83
 
 */
84
 
 
85
 
void REM_get_location_with_pointer(int *wx, int *wy, int *button)
86
 
{
87
 
    *button = 0;                /* ?, how button = -1 is used (see driver) */
88
 
 
89
 
    _send_ident(GET_LOCATION_WITH_POINTER);
90
 
    _send_int(wx);
91
 
    _send_int(wy);
92
 
    _send_int(button);
93
 
    _get_int(wx);
94
 
    _get_int(wy);
95
 
    _get_int(button);
96
 
}
97
 
 
98
 
#endif /* HAVE_SOCKET */