Initial import of Lunapaint from
[AROS-Contrib.git] / gfx / lunapaint / src / common.h
blobcc82e8f0550a227f7d91dc5fd9ed5202508e01cc
1 /****************************************************************************
2 * *
3 * common.h -- Lunapaint, *
4 * http://developer.berlios.de/projects/lunapaintami/ *
5 * Copyright (C) 2006, 2007, Hogne Titlestad <hogga@sub-ether.org> *
6 * Copyright (C) 2009-2011 LunaPaint Development Team *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the Free Software Foundation, *
20 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21 * *
22 ****************************************************************************/
24 #ifndef _common_h_
25 #define _common_h_
27 #define LUNA_MOUSEDOWN 1001
28 #define LUNA_TOOL_BRUSH 1
29 #define LUNA_TOOL_FILL 2
30 #define LUNA_TOOL_LINE 3
31 #define LUNA_TOOL_RECTANGLE 4
32 #define LUNA_TOOL_CLIPBRUSH 5
33 #define LUNA_TOOL_CIRCLE 6
34 #define LUNA_TOOL_COLORPICKER 7
35 #define LUNA_PAINTMODE_NORMAL 1
36 #define LUNA_PAINTMODE_ERASE 2
37 #define LUNA_PAINTMODE_UNERASE 3
38 #define LUNA_PAINTMODE_BLUR 4
39 #define LUNA_PAINTMODE_SMUDGE 5
40 #define LUNA_PAINTMODE_LIGHTEN 6
41 #define LUNA_PAINTMODE_DARKEN 7
42 #define LUNA_PAINTMODE_COLORIZE 8
43 #define LUNA_PAINTMODE_COLOR 9
45 #define LUNA_COLORMODE_64BIT 1
46 #define LUNA_COLORMODE_SNAP 2
48 #include <stdio.h>
49 #include <stdlib.h>
50 #include "core/definitions.h"
52 #ifdef __AROS__
53 #include "app/parts.h"
54 #endif
56 struct Affrect
58 int x;
59 int y;
60 int w;
61 int h;
64 struct WindowList* globalActiveWindow;
65 struct oCanvas* globalActiveCanvas;
66 int globalWindowIncrement;
67 int globalEvents;
68 int globalCurrentTool;
69 int globalGrid; // Using grid?
70 int globalCurrentGrid; // Grid size
72 int eMouseX; // event mouse coordinate
73 int eMouseY; // --||--
74 double cMouseX; // Registered coordinates..
75 double cMouseY; // --||--
76 double dMouseX; // Coordinate for drawing
77 double dMouseY; // --||--
78 double pMouseX; // Prev coordinate for drawing
79 double pMouseY; // --||--
81 BOOL MouseButtonL;
82 BOOL MouseButtonR;
83 BOOL globalAntialiasing;
84 BOOL globalFeather;
85 int globalBrushMode; // Normal generated or clipbrush
86 int globalColorMode; // How to use colors
87 UWORD lastKeyPressed;
88 BOOL MouseHasMoved;
90 #endif