pleyo.com

/src/trunk2/BAL/Interfaces/graphics/Icon.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this library; see the file COPYING.LIB.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  *
00019  */
00020 
00021 #ifndef Icon_h
00022 #define Icon_h
00023 
00024 #include "Shared.h"
00025 #include <wtf/Forward.h>
00026 
00027 #if PLATFORM(MAC)
00028 #include <wtf/RetainPtr.h>
00029 #ifdef __OBJC__
00030 @class NSImage;
00031 #else
00032 class NSImage;
00033 #endif
00034 #elif PLATFORM(WIN)
00035 typedef struct HICON__* HICON;
00036 #elif PLATFORM(QT)
00037 #include <QIcon>
00038 #endif
00039 
00040 namespace WebCore {
00041 
00042 class GraphicsContext;
00043 class IntRect;
00044 class String;
00045     
00046 class Icon : public Shared<Icon> {
00047 public:
00048     Icon();
00049     ~Icon();
00050     
00051     static PassRefPtr<Icon> newIconForFile(const String& filename);
00052 
00053     void paint(GraphicsContext*, const IntRect&);
00054 
00055 #if PLATFORM(WIN)
00056     Icon(HICON);
00057 #endif
00058 
00059 private:
00060 #if PLATFORM(MAC)
00061     Icon(NSImage*);
00062 #endif
00063 #if PLATFORM(MAC)
00064     RetainPtr<NSImage> m_nsImage;
00065 #elif PLATFORM(WIN)
00066     HICON m_hIcon;
00067 #elif PLATFORM(QT)
00068     QIcon m_icon;
00069 #endif
00070 };
00071 
00072 }
00073 
00074 #endif

Generated on Wed Nov 21 20:04:17 2007 for Origyn Web Browser by Doxygen 1.5.3

pleyo.com
pleyo.com