1 /****************************************************************************
3 * layers.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 *
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. *
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. *
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. *
22 ****************************************************************************/
30 #include "aros/aros.h"
33 #include <exec/types.h>
34 #include <libraries/mui.h>
35 #include <cybergraphx/cybergraphics.h>
37 #include <proto/utility.h>
38 #include <proto/exec.h>
39 #include <proto/intuition.h>
40 #include <proto/gadtools.h>
41 #include <proto/muimaster.h>
42 #include <proto/graphics.h>
43 #include <proto/cybergraphics.h>
44 #include <clib/alib_protos.h>
48 #include "aros/aros.h"
55 extern Object
*WindowLayers
;
56 extern Object
*WidgetLayers
;
57 extern Object
*ScrollLayers
;
58 extern Object
*BtnAddLayer
;
59 extern Object
*BtnDelLayer
;
60 extern Object
*BtnSwapLayer
;
61 extern Object
*BtnMergeLayer
;
62 extern Object
*BtnCopyLayer
;
63 extern Object
*LayerOpacity
;
64 extern Object
*LayerName
;
65 extern Object
*LayerVisible
;
66 extern Object
*LayerControlGroup
;
67 extern Object
*LayerOpacityValue
;
69 extern unsigned int *LayersWidgetTmpBuf
;
70 extern unsigned int layersWidgetWidth
;
71 extern unsigned int layersWidgetHeight
;
72 extern int layersLastScrollPos
;
73 extern int layersUpdateX
, layersUpdateY
, layersUpdateW
, layersUpdateH
;
75 extern struct Hook changeOpacityHook
;
76 extern struct Hook acknowledgeOpacity
;
77 extern struct Hook acknowledgeLayName
;
78 extern struct Hook changeVisibilityHook
;
79 extern struct oCanvas
* lastDrawnCanvas
;
80 extern BOOL forceLayerRedraw
;
83 This function initializes the layer window and the widget
85 void Init_LayersWindow ( );
88 This function returns the dimensions of the layer widget
90 IPTR
layerMinMax ( Class
*CLASS
, Object
*self
, struct MUIP_AskMinMax
*message
);
93 Blank box on the layer widget
95 void layerRenderBlank ( );
98 This function renders the layer widget
100 BOOL
layerRender ( Class
*CLASS
, Object
*self
);
103 Render OS friendly text to the layer preview
105 void RenderLayerNames ( int x
, int y
, int w
, int h
);
108 This function handles input on the layer widget
110 IPTR
layerHandleInput ( Class
*CLASS
, Object
*self
, struct MUIP_HandleInput
*msg
);
113 Repaint the actual widget
115 void layersRepaintWindow ( Class
*CLASS
, Object
*self
);
120 void Exit_LayersWindow ( );