00001 /* 00002 * Copyright © 2008 Dennis Kasprzyk 00003 * 00004 * Permission to use, copy, modify, distribute, and sell this software 00005 * and its documentation for any purpose is hereby granted without 00006 * fee, provided that the above copyright notice appear in all copies 00007 * and that both that copyright notice and this permission notice 00008 * appear in supporting documentation, and that the name of 00009 * Dennis Kasprzyk not be used in advertising or publicity pertaining to 00010 * distribution of the software without specific, written prior permission. 00011 * Dennis Kasprzyk makes no representations about the suitability of this 00012 * software for any purpose. It is provided "as is" without express or 00013 * implied warranty. 00014 * 00015 * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 00016 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN 00017 * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR 00018 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00019 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00020 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00021 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00022 * 00023 * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org> 00024 */ 00025 00026 #ifndef _COMPSIZE_H 00027 #define _COMPSIZE_H 00028 00029 #include <vector> 00030 #include <list> 00031 00036 class CompSize { 00037 00038 public: 00039 CompSize (); 00040 CompSize (int, int); 00041 00042 int width () const; 00043 int height () const; 00044 00045 void setWidth (int); 00046 void setHeight (int); 00047 00048 typedef std::vector<CompSize> vector; 00049 typedef std::vector<CompSize *> ptrVector; 00050 typedef std::list<CompSize> list; 00051 typedef std::list<CompSize *> ptrList; 00052 00053 private: 00054 int mWidth, mHeight; 00055 }; 00056 00057 inline int 00058 CompSize::width () const 00059 { 00060 return mWidth; 00061 } 00062 00063 inline int 00064 CompSize::height () const 00065 { 00066 return mHeight; 00067 } 00068 00069 #endif