]> git.sur5r.net Git - glabels/blob - src/view-line.h
Imported Upstream version 3.4.0
[glabels] / src / view-line.h
1 /*
2  *  view-line.h
3  *  Copyright (C) 2001-2009  Jim Evins <evins@snaught.com>.
4  *
5  *  This file is part of gLabels.
6  *
7  *  gLabels is free software: you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation, either version 3 of the License, or
10  *  (at your option) any later version.
11  *
12  *  gLabels is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with gLabels.  If not, see <http://www.gnu.org/licenses/>.
19  */
20
21 #ifndef __VIEW_LINE_H__
22 #define __VIEW_LINE_H__
23
24 #include "view.h"
25
26
27 G_BEGIN_DECLS
28
29 /* Macro for value with sign from first argument and absolute value from second argument */
30 /* It is used in diagonal lines calculations */
31 #define SIGN_AND_VALUE(var_for_sign, var_for_val) (var_for_sign > 0 ? (var_for_val < 0 ? -var_for_val : var_for_val) : (var_for_val < 0 ? var_for_val : -var_for_val))
32
33 /* cursor for creating line objects */
34 GdkCursor *gl_view_line_get_create_cursor           (void);
35
36 /* Object creation handlers. */
37 void       gl_view_line_create_button_press_event   (glView  *view,
38                                                      gdouble  x,
39                                                      gdouble  y);
40
41 void       gl_view_line_create_motion_event         (glView  *view,
42                                                      gdouble  x,
43                                                      gdouble  y,
44                                                      gboolean fixed_angle);
45
46 void       gl_view_line_create_button_release_event (glView  *view,
47                                                      gdouble  x,
48                                                      gdouble  y,
49                                                      gboolean fixed_angle);
50
51
52 G_END_DECLS
53
54 #endif /* __VIEW_LINE_H__ */
55
56
57
58 /*
59  * Local Variables:       -- emacs
60  * mode: C                -- emacs
61  * c-basic-offset: 8      -- emacs
62  * tab-width: 8           -- emacs
63  * indent-tabs-mode: nil  -- emacs
64  * End:                   -- emacs
65  */