pleyo.com

/src/trunk2/BAL/Configuration/BALConfiguration.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2007 Pleyo.  All rights reserved.
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions
00006  * are met:
00007  *
00008  * 1.  Redistributions of source code must retain the above copyright
00009  *     notice, this list of conditions and the following disclaimer.
00010  * 2.  Redistributions in binary form must reproduce the above copyright
00011  *     notice, this list of conditions and the following disclaimer in the
00012  *     documentation and/or other materials provided with the distribution.
00013  * 3.  Neither the name of Pleyo nor the names of
00014  *     its contributors may be used to endorse or promote products derived
00015  *     from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
00018  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00019  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00020  * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
00021  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00022  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00023  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00024  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00026  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  */
00028  
00041 #ifndef BAL_CONFIGURATION_
00042 #define BAL_CONFIGURATION_
00043 
00044 #include <stdio.h>
00045 #include <stdlib.h>
00046 
00047 // must use log() to enable deactivation during LayoutTests
00048 #ifdef BAL_LOG
00049   #define BALNotImplemented() if (!getenv("LAYOUT_TEST") && getenv("NOT_IMPLEMENTED")) { printf("%s:%d:%s() Not implemented\n", __FILE__, __LINE__, __func__); }
00050 #else
00051   #define BALNotImplemented()
00052 #endif
00053 
00054 #include "RGBA32Array.h" // no forwarding due to typedef
00055 #include "BIWindowEvent.h" // need to include because of BIWindowEvent::ENUM_WINDOW use
00056 
00057 namespace WebCore {
00058     class FontDescription;
00059     class IntSize;
00060     class IntRect;
00061     class FormData;
00062     class KURL;
00063     class ResourceHandleClient;
00064     class String;
00065 }
00066 
00067 using WebCore::FormData;
00068 using WebCore::KURL;
00069 using WebCore::ResourceHandleClient;
00070 
00071 namespace BAL
00072 {
00073     class BIImageDecoder;
00074     class BIEventLoop;
00075     class BIWindow;
00076     class BTAffineTransform;
00077 
00078     // Decoders
00079     BIImageDecoder* createBCJPEGImageDecoder();
00080     BIImageDecoder* createBCPNGImageDecoder();
00081     BIImageDecoder* createBCGIFImageDecoder();
00082     inline BIImageDecoder* createBCBMPImageDecoder() { return 0; }
00083     void deleteBIImageDecoder( BIImageDecoder* );
00084 
00085     // Events
00086     class BIKeyboardEvent;
00087     BIEventLoop* getBIEventLoop();
00088     void deleteBIEventLoop();
00089     BIMouseEvent* createBIMouseEvent();
00090     BIWindowEvent* createBIWindowEvent(BIWindowEvent::ENUM_WINDOW, bool bGain,
00091        const WebCore::IntRect& rect, const BTWidget*);
00092     BIKeyboardEvent* createBIKeyboardEvent(  const WebCore::String& aText,
00093        const WebCore::String& aUnmodifiedText, const WebCore::String& aKeyIdentifier,
00094        bool bIsKeyUp, bool bShiftKey, bool bCtrlKey, bool bAltKey, bool bMetaKey, bool bIsAutoRepeat,
00095        int aVKey );
00096     BIEvent* createBITimerEvent();
00097 
00098     // Window
00099     class BIWindowManager;
00100 //    BIWindow* createBCWindowBal(int x, int y, int width, int height, int depth);
00101     BIWindowManager* getBIWindowManager();
00102     void deleteBIWindowManager();
00103 
00104     // Observer
00105     class BIObserver;
00106     class BIObserverService;
00107     BIObserverService* getBIObserverService();
00108     
00109     // ResourceHandleManager
00110     class BIResourceHandleManager;
00111     class BIResourceHandle;
00112     BIResourceHandleManager* getBIResourceHandleManager();
00113     void deleteBIResourceHandleManager();
00114     // BIResourceHandle* createBCResourceHandle removed because of a static create
00115 
00116 
00117     // Fonts
00118 //     class BIFontCache;
00119 //     class BIFontData;
00120     class BIFontPlatformDataPrivate;
00121     class BIGlyphBuffer;
00122 //     BIFontCache* getBIFontCache();
00123     BIGlyphBuffer* createBIGlyphBuffer();
00124     void deleteBIGlyphBuffer(BIGlyphBuffer*);
00125     BIFontPlatformDataPrivate* createBIFontPlatformDataPrivate();
00126     void deleteBIFontPlatformDataPrivate(BIFontPlatformDataPrivate* data);
00127 
00128     // Graphics
00129     class BIGraphicsContext;
00130     class BIGraphicsDevice;
00131     class BINativeImage;
00132     class BISurface;
00133     BIGraphicsContext* createRGBA32GraphicsContext(unsigned width, unsigned height);
00134     void deleteRGBA32GraphicsContext(BIGraphicsContext*);
00135 //    BINativeImage* createBCNativeImage(const RGBA32Array&, const WebCore::IntSize&);
00136 //    BINativeImage* createBCNativeImage(const WebCore::IntSize&);
00137     BIGraphicsContext* getBIGraphicsContext();
00138     BIGraphicsContext* createBIGraphicsContext();
00139     BIGraphicsContext* createFakeBIGraphicsContext();
00140     void deleteBIGraphicsContext(BIGraphicsContext*);
00141     BTAffineTransform &createBiAffineTransform();
00142     BTAffineTransform &createBiAffineTransform(double a, double b, double c, double d, double tx, double ty);
00143     BIGraphicsDevice* getBIGraphicsDevice();
00144     void deleteBIGraphicsDevice();
00145     
00146  
00147     // XML
00148     class BIXSLT;
00149     BIXSLT* createBIXSLT();
00150     class BIXML;
00151     BIXML* createBIXML();
00152 
00153     //Internationalization
00154     class BIInternationalization;
00155     BIInternationalization *getBIInternationalization();
00156 }
00157 
00158 // Bridge !
00159 // not in BAL namespace
00160 class BICookieJar;
00161 BICookieJar* getBICookieJar();
00162 void deleteBICookieJar(BICookieJar*);
00163 
00164 // Implementation of previous methods will be done
00165 // in the component itself, with this macro.
00166 
00167 #define IMPLEMENT_CREATE_DELETE(interfacename, classname) \
00168     namespace BAL { \
00169         interfacename* create##interfacename() { \
00170             return new classname(); \
00171         } \
00172         void delete##interfacename(interfacename* p) { \
00173             delete p; \
00174         } \
00175     }
00176 
00177 #define IMPLEMENT_GET_DELETE(interfacename, classname) \
00178     namespace BAL { \
00179         static interfacename* __##classname = 0; \
00180         interfacename* get##interfacename() { \
00181             if (__##classname) \
00182                 return __##classname; \
00183             else \
00184                 return __##classname = new classname(); \
00185         } \
00186         void delete##interfacename() { \
00187             if (__##classname) { \
00188                 delete __##classname; \
00189                 __##classname = NULL; \
00190             } \
00191         } \
00192     }
00193 
00194 #endif

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

pleyo.com
pleyo.com