00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00041 #ifndef BAL_CONFIGURATION_
00042 #define BAL_CONFIGURATION_
00043
00044 #include <stdio.h>
00045 #include <stdlib.h>
00046
00047
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"
00055 #include "BIWindowEvent.h"
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
00079 BIImageDecoder* createBCJPEGImageDecoder();
00080 BIImageDecoder* createBCPNGImageDecoder();
00081 BIImageDecoder* createBCGIFImageDecoder();
00082 inline BIImageDecoder* createBCBMPImageDecoder() { return 0; }
00083 void deleteBIImageDecoder( BIImageDecoder* );
00084
00085
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
00099 class BIWindowManager;
00100
00101 BIWindowManager* getBIWindowManager();
00102 void deleteBIWindowManager();
00103
00104
00105 class BIObserver;
00106 class BIObserverService;
00107 BIObserverService* getBIObserverService();
00108
00109
00110 class BIResourceHandleManager;
00111 class BIResourceHandle;
00112 BIResourceHandleManager* getBIResourceHandleManager();
00113 void deleteBIResourceHandleManager();
00114
00115
00116
00117
00118
00119
00120 class BIFontPlatformDataPrivate;
00121 class BIGlyphBuffer;
00122
00123 BIGlyphBuffer* createBIGlyphBuffer();
00124 void deleteBIGlyphBuffer(BIGlyphBuffer*);
00125 BIFontPlatformDataPrivate* createBIFontPlatformDataPrivate();
00126 void deleteBIFontPlatformDataPrivate(BIFontPlatformDataPrivate* data);
00127
00128
00129 class BIGraphicsContext;
00130 class BIGraphicsDevice;
00131 class BINativeImage;
00132 class BISurface;
00133 BIGraphicsContext* createRGBA32GraphicsContext(unsigned width, unsigned height);
00134 void deleteRGBA32GraphicsContext(BIGraphicsContext*);
00135
00136
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
00148 class BIXSLT;
00149 BIXSLT* createBIXSLT();
00150 class BIXML;
00151 BIXML* createBIXML();
00152
00153
00154 class BIInternationalization;
00155 BIInternationalization *getBIInternationalization();
00156 }
00157
00158
00159
00160 class BICookieJar;
00161 BICookieJar* getBICookieJar();
00162 void deleteBICookieJar(BICookieJar*);
00163
00164
00165
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