Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / examples / dtdnd / icon.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: icon.h /main/3 1995/10/27 10:39:18 rswiston $ */
24 /*****************************************************************************
25  *****************************************************************************
26  **
27  **   File:         icon.h
28  **
29  **   Description:  Header for icon handling portion of CDE Drag & Drop Demo.
30  **
31  **  (c) Copyright 1993, 1994 Hewlett-Packard Company
32  **  (c) Copyright 1993, 1994 International Business Machines Corp.
33  **  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
34  **  (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
35  **      Novell, Inc.
36  **
37  ****************************************************************************
38  ************************************<+>*************************************/
39
40 #include <sys/param.h>
41 #include <stdio.h>
42
43 /*
44  * Icon Information Structure
45  */
46
47 typedef struct _IconInfo {
48         XRectangle      icon;
49         char            *name;
50         void            *data;
51         int             dataCount;
52         Pixmap          bitmap;
53         Pixmap          mask;
54         Widget          dragIcon;
55         int             type;
56         struct _IconInfo *next;
57         struct _IconInfo *prev;
58 } IconInfo;
59
60 /*
61  * Icon Typedefs
62  */
63
64 typedef enum {
65         IconBitmap,
66         IconMask
67 } IconBitmapPart;
68
69 typedef enum {
70         IconByFile,
71         IconByData,
72         IconByType
73 } IconTyping;
74
75 /*
76  * Public Icon Handling Function Declarations
77  */
78
79 void            IconCreateDouble(Widget, IconInfo*, int, int, IconInfo*,
80                         short, short);
81 void            IconDelete(Widget, IconInfo*);
82 void            IconDraw(Widget, IconInfo*);
83 void            IconInitialize(Widget, IconInfo*, short, short, void*, int, 
84                         char*, IconTyping);
85 IconInfo        *IconNew();
86