1 /*
 2  * Copyright �� 2008 Dennis Kasprzyk
 3  * Copyright �� 2007 Novell, Inc.
 4  *
 5  * Permission to use, copy, modify, distribute, and sell this software
 6  * and its documentation for any purpose is hereby granted without
 7  * fee, provided that the above copyright notice appear in all copies
 8  * and that both that copyright notice and this permission notice
 9  * appear in supporting documentation, and that the name of
10  * Dennis Kasprzyk not be used in advertising or publicity pertaining to
11  * distribution of the software without specific, written prior permission.
12  * Dennis Kasprzyk makes no representations about the suitability of this
13  * software for any purpose. It is provided "as is" without express or
14  * implied warranty.
15  *
16  * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
18  * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
20  * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
21  * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
22  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23  *
24  * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
25  *          David Reveman <davidr@novell.com>
26  */
27 
28 #ifndef _COMPICON_H
29 #define _COMPICON_H
30 
31 #include <core/size.h>
32 
33 #include <boost/noncopyable.hpp>
34 /**
35  * Wraps an application icon pixel map and it's meta information (such as dimensions)
36  */
CID 10882 - MISSING_COPY
Class "CompIcon" owns resources that are managed in its constructor and destructor but has no user-written copy constructor.
37 class CompIcon : boost::noncopyable {
38     public:
39 	CompIcon (unsigned width, unsigned int height);
40 	~CompIcon ();
41 	
42 	int width () const { return mSize.width(); }
43 	int height () const { return mSize.height(); }
44 	operator CompSize const&() const { return mSize; }
45 
46 	/**
47 	 * Gets a pointer to the pixel data for this icon.
48 	 */
49 	unsigned char* data ();
50 
51     private:
52 	CompSize mSize;
53 	unsigned char *mData;
54 };
55 
56 #endif